typescript 5.0.0-dev.20221205 → 5.0.0-dev.20221206

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.
@@ -50,7 +50,7 @@ var path = __toESM(require("path"));
50
50
 
51
51
  // src/compiler/corePublic.ts
52
52
  var versionMajorMinor = "5.0";
53
- var version = `${versionMajorMinor}.0-dev.20221205`;
53
+ var version = `${versionMajorMinor}.0-dev.20221206`;
54
54
 
55
55
  // src/compiler/core.ts
56
56
  var emptyArray = [];
@@ -25757,17 +25757,29 @@ function formatExtensions(extensions) {
25757
25757
  }
25758
25758
  function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache) {
25759
25759
  if (resultFromCache) {
25760
- resultFromCache.failedLookupLocations.push(...failedLookupLocations);
25761
- resultFromCache.affectingLocations.push(...affectingLocations);
25760
+ resultFromCache.failedLookupLocations = updateResolutionField(resultFromCache.failedLookupLocations, failedLookupLocations);
25761
+ resultFromCache.affectingLocations = updateResolutionField(resultFromCache.affectingLocations, affectingLocations);
25762
+ resultFromCache.resolutionDiagnostics = updateResolutionField(resultFromCache.resolutionDiagnostics, diagnostics);
25762
25763
  return resultFromCache;
25763
25764
  }
25764
25765
  return {
25765
25766
  resolvedModule: resolved && { resolvedFileName: resolved.path, originalPath: resolved.originalPath === true ? void 0 : resolved.originalPath, extension: resolved.extension, isExternalLibraryImport, packageId: resolved.packageId },
25766
- failedLookupLocations,
25767
- affectingLocations,
25768
- resolutionDiagnostics: diagnostics
25767
+ failedLookupLocations: initializeResolutionField(failedLookupLocations),
25768
+ affectingLocations: initializeResolutionField(affectingLocations),
25769
+ resolutionDiagnostics: initializeResolutionField(diagnostics)
25769
25770
  };
25770
25771
  }
25772
+ function initializeResolutionField(value) {
25773
+ return value.length ? value : void 0;
25774
+ }
25775
+ function updateResolutionField(to, value) {
25776
+ if (!(value == null ? void 0 : value.length))
25777
+ return to;
25778
+ if (!(to == null ? void 0 : to.length))
25779
+ return value;
25780
+ to.push(...value);
25781
+ return to;
25782
+ }
25771
25783
  function readPackageJsonField(jsonContent, fieldName, typeOfTag, state) {
25772
25784
  if (!hasProperty(jsonContent, fieldName)) {
25773
25785
  if (state.traceEnabled) {
@@ -26051,7 +26063,7 @@ function tryLoadModuleUsingBaseUrl(extensions, moduleName, loader, state) {
26051
26063
  function resolveJSModule(moduleName, initialDir, host) {
26052
26064
  const { resolvedModule, failedLookupLocations } = tryResolveJSModuleWorker(moduleName, initialDir, host);
26053
26065
  if (!resolvedModule) {
26054
- throw new Error(`Could not resolve JS module '${moduleName}' starting at '${initialDir}'. Looked in: ${failedLookupLocations.join(", ")}`);
26066
+ throw new Error(`Could not resolve JS module '${moduleName}' starting at '${initialDir}'. Looked in: ${failedLookupLocations == null ? void 0 : failedLookupLocations.join(", ")}`);
26055
26067
  }
26056
26068
  return resolvedModule.resolvedFileName;
26057
26069
  }
@@ -31680,7 +31692,7 @@ var BuilderState;
31680
31692
  }
31681
31693
  }
31682
31694
  if (sourceFile.resolvedTypeReferenceDirectiveNames) {
31683
- sourceFile.resolvedTypeReferenceDirectiveNames.forEach((resolvedTypeReferenceDirective) => {
31695
+ sourceFile.resolvedTypeReferenceDirectiveNames.forEach(({ resolvedTypeReferenceDirective }) => {
31684
31696
  if (!resolvedTypeReferenceDirective) {
31685
31697
  return;
31686
31698
  }
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.0.0-dev.20221205",
5
+ "version": "5.0.0-dev.20221206",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [