@typescript-deploys/pr-build 6.0.0-pr-62243-37 → 6.0.0-pr-62876-5

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 CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "6.0";
21
- var version = `${versionMajorMinor}.0-insiders.20251208`;
21
+ var version = `${versionMajorMinor}.0-insiders.20251211`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -13019,13 +13019,6 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
13019
13019
  isInJSDoc(node)
13020
13020
  );
13021
13021
  }
13022
- function getNonModifierTokenPosOfNode(node, sourceFile) {
13023
- const lastModifier = !nodeIsMissing(node) && canHaveModifiers(node) && node.modifiers ? last(node.modifiers) : void 0;
13024
- if (!lastModifier) {
13025
- return getTokenPosOfNode(node, sourceFile);
13026
- }
13027
- return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, lastModifier.end);
13028
- }
13029
13022
  function getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia = false) {
13030
13023
  return getTextOfNodeFromSourceText(sourceFile.text, node, includeTrivia);
13031
13024
  }
@@ -40025,7 +40018,7 @@ function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFil
40025
40018
  const affectingLocations = [];
40026
40019
  let features = getNodeResolutionFeatures(options);
40027
40020
  if (resolutionMode !== void 0) {
40028
- features |= 30 /* AllFeatures */;
40021
+ features |= 94 /* AllFeatures */;
40029
40022
  }
40030
40023
  const moduleResolution = getEmitModuleResolutionKind(options);
40031
40024
  if (resolutionMode === 99 /* ESNext */ && (3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */)) {
@@ -40180,10 +40173,10 @@ function getNodeResolutionFeatures(options) {
40180
40173
  features = 30 /* Node16Default */;
40181
40174
  break;
40182
40175
  case 99 /* NodeNext */:
40183
- features = 30 /* NodeNextDefault */;
40176
+ features = 94 /* NodeNextDefault */;
40184
40177
  break;
40185
40178
  case 100 /* Bundler */:
40186
- features = 30 /* BundlerDefault */;
40179
+ features = 94 /* BundlerDefault */;
40187
40180
  break;
40188
40181
  }
40189
40182
  if (options.resolvePackageJsonExports) {
@@ -40766,7 +40759,7 @@ function node16ModuleNameResolver(moduleName, containingFile, compilerOptions, h
40766
40759
  }
40767
40760
  function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
40768
40761
  return nodeNextModuleNameResolverWorker(
40769
- 30 /* NodeNextDefault */,
40762
+ 94 /* NodeNextDefault */,
40770
40763
  moduleName,
40771
40764
  containingFile,
40772
40765
  compilerOptions,
@@ -40845,11 +40838,11 @@ function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, hos
40845
40838
  } else {
40846
40839
  extensions = getResolveJsonModule(compilerOptions) ? 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */ | 8 /* Json */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
40847
40840
  }
40848
- return nodeModuleNameResolverWorker(conditions ? 30 /* AllFeatures */ : 0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference, conditions);
40841
+ return nodeModuleNameResolverWorker(conditions ? 94 /* AllFeatures */ : 0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference, conditions);
40849
40842
  }
40850
40843
  function nodeNextJsonConfigResolver(moduleName, containingFile, host) {
40851
40844
  return nodeModuleNameResolverWorker(
40852
- 30 /* NodeNextDefault */,
40845
+ 94 /* NodeNextDefault */,
40853
40846
  moduleName,
40854
40847
  getDirectoryPath(containingFile),
40855
40848
  { moduleResolution: 99 /* NodeNext */ },
@@ -40922,7 +40915,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
40922
40915
  const diagnosticState = {
40923
40916
  ...state,
40924
40917
  compilerOptions: diagnosticsCompilerOptions,
40925
- features: 30 /* BundlerDefault */,
40918
+ features: 94 /* BundlerDefault */,
40926
40919
  conditions: getConditions(diagnosticsCompilerOptions),
40927
40920
  reportDiagnostic: noop
40928
40921
  };
@@ -41458,7 +41451,7 @@ function loadModuleFromExports(scope, extensions, subpath, state, cache, redirec
41458
41451
  }
41459
41452
  function loadModuleFromImports(extensions, moduleName, directory, state, cache, redirectedReference) {
41460
41453
  var _a, _b;
41461
- if (moduleName === "#" || startsWith(moduleName, "#/")) {
41454
+ if (moduleName === "#" || startsWith(moduleName, "#/") && !(state.features & 64 /* ImportsPatternRoot */)) {
41462
41455
  if (state.traceEnabled) {
41463
41456
  trace(state.host, Diagnostics.Invalid_import_specifier_0_has_no_possible_resolutions, moduleName);
41464
41457
  }
@@ -63731,7 +63724,7 @@ function createTypeChecker(host) {
63731
63724
  return false;
63732
63725
  }
63733
63726
  function isContextSensitiveFunctionLikeDeclaration(node) {
63734
- return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node) || !!(getFunctionFlags(node) & 1 /* Generator */ && node.body && forEachYieldExpression(node.body, isContextSensitive));
63727
+ return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node) || hasContextSensitiveYieldExpression(node);
63735
63728
  }
63736
63729
  function hasContextSensitiveReturnExpression(node) {
63737
63730
  if (node.typeParameters || getEffectiveReturnTypeNode(node) || !node.body) {
@@ -63742,6 +63735,9 @@ function createTypeChecker(host) {
63742
63735
  }
63743
63736
  return !!forEachReturnStatement(node.body, (statement) => !!statement.expression && isContextSensitive(statement.expression));
63744
63737
  }
63738
+ function hasContextSensitiveYieldExpression(node) {
63739
+ return !!(getFunctionFlags(node) & 1 /* Generator */ && node.body && forEachYieldExpression(node.body, isContextSensitive));
63740
+ }
63745
63741
  function isContextSensitiveFunctionOrObjectLiteralMethod(func) {
63746
63742
  return (isFunctionExpressionOrArrowFunction(func) || isObjectLiteralMethod(func)) && isContextSensitiveFunctionLikeDeclaration(func);
63747
63743
  }
@@ -73296,7 +73292,9 @@ function createTypeChecker(host) {
73296
73292
  }
73297
73293
  if (inferenceContext == null ? void 0 : inferenceContext.returnMapper) {
73298
73294
  const type = instantiateInstantiableTypes(contextualType, inferenceContext.returnMapper);
73299
- return type.flags & 1048576 /* Union */ && containsType(type.types, regularFalseType) && containsType(type.types, regularTrueType) ? filterType(type, (t) => t !== regularFalseType && t !== regularTrueType) : type;
73295
+ if (!(type.flags & 3 /* AnyOrUnknown */)) {
73296
+ return type.flags & 1048576 /* Union */ && containsType(type.types, regularFalseType) && containsType(type.types, regularTrueType) ? filterType(type, (t) => t !== regularFalseType && t !== regularTrueType) : type;
73297
+ }
73300
73298
  }
73301
73299
  }
73302
73300
  return contextualType;
@@ -85724,13 +85722,8 @@ function createTypeChecker(host) {
85724
85722
  }
85725
85723
  if (isIdentifier(node.name)) {
85726
85724
  checkCollisionsForDeclarationName(node, node.name);
85727
- if (!(node.flags & (32 /* Namespace */ | 2048 /* GlobalAugmentation */))) {
85728
- const sourceFile = getSourceFileOfNode(node);
85729
- const pos = getNonModifierTokenPosOfNode(node);
85730
- const span = getSpanOfTokenAtPosition(sourceFile, pos);
85731
- suggestionDiagnostics.add(
85732
- createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead)
85733
- );
85725
+ if (!(node.flags & (32 /* Namespace */ | 2048 /* GlobalAugmentation */ | 33554432 /* Ambient */))) {
85726
+ error(node.name, Diagnostics.A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead);
85734
85727
  }
85735
85728
  }
85736
85729
  checkExportsOnMergedDeclarations(node);
package/lib/typescript.js CHANGED
@@ -913,7 +913,6 @@ __export(typescript_exports, {
913
913
  getNonAugmentationDeclaration: () => getNonAugmentationDeclaration,
914
914
  getNonDecoratorTokenPosOfNode: () => getNonDecoratorTokenPosOfNode,
915
915
  getNonIncrementalBuildInfoRoots: () => getNonIncrementalBuildInfoRoots,
916
- getNonModifierTokenPosOfNode: () => getNonModifierTokenPosOfNode,
917
916
  getNormalizedAbsolutePath: () => getNormalizedAbsolutePath,
918
917
  getNormalizedAbsolutePathWithoutRoot: () => getNormalizedAbsolutePathWithoutRoot,
919
918
  getNormalizedPathComponents: () => getNormalizedPathComponents,
@@ -2286,7 +2285,7 @@ module.exports = __toCommonJS(typescript_exports);
2286
2285
 
2287
2286
  // src/compiler/corePublic.ts
2288
2287
  var versionMajorMinor = "6.0";
2289
- var version = `${versionMajorMinor}.0-insiders.20251208`;
2288
+ var version = `${versionMajorMinor}.0-insiders.20251211`;
2290
2289
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2291
2290
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2292
2291
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -16667,13 +16666,6 @@ function getNonDecoratorTokenPosOfNode(node, sourceFile) {
16667
16666
  }
16668
16667
  return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, lastDecorator.end);
16669
16668
  }
16670
- function getNonModifierTokenPosOfNode(node, sourceFile) {
16671
- const lastModifier = !nodeIsMissing(node) && canHaveModifiers(node) && node.modifiers ? last(node.modifiers) : void 0;
16672
- if (!lastModifier) {
16673
- return getTokenPosOfNode(node, sourceFile);
16674
- }
16675
- return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, lastModifier.end);
16676
- }
16677
16669
  function getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia = false) {
16678
16670
  return getTextOfNodeFromSourceText(sourceFile.text, node, includeTrivia);
16679
16671
  }
@@ -44383,7 +44375,7 @@ function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFil
44383
44375
  const affectingLocations = [];
44384
44376
  let features = getNodeResolutionFeatures(options);
44385
44377
  if (resolutionMode !== void 0) {
44386
- features |= 30 /* AllFeatures */;
44378
+ features |= 94 /* AllFeatures */;
44387
44379
  }
44388
44380
  const moduleResolution = getEmitModuleResolutionKind(options);
44389
44381
  if (resolutionMode === 99 /* ESNext */ && (3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */)) {
@@ -44538,10 +44530,10 @@ function getNodeResolutionFeatures(options) {
44538
44530
  features = 30 /* Node16Default */;
44539
44531
  break;
44540
44532
  case 99 /* NodeNext */:
44541
- features = 30 /* NodeNextDefault */;
44533
+ features = 94 /* NodeNextDefault */;
44542
44534
  break;
44543
44535
  case 100 /* Bundler */:
44544
- features = 30 /* BundlerDefault */;
44536
+ features = 94 /* BundlerDefault */;
44545
44537
  break;
44546
44538
  }
44547
44539
  if (options.resolvePackageJsonExports) {
@@ -45141,10 +45133,11 @@ var NodeResolutionFeatures = /* @__PURE__ */ ((NodeResolutionFeatures2) => {
45141
45133
  NodeResolutionFeatures2[NodeResolutionFeatures2["SelfName"] = 4] = "SelfName";
45142
45134
  NodeResolutionFeatures2[NodeResolutionFeatures2["Exports"] = 8] = "Exports";
45143
45135
  NodeResolutionFeatures2[NodeResolutionFeatures2["ExportsPatternTrailers"] = 16] = "ExportsPatternTrailers";
45144
- NodeResolutionFeatures2[NodeResolutionFeatures2["AllFeatures"] = 30] = "AllFeatures";
45136
+ NodeResolutionFeatures2[NodeResolutionFeatures2["ImportsPatternRoot"] = 64] = "ImportsPatternRoot";
45137
+ NodeResolutionFeatures2[NodeResolutionFeatures2["AllFeatures"] = 94] = "AllFeatures";
45145
45138
  NodeResolutionFeatures2[NodeResolutionFeatures2["Node16Default"] = 30] = "Node16Default";
45146
- NodeResolutionFeatures2[NodeResolutionFeatures2["NodeNextDefault"] = 30 /* AllFeatures */] = "NodeNextDefault";
45147
- NodeResolutionFeatures2[NodeResolutionFeatures2["BundlerDefault"] = 30] = "BundlerDefault";
45139
+ NodeResolutionFeatures2[NodeResolutionFeatures2["NodeNextDefault"] = 94 /* AllFeatures */] = "NodeNextDefault";
45140
+ NodeResolutionFeatures2[NodeResolutionFeatures2["BundlerDefault"] = 94] = "BundlerDefault";
45148
45141
  NodeResolutionFeatures2[NodeResolutionFeatures2["EsmMode"] = 32] = "EsmMode";
45149
45142
  return NodeResolutionFeatures2;
45150
45143
  })(NodeResolutionFeatures || {});
@@ -45162,7 +45155,7 @@ function node16ModuleNameResolver(moduleName, containingFile, compilerOptions, h
45162
45155
  }
45163
45156
  function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
45164
45157
  return nodeNextModuleNameResolverWorker(
45165
- 30 /* NodeNextDefault */,
45158
+ 94 /* NodeNextDefault */,
45166
45159
  moduleName,
45167
45160
  containingFile,
45168
45161
  compilerOptions,
@@ -45241,11 +45234,11 @@ function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, hos
45241
45234
  } else {
45242
45235
  extensions = getResolveJsonModule(compilerOptions) ? 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */ | 8 /* Json */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
45243
45236
  }
45244
- return nodeModuleNameResolverWorker(conditions ? 30 /* AllFeatures */ : 0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference, conditions);
45237
+ return nodeModuleNameResolverWorker(conditions ? 94 /* AllFeatures */ : 0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference, conditions);
45245
45238
  }
45246
45239
  function nodeNextJsonConfigResolver(moduleName, containingFile, host) {
45247
45240
  return nodeModuleNameResolverWorker(
45248
- 30 /* NodeNextDefault */,
45241
+ 94 /* NodeNextDefault */,
45249
45242
  moduleName,
45250
45243
  getDirectoryPath(containingFile),
45251
45244
  { moduleResolution: 99 /* NodeNext */ },
@@ -45318,7 +45311,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
45318
45311
  const diagnosticState = {
45319
45312
  ...state,
45320
45313
  compilerOptions: diagnosticsCompilerOptions,
45321
- features: 30 /* BundlerDefault */,
45314
+ features: 94 /* BundlerDefault */,
45322
45315
  conditions: getConditions(diagnosticsCompilerOptions),
45323
45316
  reportDiagnostic: noop
45324
45317
  };
@@ -45968,7 +45961,7 @@ function loadModuleFromExports(scope, extensions, subpath, state, cache, redirec
45968
45961
  }
45969
45962
  function loadModuleFromImports(extensions, moduleName, directory, state, cache, redirectedReference) {
45970
45963
  var _a, _b;
45971
- if (moduleName === "#" || startsWith(moduleName, "#/")) {
45964
+ if (moduleName === "#" || startsWith(moduleName, "#/") && !(state.features & 64 /* ImportsPatternRoot */)) {
45972
45965
  if (state.traceEnabled) {
45973
45966
  trace(state.host, Diagnostics.Invalid_import_specifier_0_has_no_possible_resolutions, moduleName);
45974
45967
  }
@@ -68359,7 +68352,7 @@ function createTypeChecker(host) {
68359
68352
  return false;
68360
68353
  }
68361
68354
  function isContextSensitiveFunctionLikeDeclaration(node) {
68362
- return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node) || !!(getFunctionFlags(node) & 1 /* Generator */ && node.body && forEachYieldExpression(node.body, isContextSensitive));
68355
+ return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node) || hasContextSensitiveYieldExpression(node);
68363
68356
  }
68364
68357
  function hasContextSensitiveReturnExpression(node) {
68365
68358
  if (node.typeParameters || getEffectiveReturnTypeNode(node) || !node.body) {
@@ -68370,6 +68363,9 @@ function createTypeChecker(host) {
68370
68363
  }
68371
68364
  return !!forEachReturnStatement(node.body, (statement) => !!statement.expression && isContextSensitive(statement.expression));
68372
68365
  }
68366
+ function hasContextSensitiveYieldExpression(node) {
68367
+ return !!(getFunctionFlags(node) & 1 /* Generator */ && node.body && forEachYieldExpression(node.body, isContextSensitive));
68368
+ }
68373
68369
  function isContextSensitiveFunctionOrObjectLiteralMethod(func) {
68374
68370
  return (isFunctionExpressionOrArrowFunction(func) || isObjectLiteralMethod(func)) && isContextSensitiveFunctionLikeDeclaration(func);
68375
68371
  }
@@ -77924,7 +77920,9 @@ function createTypeChecker(host) {
77924
77920
  }
77925
77921
  if (inferenceContext == null ? void 0 : inferenceContext.returnMapper) {
77926
77922
  const type = instantiateInstantiableTypes(contextualType, inferenceContext.returnMapper);
77927
- return type.flags & 1048576 /* Union */ && containsType(type.types, regularFalseType) && containsType(type.types, regularTrueType) ? filterType(type, (t) => t !== regularFalseType && t !== regularTrueType) : type;
77923
+ if (!(type.flags & 3 /* AnyOrUnknown */)) {
77924
+ return type.flags & 1048576 /* Union */ && containsType(type.types, regularFalseType) && containsType(type.types, regularTrueType) ? filterType(type, (t) => t !== regularFalseType && t !== regularTrueType) : type;
77925
+ }
77928
77926
  }
77929
77927
  }
77930
77928
  return contextualType;
@@ -90352,13 +90350,8 @@ function createTypeChecker(host) {
90352
90350
  }
90353
90351
  if (isIdentifier(node.name)) {
90354
90352
  checkCollisionsForDeclarationName(node, node.name);
90355
- if (!(node.flags & (32 /* Namespace */ | 2048 /* GlobalAugmentation */))) {
90356
- const sourceFile = getSourceFileOfNode(node);
90357
- const pos = getNonModifierTokenPosOfNode(node);
90358
- const span = getSpanOfTokenAtPosition(sourceFile, pos);
90359
- suggestionDiagnostics.add(
90360
- createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead)
90361
- );
90353
+ if (!(node.flags & (32 /* Namespace */ | 2048 /* GlobalAugmentation */ | 33554432 /* Ambient */))) {
90354
+ error2(node.name, Diagnostics.A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead);
90362
90355
  }
90363
90356
  }
90364
90357
  checkExportsOnMergedDeclarations(node);
@@ -184309,7 +184302,6 @@ __export(ts_exports2, {
184309
184302
  getNonAugmentationDeclaration: () => getNonAugmentationDeclaration,
184310
184303
  getNonDecoratorTokenPosOfNode: () => getNonDecoratorTokenPosOfNode,
184311
184304
  getNonIncrementalBuildInfoRoots: () => getNonIncrementalBuildInfoRoots,
184312
- getNonModifierTokenPosOfNode: () => getNonModifierTokenPosOfNode,
184313
184305
  getNormalizedAbsolutePath: () => getNormalizedAbsolutePath,
184314
184306
  getNormalizedAbsolutePathWithoutRoot: () => getNormalizedAbsolutePathWithoutRoot,
184315
184307
  getNormalizedPathComponents: () => getNormalizedPathComponents,
@@ -199071,7 +199063,6 @@ if (typeof console !== "undefined") {
199071
199063
  getNonAugmentationDeclaration,
199072
199064
  getNonDecoratorTokenPosOfNode,
199073
199065
  getNonIncrementalBuildInfoRoots,
199074
- getNonModifierTokenPosOfNode,
199075
199066
  getNormalizedAbsolutePath,
199076
199067
  getNormalizedAbsolutePathWithoutRoot,
199077
199068
  getNormalizedPathComponents,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typescript-deploys/pr-build",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "6.0.0-pr-62243-37",
5
+ "version": "6.0.0-pr-62876-5",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [