Skip to content

Commit 14fa6ac

Browse files
committed
Update LKG
1 parent 3af1894 commit 14fa6ac

File tree

7 files changed

+28
-25
lines changed

7 files changed

+28
-25
lines changed

lib/tsserver.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ var ts;
389389
NodeFlags[NodeFlags["JavaScriptFile"] = 65536] = "JavaScriptFile";
390390
NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 131072] = "ThisNodeOrAnySubNodesHasError";
391391
NodeFlags[NodeFlags["HasAggregatedChildData"] = 262144] = "HasAggregatedChildData";
392-
NodeFlags[NodeFlags["PossiblyContainDynamicImport"] = 524288] = "PossiblyContainDynamicImport";
392+
NodeFlags[NodeFlags["PossiblyContainsDynamicImport"] = 524288] = "PossiblyContainsDynamicImport";
393393
NodeFlags[NodeFlags["BlockScoped"] = 3] = "BlockScoped";
394394
NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 384] = "ReachabilityCheckFlags";
395395
NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 1408] = "ReachabilityAndEmitFlags";

lib/tsserverlibrary.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,6 @@ declare namespace ts {
408408
JavaScriptFile = 65536,
409409
ThisNodeOrAnySubNodesHasError = 131072,
410410
HasAggregatedChildData = 262144,
411-
PossiblyContainDynamicImport = 524288,
412411
BlockScoped = 3,
413412
ReachabilityCheckFlags = 384,
414413
ReachabilityAndEmitFlags = 1408,

lib/tsserverlibrary.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ var ts;
389389
NodeFlags[NodeFlags["JavaScriptFile"] = 65536] = "JavaScriptFile";
390390
NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 131072] = "ThisNodeOrAnySubNodesHasError";
391391
NodeFlags[NodeFlags["HasAggregatedChildData"] = 262144] = "HasAggregatedChildData";
392-
NodeFlags[NodeFlags["PossiblyContainDynamicImport"] = 524288] = "PossiblyContainDynamicImport";
392+
NodeFlags[NodeFlags["PossiblyContainsDynamicImport"] = 524288] = "PossiblyContainsDynamicImport";
393393
NodeFlags[NodeFlags["BlockScoped"] = 3] = "BlockScoped";
394394
NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 384] = "ReachabilityCheckFlags";
395395
NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 1408] = "ReachabilityAndEmitFlags";

lib/typescript.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,6 @@ declare namespace ts {
415415
JavaScriptFile = 65536,
416416
ThisNodeOrAnySubNodesHasError = 131072,
417417
HasAggregatedChildData = 262144,
418-
PossiblyContainDynamicImport = 524288,
419418
BlockScoped = 3,
420419
ReachabilityCheckFlags = 384,
421420
ReachabilityAndEmitFlags = 1408,

lib/typescript.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -424,13 +424,16 @@ var ts;
424424
NodeFlags[NodeFlags["JavaScriptFile"] = 65536] = "JavaScriptFile";
425425
NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 131072] = "ThisNodeOrAnySubNodesHasError";
426426
NodeFlags[NodeFlags["HasAggregatedChildData"] = 262144] = "HasAggregatedChildData";
427-
// This flag will be set to true when the parse encounter dynamic import so that post-parsing process of module resolution
428-
// will not walk the tree if the flag is not set. However, this flag is just a approximation because once it is set, the flag never get reset.
429-
// (hence it is named "possiblyContainDynamicImport").
430-
// During editing, if dynamic import is remove, incremental parsing will *NOT* update this flag. This will then causes walking of the tree during module resolution.
431-
// However, the removal operation should not occur often and in the case of the removal, it is likely that users will add back the import anyway.
432-
// The advantage of this approach is its simplicity. For the case of batch compilation, we garuntee that users won't have to pay the price of walking the tree if dynamic import isn't used.
433-
NodeFlags[NodeFlags["PossiblyContainDynamicImport"] = 524288] = "PossiblyContainDynamicImport";
427+
// This flag will be set when the parser encounters a dynamic import expression so that module resolution
428+
// will not have to walk the tree if the flag is not set. However, this flag is just a approximation because
429+
// once it is set, the flag never gets cleared (hence why it's named "PossiblyContainsDynamicImport").
430+
// During editing, if dynamic import is removed, incremental parsing will *NOT* update this flag. This means that the tree will always be traversed
431+
// during module resolution. However, the removal operation should not occur often and in the case of the
432+
// removal, it is likely that users will add the import anyway.
433+
// The advantage of this approach is its simplicity. For the case of batch compilation,
434+
// we guarantee that users won't have to pay the price of walking the tree if a dynamic import isn't used.
435+
/* @internal */
436+
NodeFlags[NodeFlags["PossiblyContainsDynamicImport"] = 524288] = "PossiblyContainsDynamicImport";
434437
NodeFlags[NodeFlags["BlockScoped"] = 3] = "BlockScoped";
435438
NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 384] = "ReachabilityCheckFlags";
436439
NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 1408] = "ReachabilityAndEmitFlags";
@@ -16304,7 +16307,7 @@ var ts;
1630416307
var newSourceFile = IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
1630516308
// Because new source file node is created, it may not have the flag PossiblyContainDynamicImport. This is the case if there is no new edit to add dynamic import.
1630616309
// We will manually port the flag to the new source file.
16307-
newSourceFile.flags |= (sourceFile.flags & 524288 /* PossiblyContainDynamicImport */);
16310+
newSourceFile.flags |= (sourceFile.flags & 524288 /* PossiblyContainsDynamicImport */);
1630816311
return newSourceFile;
1630916312
}
1631016313
ts.updateSourceFile = updateSourceFile;
@@ -19111,7 +19114,7 @@ var ts;
1911119114
// For example:
1911219115
// var foo3 = require("subfolder
1911319116
// import * as foo1 from "module-from-node -> we want this import to be a statement rather than import call expression
19114-
sourceFile.flags |= 524288 /* PossiblyContainDynamicImport */;
19117+
sourceFile.flags |= 524288 /* PossiblyContainsDynamicImport */;
1911519118
expression = parseTokenNode();
1911619119
}
1911719120
else {
@@ -70034,7 +70037,7 @@ var ts;
7003470037
for (var _i = 0, _a = file.statements; _i < _a.length; _i++) {
7003570038
var node = _a[_i];
7003670039
collectModuleReferences(node, /*inAmbientModule*/ false);
70037-
if ((file.flags & 524288 /* PossiblyContainDynamicImport */) || isJavaScriptFile) {
70040+
if ((file.flags & 524288 /* PossiblyContainsDynamicImport */) || isJavaScriptFile) {
7003870041
collectDynamicImportOrRequireCalls(node);
7003970042
}
7004070043
}

lib/typescriptServices.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,6 @@ declare namespace ts {
415415
JavaScriptFile = 65536,
416416
ThisNodeOrAnySubNodesHasError = 131072,
417417
HasAggregatedChildData = 262144,
418-
PossiblyContainDynamicImport = 524288,
419418
BlockScoped = 3,
420419
ReachabilityCheckFlags = 384,
421420
ReachabilityAndEmitFlags = 1408,

lib/typescriptServices.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -424,13 +424,16 @@ var ts;
424424
NodeFlags[NodeFlags["JavaScriptFile"] = 65536] = "JavaScriptFile";
425425
NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 131072] = "ThisNodeOrAnySubNodesHasError";
426426
NodeFlags[NodeFlags["HasAggregatedChildData"] = 262144] = "HasAggregatedChildData";
427-
// This flag will be set to true when the parse encounter dynamic import so that post-parsing process of module resolution
428-
// will not walk the tree if the flag is not set. However, this flag is just a approximation because once it is set, the flag never get reset.
429-
// (hence it is named "possiblyContainDynamicImport").
430-
// During editing, if dynamic import is remove, incremental parsing will *NOT* update this flag. This will then causes walking of the tree during module resolution.
431-
// However, the removal operation should not occur often and in the case of the removal, it is likely that users will add back the import anyway.
432-
// The advantage of this approach is its simplicity. For the case of batch compilation, we garuntee that users won't have to pay the price of walking the tree if dynamic import isn't used.
433-
NodeFlags[NodeFlags["PossiblyContainDynamicImport"] = 524288] = "PossiblyContainDynamicImport";
427+
// This flag will be set when the parser encounters a dynamic import expression so that module resolution
428+
// will not have to walk the tree if the flag is not set. However, this flag is just a approximation because
429+
// once it is set, the flag never gets cleared (hence why it's named "PossiblyContainsDynamicImport").
430+
// During editing, if dynamic import is removed, incremental parsing will *NOT* update this flag. This means that the tree will always be traversed
431+
// during module resolution. However, the removal operation should not occur often and in the case of the
432+
// removal, it is likely that users will add the import anyway.
433+
// The advantage of this approach is its simplicity. For the case of batch compilation,
434+
// we guarantee that users won't have to pay the price of walking the tree if a dynamic import isn't used.
435+
/* @internal */
436+
NodeFlags[NodeFlags["PossiblyContainsDynamicImport"] = 524288] = "PossiblyContainsDynamicImport";
434437
NodeFlags[NodeFlags["BlockScoped"] = 3] = "BlockScoped";
435438
NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 384] = "ReachabilityCheckFlags";
436439
NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 1408] = "ReachabilityAndEmitFlags";
@@ -16304,7 +16307,7 @@ var ts;
1630416307
var newSourceFile = IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
1630516308
// Because new source file node is created, it may not have the flag PossiblyContainDynamicImport. This is the case if there is no new edit to add dynamic import.
1630616309
// We will manually port the flag to the new source file.
16307-
newSourceFile.flags |= (sourceFile.flags & 524288 /* PossiblyContainDynamicImport */);
16310+
newSourceFile.flags |= (sourceFile.flags & 524288 /* PossiblyContainsDynamicImport */);
1630816311
return newSourceFile;
1630916312
}
1631016313
ts.updateSourceFile = updateSourceFile;
@@ -19111,7 +19114,7 @@ var ts;
1911119114
// For example:
1911219115
// var foo3 = require("subfolder
1911319116
// import * as foo1 from "module-from-node -> we want this import to be a statement rather than import call expression
19114-
sourceFile.flags |= 524288 /* PossiblyContainDynamicImport */;
19117+
sourceFile.flags |= 524288 /* PossiblyContainsDynamicImport */;
1911519118
expression = parseTokenNode();
1911619119
}
1911719120
else {
@@ -70034,7 +70037,7 @@ var ts;
7003470037
for (var _i = 0, _a = file.statements; _i < _a.length; _i++) {
7003570038
var node = _a[_i];
7003670039
collectModuleReferences(node, /*inAmbientModule*/ false);
70037-
if ((file.flags & 524288 /* PossiblyContainDynamicImport */) || isJavaScriptFile) {
70040+
if ((file.flags & 524288 /* PossiblyContainsDynamicImport */) || isJavaScriptFile) {
7003870041
collectDynamicImportOrRequireCalls(node);
7003970042
}
7004070043
}

0 commit comments

Comments
 (0)