typescript 5.3.0-dev.20231010 → 5.3.0-dev.20231012
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 +90 -32
- package/lib/tsserver.js +136 -86
- package/lib/typescript.d.ts +0 -1
- package/lib/typescript.js +136 -86
- package/lib/typingsInstaller.js +39 -16
- package/package.json +4 -3
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.3";
|
|
57
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20231012`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -27367,7 +27367,7 @@ function formatExtensions(extensions) {
|
|
|
27367
27367
|
result.push("JSON");
|
|
27368
27368
|
return result.join(", ");
|
|
27369
27369
|
}
|
|
27370
|
-
function createResolvedModuleWithFailedLookupLocationsHandlingSymlink(moduleName, resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, state, legacyResult) {
|
|
27370
|
+
function createResolvedModuleWithFailedLookupLocationsHandlingSymlink(moduleName, resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, state, cache, legacyResult) {
|
|
27371
27371
|
if (!state.resultFromCache && !state.compilerOptions.preserveSymlinks && resolved && isExternalLibraryImport && !resolved.originalPath && !isExternalModuleNameRelative(moduleName)) {
|
|
27372
27372
|
const { resolvedFileName, originalPath } = getOriginalAndResolvedFileName(resolved.path, state.host, state.traceEnabled);
|
|
27373
27373
|
if (originalPath)
|
|
@@ -27380,15 +27380,25 @@ function createResolvedModuleWithFailedLookupLocationsHandlingSymlink(moduleName
|
|
|
27380
27380
|
affectingLocations,
|
|
27381
27381
|
diagnostics,
|
|
27382
27382
|
state.resultFromCache,
|
|
27383
|
+
cache,
|
|
27383
27384
|
legacyResult
|
|
27384
27385
|
);
|
|
27385
27386
|
}
|
|
27386
|
-
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache, legacyResult) {
|
|
27387
|
+
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache, cache, legacyResult) {
|
|
27387
27388
|
if (resultFromCache) {
|
|
27388
|
-
|
|
27389
|
-
|
|
27390
|
-
|
|
27391
|
-
|
|
27389
|
+
if (!(cache == null ? void 0 : cache.isReadonly)) {
|
|
27390
|
+
resultFromCache.failedLookupLocations = updateResolutionField(resultFromCache.failedLookupLocations, failedLookupLocations);
|
|
27391
|
+
resultFromCache.affectingLocations = updateResolutionField(resultFromCache.affectingLocations, affectingLocations);
|
|
27392
|
+
resultFromCache.resolutionDiagnostics = updateResolutionField(resultFromCache.resolutionDiagnostics, diagnostics);
|
|
27393
|
+
return resultFromCache;
|
|
27394
|
+
} else {
|
|
27395
|
+
return {
|
|
27396
|
+
...resultFromCache,
|
|
27397
|
+
failedLookupLocations: initializeResolutionFieldForReadonlyCache(resultFromCache.failedLookupLocations, failedLookupLocations),
|
|
27398
|
+
affectingLocations: initializeResolutionFieldForReadonlyCache(resultFromCache.affectingLocations, affectingLocations),
|
|
27399
|
+
resolutionDiagnostics: initializeResolutionFieldForReadonlyCache(resultFromCache.resolutionDiagnostics, diagnostics)
|
|
27400
|
+
};
|
|
27401
|
+
}
|
|
27392
27402
|
}
|
|
27393
27403
|
return {
|
|
27394
27404
|
resolvedModule: resolved && {
|
|
@@ -27416,6 +27426,13 @@ function updateResolutionField(to, value) {
|
|
|
27416
27426
|
to.push(...value);
|
|
27417
27427
|
return to;
|
|
27418
27428
|
}
|
|
27429
|
+
function initializeResolutionFieldForReadonlyCache(fromCache, value) {
|
|
27430
|
+
if (!(fromCache == null ? void 0 : fromCache.length))
|
|
27431
|
+
return initializeResolutionField(value);
|
|
27432
|
+
if (!value.length)
|
|
27433
|
+
return fromCache.slice();
|
|
27434
|
+
return [...fromCache, ...value];
|
|
27435
|
+
}
|
|
27419
27436
|
function readPackageJsonField(jsonContent, fieldName, typeOfTag, state) {
|
|
27420
27437
|
if (!hasProperty(jsonContent, fieldName)) {
|
|
27421
27438
|
if (state.traceEnabled) {
|
|
@@ -27637,9 +27654,11 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca
|
|
|
27637
27654
|
if (result && result.resolvedModule)
|
|
27638
27655
|
(_b = perfLogger) == null ? void 0 : _b.logInfoEvent(`Module "${moduleName}" resolved to "${result.resolvedModule.resolvedFileName}"`);
|
|
27639
27656
|
(_c = perfLogger) == null ? void 0 : _c.logStopResolveModule(result && result.resolvedModule ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
27640
|
-
cache
|
|
27641
|
-
|
|
27642
|
-
|
|
27657
|
+
if (cache && !cache.isReadonly) {
|
|
27658
|
+
cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(moduleName, resolutionMode, result);
|
|
27659
|
+
if (!isExternalModuleNameRelative(moduleName)) {
|
|
27660
|
+
cache.getOrCreateCacheForNonRelativeName(moduleName, resolutionMode, redirectedReference).set(containingDirectory, result);
|
|
27661
|
+
}
|
|
27643
27662
|
}
|
|
27644
27663
|
}
|
|
27645
27664
|
if (traceEnabled) {
|
|
@@ -27923,6 +27942,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
|
|
|
27923
27942
|
affectingLocations,
|
|
27924
27943
|
diagnostics,
|
|
27925
27944
|
state,
|
|
27945
|
+
cache,
|
|
27926
27946
|
legacyResult
|
|
27927
27947
|
);
|
|
27928
27948
|
function tryResolve(extensions2, state2) {
|
|
@@ -28186,7 +28206,7 @@ function getVersionPathsOfPackageJsonInfo(packageJsonInfo, state) {
|
|
|
28186
28206
|
return packageJsonInfo.contents.versionPaths || void 0;
|
|
28187
28207
|
}
|
|
28188
28208
|
function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) {
|
|
28189
|
-
var _a, _b, _c, _d, _e, _f
|
|
28209
|
+
var _a, _b, _c, _d, _e, _f;
|
|
28190
28210
|
const { host, traceEnabled } = state;
|
|
28191
28211
|
const packageJsonPath = combinePaths(packageDirectory, "package.json");
|
|
28192
28212
|
if (onlyRecordFailures) {
|
|
@@ -28214,15 +28234,17 @@ function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) {
|
|
|
28214
28234
|
trace(host, Diagnostics.Found_package_json_at_0, packageJsonPath);
|
|
28215
28235
|
}
|
|
28216
28236
|
const result = { packageDirectory, contents: { packageJsonContent, versionPaths: void 0, resolvedEntrypoints: void 0 } };
|
|
28217
|
-
(
|
|
28218
|
-
|
|
28237
|
+
if (state.packageJsonInfoCache && !state.packageJsonInfoCache.isReadonly)
|
|
28238
|
+
state.packageJsonInfoCache.setPackageJsonInfo(packageJsonPath, result);
|
|
28239
|
+
(_e = state.affectingLocations) == null ? void 0 : _e.push(packageJsonPath);
|
|
28219
28240
|
return result;
|
|
28220
28241
|
} else {
|
|
28221
28242
|
if (directoryExists && traceEnabled) {
|
|
28222
28243
|
trace(host, Diagnostics.File_0_does_not_exist, packageJsonPath);
|
|
28223
28244
|
}
|
|
28224
|
-
(
|
|
28225
|
-
|
|
28245
|
+
if (state.packageJsonInfoCache && !state.packageJsonInfoCache.isReadonly)
|
|
28246
|
+
state.packageJsonInfoCache.setPackageJsonInfo(packageJsonPath, directoryExists);
|
|
28247
|
+
(_f = state.failedLookupLocations) == null ? void 0 : _f.push(packageJsonPath);
|
|
28226
28248
|
}
|
|
28227
28249
|
}
|
|
28228
28250
|
function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, jsonContent, versionPaths) {
|
|
@@ -28999,7 +29021,8 @@ function classicNameResolver(moduleName, containingFile, compilerOptions, host,
|
|
|
28999
29021
|
failedLookupLocations,
|
|
29000
29022
|
affectingLocations,
|
|
29001
29023
|
diagnostics,
|
|
29002
|
-
state
|
|
29024
|
+
state,
|
|
29025
|
+
cache
|
|
29003
29026
|
);
|
|
29004
29027
|
function tryResolve(extensions) {
|
|
29005
29028
|
const resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFileNoPackageId, state);
|
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.3.0-dev.
|
|
5
|
+
"version": "5.3.0-dev.20231012",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -106,12 +106,13 @@
|
|
|
106
106
|
"buffer": false,
|
|
107
107
|
"@microsoft/typescript-etw": false,
|
|
108
108
|
"source-map-support": false,
|
|
109
|
-
"inspector": false
|
|
109
|
+
"inspector": false,
|
|
110
|
+
"perf_hooks": false
|
|
110
111
|
},
|
|
111
112
|
"packageManager": "npm@8.19.4",
|
|
112
113
|
"volta": {
|
|
113
114
|
"node": "20.1.0",
|
|
114
115
|
"npm": "8.19.4"
|
|
115
116
|
},
|
|
116
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "a8546cec3da7ff578ecf7a4ea1cd523e1a1ef54a"
|
|
117
118
|
}
|