typescript 5.3.0-dev.20230912 → 5.3.0-dev.20230913
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 +24 -4
- package/lib/tsserver.js +34 -7
- package/lib/typescript.js +34 -7
- package/lib/typingsInstaller.js +1 -1
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.3";
|
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20230913`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -36691,7 +36691,7 @@ function hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, e
|
|
|
36691
36691
|
return false;
|
|
36692
36692
|
}
|
|
36693
36693
|
for (const ext of extensionGroup) {
|
|
36694
|
-
if (fileExtensionIs(file, ext)) {
|
|
36694
|
+
if (fileExtensionIs(file, ext) && (ext !== ".ts" /* Ts */ || !fileExtensionIs(file, ".d.ts" /* Dts */))) {
|
|
36695
36695
|
return false;
|
|
36696
36696
|
}
|
|
36697
36697
|
const higherPriorityPath = keyMapper(changeExtension(file, ext));
|
|
@@ -114468,7 +114468,8 @@ function isIgnoredFileFromWildCardWatching({
|
|
|
114468
114468
|
currentDirectory,
|
|
114469
114469
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
114470
114470
|
writeLog,
|
|
114471
|
-
toPath: toPath3
|
|
114471
|
+
toPath: toPath3,
|
|
114472
|
+
getScriptKind
|
|
114472
114473
|
}) {
|
|
114473
114474
|
const newPath = removeIgnoredPath(fileOrDirectoryPath);
|
|
114474
114475
|
if (!newPath) {
|
|
@@ -114478,7 +114479,7 @@ function isIgnoredFileFromWildCardWatching({
|
|
|
114478
114479
|
fileOrDirectoryPath = newPath;
|
|
114479
114480
|
if (fileOrDirectoryPath === watchedDirPath)
|
|
114480
114481
|
return false;
|
|
114481
|
-
if (hasExtension(fileOrDirectoryPath) && !isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) {
|
|
114482
|
+
if (hasExtension(fileOrDirectoryPath) && !(isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions) || isSupportedScriptKind())) {
|
|
114482
114483
|
writeLog(`Project: ${configFileName} Detected file add/remove of non supported extension: ${fileOrDirectory}`);
|
|
114483
114484
|
return true;
|
|
114484
114485
|
}
|
|
@@ -114507,6 +114508,25 @@ function isIgnoredFileFromWildCardWatching({
|
|
|
114507
114508
|
function hasSourceFile(file) {
|
|
114508
114509
|
return realProgram ? !!realProgram.getSourceFileByPath(file) : builderProgram ? builderProgram.getState().fileInfos.has(file) : !!find(program, (rootFile) => toPath3(rootFile) === file);
|
|
114509
114510
|
}
|
|
114511
|
+
function isSupportedScriptKind() {
|
|
114512
|
+
if (!getScriptKind)
|
|
114513
|
+
return false;
|
|
114514
|
+
const scriptKind = getScriptKind(fileOrDirectory);
|
|
114515
|
+
switch (scriptKind) {
|
|
114516
|
+
case 3 /* TS */:
|
|
114517
|
+
case 4 /* TSX */:
|
|
114518
|
+
case 7 /* Deferred */:
|
|
114519
|
+
case 5 /* External */:
|
|
114520
|
+
return true;
|
|
114521
|
+
case 1 /* JS */:
|
|
114522
|
+
case 2 /* JSX */:
|
|
114523
|
+
return getAllowJSCompilerOption(options);
|
|
114524
|
+
case 6 /* JSON */:
|
|
114525
|
+
return getResolveJsonModule(options);
|
|
114526
|
+
case 0 /* Unknown */:
|
|
114527
|
+
return false;
|
|
114528
|
+
}
|
|
114529
|
+
}
|
|
114510
114530
|
}
|
|
114511
114531
|
function isBuilderProgram(program) {
|
|
114512
114532
|
return !!program.getState;
|
package/lib/tsserver.js
CHANGED
|
@@ -2327,7 +2327,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2327
2327
|
|
|
2328
2328
|
// src/compiler/corePublic.ts
|
|
2329
2329
|
var versionMajorMinor = "5.3";
|
|
2330
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2330
|
+
var version = `${versionMajorMinor}.0-dev.20230913`;
|
|
2331
2331
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2332
2332
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2333
2333
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -41122,7 +41122,7 @@ function hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, e
|
|
|
41122
41122
|
return false;
|
|
41123
41123
|
}
|
|
41124
41124
|
for (const ext of extensionGroup) {
|
|
41125
|
-
if (fileExtensionIs(file, ext)) {
|
|
41125
|
+
if (fileExtensionIs(file, ext) && (ext !== ".ts" /* Ts */ || !fileExtensionIs(file, ".d.ts" /* Dts */))) {
|
|
41126
41126
|
return false;
|
|
41127
41127
|
}
|
|
41128
41128
|
const higherPriorityPath = keyMapper(changeExtension(file, ext));
|
|
@@ -119369,7 +119369,8 @@ function isIgnoredFileFromWildCardWatching({
|
|
|
119369
119369
|
currentDirectory,
|
|
119370
119370
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
119371
119371
|
writeLog,
|
|
119372
|
-
toPath: toPath3
|
|
119372
|
+
toPath: toPath3,
|
|
119373
|
+
getScriptKind: getScriptKind2
|
|
119373
119374
|
}) {
|
|
119374
119375
|
const newPath = removeIgnoredPath(fileOrDirectoryPath);
|
|
119375
119376
|
if (!newPath) {
|
|
@@ -119379,7 +119380,7 @@ function isIgnoredFileFromWildCardWatching({
|
|
|
119379
119380
|
fileOrDirectoryPath = newPath;
|
|
119380
119381
|
if (fileOrDirectoryPath === watchedDirPath)
|
|
119381
119382
|
return false;
|
|
119382
|
-
if (hasExtension(fileOrDirectoryPath) && !isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) {
|
|
119383
|
+
if (hasExtension(fileOrDirectoryPath) && !(isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions) || isSupportedScriptKind())) {
|
|
119383
119384
|
writeLog(`Project: ${configFileName} Detected file add/remove of non supported extension: ${fileOrDirectory}`);
|
|
119384
119385
|
return true;
|
|
119385
119386
|
}
|
|
@@ -119408,6 +119409,25 @@ function isIgnoredFileFromWildCardWatching({
|
|
|
119408
119409
|
function hasSourceFile(file) {
|
|
119409
119410
|
return realProgram ? !!realProgram.getSourceFileByPath(file) : builderProgram ? builderProgram.getState().fileInfos.has(file) : !!find(program, (rootFile) => toPath3(rootFile) === file);
|
|
119410
119411
|
}
|
|
119412
|
+
function isSupportedScriptKind() {
|
|
119413
|
+
if (!getScriptKind2)
|
|
119414
|
+
return false;
|
|
119415
|
+
const scriptKind = getScriptKind2(fileOrDirectory);
|
|
119416
|
+
switch (scriptKind) {
|
|
119417
|
+
case 3 /* TS */:
|
|
119418
|
+
case 4 /* TSX */:
|
|
119419
|
+
case 7 /* Deferred */:
|
|
119420
|
+
case 5 /* External */:
|
|
119421
|
+
return true;
|
|
119422
|
+
case 1 /* JS */:
|
|
119423
|
+
case 2 /* JSX */:
|
|
119424
|
+
return getAllowJSCompilerOption(options);
|
|
119425
|
+
case 6 /* JSON */:
|
|
119426
|
+
return getResolveJsonModule(options);
|
|
119427
|
+
case 0 /* Unknown */:
|
|
119428
|
+
return false;
|
|
119429
|
+
}
|
|
119430
|
+
}
|
|
119411
119431
|
}
|
|
119412
119432
|
function isBuilderProgram(program) {
|
|
119413
119433
|
return !!program.getState;
|
|
@@ -169694,7 +169714,7 @@ function getAllRules() {
|
|
|
169694
169714
|
// insert space after '?' only when it is used in conditional operator
|
|
169695
169715
|
rule("SpaceAfterQuestionMarkInConditionalOperator", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* InsertSpace */),
|
|
169696
169716
|
// in other cases there should be no space between '?' and next token
|
|
169697
|
-
rule("NoSpaceAfterQuestionMark", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
|
|
169717
|
+
rule("NoSpaceAfterQuestionMark", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isNonOptionalPropertyContext], 16 /* DeleteSpace */),
|
|
169698
169718
|
rule("NoSpaceBeforeDot", anyToken, [25 /* DotToken */, 29 /* QuestionDotToken */], [isNonJsxSameLineTokenContext, isNotPropertyAccessOnIntegerLiteral], 16 /* DeleteSpace */),
|
|
169699
169719
|
rule("NoSpaceAfterDot", [25 /* DotToken */, 29 /* QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
|
|
169700
169720
|
rule("NoSpaceBetweenImportParenInImportType", 102 /* ImportKeyword */, 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* DeleteSpace */),
|
|
@@ -170039,6 +170059,12 @@ function isTypeAnnotationContext(context) {
|
|
|
170039
170059
|
const contextKind = context.contextNode.kind;
|
|
170040
170060
|
return contextKind === 172 /* PropertyDeclaration */ || contextKind === 171 /* PropertySignature */ || contextKind === 169 /* Parameter */ || contextKind === 260 /* VariableDeclaration */ || isFunctionLikeKind(contextKind);
|
|
170041
170061
|
}
|
|
170062
|
+
function isOptionalPropertyContext(context) {
|
|
170063
|
+
return isPropertyDeclaration(context.contextNode) && context.contextNode.questionToken;
|
|
170064
|
+
}
|
|
170065
|
+
function isNonOptionalPropertyContext(context) {
|
|
170066
|
+
return !isOptionalPropertyContext(context);
|
|
170067
|
+
}
|
|
170042
170068
|
function isConditionalOperatorContext(context) {
|
|
170043
170069
|
return context.contextNode.kind === 227 /* ConditionalExpression */ || context.contextNode.kind === 194 /* ConditionalType */;
|
|
170044
170070
|
}
|
|
@@ -176186,7 +176212,7 @@ var Project3 = class _Project {
|
|
|
176186
176212
|
return scriptInfo;
|
|
176187
176213
|
}
|
|
176188
176214
|
getScriptKind(fileName) {
|
|
176189
|
-
const info = this.
|
|
176215
|
+
const info = this.projectService.getScriptInfoForPath(this.toPath(fileName));
|
|
176190
176216
|
return info && info.scriptKind;
|
|
176191
176217
|
}
|
|
176192
176218
|
getScriptVersion(filename) {
|
|
@@ -179003,7 +179029,8 @@ var _ProjectService = class _ProjectService {
|
|
|
179003
179029
|
program: (configuredProjectForConfig == null ? void 0 : configuredProjectForConfig.getCurrentProgram()) || config.parsedCommandLine.fileNames,
|
|
179004
179030
|
useCaseSensitiveFileNames: this.host.useCaseSensitiveFileNames,
|
|
179005
179031
|
writeLog: (s) => this.logger.info(s),
|
|
179006
|
-
toPath: (s) => this.toPath(s)
|
|
179032
|
+
toPath: (s) => this.toPath(s),
|
|
179033
|
+
getScriptKind: configuredProjectForConfig ? (fileName) => configuredProjectForConfig.getScriptKind(fileName) : void 0
|
|
179007
179034
|
}))
|
|
179008
179035
|
return;
|
|
179009
179036
|
if (config.reloadLevel !== 2 /* Full */)
|
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.3";
|
|
38
|
-
version = `${versionMajorMinor}.0-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20230913`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -37443,7 +37443,7 @@ ${lanes.join("\n")}
|
|
|
37443
37443
|
return false;
|
|
37444
37444
|
}
|
|
37445
37445
|
for (const ext of extensionGroup) {
|
|
37446
|
-
if (fileExtensionIs(file, ext)) {
|
|
37446
|
+
if (fileExtensionIs(file, ext) && (ext !== ".ts" /* Ts */ || !fileExtensionIs(file, ".d.ts" /* Dts */))) {
|
|
37447
37447
|
return false;
|
|
37448
37448
|
}
|
|
37449
37449
|
const higherPriorityPath = keyMapper(changeExtension(file, ext));
|
|
@@ -117466,7 +117466,8 @@ ${lanes.join("\n")}
|
|
|
117466
117466
|
currentDirectory,
|
|
117467
117467
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
117468
117468
|
writeLog,
|
|
117469
|
-
toPath: toPath3
|
|
117469
|
+
toPath: toPath3,
|
|
117470
|
+
getScriptKind: getScriptKind2
|
|
117470
117471
|
}) {
|
|
117471
117472
|
const newPath = removeIgnoredPath(fileOrDirectoryPath);
|
|
117472
117473
|
if (!newPath) {
|
|
@@ -117476,7 +117477,7 @@ ${lanes.join("\n")}
|
|
|
117476
117477
|
fileOrDirectoryPath = newPath;
|
|
117477
117478
|
if (fileOrDirectoryPath === watchedDirPath)
|
|
117478
117479
|
return false;
|
|
117479
|
-
if (hasExtension(fileOrDirectoryPath) && !isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) {
|
|
117480
|
+
if (hasExtension(fileOrDirectoryPath) && !(isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions) || isSupportedScriptKind())) {
|
|
117480
117481
|
writeLog(`Project: ${configFileName} Detected file add/remove of non supported extension: ${fileOrDirectory}`);
|
|
117481
117482
|
return true;
|
|
117482
117483
|
}
|
|
@@ -117505,6 +117506,25 @@ ${lanes.join("\n")}
|
|
|
117505
117506
|
function hasSourceFile(file) {
|
|
117506
117507
|
return realProgram ? !!realProgram.getSourceFileByPath(file) : builderProgram ? builderProgram.getState().fileInfos.has(file) : !!find(program, (rootFile) => toPath3(rootFile) === file);
|
|
117507
117508
|
}
|
|
117509
|
+
function isSupportedScriptKind() {
|
|
117510
|
+
if (!getScriptKind2)
|
|
117511
|
+
return false;
|
|
117512
|
+
const scriptKind = getScriptKind2(fileOrDirectory);
|
|
117513
|
+
switch (scriptKind) {
|
|
117514
|
+
case 3 /* TS */:
|
|
117515
|
+
case 4 /* TSX */:
|
|
117516
|
+
case 7 /* Deferred */:
|
|
117517
|
+
case 5 /* External */:
|
|
117518
|
+
return true;
|
|
117519
|
+
case 1 /* JS */:
|
|
117520
|
+
case 2 /* JSX */:
|
|
117521
|
+
return getAllowJSCompilerOption(options);
|
|
117522
|
+
case 6 /* JSON */:
|
|
117523
|
+
return getResolveJsonModule(options);
|
|
117524
|
+
case 0 /* Unknown */:
|
|
117525
|
+
return false;
|
|
117526
|
+
}
|
|
117527
|
+
}
|
|
117508
117528
|
}
|
|
117509
117529
|
function isBuilderProgram(program) {
|
|
117510
117530
|
return !!program.getState;
|
|
@@ -169166,7 +169186,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
169166
169186
|
// insert space after '?' only when it is used in conditional operator
|
|
169167
169187
|
rule("SpaceAfterQuestionMarkInConditionalOperator", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* InsertSpace */),
|
|
169168
169188
|
// in other cases there should be no space between '?' and next token
|
|
169169
|
-
rule("NoSpaceAfterQuestionMark", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
|
|
169189
|
+
rule("NoSpaceAfterQuestionMark", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isNonOptionalPropertyContext], 16 /* DeleteSpace */),
|
|
169170
169190
|
rule("NoSpaceBeforeDot", anyToken, [25 /* DotToken */, 29 /* QuestionDotToken */], [isNonJsxSameLineTokenContext, isNotPropertyAccessOnIntegerLiteral], 16 /* DeleteSpace */),
|
|
169171
169191
|
rule("NoSpaceAfterDot", [25 /* DotToken */, 29 /* QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
|
|
169172
169192
|
rule("NoSpaceBetweenImportParenInImportType", 102 /* ImportKeyword */, 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* DeleteSpace */),
|
|
@@ -169511,6 +169531,12 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
169511
169531
|
const contextKind = context.contextNode.kind;
|
|
169512
169532
|
return contextKind === 172 /* PropertyDeclaration */ || contextKind === 171 /* PropertySignature */ || contextKind === 169 /* Parameter */ || contextKind === 260 /* VariableDeclaration */ || isFunctionLikeKind(contextKind);
|
|
169513
169533
|
}
|
|
169534
|
+
function isOptionalPropertyContext(context) {
|
|
169535
|
+
return isPropertyDeclaration(context.contextNode) && context.contextNode.questionToken;
|
|
169536
|
+
}
|
|
169537
|
+
function isNonOptionalPropertyContext(context) {
|
|
169538
|
+
return !isOptionalPropertyContext(context);
|
|
169539
|
+
}
|
|
169514
169540
|
function isConditionalOperatorContext(context) {
|
|
169515
169541
|
return context.contextNode.kind === 227 /* ConditionalExpression */ || context.contextNode.kind === 194 /* ConditionalType */;
|
|
169516
169542
|
}
|
|
@@ -173528,7 +173554,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
173528
173554
|
return scriptInfo;
|
|
173529
173555
|
}
|
|
173530
173556
|
getScriptKind(fileName) {
|
|
173531
|
-
const info = this.
|
|
173557
|
+
const info = this.projectService.getScriptInfoForPath(this.toPath(fileName));
|
|
173532
173558
|
return info && info.scriptKind;
|
|
173533
173559
|
}
|
|
173534
173560
|
getScriptVersion(filename) {
|
|
@@ -176349,7 +176375,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
176349
176375
|
program: (configuredProjectForConfig == null ? void 0 : configuredProjectForConfig.getCurrentProgram()) || config.parsedCommandLine.fileNames,
|
|
176350
176376
|
useCaseSensitiveFileNames: this.host.useCaseSensitiveFileNames,
|
|
176351
176377
|
writeLog: (s) => this.logger.info(s),
|
|
176352
|
-
toPath: (s) => this.toPath(s)
|
|
176378
|
+
toPath: (s) => this.toPath(s),
|
|
176379
|
+
getScriptKind: configuredProjectForConfig ? (fileName) => configuredProjectForConfig.getScriptKind(fileName) : void 0
|
|
176353
176380
|
}))
|
|
176354
176381
|
return;
|
|
176355
176382
|
if (config.reloadLevel !== 2 /* Full */)
|
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.20230913`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
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.20230913",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"node": "20.1.0",
|
|
113
113
|
"npm": "8.19.4"
|
|
114
114
|
},
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "3ade5022d7f287fdaf61c9e6deed32a3ffb60bc4"
|
|
116
116
|
}
|