typescript 5.7.1-rc → 5.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/_tsc.js +1 -1
- package/lib/typescript.d.ts +0 -11
- package/lib/typescript.js +17 -43
- package/package.json +2 -2
package/lib/_tsc.js
CHANGED
package/lib/typescript.d.ts
CHANGED
@@ -123,7 +123,6 @@ declare namespace ts {
|
|
123
123
|
ProvideInlayHints = "provideInlayHints",
|
124
124
|
WatchChange = "watchChange",
|
125
125
|
MapCode = "mapCode",
|
126
|
-
CopilotRelated = "copilotRelated",
|
127
126
|
}
|
128
127
|
/**
|
129
128
|
* A TypeScript Server message
|
@@ -1831,16 +1830,6 @@ declare namespace ts {
|
|
1831
1830
|
export interface MapCodeResponse extends Response {
|
1832
1831
|
body: readonly FileCodeEdits[];
|
1833
1832
|
}
|
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
|
-
}
|
1844
1833
|
/**
|
1845
1834
|
* Synchronous request for semantic diagnostics of one file.
|
1846
1835
|
*/
|
package/lib/typescript.js
CHANGED
@@ -2278,7 +2278,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
2278
2278
|
|
2279
2279
|
// src/compiler/corePublic.ts
|
2280
2280
|
var versionMajorMinor = "5.7";
|
2281
|
-
var version = "5.7.
|
2281
|
+
var version = "5.7.2";
|
2282
2282
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
2283
2283
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
2284
2284
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
@@ -146430,23 +146430,22 @@ function getUsageInfo(oldFile, toMove, checker, existingTargetLocals = /* @__PUR
|
|
146430
146430
|
const unusedImportsFromOldFile = /* @__PURE__ */ new Set();
|
146431
146431
|
for (const statement of toMove) {
|
146432
146432
|
forEachReference(statement, checker, enclosingRange, (symbol, isValidTypeOnlyUseSite) => {
|
146433
|
-
if (!symbol.declarations
|
146433
|
+
if (!symbol.declarations) {
|
146434
146434
|
return;
|
146435
146435
|
}
|
146436
146436
|
if (existingTargetLocals.has(skipAlias(symbol, checker))) {
|
146437
146437
|
unusedImportsFromOldFile.add(symbol);
|
146438
146438
|
return;
|
146439
146439
|
}
|
146440
|
-
|
146441
|
-
|
146442
|
-
|
146443
|
-
|
146444
|
-
|
146445
|
-
|
146446
|
-
|
146447
|
-
|
146448
|
-
|
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);
|
146450
146449
|
}
|
146451
146450
|
});
|
146452
146451
|
}
|
@@ -146480,16 +146479,6 @@ function getUsageInfo(oldFile, toMove, checker, existingTargetLocals = /* @__PUR
|
|
146480
146479
|
return !!jsxNamespaceSymbol2 && some(jsxNamespaceSymbol2.declarations, isInImport) ? jsxNamespaceSymbol2 : void 0;
|
146481
146480
|
}
|
146482
146481
|
}
|
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
|
-
}
|
146493
146482
|
function makeUniqueFilename(proposedFilename, extension, inDirectory, host) {
|
146494
146483
|
let newFilename = proposedFilename;
|
146495
146484
|
for (let i = 1; ; i++) {
|
@@ -151312,8 +151301,7 @@ var invalidOperationsInPartialSemanticMode = [
|
|
151312
151301
|
"provideCallHierarchyOutgoingCalls",
|
151313
151302
|
"provideInlayHints",
|
151314
151303
|
"getSupportedCodeFixes",
|
151315
|
-
"getPasteEdits"
|
151316
|
-
"getImports"
|
151304
|
+
"getPasteEdits"
|
151317
151305
|
];
|
151318
151306
|
var invalidOperationsInSyntacticMode = [
|
151319
151307
|
...invalidOperationsInPartialSemanticMode,
|
@@ -152565,18 +152553,6 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
|
|
152565
152553
|
preferences
|
152566
152554
|
);
|
152567
152555
|
}
|
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
|
-
}
|
152580
152556
|
const ls = {
|
152581
152557
|
dispose,
|
152582
152558
|
cleanupSemanticCache,
|
@@ -152650,8 +152626,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
|
|
152650
152626
|
getSupportedCodeFixes,
|
152651
152627
|
preparePasteEditsForFile,
|
152652
152628
|
getPasteEdits,
|
152653
|
-
mapCode: mapCode2
|
152654
|
-
getImports
|
152629
|
+
mapCode: mapCode2
|
152655
152630
|
};
|
152656
152631
|
switch (languageServiceMode) {
|
152657
152632
|
case 0 /* Semantic */:
|
@@ -193108,8 +193083,8 @@ var Session3 = class _Session {
|
|
193108
193083
|
["mapCode" /* MapCode */]: (request) => {
|
193109
193084
|
return this.requiredResponse(this.mapCode(request.arguments));
|
193110
193085
|
},
|
193111
|
-
["copilotRelated" /* CopilotRelated */]: (
|
193112
|
-
return this.requiredResponse(this.getCopilotRelatedInfo(
|
193086
|
+
["copilotRelated" /* CopilotRelated */]: () => {
|
193087
|
+
return this.requiredResponse(this.getCopilotRelatedInfo());
|
193113
193088
|
}
|
193114
193089
|
}));
|
193115
193090
|
this.host = opts.host;
|
@@ -194057,10 +194032,9 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
194057
194032
|
const changes = languageService.mapCode(file, args.mapping.contents, focusLocations, formatOptions, preferences);
|
194058
194033
|
return this.mapTextChangesToCodeEdits(changes);
|
194059
194034
|
}
|
194060
|
-
getCopilotRelatedInfo(
|
194061
|
-
const { file, project } = this.getFileAndProject(args);
|
194035
|
+
getCopilotRelatedInfo() {
|
194062
194036
|
return {
|
194063
|
-
relatedFiles:
|
194037
|
+
relatedFiles: []
|
194064
194038
|
};
|
194065
194039
|
}
|
194066
194040
|
setCompilerOptionsForInferredProjects(args) {
|
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "typescript",
|
3
3
|
"author": "Microsoft Corp.",
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
5
|
-
"version": "5.7.
|
5
|
+
"version": "5.7.2",
|
6
6
|
"license": "Apache-2.0",
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
8
8
|
"keywords": [
|
@@ -116,5 +116,5 @@
|
|
116
116
|
"node": "20.1.0",
|
117
117
|
"npm": "8.19.4"
|
118
118
|
},
|
119
|
-
"gitHead": "
|
119
|
+
"gitHead": "d701d908d534e68cfab24b6df15539014ac348a3"
|
120
120
|
}
|