@typescript-deploys/pr-build 5.0.0-pr-50996-2 → 5.0.0-pr-51492-2

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
@@ -3784,19 +3784,19 @@ var ModuleResolutionKind = /* @__PURE__ */ ((ModuleResolutionKind2) => {
3784
3784
  ModuleResolutionKind2[ModuleResolutionKind2["NodeNext"] = 99] = "NodeNext";
3785
3785
  return ModuleResolutionKind2;
3786
3786
  })(ModuleResolutionKind || {});
3787
- var ModuleKind = /* @__PURE__ */ ((ModuleKind4) => {
3788
- ModuleKind4[ModuleKind4["None"] = 0] = "None";
3789
- ModuleKind4[ModuleKind4["CommonJS"] = 1] = "CommonJS";
3790
- ModuleKind4[ModuleKind4["AMD"] = 2] = "AMD";
3791
- ModuleKind4[ModuleKind4["UMD"] = 3] = "UMD";
3792
- ModuleKind4[ModuleKind4["System"] = 4] = "System";
3793
- ModuleKind4[ModuleKind4["ES2015"] = 5] = "ES2015";
3794
- ModuleKind4[ModuleKind4["ES2020"] = 6] = "ES2020";
3795
- ModuleKind4[ModuleKind4["ES2022"] = 7] = "ES2022";
3796
- ModuleKind4[ModuleKind4["ESNext"] = 99] = "ESNext";
3797
- ModuleKind4[ModuleKind4["Node16"] = 100] = "Node16";
3798
- ModuleKind4[ModuleKind4["NodeNext"] = 199] = "NodeNext";
3799
- return ModuleKind4;
3787
+ var ModuleKind = /* @__PURE__ */ ((ModuleKind2) => {
3788
+ ModuleKind2[ModuleKind2["None"] = 0] = "None";
3789
+ ModuleKind2[ModuleKind2["CommonJS"] = 1] = "CommonJS";
3790
+ ModuleKind2[ModuleKind2["AMD"] = 2] = "AMD";
3791
+ ModuleKind2[ModuleKind2["UMD"] = 3] = "UMD";
3792
+ ModuleKind2[ModuleKind2["System"] = 4] = "System";
3793
+ ModuleKind2[ModuleKind2["ES2015"] = 5] = "ES2015";
3794
+ ModuleKind2[ModuleKind2["ES2020"] = 6] = "ES2020";
3795
+ ModuleKind2[ModuleKind2["ES2022"] = 7] = "ES2022";
3796
+ ModuleKind2[ModuleKind2["ESNext"] = 99] = "ESNext";
3797
+ ModuleKind2[ModuleKind2["Node16"] = 100] = "Node16";
3798
+ ModuleKind2[ModuleKind2["NodeNext"] = 199] = "NodeNext";
3799
+ return ModuleKind2;
3800
3800
  })(ModuleKind || {});
3801
3801
  var TransformFlags = /* @__PURE__ */ ((TransformFlags3) => {
3802
3802
  TransformFlags3[TransformFlags3["None"] = 0] = "None";
@@ -15356,26 +15356,6 @@ function parsePseudoBigInt(stringValue) {
15356
15356
  function pseudoBigIntToString({ negative, base10Value }) {
15357
15357
  return (negative && base10Value !== "0" ? "-" : "") + base10Value;
15358
15358
  }
15359
- function parseValidBigInt(text) {
15360
- const negative = text.startsWith("-");
15361
- const base10Value = parsePseudoBigInt(`${negative ? text.slice(1) : text}n`);
15362
- return { negative, base10Value };
15363
- }
15364
- function isValidBigIntString(s, roundTripOnly) {
15365
- if (s === "")
15366
- return false;
15367
- const scanner = createScanner(99 /* ESNext */, false);
15368
- let success = true;
15369
- scanner.setOnError(() => success = false);
15370
- scanner.setText(s + "n");
15371
- let result = scanner.scan();
15372
- const negative = result === 40 /* MinusToken */;
15373
- if (negative) {
15374
- result = scanner.scan();
15375
- }
15376
- const flags = scanner.getTokenFlags();
15377
- return success && result === 9 /* BigIntLiteral */ && scanner.getTextPos() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner.getTokenValue()) }));
15378
- }
15379
15359
  function isValidTypeOnlyAliasUseSite(useSite) {
15380
15360
  return !!(useSite.flags & 16777216 /* Ambient */) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite));
15381
15361
  }
@@ -15695,10 +15675,6 @@ function isOptionalJSDocPropertyLikeTag(node) {
15695
15675
  const { isBracketed, typeExpression } = node;
15696
15676
  return isBracketed || !!typeExpression && typeExpression.type.kind === 319 /* JSDocOptionalType */;
15697
15677
  }
15698
- function canUsePropertyAccess(name, languageVersion) {
15699
- const firstChar = name.charCodeAt(0);
15700
- return firstChar === 35 /* hash */ ? name.length > 1 && isIdentifierStart(name.charCodeAt(1), languageVersion) : isIdentifierStart(firstChar, languageVersion);
15701
- }
15702
15678
 
15703
15679
  // src/compiler/factory/baseNodeFactory.ts
15704
15680
  function createBaseNodeFactory() {
@@ -37525,11 +37501,11 @@ function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFi
37525
37501
  if (specifier && modulePath.isRedirect) {
37526
37502
  return nodeModulesSpecifiers;
37527
37503
  }
37528
- if (!specifier && !modulePath.isRedirect) {
37504
+ if (!specifier) {
37529
37505
  const local = getLocalModuleSpecifier(modulePath.path, info, compilerOptions, host, options.overrideImportMode || importingSourceFile.impliedNodeFormat, preferences);
37530
37506
  if (pathIsBareSpecifier(local)) {
37531
37507
  pathsSpecifiers = append(pathsSpecifiers, local);
37532
- } else if (!importedFileIsInNodeModules || modulePath.isInNodeModules) {
37508
+ } else if (!modulePath.isRedirect && (!importedFileIsInNodeModules || modulePath.isInNodeModules)) {
37533
37509
  relativeSpecifiers = append(relativeSpecifiers, local);
37534
37510
  }
37535
37511
  }
@@ -37554,31 +37530,29 @@ function getLocalModuleSpecifier(moduleFileName, info, compilerOptions, host, im
37554
37530
  return relativePath;
37555
37531
  }
37556
37532
  const fromPaths = paths && tryGetModuleNameFromPaths(relativeToBaseUrl, paths, getAllowedEndings(ending, compilerOptions, importMode), host, compilerOptions);
37557
- const nonRelative = fromPaths === void 0 && baseUrl !== void 0 ? removeExtensionAndIndexPostFix(relativeToBaseUrl, ending, compilerOptions) : fromPaths;
37558
- if (!nonRelative) {
37533
+ const maybeNonRelative = fromPaths === void 0 && baseUrl !== void 0 ? removeExtensionAndIndexPostFix(relativeToBaseUrl, ending, compilerOptions) : fromPaths;
37534
+ if (!maybeNonRelative) {
37559
37535
  return relativePath;
37560
37536
  }
37561
- if (relativePreference === 1 /* NonRelative */) {
37562
- return nonRelative;
37537
+ if (relativePreference === 1 /* NonRelative */ && !pathIsRelative(maybeNonRelative)) {
37538
+ return maybeNonRelative;
37563
37539
  }
37564
- if (relativePreference === 3 /* ExternalNonRelative */) {
37540
+ if (relativePreference === 3 /* ExternalNonRelative */ && !pathIsRelative(maybeNonRelative)) {
37565
37541
  const projectDirectory = compilerOptions.configFilePath ? toPath(getDirectoryPath(compilerOptions.configFilePath), host.getCurrentDirectory(), info.getCanonicalFileName) : info.getCanonicalFileName(host.getCurrentDirectory());
37566
37542
  const modulePath = toPath(moduleFileName, projectDirectory, getCanonicalFileName);
37567
37543
  const sourceIsInternal = startsWith(sourceDirectory, projectDirectory);
37568
37544
  const targetIsInternal = startsWith(modulePath, projectDirectory);
37569
37545
  if (sourceIsInternal && !targetIsInternal || !sourceIsInternal && targetIsInternal) {
37570
- return nonRelative;
37546
+ return maybeNonRelative;
37571
37547
  }
37572
37548
  const nearestTargetPackageJson = getNearestAncestorDirectoryWithPackageJson(host, getDirectoryPath(modulePath));
37573
37549
  const nearestSourcePackageJson = getNearestAncestorDirectoryWithPackageJson(host, sourceDirectory);
37574
37550
  if (nearestSourcePackageJson !== nearestTargetPackageJson) {
37575
- return nonRelative;
37551
+ return maybeNonRelative;
37576
37552
  }
37577
37553
  return relativePath;
37578
37554
  }
37579
- if (relativePreference !== 2 /* Shortest */)
37580
- Debug.assertNever(relativePreference);
37581
- return isPathRelativeToParent(nonRelative) || countPathComponents(relativePath) < countPathComponents(nonRelative) ? relativePath : nonRelative;
37555
+ return isPathRelativeToParent(maybeNonRelative) || countPathComponents(relativePath) < countPathComponents(maybeNonRelative) ? relativePath : maybeNonRelative;
37582
37556
  }
37583
37557
  function countPathComponents(path) {
37584
37558
  let count = 0;
@@ -43182,7 +43156,8 @@ function createTypeChecker(host) {
43182
43156
  if (isSingleOrDoubleQuote(firstChar) && some(symbol2.declarations, hasNonGlobalAugmentationExternalModuleSymbol)) {
43183
43157
  return factory.createStringLiteral(getSpecifierForModuleSymbol(symbol2, context));
43184
43158
  }
43185
- if (index === 0 || canUsePropertyAccess(symbolName2, languageVersion)) {
43159
+ const canUsePropertyAccess = firstChar === 35 /* hash */ ? symbolName2.length > 1 && isIdentifierStart(symbolName2.charCodeAt(1), languageVersion) : isIdentifierStart(firstChar, languageVersion);
43160
+ if (index === 0 || canUsePropertyAccess) {
43186
43161
  const identifier = setEmitFlags(factory.createIdentifier(symbolName2, typeParameterNodes), 16777216 /* NoAsciiEscaping */);
43187
43162
  identifier.symbol = symbol2;
43188
43163
  return index > 0 ? factory.createPropertyAccessExpression(createExpressionFromSymbolChain(chain2, index - 1), identifier) : identifier;
@@ -55238,7 +55213,24 @@ function createTypeChecker(host) {
55238
55213
  return isFinite(n) && (!roundTripOnly || "" + n === s);
55239
55214
  }
55240
55215
  function parseBigIntLiteralType(text) {
55241
- return getBigIntLiteralType(parseValidBigInt(text));
55216
+ const negative = text.startsWith("-");
55217
+ const base10Value = parsePseudoBigInt(`${negative ? text.slice(1) : text}n`);
55218
+ return getBigIntLiteralType({ negative, base10Value });
55219
+ }
55220
+ function isValidBigIntString(s, roundTripOnly) {
55221
+ if (s === "")
55222
+ return false;
55223
+ const scanner = createScanner(99 /* ESNext */, false);
55224
+ let success = true;
55225
+ scanner.setOnError(() => success = false);
55226
+ scanner.setText(s + "n");
55227
+ let result = scanner.scan();
55228
+ const negative = result === 40 /* MinusToken */;
55229
+ if (negative) {
55230
+ result = scanner.scan();
55231
+ }
55232
+ const flags = scanner.getTokenFlags();
55233
+ return success && result === 9 /* BigIntLiteral */ && scanner.getTextPos() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner.getTokenValue()) }));
55242
55234
  }
55243
55235
  function isMemberOfStringMapping(source, target) {
55244
55236
  if (target.flags & (4 /* String */ | 1 /* Any */)) {
@@ -102159,12 +102151,12 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
102159
102151
  const resolved = getResolutionWithResolvedFileName(resolution);
102160
102152
  trace(
102161
102153
  host,
102162
- loader === resolveModuleName2 ? (resolved == null ? void 0 : resolved.resolvedFileName) ? resolved.packagetId ? Diagnostics.Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4 : Diagnostics.Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3 : Diagnostics.Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved : (resolved == null ? void 0 : resolved.resolvedFileName) ? resolved.packagetId ? Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4 : Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3 : Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved,
102154
+ loader === resolveModuleName2 ? (resolved == null ? void 0 : resolved.resolvedFileName) ? resolved.packageId ? Diagnostics.Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4 : Diagnostics.Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3 : Diagnostics.Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved : (resolved == null ? void 0 : resolved.resolvedFileName) ? resolved.packageId ? Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4 : Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3 : Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved,
102163
102155
  name,
102164
102156
  containingFile,
102165
102157
  getDirectoryPath(containingFile),
102166
102158
  resolved == null ? void 0 : resolved.resolvedFileName,
102167
- (resolved == null ? void 0 : resolved.packagetId) && packageIdToString(resolved.packagetId)
102159
+ (resolved == null ? void 0 : resolved.packageId) && packageIdToString(resolved.packageId)
102168
102160
  );
102169
102161
  }
102170
102162
  } else {
@@ -102189,11 +102181,11 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
102189
102181
  const resolved = getResolutionWithResolvedFileName(resolution);
102190
102182
  trace(
102191
102183
  host,
102192
- loader === resolveModuleName2 ? (resolved == null ? void 0 : resolved.resolvedFileName) ? resolved.packagetId ? Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved : (resolved == null ? void 0 : resolved.resolvedFileName) ? resolved.packagetId ? Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved,
102184
+ loader === resolveModuleName2 ? (resolved == null ? void 0 : resolved.resolvedFileName) ? resolved.packageId ? Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved : (resolved == null ? void 0 : resolved.resolvedFileName) ? resolved.packageId ? Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved,
102193
102185
  name,
102194
102186
  containingFile,
102195
102187
  resolved == null ? void 0 : resolved.resolvedFileName,
102196
- (resolved == null ? void 0 : resolved.packagetId) && packageIdToString(resolved.packagetId)
102188
+ (resolved == null ? void 0 : resolved.packageId) && packageIdToString(resolved.packageId)
102197
102189
  );
102198
102190
  }
102199
102191
  }