Skip to content

Commit

Permalink
Bump version to 5.7.2 and LKG
Browse files Browse the repository at this point in the history
  • Loading branch information
typescript-bot committed Nov 21, 2024
1 parent 0503a63 commit d701d90
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 59 deletions.
2 changes: 1 addition & 1 deletion lib/_tsc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ and limitations under the License.

// src/compiler/corePublic.ts
var versionMajorMinor = "5.7";
var version = "5.7.1-rc";
var version = "5.7.2";

// src/compiler/core.ts
var emptyArray = [];
Expand Down
11 changes: 0 additions & 11 deletions lib/typescript.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ declare namespace ts {
ProvideInlayHints = "provideInlayHints",
WatchChange = "watchChange",
MapCode = "mapCode",
CopilotRelated = "copilotRelated",
}
/**
* A TypeScript Server message
Expand Down Expand Up @@ -1831,16 +1830,6 @@ declare namespace ts {
export interface MapCodeResponse extends Response {
body: readonly FileCodeEdits[];
}
export interface CopilotRelatedRequest extends FileRequest {
command: CommandTypes.CopilotRelated;
arguments: FileRequestArgs;
}
export interface CopilotRelatedItems {
relatedFiles: readonly string[];
}
export interface CopilotRelatedResponse extends Response {
body: CopilotRelatedItems;
}
/**
* Synchronous request for semantic diagnostics of one file.
*/
Expand Down
60 changes: 17 additions & 43 deletions lib/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -2278,7 +2278,7 @@ module.exports = __toCommonJS(typescript_exports);

// src/compiler/corePublic.ts
var versionMajorMinor = "5.7";
var version = "5.7.1-rc";
var version = "5.7.2";
var Comparison = /* @__PURE__ */ ((Comparison3) => {
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
Expand Down Expand Up @@ -146430,23 +146430,22 @@ function getUsageInfo(oldFile, toMove, checker, existingTargetLocals = /* @__PUR
const unusedImportsFromOldFile = /* @__PURE__ */ new Set();
for (const statement of toMove) {
forEachReference(statement, checker, enclosingRange, (symbol, isValidTypeOnlyUseSite) => {
if (!symbol.declarations || isGlobalType(checker, symbol)) {
if (!symbol.declarations) {
return;
}
if (existingTargetLocals.has(skipAlias(symbol, checker))) {
unusedImportsFromOldFile.add(symbol);
return;
}
for (const decl of symbol.declarations) {
if (isInImport(decl)) {
const prevIsTypeOnly = oldImportsNeededByTargetFile.get(symbol);
oldImportsNeededByTargetFile.set(symbol, [
prevIsTypeOnly === void 0 ? isValidTypeOnlyUseSite : prevIsTypeOnly && isValidTypeOnlyUseSite,
tryCast(decl, (d) => isImportSpecifier(d) || isImportClause(d) || isNamespaceImport(d) || isImportEqualsDeclaration(d) || isBindingElement(d) || isVariableDeclaration(d))
]);
} else if (isTopLevelDeclaration(decl) && sourceFileOfTopLevelDeclaration(decl) === oldFile && !movedSymbols.has(symbol)) {
targetFileImportsFromOldFile.set(symbol, isValidTypeOnlyUseSite);
}
const importedDeclaration = find(symbol.declarations, isInImport);
if (importedDeclaration) {
const prevIsTypeOnly = oldImportsNeededByTargetFile.get(symbol);
oldImportsNeededByTargetFile.set(symbol, [
prevIsTypeOnly === void 0 ? isValidTypeOnlyUseSite : prevIsTypeOnly && isValidTypeOnlyUseSite,
tryCast(importedDeclaration, (d) => isImportSpecifier(d) || isImportClause(d) || isNamespaceImport(d) || isImportEqualsDeclaration(d) || isBindingElement(d) || isVariableDeclaration(d))
]);
} else if (!movedSymbols.has(symbol) && every(symbol.declarations, (decl) => isTopLevelDeclaration(decl) && sourceFileOfTopLevelDeclaration(decl) === oldFile)) {
targetFileImportsFromOldFile.set(symbol, isValidTypeOnlyUseSite);
}
});
}
Expand Down Expand Up @@ -146480,16 +146479,6 @@ function getUsageInfo(oldFile, toMove, checker, existingTargetLocals = /* @__PUR
return !!jsxNamespaceSymbol2 && some(jsxNamespaceSymbol2.declarations, isInImport) ? jsxNamespaceSymbol2 : void 0;
}
}
function isGlobalType(checker, symbol) {
return !!checker.resolveName(
symbol.name,
/*location*/
void 0,
788968 /* Type */,
/*excludeGlobals*/
false
);
}
function makeUniqueFilename(proposedFilename, extension, inDirectory, host) {
let newFilename = proposedFilename;
for (let i = 1; ; i++) {
Expand Down Expand Up @@ -151312,8 +151301,7 @@ var invalidOperationsInPartialSemanticMode = [
"provideCallHierarchyOutgoingCalls",
"provideInlayHints",
"getSupportedCodeFixes",
"getPasteEdits",
"getImports"
"getPasteEdits"
];
var invalidOperationsInSyntacticMode = [
...invalidOperationsInPartialSemanticMode,
Expand Down Expand Up @@ -152565,18 +152553,6 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
preferences
);
}
function getImports(fileName) {
var _a2, _b;
synchronizeHostData();
const file = getValidSourceFile(fileName);
let imports;
for (const specifier of file.imports) {
if (nodeIsSynthesized(specifier)) continue;
const name = (_b = (_a2 = program.getResolvedModuleFromModuleSpecifier(specifier, file)) == null ? void 0 : _a2.resolvedModule) == null ? void 0 : _b.resolvedFileName;
if (name) (imports ?? (imports = /* @__PURE__ */ new Set())).add(name);
}
return imports ? arrayFrom(imports) : emptyArray;
}
const ls = {
dispose,
cleanupSemanticCache,
Expand Down Expand Up @@ -152650,8 +152626,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
getSupportedCodeFixes,
preparePasteEditsForFile,
getPasteEdits,
mapCode: mapCode2,
getImports
mapCode: mapCode2
};
switch (languageServiceMode) {
case 0 /* Semantic */:
Expand Down Expand Up @@ -193108,8 +193083,8 @@ var Session3 = class _Session {
["mapCode" /* MapCode */]: (request) => {
return this.requiredResponse(this.mapCode(request.arguments));
},
["copilotRelated" /* CopilotRelated */]: (request) => {
return this.requiredResponse(this.getCopilotRelatedInfo(request.arguments));
["copilotRelated" /* CopilotRelated */]: () => {
return this.requiredResponse(this.getCopilotRelatedInfo());
}
}));
this.host = opts.host;
Expand Down Expand Up @@ -194057,10 +194032,9 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
const changes = languageService.mapCode(file, args.mapping.contents, focusLocations, formatOptions, preferences);
return this.mapTextChangesToCodeEdits(changes);
}
getCopilotRelatedInfo(args) {
const { file, project } = this.getFileAndProject(args);
getCopilotRelatedInfo() {
return {
relatedFiles: project.getLanguageService().getImports(file)
relatedFiles: []
};
}
setCompilerOptionsForInferredProjects(args) {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "typescript",
"author": "Microsoft Corp.",
"homepage": "https://www.typescriptlang.org/",
"version": "5.7.1-rc",
"version": "5.7.2",
"license": "Apache-2.0",
"description": "TypeScript is a language for application scale JavaScript development",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/corePublic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
export const versionMajorMinor = "5.7";
// The following is baselined as a literal template type without intervention
/** The version of the TypeScript compiler release */
export const version = "5.7.1-rc" as string;
export const version = "5.7.2" as string;

/**
* Type of objects whose values are all of the same type.
Expand Down

0 comments on commit d701d90

Please sign in to comment.