typescript 5.4.0-dev.20231127 → 5.4.0-dev.20231129
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 +224 -174
- package/lib/tsserver.js +415 -305
- package/lib/typescript.js +413 -304
- package/lib/typingsInstaller.js +32 -19
- package/package.json +3 -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.4";
|
|
57
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20231129`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -23028,8 +23028,9 @@ var Parser;
|
|
|
23028
23028
|
function nextTokenIsStringLiteral() {
|
|
23029
23029
|
return nextToken() === 11 /* StringLiteral */;
|
|
23030
23030
|
}
|
|
23031
|
-
function
|
|
23032
|
-
|
|
23031
|
+
function nextTokenIsFromKeywordOrEqualsToken() {
|
|
23032
|
+
nextToken();
|
|
23033
|
+
return token() === 161 /* FromKeyword */ || token() === 64 /* EqualsToken */;
|
|
23033
23034
|
}
|
|
23034
23035
|
function nextTokenIsIdentifierOrStringLiteralOnSameLine() {
|
|
23035
23036
|
nextToken();
|
|
@@ -23726,7 +23727,7 @@ var Parser;
|
|
|
23726
23727
|
identifier = parseIdentifier();
|
|
23727
23728
|
}
|
|
23728
23729
|
let isTypeOnly = false;
|
|
23729
|
-
if ((identifier == null ? void 0 : identifier.escapedText) === "type" && (token() !== 161 /* FromKeyword */ || isIdentifier2() && lookAhead(
|
|
23730
|
+
if ((identifier == null ? void 0 : identifier.escapedText) === "type" && (token() !== 161 /* FromKeyword */ || isIdentifier2() && lookAhead(nextTokenIsFromKeywordOrEqualsToken)) && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) {
|
|
23730
23731
|
isTypeOnly = true;
|
|
23731
23732
|
identifier = isIdentifier2() ? parseIdentifier() : void 0;
|
|
23732
23733
|
}
|
|
@@ -24509,18 +24510,7 @@ var Parser;
|
|
|
24509
24510
|
}
|
|
24510
24511
|
nextTokenJSDoc();
|
|
24511
24512
|
skipWhitespace();
|
|
24512
|
-
const
|
|
24513
|
-
let name = tokenIsIdentifierOrKeyword(token()) ? parseEntityName(
|
|
24514
|
-
/*allowReservedWords*/
|
|
24515
|
-
true
|
|
24516
|
-
) : void 0;
|
|
24517
|
-
if (name) {
|
|
24518
|
-
while (token() === 81 /* PrivateIdentifier */) {
|
|
24519
|
-
reScanHashToken();
|
|
24520
|
-
nextTokenJSDoc();
|
|
24521
|
-
name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), p2);
|
|
24522
|
-
}
|
|
24523
|
-
}
|
|
24513
|
+
const name = parseJSDocLinkName();
|
|
24524
24514
|
const text = [];
|
|
24525
24515
|
while (token() !== 20 /* CloseBraceToken */ && token() !== 4 /* NewLineTrivia */ && token() !== 1 /* EndOfFileToken */) {
|
|
24526
24516
|
text.push(scanner.getTokenText());
|
|
@@ -24529,6 +24519,26 @@ var Parser;
|
|
|
24529
24519
|
const create = linkType === "link" ? factory2.createJSDocLink : linkType === "linkcode" ? factory2.createJSDocLinkCode : factory2.createJSDocLinkPlain;
|
|
24530
24520
|
return finishNode(create(name, text.join("")), start2, scanner.getTokenEnd());
|
|
24531
24521
|
}
|
|
24522
|
+
function parseJSDocLinkName() {
|
|
24523
|
+
if (tokenIsIdentifierOrKeyword(token())) {
|
|
24524
|
+
const pos = getNodePos();
|
|
24525
|
+
let name = parseIdentifierName();
|
|
24526
|
+
while (parseOptional(25 /* DotToken */)) {
|
|
24527
|
+
name = finishNode(factory2.createQualifiedName(name, token() === 81 /* PrivateIdentifier */ ? createMissingNode(
|
|
24528
|
+
80 /* Identifier */,
|
|
24529
|
+
/*reportAtCurrentPosition*/
|
|
24530
|
+
false
|
|
24531
|
+
) : parseIdentifier()), pos);
|
|
24532
|
+
}
|
|
24533
|
+
while (token() === 81 /* PrivateIdentifier */) {
|
|
24534
|
+
reScanHashToken();
|
|
24535
|
+
nextTokenJSDoc();
|
|
24536
|
+
name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), pos);
|
|
24537
|
+
}
|
|
24538
|
+
return name;
|
|
24539
|
+
}
|
|
24540
|
+
return void 0;
|
|
24541
|
+
}
|
|
24532
24542
|
function parseJSDocLinkPrefix() {
|
|
24533
24543
|
skipWhitespaceOrAsterisk();
|
|
24534
24544
|
if (token() === 19 /* OpenBraceToken */ && nextTokenJSDoc() === 60 /* AtToken */ && tokenIsIdentifierOrKeyword(nextTokenJSDoc())) {
|
|
@@ -27630,6 +27640,9 @@ function getConditions(options, resolutionMode) {
|
|
|
27630
27640
|
}
|
|
27631
27641
|
return concatenate(conditions, options.customConditions);
|
|
27632
27642
|
}
|
|
27643
|
+
function isPackageJsonInfo(entry) {
|
|
27644
|
+
return !!(entry == null ? void 0 : entry.contents);
|
|
27645
|
+
}
|
|
27633
27646
|
function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
27634
27647
|
var _a, _b, _c;
|
|
27635
27648
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
@@ -28257,13 +28270,13 @@ function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) {
|
|
|
28257
28270
|
}
|
|
28258
28271
|
const existing = (_b = state.packageJsonInfoCache) == null ? void 0 : _b.getPackageJsonInfo(packageJsonPath);
|
|
28259
28272
|
if (existing !== void 0) {
|
|
28260
|
-
if (
|
|
28273
|
+
if (isPackageJsonInfo(existing)) {
|
|
28261
28274
|
if (traceEnabled)
|
|
28262
28275
|
trace(host, Diagnostics.File_0_exists_according_to_earlier_cached_lookups, packageJsonPath);
|
|
28263
28276
|
(_c = state.affectingLocations) == null ? void 0 : _c.push(packageJsonPath);
|
|
28264
28277
|
return existing.packageDirectory === packageDirectory ? existing : { packageDirectory, contents: existing.contents };
|
|
28265
28278
|
} else {
|
|
28266
|
-
if (existing && traceEnabled)
|
|
28279
|
+
if (existing.directoryExists && traceEnabled)
|
|
28267
28280
|
trace(host, Diagnostics.File_0_does_not_exist_according_to_earlier_cached_lookups, packageJsonPath);
|
|
28268
28281
|
(_d = state.failedLookupLocations) == null ? void 0 : _d.push(packageJsonPath);
|
|
28269
28282
|
return void 0;
|
|
@@ -28285,7 +28298,7 @@ function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) {
|
|
|
28285
28298
|
trace(host, Diagnostics.File_0_does_not_exist, packageJsonPath);
|
|
28286
28299
|
}
|
|
28287
28300
|
if (state.packageJsonInfoCache && !state.packageJsonInfoCache.isReadonly)
|
|
28288
|
-
state.packageJsonInfoCache.setPackageJsonInfo(packageJsonPath, directoryExists);
|
|
28301
|
+
state.packageJsonInfoCache.setPackageJsonInfo(packageJsonPath, { packageDirectory, directoryExists });
|
|
28289
28302
|
(_f = state.failedLookupLocations) == null ? void 0 : _f.push(packageJsonPath);
|
|
28290
28303
|
}
|
|
28291
28304
|
}
|
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.4.0-dev.
|
|
5
|
+
"version": "5.4.0-dev.20231129",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"playwright": "^1.38.0",
|
|
79
79
|
"source-map-support": "^0.5.21",
|
|
80
80
|
"tslib": "^2.5.0",
|
|
81
|
-
"typescript": "^5.
|
|
81
|
+
"typescript": "^5.3.2",
|
|
82
82
|
"which": "^2.0.2"
|
|
83
83
|
},
|
|
84
84
|
"overrides": {
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"node": "20.1.0",
|
|
115
115
|
"npm": "8.19.4"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "2869579b2cad770ae20617e4148741c2ce35ffdc"
|
|
118
118
|
}
|