@typescript-deploys/pr-build 5.8.0-pr-60800-2 → 5.8.0-pr-60755-11

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 = "5.8";
21
- var version = `${versionMajorMinor}.0-insiders.20241217`;
21
+ var version = `${versionMajorMinor}.0-insiders.20241218`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -5502,33 +5502,21 @@ function getNormalizedPathComponents(path, currentDirectory) {
5502
5502
  return reducePathComponents(getPathComponents(path, currentDirectory));
5503
5503
  }
5504
5504
  function getNormalizedAbsolutePath(fileName, currentDirectory) {
5505
+ fileName = normalizeSlashes(fileName);
5505
5506
  if (isNotNormalizedOrAbsolute(fileName)) {
5506
5507
  return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory));
5507
5508
  }
5508
5509
  return fileName;
5509
5510
  }
5510
5511
  function isNotNormalizedOrAbsolute(s) {
5511
- if (getEncodedRootLength(s) === 0) return true;
5512
- if (s.length > 0) {
5513
- const lastChar = s.charCodeAt(s.length - 1);
5514
- if (lastChar === 47 /* slash */ || lastChar === 92 /* backslash */) return true;
5515
- }
5516
- for (let i = 0, n = s.length - 1; i < n; i++) {
5517
- const curr = s.charCodeAt(i);
5518
- const next = s.charCodeAt(i + 1);
5519
- if (curr === 46 /* dot */) {
5520
- if (next === 47 /* slash */) {
5521
- return true;
5522
- }
5523
- } else if (curr === 47 /* slash */) {
5524
- if (next === 47 /* slash */) {
5525
- return true;
5526
- }
5527
- } else if (curr === 92 /* backslash */) {
5528
- return true;
5529
- }
5512
+ if (getEncodedRootLength(s) === 0) {
5513
+ return true;
5530
5514
  }
5531
- return false;
5515
+ const lastChar = s.charCodeAt(s.length - 1);
5516
+ if (lastChar === 47 /* slash */) {
5517
+ return true;
5518
+ }
5519
+ return relativePathSegmentRegExp.test(s);
5532
5520
  }
5533
5521
  function normalizePath(path) {
5534
5522
  path = normalizeSlashes(path);
@@ -45156,7 +45144,9 @@ function getLocalModuleSpecifier(moduleFileName, info, compilerOptions, host, im
45156
45144
  if (!baseUrl && !paths && !getResolvePackageJsonImports(compilerOptions) || relativePreference === 0 /* Relative */) {
45157
45145
  return pathsOnly ? void 0 : relativePath;
45158
45146
  }
45159
- const baseDirectory = getNormalizedAbsolutePath(getPathsBasePath(compilerOptions, host) || baseUrl, host.getCurrentDirectory());
45147
+ const currentDirectory = host.getCurrentDirectory();
45148
+ const basePath = getPathsBasePath(compilerOptions, host) ?? baseUrl ?? currentDirectory;
45149
+ const baseDirectory = getNormalizedAbsolutePath(basePath, currentDirectory);
45160
45150
  const relativeToBaseUrl = getRelativePathIfInSameVolume(moduleFileName, baseDirectory, getCanonicalFileName);
45161
45151
  if (!relativeToBaseUrl) {
45162
45152
  return pathsOnly ? void 0 : relativePath;
@@ -121231,9 +121221,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
121231
121221
  let skipDefaultLib = options.noLib;
121232
121222
  const getDefaultLibraryFileName = memoize(() => host.getDefaultLibFileName(options));
121233
121223
  const defaultLibraryPath = host.getDefaultLibLocation ? host.getDefaultLibLocation() : getDirectoryPath(getDefaultLibraryFileName());
121234
- let programDiagnostics;
121235
- let reuseConfigDiagnostics = false;
121236
- let configDiagnostics;
121224
+ const programDiagnostics = createDiagnosticCollection();
121237
121225
  let lazyProgramDiagnosticExplainingFile = [];
121238
121226
  const currentDirectory = host.getCurrentDirectory();
121239
121227
  const supportedExtensions = getSupportedExtensions(options);
@@ -121528,7 +121516,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
121528
121516
  resolvedModules,
121529
121517
  resolvedTypeReferenceDirectiveNames,
121530
121518
  resolvedLibReferences,
121531
- getConfigDiagnostics: () => configDiagnostics,
121532
121519
  getResolvedModule,
121533
121520
  getResolvedModuleFromModuleSpecifier,
121534
121521
  getResolvedTypeReferenceDirective,
@@ -121567,19 +121554,12 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
121567
121554
  getGlobalTypingsCacheLocation: maybeBind(host, host.getGlobalTypingsCacheLocation)
121568
121555
  };
121569
121556
  onProgramCreateComplete();
121570
- if (!reuseConfigDiagnostics) {
121571
- verifyCompilerOptions();
121572
- }
121557
+ verifyCompilerOptions();
121573
121558
  mark("afterProgram");
121574
121559
  measure("Program", "beforeProgram", "afterProgram");
121575
121560
  (_p = tracing) == null ? void 0 : _p.pop();
121576
121561
  return program;
121577
121562
  function updateAndGetProgramDiagnostics() {
121578
- if (programDiagnostics) {
121579
- return programDiagnostics;
121580
- }
121581
- programDiagnostics = createDiagnosticCollection();
121582
- configDiagnostics == null ? void 0 : configDiagnostics.getDiagnostics().forEach((d) => programDiagnostics.add(d));
121583
121563
  if (lazyProgramDiagnosticExplainingFile) {
121584
121564
  fileProcessingDiagnostics == null ? void 0 : fileProcessingDiagnostics.forEach((diagnostic) => {
121585
121565
  switch (diagnostic.kind) {
@@ -122094,10 +122074,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
122094
122074
  }
122095
122075
  filesByName.set(path, filesByName.get(oldFile.path));
122096
122076
  });
122097
- if (oldOptions.configFile && oldOptions.configFile === options.configFile || !oldOptions.configFile && !options.configFile && !optionsHaveChanges(oldOptions, options, optionDeclarations)) {
122098
- configDiagnostics = oldProgram.getConfigDiagnostics();
122099
- reuseConfigDiagnostics = true;
122100
- }
122101
122077
  files = newSourceFiles;
122102
122078
  fileReasons = oldProgram.getFileIncludeReasons();
122103
122079
  fileProcessingDiagnostics = oldProgram.getFileProcessingDiagnostics();
@@ -123456,7 +123432,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
123456
123432
  }
123457
123433
  const outputFile = options.outFile;
123458
123434
  if (!options.tsBuildInfoFile && options.incremental && !outputFile && !options.configFilePath) {
123459
- addConfigDiagnostic(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));
123435
+ programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));
123460
123436
  }
123461
123437
  verifyDeprecatedCompilerOptions();
123462
123438
  verifyProjectReferences();
@@ -123558,14 +123534,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
123558
123534
  }
123559
123535
  } else if (firstNonAmbientExternalModuleSourceFile && languageVersion < 2 /* ES2015 */ && options.module === 0 /* None */) {
123560
123536
  const span = getErrorSpanForNode(firstNonAmbientExternalModuleSourceFile, typeof firstNonAmbientExternalModuleSourceFile.externalModuleIndicator === "boolean" ? firstNonAmbientExternalModuleSourceFile : firstNonAmbientExternalModuleSourceFile.externalModuleIndicator);
123561
- addConfigDiagnostic(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none));
123537
+ programDiagnostics.add(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none));
123562
123538
  }
123563
123539
  if (outputFile && !options.emitDeclarationOnly) {
123564
123540
  if (options.module && !(options.module === 2 /* AMD */ || options.module === 4 /* System */)) {
123565
123541
  createDiagnosticForOptionName(Diagnostics.Only_amd_and_system_modules_are_supported_alongside_0, "outFile", "module");
123566
123542
  } else if (options.module === void 0 && firstNonAmbientExternalModuleSourceFile) {
123567
123543
  const span = getErrorSpanForNode(firstNonAmbientExternalModuleSourceFile, typeof firstNonAmbientExternalModuleSourceFile.externalModuleIndicator === "boolean" ? firstNonAmbientExternalModuleSourceFile : firstNonAmbientExternalModuleSourceFile.externalModuleIndicator);
123568
- addConfigDiagnostic(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system, "outFile"));
123544
+ programDiagnostics.add(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system, "outFile"));
123569
123545
  }
123570
123546
  }
123571
123547
  if (getResolveJsonModule(options)) {
@@ -124036,7 +124012,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
124036
124012
  forEachPropertyAssignment(pathProp.initializer, key, (keyProps) => {
124037
124013
  const initializer = keyProps.initializer;
124038
124014
  if (isArrayLiteralExpression(initializer) && initializer.elements.length > valueIndex) {
124039
- addConfigDiagnostic(createDiagnosticForNodeInSourceFile(options.configFile, initializer.elements[valueIndex], message, ...args));
124015
+ programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, initializer.elements[valueIndex], message, ...args));
124040
124016
  needCompilerDiagnostic = false;
124041
124017
  }
124042
124018
  });
@@ -124104,9 +124080,9 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
124104
124080
  function createDiagnosticForReference(sourceFile, index, message, ...args) {
124105
124081
  const referencesSyntax = forEachTsConfigPropArray(sourceFile || options.configFile, "references", (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0);
124106
124082
  if (referencesSyntax && referencesSyntax.elements.length > index) {
124107
- addConfigDiagnostic(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, ...args));
124083
+ programDiagnostics.add(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, ...args));
124108
124084
  } else {
124109
- addConfigDiagnostic(createCompilerDiagnostic(message, ...args));
124085
+ programDiagnostics.add(createCompilerDiagnostic(message, ...args));
124110
124086
  }
124111
124087
  }
124112
124088
  function createDiagnosticForOption(onKey, option1, option2, message, ...args) {
@@ -124120,14 +124096,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
124120
124096
  const compilerOptionsProperty = getCompilerOptionsPropertySyntax();
124121
124097
  if (compilerOptionsProperty) {
124122
124098
  if ("messageText" in message) {
124123
- addConfigDiagnostic(createDiagnosticForNodeFromMessageChain(options.configFile, compilerOptionsProperty.name, message));
124099
+ programDiagnostics.add(createDiagnosticForNodeFromMessageChain(options.configFile, compilerOptionsProperty.name, message));
124124
124100
  } else {
124125
- addConfigDiagnostic(createDiagnosticForNodeInSourceFile(options.configFile, compilerOptionsProperty.name, message, ...args));
124101
+ programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, compilerOptionsProperty.name, message, ...args));
124126
124102
  }
124127
124103
  } else if ("messageText" in message) {
124128
- addConfigDiagnostic(createCompilerDiagnosticFromMessageChain(message));
124104
+ programDiagnostics.add(createCompilerDiagnosticFromMessageChain(message));
124129
124105
  } else {
124130
- addConfigDiagnostic(createCompilerDiagnostic(message, ...args));
124106
+ programDiagnostics.add(createCompilerDiagnostic(message, ...args));
124131
124107
  }
124132
124108
  }
124133
124109
  function getCompilerOptionsObjectLiteralSyntax() {
@@ -124151,9 +124127,9 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
124151
124127
  let needsCompilerDiagnostic = false;
124152
124128
  forEachPropertyAssignment(objectLiteral, key1, (prop) => {
124153
124129
  if ("messageText" in message) {
124154
- addConfigDiagnostic(createDiagnosticForNodeFromMessageChain(options.configFile, onKey ? prop.name : prop.initializer, message));
124130
+ programDiagnostics.add(createDiagnosticForNodeFromMessageChain(options.configFile, onKey ? prop.name : prop.initializer, message));
124155
124131
  } else {
124156
- addConfigDiagnostic(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, ...args));
124132
+ programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, ...args));
124157
124133
  }
124158
124134
  needsCompilerDiagnostic = true;
124159
124135
  }, key2);
@@ -124161,10 +124137,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
124161
124137
  }
124162
124138
  function blockEmittingOfFile(emitFileName, diag2) {
124163
124139
  hasEmitBlockingDiagnostics.set(toPath3(emitFileName), true);
124164
- addConfigDiagnostic(diag2);
124165
- }
124166
- function addConfigDiagnostic(diag2) {
124167
- (configDiagnostics ?? (configDiagnostics = createDiagnosticCollection())).add(diag2);
124140
+ programDiagnostics.add(diag2);
124168
124141
  }
124169
124142
  function isEmittedFile(file) {
124170
124143
  if (options.noEmit) {
@@ -125417,7 +125390,7 @@ function getBuildInfo2(state) {
125417
125390
  var _a, _b;
125418
125391
  const currentDirectory = state.program.getCurrentDirectory();
125419
125392
  const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory));
125420
- const latestChangedDtsFile = state.latestChangedDtsFile ? relativeToBuildInfoEnsuringAbsolutePath(state.latestChangedDtsFile) : void 0;
125393
+ const latestChangedDtsFile = state.latestChangedDtsFile ? relativePathToBuildInfo(state.latestChangedDtsFile) : void 0;
125421
125394
  const fileNames = [];
125422
125395
  const fileNameToFileId = /* @__PURE__ */ new Map();
125423
125396
  const rootFileNames = new Set(state.program.getRootFileNames().map((f) => toPath(f, currentDirectory, state.program.getCanonicalFileName)));
@@ -125559,9 +125532,15 @@ function getBuildInfo2(state) {
125559
125532
  version
125560
125533
  };
125561
125534
  return buildInfo;
125562
- function relativeToBuildInfoEnsuringAbsolutePath(path) {
125535
+ function relativePathToBuildInfo(path) {
125563
125536
  return relativeToBuildInfo(getNormalizedAbsolutePath(path, currentDirectory));
125564
125537
  }
125538
+ function relativePathToBuildInfoOrOriginalValue(path) {
125539
+ if (typeof path === "string") {
125540
+ return relativePathToBuildInfo(path);
125541
+ }
125542
+ return void 0;
125543
+ }
125565
125544
  function relativeToBuildInfo(path) {
125566
125545
  return ensurePathIsNonModuleName(getRelativePathFromDirectory(buildInfoDirectory, path, state.program.getCanonicalFileName));
125567
125546
  }
@@ -125626,10 +125605,10 @@ function getBuildInfo2(state) {
125626
125605
  if (option.type === "list") {
125627
125606
  const values = value;
125628
125607
  if (option.element.isFilePath && values.length) {
125629
- return values.map(relativeToBuildInfoEnsuringAbsolutePath);
125608
+ return mapDefined(values, relativePathToBuildInfoOrOriginalValue);
125630
125609
  }
125631
125610
  } else if (option.isFilePath) {
125632
- return relativeToBuildInfoEnsuringAbsolutePath(value);
125611
+ return relativePathToBuildInfoOrOriginalValue(value);
125633
125612
  }
125634
125613
  }
125635
125614
  return value;
package/lib/typescript.js CHANGED
@@ -2279,7 +2279,7 @@ module.exports = __toCommonJS(typescript_exports);
2279
2279
 
2280
2280
  // src/compiler/corePublic.ts
2281
2281
  var versionMajorMinor = "5.8";
2282
- var version = `${versionMajorMinor}.0-insiders.20241217`;
2282
+ var version = `${versionMajorMinor}.0-insiders.20241218`;
2283
2283
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2284
2284
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2285
2285
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -8876,33 +8876,21 @@ function getNormalizedPathComponents(path, currentDirectory) {
8876
8876
  return reducePathComponents(getPathComponents(path, currentDirectory));
8877
8877
  }
8878
8878
  function getNormalizedAbsolutePath(fileName, currentDirectory) {
8879
+ fileName = normalizeSlashes(fileName);
8879
8880
  if (isNotNormalizedOrAbsolute(fileName)) {
8880
8881
  return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory));
8881
8882
  }
8882
8883
  return fileName;
8883
8884
  }
8884
8885
  function isNotNormalizedOrAbsolute(s) {
8885
- if (getEncodedRootLength(s) === 0) return true;
8886
- if (s.length > 0) {
8887
- const lastChar = s.charCodeAt(s.length - 1);
8888
- if (lastChar === 47 /* slash */ || lastChar === 92 /* backslash */) return true;
8889
- }
8890
- for (let i = 0, n = s.length - 1; i < n; i++) {
8891
- const curr = s.charCodeAt(i);
8892
- const next = s.charCodeAt(i + 1);
8893
- if (curr === 46 /* dot */) {
8894
- if (next === 47 /* slash */) {
8895
- return true;
8896
- }
8897
- } else if (curr === 47 /* slash */) {
8898
- if (next === 47 /* slash */) {
8899
- return true;
8900
- }
8901
- } else if (curr === 92 /* backslash */) {
8902
- return true;
8903
- }
8886
+ if (getEncodedRootLength(s) === 0) {
8887
+ return true;
8904
8888
  }
8905
- return false;
8889
+ const lastChar = s.charCodeAt(s.length - 1);
8890
+ if (lastChar === 47 /* slash */) {
8891
+ return true;
8892
+ }
8893
+ return relativePathSegmentRegExp.test(s);
8906
8894
  }
8907
8895
  function normalizePath(path) {
8908
8896
  path = normalizeSlashes(path);
@@ -49745,7 +49733,9 @@ function getLocalModuleSpecifier(moduleFileName, info, compilerOptions, host, im
49745
49733
  if (!baseUrl && !paths && !getResolvePackageJsonImports(compilerOptions) || relativePreference === 0 /* Relative */) {
49746
49734
  return pathsOnly ? void 0 : relativePath;
49747
49735
  }
49748
- const baseDirectory = getNormalizedAbsolutePath(getPathsBasePath(compilerOptions, host) || baseUrl, host.getCurrentDirectory());
49736
+ const currentDirectory = host.getCurrentDirectory();
49737
+ const basePath = getPathsBasePath(compilerOptions, host) ?? baseUrl ?? currentDirectory;
49738
+ const baseDirectory = getNormalizedAbsolutePath(basePath, currentDirectory);
49749
49739
  const relativeToBaseUrl = getRelativePathIfInSameVolume(moduleFileName, baseDirectory, getCanonicalFileName);
49750
49740
  if (!relativeToBaseUrl) {
49751
49741
  return pathsOnly ? void 0 : relativePath;
@@ -126074,9 +126064,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126074
126064
  let skipDefaultLib = options.noLib;
126075
126065
  const getDefaultLibraryFileName = memoize(() => host.getDefaultLibFileName(options));
126076
126066
  const defaultLibraryPath = host.getDefaultLibLocation ? host.getDefaultLibLocation() : getDirectoryPath(getDefaultLibraryFileName());
126077
- let programDiagnostics;
126078
- let reuseConfigDiagnostics = false;
126079
- let configDiagnostics;
126067
+ const programDiagnostics = createDiagnosticCollection();
126080
126068
  let lazyProgramDiagnosticExplainingFile = [];
126081
126069
  const currentDirectory = host.getCurrentDirectory();
126082
126070
  const supportedExtensions = getSupportedExtensions(options);
@@ -126371,7 +126359,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126371
126359
  resolvedModules,
126372
126360
  resolvedTypeReferenceDirectiveNames,
126373
126361
  resolvedLibReferences,
126374
- getConfigDiagnostics: () => configDiagnostics,
126375
126362
  getResolvedModule,
126376
126363
  getResolvedModuleFromModuleSpecifier,
126377
126364
  getResolvedTypeReferenceDirective,
@@ -126410,19 +126397,12 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126410
126397
  getGlobalTypingsCacheLocation: maybeBind(host, host.getGlobalTypingsCacheLocation)
126411
126398
  };
126412
126399
  onProgramCreateComplete();
126413
- if (!reuseConfigDiagnostics) {
126414
- verifyCompilerOptions();
126415
- }
126400
+ verifyCompilerOptions();
126416
126401
  mark("afterProgram");
126417
126402
  measure("Program", "beforeProgram", "afterProgram");
126418
126403
  (_p = tracing) == null ? void 0 : _p.pop();
126419
126404
  return program;
126420
126405
  function updateAndGetProgramDiagnostics() {
126421
- if (programDiagnostics) {
126422
- return programDiagnostics;
126423
- }
126424
- programDiagnostics = createDiagnosticCollection();
126425
- configDiagnostics == null ? void 0 : configDiagnostics.getDiagnostics().forEach((d) => programDiagnostics.add(d));
126426
126406
  if (lazyProgramDiagnosticExplainingFile) {
126427
126407
  fileProcessingDiagnostics == null ? void 0 : fileProcessingDiagnostics.forEach((diagnostic) => {
126428
126408
  switch (diagnostic.kind) {
@@ -126937,10 +126917,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126937
126917
  }
126938
126918
  filesByName.set(path, filesByName.get(oldFile.path));
126939
126919
  });
126940
- if (oldOptions.configFile && oldOptions.configFile === options.configFile || !oldOptions.configFile && !options.configFile && !optionsHaveChanges(oldOptions, options, optionDeclarations)) {
126941
- configDiagnostics = oldProgram.getConfigDiagnostics();
126942
- reuseConfigDiagnostics = true;
126943
- }
126944
126920
  files = newSourceFiles;
126945
126921
  fileReasons = oldProgram.getFileIncludeReasons();
126946
126922
  fileProcessingDiagnostics = oldProgram.getFileProcessingDiagnostics();
@@ -128299,7 +128275,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
128299
128275
  }
128300
128276
  const outputFile = options.outFile;
128301
128277
  if (!options.tsBuildInfoFile && options.incremental && !outputFile && !options.configFilePath) {
128302
- addConfigDiagnostic(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));
128278
+ programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));
128303
128279
  }
128304
128280
  verifyDeprecatedCompilerOptions();
128305
128281
  verifyProjectReferences();
@@ -128401,14 +128377,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
128401
128377
  }
128402
128378
  } else if (firstNonAmbientExternalModuleSourceFile && languageVersion < 2 /* ES2015 */ && options.module === 0 /* None */) {
128403
128379
  const span = getErrorSpanForNode(firstNonAmbientExternalModuleSourceFile, typeof firstNonAmbientExternalModuleSourceFile.externalModuleIndicator === "boolean" ? firstNonAmbientExternalModuleSourceFile : firstNonAmbientExternalModuleSourceFile.externalModuleIndicator);
128404
- addConfigDiagnostic(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none));
128380
+ programDiagnostics.add(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none));
128405
128381
  }
128406
128382
  if (outputFile && !options.emitDeclarationOnly) {
128407
128383
  if (options.module && !(options.module === 2 /* AMD */ || options.module === 4 /* System */)) {
128408
128384
  createDiagnosticForOptionName(Diagnostics.Only_amd_and_system_modules_are_supported_alongside_0, "outFile", "module");
128409
128385
  } else if (options.module === void 0 && firstNonAmbientExternalModuleSourceFile) {
128410
128386
  const span = getErrorSpanForNode(firstNonAmbientExternalModuleSourceFile, typeof firstNonAmbientExternalModuleSourceFile.externalModuleIndicator === "boolean" ? firstNonAmbientExternalModuleSourceFile : firstNonAmbientExternalModuleSourceFile.externalModuleIndicator);
128411
- addConfigDiagnostic(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system, "outFile"));
128387
+ programDiagnostics.add(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system, "outFile"));
128412
128388
  }
128413
128389
  }
128414
128390
  if (getResolveJsonModule(options)) {
@@ -128879,7 +128855,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
128879
128855
  forEachPropertyAssignment(pathProp.initializer, key, (keyProps) => {
128880
128856
  const initializer = keyProps.initializer;
128881
128857
  if (isArrayLiteralExpression(initializer) && initializer.elements.length > valueIndex) {
128882
- addConfigDiagnostic(createDiagnosticForNodeInSourceFile(options.configFile, initializer.elements[valueIndex], message, ...args));
128858
+ programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, initializer.elements[valueIndex], message, ...args));
128883
128859
  needCompilerDiagnostic = false;
128884
128860
  }
128885
128861
  });
@@ -128947,9 +128923,9 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
128947
128923
  function createDiagnosticForReference(sourceFile, index, message, ...args) {
128948
128924
  const referencesSyntax = forEachTsConfigPropArray(sourceFile || options.configFile, "references", (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0);
128949
128925
  if (referencesSyntax && referencesSyntax.elements.length > index) {
128950
- addConfigDiagnostic(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, ...args));
128926
+ programDiagnostics.add(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, ...args));
128951
128927
  } else {
128952
- addConfigDiagnostic(createCompilerDiagnostic(message, ...args));
128928
+ programDiagnostics.add(createCompilerDiagnostic(message, ...args));
128953
128929
  }
128954
128930
  }
128955
128931
  function createDiagnosticForOption(onKey, option1, option2, message, ...args) {
@@ -128963,14 +128939,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
128963
128939
  const compilerOptionsProperty = getCompilerOptionsPropertySyntax();
128964
128940
  if (compilerOptionsProperty) {
128965
128941
  if ("messageText" in message) {
128966
- addConfigDiagnostic(createDiagnosticForNodeFromMessageChain(options.configFile, compilerOptionsProperty.name, message));
128942
+ programDiagnostics.add(createDiagnosticForNodeFromMessageChain(options.configFile, compilerOptionsProperty.name, message));
128967
128943
  } else {
128968
- addConfigDiagnostic(createDiagnosticForNodeInSourceFile(options.configFile, compilerOptionsProperty.name, message, ...args));
128944
+ programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, compilerOptionsProperty.name, message, ...args));
128969
128945
  }
128970
128946
  } else if ("messageText" in message) {
128971
- addConfigDiagnostic(createCompilerDiagnosticFromMessageChain(message));
128947
+ programDiagnostics.add(createCompilerDiagnosticFromMessageChain(message));
128972
128948
  } else {
128973
- addConfigDiagnostic(createCompilerDiagnostic(message, ...args));
128949
+ programDiagnostics.add(createCompilerDiagnostic(message, ...args));
128974
128950
  }
128975
128951
  }
128976
128952
  function getCompilerOptionsObjectLiteralSyntax() {
@@ -128994,9 +128970,9 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
128994
128970
  let needsCompilerDiagnostic = false;
128995
128971
  forEachPropertyAssignment(objectLiteral, key1, (prop) => {
128996
128972
  if ("messageText" in message) {
128997
- addConfigDiagnostic(createDiagnosticForNodeFromMessageChain(options.configFile, onKey ? prop.name : prop.initializer, message));
128973
+ programDiagnostics.add(createDiagnosticForNodeFromMessageChain(options.configFile, onKey ? prop.name : prop.initializer, message));
128998
128974
  } else {
128999
- addConfigDiagnostic(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, ...args));
128975
+ programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, ...args));
129000
128976
  }
129001
128977
  needsCompilerDiagnostic = true;
129002
128978
  }, key2);
@@ -129004,10 +128980,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
129004
128980
  }
129005
128981
  function blockEmittingOfFile(emitFileName, diag2) {
129006
128982
  hasEmitBlockingDiagnostics.set(toPath3(emitFileName), true);
129007
- addConfigDiagnostic(diag2);
129008
- }
129009
- function addConfigDiagnostic(diag2) {
129010
- (configDiagnostics ?? (configDiagnostics = createDiagnosticCollection())).add(diag2);
128983
+ programDiagnostics.add(diag2);
129011
128984
  }
129012
128985
  function isEmittedFile(file) {
129013
128986
  if (options.noEmit) {
@@ -130289,7 +130262,7 @@ function getBuildInfo2(state) {
130289
130262
  var _a, _b;
130290
130263
  const currentDirectory = state.program.getCurrentDirectory();
130291
130264
  const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory));
130292
- const latestChangedDtsFile = state.latestChangedDtsFile ? relativeToBuildInfoEnsuringAbsolutePath(state.latestChangedDtsFile) : void 0;
130265
+ const latestChangedDtsFile = state.latestChangedDtsFile ? relativePathToBuildInfo(state.latestChangedDtsFile) : void 0;
130293
130266
  const fileNames = [];
130294
130267
  const fileNameToFileId = /* @__PURE__ */ new Map();
130295
130268
  const rootFileNames = new Set(state.program.getRootFileNames().map((f) => toPath(f, currentDirectory, state.program.getCanonicalFileName)));
@@ -130431,9 +130404,15 @@ function getBuildInfo2(state) {
130431
130404
  version
130432
130405
  };
130433
130406
  return buildInfo;
130434
- function relativeToBuildInfoEnsuringAbsolutePath(path) {
130407
+ function relativePathToBuildInfo(path) {
130435
130408
  return relativeToBuildInfo(getNormalizedAbsolutePath(path, currentDirectory));
130436
130409
  }
130410
+ function relativePathToBuildInfoOrOriginalValue(path) {
130411
+ if (typeof path === "string") {
130412
+ return relativePathToBuildInfo(path);
130413
+ }
130414
+ return void 0;
130415
+ }
130437
130416
  function relativeToBuildInfo(path) {
130438
130417
  return ensurePathIsNonModuleName(getRelativePathFromDirectory(buildInfoDirectory, path, state.program.getCanonicalFileName));
130439
130418
  }
@@ -130498,10 +130477,10 @@ function getBuildInfo2(state) {
130498
130477
  if (option.type === "list") {
130499
130478
  const values = value;
130500
130479
  if (option.element.isFilePath && values.length) {
130501
- return values.map(relativeToBuildInfoEnsuringAbsolutePath);
130480
+ return mapDefined(values, relativePathToBuildInfoOrOriginalValue);
130502
130481
  }
130503
130482
  } else if (option.isFilePath) {
130504
- return relativeToBuildInfoEnsuringAbsolutePath(value);
130483
+ return relativePathToBuildInfoOrOriginalValue(value);
130505
130484
  }
130506
130485
  }
130507
130486
  return value;
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": "5.8.0-pr-60800-2",
5
+ "version": "5.8.0-pr-60755-11",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [