Skip to content

Commit d701d90

Browse files
Bump version to 5.7.2 and LKG
1 parent 0503a63 commit d701d90

File tree

6 files changed

+22
-59
lines changed

6 files changed

+22
-59
lines changed

Diff for: lib/_tsc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ and limitations under the License.
1818

1919
// src/compiler/corePublic.ts
2020
var versionMajorMinor = "5.7";
21-
var version = "5.7.1-rc";
21+
var version = "5.7.2";
2222

2323
// src/compiler/core.ts
2424
var emptyArray = [];

Diff for: lib/typescript.d.ts

-11
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ declare namespace ts {
123123
ProvideInlayHints = "provideInlayHints",
124124
WatchChange = "watchChange",
125125
MapCode = "mapCode",
126-
CopilotRelated = "copilotRelated",
127126
}
128127
/**
129128
* A TypeScript Server message
@@ -1831,16 +1830,6 @@ declare namespace ts {
18311830
export interface MapCodeResponse extends Response {
18321831
body: readonly FileCodeEdits[];
18331832
}
1834-
export interface CopilotRelatedRequest extends FileRequest {
1835-
command: CommandTypes.CopilotRelated;
1836-
arguments: FileRequestArgs;
1837-
}
1838-
export interface CopilotRelatedItems {
1839-
relatedFiles: readonly string[];
1840-
}
1841-
export interface CopilotRelatedResponse extends Response {
1842-
body: CopilotRelatedItems;
1843-
}
18441833
/**
18451834
* Synchronous request for semantic diagnostics of one file.
18461835
*/

Diff for: lib/typescript.js

+17-43
Original file line numberDiff line numberDiff line change
@@ -2278,7 +2278,7 @@ module.exports = __toCommonJS(typescript_exports);
22782278

22792279
// src/compiler/corePublic.ts
22802280
var versionMajorMinor = "5.7";
2281-
var version = "5.7.1-rc";
2281+
var version = "5.7.2";
22822282
var Comparison = /* @__PURE__ */ ((Comparison3) => {
22832283
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
22842284
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -146430,23 +146430,22 @@ function getUsageInfo(oldFile, toMove, checker, existingTargetLocals = /* @__PUR
146430146430
const unusedImportsFromOldFile = /* @__PURE__ */ new Set();
146431146431
for (const statement of toMove) {
146432146432
forEachReference(statement, checker, enclosingRange, (symbol, isValidTypeOnlyUseSite) => {
146433-
if (!symbol.declarations || isGlobalType(checker, symbol)) {
146433+
if (!symbol.declarations) {
146434146434
return;
146435146435
}
146436146436
if (existingTargetLocals.has(skipAlias(symbol, checker))) {
146437146437
unusedImportsFromOldFile.add(symbol);
146438146438
return;
146439146439
}
146440-
for (const decl of symbol.declarations) {
146441-
if (isInImport(decl)) {
146442-
const prevIsTypeOnly = oldImportsNeededByTargetFile.get(symbol);
146443-
oldImportsNeededByTargetFile.set(symbol, [
146444-
prevIsTypeOnly === void 0 ? isValidTypeOnlyUseSite : prevIsTypeOnly && isValidTypeOnlyUseSite,
146445-
tryCast(decl, (d) => isImportSpecifier(d) || isImportClause(d) || isNamespaceImport(d) || isImportEqualsDeclaration(d) || isBindingElement(d) || isVariableDeclaration(d))
146446-
]);
146447-
} else if (isTopLevelDeclaration(decl) && sourceFileOfTopLevelDeclaration(decl) === oldFile && !movedSymbols.has(symbol)) {
146448-
targetFileImportsFromOldFile.set(symbol, isValidTypeOnlyUseSite);
146449-
}
146440+
const importedDeclaration = find(symbol.declarations, isInImport);
146441+
if (importedDeclaration) {
146442+
const prevIsTypeOnly = oldImportsNeededByTargetFile.get(symbol);
146443+
oldImportsNeededByTargetFile.set(symbol, [
146444+
prevIsTypeOnly === void 0 ? isValidTypeOnlyUseSite : prevIsTypeOnly && isValidTypeOnlyUseSite,
146445+
tryCast(importedDeclaration, (d) => isImportSpecifier(d) || isImportClause(d) || isNamespaceImport(d) || isImportEqualsDeclaration(d) || isBindingElement(d) || isVariableDeclaration(d))
146446+
]);
146447+
} else if (!movedSymbols.has(symbol) && every(symbol.declarations, (decl) => isTopLevelDeclaration(decl) && sourceFileOfTopLevelDeclaration(decl) === oldFile)) {
146448+
targetFileImportsFromOldFile.set(symbol, isValidTypeOnlyUseSite);
146450146449
}
146451146450
});
146452146451
}
@@ -146480,16 +146479,6 @@ function getUsageInfo(oldFile, toMove, checker, existingTargetLocals = /* @__PUR
146480146479
return !!jsxNamespaceSymbol2 && some(jsxNamespaceSymbol2.declarations, isInImport) ? jsxNamespaceSymbol2 : void 0;
146481146480
}
146482146481
}
146483-
function isGlobalType(checker, symbol) {
146484-
return !!checker.resolveName(
146485-
symbol.name,
146486-
/*location*/
146487-
void 0,
146488-
788968 /* Type */,
146489-
/*excludeGlobals*/
146490-
false
146491-
);
146492-
}
146493146482
function makeUniqueFilename(proposedFilename, extension, inDirectory, host) {
146494146483
let newFilename = proposedFilename;
146495146484
for (let i = 1; ; i++) {
@@ -151312,8 +151301,7 @@ var invalidOperationsInPartialSemanticMode = [
151312151301
"provideCallHierarchyOutgoingCalls",
151313151302
"provideInlayHints",
151314151303
"getSupportedCodeFixes",
151315-
"getPasteEdits",
151316-
"getImports"
151304+
"getPasteEdits"
151317151305
];
151318151306
var invalidOperationsInSyntacticMode = [
151319151307
...invalidOperationsInPartialSemanticMode,
@@ -152565,18 +152553,6 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
152565152553
preferences
152566152554
);
152567152555
}
152568-
function getImports(fileName) {
152569-
var _a2, _b;
152570-
synchronizeHostData();
152571-
const file = getValidSourceFile(fileName);
152572-
let imports;
152573-
for (const specifier of file.imports) {
152574-
if (nodeIsSynthesized(specifier)) continue;
152575-
const name = (_b = (_a2 = program.getResolvedModuleFromModuleSpecifier(specifier, file)) == null ? void 0 : _a2.resolvedModule) == null ? void 0 : _b.resolvedFileName;
152576-
if (name) (imports ?? (imports = /* @__PURE__ */ new Set())).add(name);
152577-
}
152578-
return imports ? arrayFrom(imports) : emptyArray;
152579-
}
152580152556
const ls = {
152581152557
dispose,
152582152558
cleanupSemanticCache,
@@ -152650,8 +152626,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
152650152626
getSupportedCodeFixes,
152651152627
preparePasteEditsForFile,
152652152628
getPasteEdits,
152653-
mapCode: mapCode2,
152654-
getImports
152629+
mapCode: mapCode2
152655152630
};
152656152631
switch (languageServiceMode) {
152657152632
case 0 /* Semantic */:
@@ -193108,8 +193083,8 @@ var Session3 = class _Session {
193108193083
["mapCode" /* MapCode */]: (request) => {
193109193084
return this.requiredResponse(this.mapCode(request.arguments));
193110193085
},
193111-
["copilotRelated" /* CopilotRelated */]: (request) => {
193112-
return this.requiredResponse(this.getCopilotRelatedInfo(request.arguments));
193086+
["copilotRelated" /* CopilotRelated */]: () => {
193087+
return this.requiredResponse(this.getCopilotRelatedInfo());
193113193088
}
193114193089
}));
193115193090
this.host = opts.host;
@@ -194057,10 +194032,9 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
194057194032
const changes = languageService.mapCode(file, args.mapping.contents, focusLocations, formatOptions, preferences);
194058194033
return this.mapTextChangesToCodeEdits(changes);
194059194034
}
194060-
getCopilotRelatedInfo(args) {
194061-
const { file, project } = this.getFileAndProject(args);
194035+
getCopilotRelatedInfo() {
194062194036
return {
194063-
relatedFiles: project.getLanguageService().getImports(file)
194037+
relatedFiles: []
194064194038
};
194065194039
}
194066194040
setCompilerOptionsForInferredProjects(args) {

Diff for: package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "typescript",
33
"author": "Microsoft Corp.",
44
"homepage": "https://www.typescriptlang.org/",
5-
"version": "5.7.1-rc",
5+
"version": "5.7.2",
66
"license": "Apache-2.0",
77
"description": "TypeScript is a language for application scale JavaScript development",
88
"keywords": [

Diff for: src/compiler/corePublic.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
export const versionMajorMinor = "5.7";
44
// The following is baselined as a literal template type without intervention
55
/** The version of the TypeScript compiler release */
6-
export const version = "5.7.1-rc" as string;
6+
export const version = "5.7.2" as string;
77

88
/**
99
* Type of objects whose values are all of the same type.

0 commit comments

Comments
 (0)