@typescript-deploys/pr-build 5.4.0-pr-57029-27 → 5.4.0-pr-57133-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 +15 -57
- package/lib/tsserver.js +15 -57
- package/lib/typescript.d.ts +0 -1
- package/lib/typescript.js +2319 -58
- package/lib/typingsInstaller.js +13 -55
- package/package.json +2 -2
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.4";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20240123`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -7145,9 +7145,6 @@ var Diagnostics = {
|
|
|
7145
7145
|
There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings: diag(6278, 3 /* Message */, "There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278", `There are types at '{0}', but this result could not be resolved when respecting package.json "exports". The '{1}' library may need to update its package.json or typings.`),
|
|
7146
7146
|
Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update: diag(6279, 3 /* Message */, "Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_ne_6279", "Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update."),
|
|
7147
7147
|
There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler: diag(6280, 3 /* Message */, "There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setti_6280", "There are types at '{0}', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'."),
|
|
7148
|
-
package_json_has_a_peerDependencies_field: diag(6281, 3 /* Message */, "package_json_has_a_peerDependencies_field_6281", "'package.json' has a 'peerDependencies' field."),
|
|
7149
|
-
Found_peerDependency_0_with_1_version: diag(6282, 3 /* Message */, "Found_peerDependency_0_with_1_version_6282", "Found peerDependency '{0}' with '{1}' version."),
|
|
7150
|
-
Failed_to_find_peerDependency_0: diag(6283, 3 /* Message */, "Failed_to_find_peerDependency_0_6283", "Failed to find peerDependency '{0}'."),
|
|
7151
7148
|
Enable_project_compilation: diag(6302, 3 /* Message */, "Enable_project_compilation_6302", "Enable project compilation"),
|
|
7152
7149
|
Composite_projects_may_not_disable_declaration_emit: diag(6304, 1 /* Error */, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."),
|
|
7153
7150
|
Output_file_0_has_not_been_built_from_source_file_1: diag(6305, 1 /* Error */, "Output_file_0_has_not_been_built_from_source_file_1_6305", "Output file '{0}' has not been built from source file '{1}'."),
|
|
@@ -11582,13 +11579,13 @@ function createModuleNotFoundChain(sourceFile, host, moduleReference, mode, pack
|
|
|
11582
11579
|
return result;
|
|
11583
11580
|
}
|
|
11584
11581
|
function packageIdIsEqual(a, b) {
|
|
11585
|
-
return a === b || !!a && !!b && a.name === b.name && a.subModuleName === b.subModuleName && a.version === b.version
|
|
11582
|
+
return a === b || !!a && !!b && a.name === b.name && a.subModuleName === b.subModuleName && a.version === b.version;
|
|
11586
11583
|
}
|
|
11587
11584
|
function packageIdToPackageName({ name, subModuleName }) {
|
|
11588
11585
|
return subModuleName ? `${name}/${subModuleName}` : name;
|
|
11589
11586
|
}
|
|
11590
11587
|
function packageIdToString(packageId) {
|
|
11591
|
-
return `${packageIdToPackageName(packageId)}@${packageId.version}
|
|
11588
|
+
return `${packageIdToPackageName(packageId)}@${packageId.version}`;
|
|
11592
11589
|
}
|
|
11593
11590
|
function typeDirectiveIsEqualTo(oldResolution, newResolution) {
|
|
11594
11591
|
return oldResolution === newResolution || oldResolution.resolvedTypeReferenceDirective === newResolution.resolvedTypeReferenceDirective || !!oldResolution.resolvedTypeReferenceDirective && !!newResolution.resolvedTypeReferenceDirective && oldResolution.resolvedTypeReferenceDirective.resolvedFileName === newResolution.resolvedTypeReferenceDirective.resolvedFileName && !!oldResolution.resolvedTypeReferenceDirective.primary === !!newResolution.resolvedTypeReferenceDirective.primary && oldResolution.resolvedTypeReferenceDirective.originalPath === newResolution.resolvedTypeReferenceDirective.originalPath;
|
|
@@ -37166,7 +37163,7 @@ function trace(host, message, ...args) {
|
|
|
37166
37163
|
function isTraceEnabled(compilerOptions, host) {
|
|
37167
37164
|
return !!compilerOptions.traceResolution && host.trace !== void 0;
|
|
37168
37165
|
}
|
|
37169
|
-
function withPackageId(packageInfo, r
|
|
37166
|
+
function withPackageId(packageInfo, r) {
|
|
37170
37167
|
let packageId;
|
|
37171
37168
|
if (r && packageInfo) {
|
|
37172
37169
|
const packageJsonContent = packageInfo.contents.packageJsonContent;
|
|
@@ -37174,8 +37171,7 @@ function withPackageId(packageInfo, r, state) {
|
|
|
37174
37171
|
packageId = {
|
|
37175
37172
|
name: packageJsonContent.name,
|
|
37176
37173
|
subModuleName: r.path.slice(packageInfo.packageDirectory.length + directorySeparator.length),
|
|
37177
|
-
version: packageJsonContent.version
|
|
37178
|
-
peerDependencies: getPeerDependenciesOfPackageJsonInfo(packageInfo, state)
|
|
37174
|
+
version: packageJsonContent.version
|
|
37179
37175
|
};
|
|
37180
37176
|
}
|
|
37181
37177
|
}
|
|
@@ -37185,9 +37181,7 @@ function noPackageId(r) {
|
|
|
37185
37181
|
return withPackageId(
|
|
37186
37182
|
/*packageInfo*/
|
|
37187
37183
|
void 0,
|
|
37188
|
-
r
|
|
37189
|
-
/*state*/
|
|
37190
|
-
void 0
|
|
37184
|
+
r
|
|
37191
37185
|
);
|
|
37192
37186
|
}
|
|
37193
37187
|
function removeIgnoredPackageId(r) {
|
|
@@ -37553,7 +37547,7 @@ function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFil
|
|
|
37553
37547
|
false,
|
|
37554
37548
|
moduleResolutionState
|
|
37555
37549
|
) : void 0;
|
|
37556
|
-
return resolvedTypeScriptOnly(withPackageId(packageInfo, resolvedFromFile
|
|
37550
|
+
return resolvedTypeScriptOnly(withPackageId(packageInfo, resolvedFromFile));
|
|
37557
37551
|
}
|
|
37558
37552
|
}
|
|
37559
37553
|
return resolvedTypeScriptOnly(
|
|
@@ -38489,7 +38483,7 @@ function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures,
|
|
|
38489
38483
|
false,
|
|
38490
38484
|
state
|
|
38491
38485
|
) : void 0;
|
|
38492
|
-
return withPackageId(packageInfo, resolvedFromFile
|
|
38486
|
+
return withPackageId(packageInfo, resolvedFromFile);
|
|
38493
38487
|
}
|
|
38494
38488
|
}
|
|
38495
38489
|
if (!onlyRecordFailures) {
|
|
@@ -38632,7 +38626,7 @@ function loadNodeModuleFromDirectory(extensions, candidate, onlyRecordFailures,
|
|
|
38632
38626
|
const packageInfo = considerPackageJson ? getPackageJsonInfo(candidate, onlyRecordFailures, state) : void 0;
|
|
38633
38627
|
const packageJsonContent = packageInfo && packageInfo.contents.packageJsonContent;
|
|
38634
38628
|
const versionPaths = packageInfo && getVersionPathsOfPackageJsonInfo(packageInfo, state);
|
|
38635
|
-
return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJsonContent, versionPaths)
|
|
38629
|
+
return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJsonContent, versionPaths));
|
|
38636
38630
|
}
|
|
38637
38631
|
function getTemporaryModuleResolutionState(packageJsonInfoCache, host, options) {
|
|
38638
38632
|
return {
|
|
@@ -38674,42 +38668,6 @@ function getVersionPathsOfPackageJsonInfo(packageJsonInfo, state) {
|
|
|
38674
38668
|
}
|
|
38675
38669
|
return packageJsonInfo.contents.versionPaths || void 0;
|
|
38676
38670
|
}
|
|
38677
|
-
function getPeerDependenciesOfPackageJsonInfo(packageJsonInfo, state) {
|
|
38678
|
-
if (packageJsonInfo.contents.peerDependencies === void 0) {
|
|
38679
|
-
packageJsonInfo.contents.peerDependencies = readPackageJsonPeerDependencies(packageJsonInfo, state) || false;
|
|
38680
|
-
}
|
|
38681
|
-
return packageJsonInfo.contents.peerDependencies || void 0;
|
|
38682
|
-
}
|
|
38683
|
-
function readPackageJsonPeerDependencies(packageJsonInfo, state) {
|
|
38684
|
-
const peerDependencies = readPackageJsonField(packageJsonInfo.contents.packageJsonContent, "peerDependencies", "object", state);
|
|
38685
|
-
if (peerDependencies === void 0)
|
|
38686
|
-
return void 0;
|
|
38687
|
-
if (state.traceEnabled)
|
|
38688
|
-
trace(state.host, Diagnostics.package_json_has_a_peerDependencies_field);
|
|
38689
|
-
const packageDirectory = realPath(packageJsonInfo.packageDirectory, state.host, state.traceEnabled);
|
|
38690
|
-
const nodeModules = packageDirectory.substring(0, packageDirectory.lastIndexOf("node_modules") + "node_modules".length) + directorySeparator;
|
|
38691
|
-
let result = "";
|
|
38692
|
-
for (const key in peerDependencies) {
|
|
38693
|
-
if (hasProperty(peerDependencies, key)) {
|
|
38694
|
-
const peerPackageJson = getPackageJsonInfo(
|
|
38695
|
-
nodeModules + key,
|
|
38696
|
-
/*onlyRecordFailures*/
|
|
38697
|
-
false,
|
|
38698
|
-
state
|
|
38699
|
-
);
|
|
38700
|
-
if (peerPackageJson) {
|
|
38701
|
-
const version2 = peerPackageJson.contents.packageJsonContent.version;
|
|
38702
|
-
result += `+${key}@${version2}`;
|
|
38703
|
-
if (state.traceEnabled)
|
|
38704
|
-
trace(state.host, Diagnostics.Found_peerDependency_0_with_1_version, key, version2);
|
|
38705
|
-
} else {
|
|
38706
|
-
if (state.traceEnabled)
|
|
38707
|
-
trace(state.host, Diagnostics.Failed_to_find_peerDependency_0, key);
|
|
38708
|
-
}
|
|
38709
|
-
}
|
|
38710
|
-
}
|
|
38711
|
-
return result;
|
|
38712
|
-
}
|
|
38713
38671
|
function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) {
|
|
38714
38672
|
var _a, _b, _c, _d, _e, _f;
|
|
38715
38673
|
const { host, traceEnabled } = state;
|
|
@@ -38738,7 +38696,7 @@ function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) {
|
|
|
38738
38696
|
if (traceEnabled) {
|
|
38739
38697
|
trace(host, Diagnostics.Found_package_json_at_0, packageJsonPath);
|
|
38740
38698
|
}
|
|
38741
|
-
const result = { packageDirectory, contents: { packageJsonContent, versionPaths: void 0, resolvedEntrypoints: void 0
|
|
38699
|
+
const result = { packageDirectory, contents: { packageJsonContent, versionPaths: void 0, resolvedEntrypoints: void 0 } };
|
|
38742
38700
|
if (state.packageJsonInfoCache && !state.packageJsonInfoCache.isReadonly)
|
|
38743
38701
|
state.packageJsonInfoCache.setPackageJsonInfo(packageJsonPath, result);
|
|
38744
38702
|
(_e = state.affectingLocations) == null ? void 0 : _e.push(packageJsonPath);
|
|
@@ -39146,7 +39104,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
|
|
|
39146
39104
|
/*onlyRecordFailures*/
|
|
39147
39105
|
false,
|
|
39148
39106
|
state
|
|
39149
|
-
)
|
|
39107
|
+
)));
|
|
39150
39108
|
} else if (typeof target === "object" && target !== null) {
|
|
39151
39109
|
if (!Array.isArray(target)) {
|
|
39152
39110
|
traceIfEnabled(state, Diagnostics.Entering_conditional_exports);
|
|
@@ -39260,7 +39218,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
|
|
|
39260
39218
|
/*onlyRecordFailures*/
|
|
39261
39219
|
false,
|
|
39262
39220
|
state
|
|
39263
|
-
)
|
|
39221
|
+
)));
|
|
39264
39222
|
}
|
|
39265
39223
|
}
|
|
39266
39224
|
}
|
|
@@ -39391,7 +39349,7 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node
|
|
|
39391
39349
|
packageInfo.contents.packageJsonContent,
|
|
39392
39350
|
getVersionPathsOfPackageJsonInfo(packageInfo, state)
|
|
39393
39351
|
);
|
|
39394
|
-
return withPackageId(packageInfo, fromDirectory
|
|
39352
|
+
return withPackageId(packageInfo, fromDirectory);
|
|
39395
39353
|
}
|
|
39396
39354
|
const loader = (extensions2, candidate2, onlyRecordFailures, state2) => {
|
|
39397
39355
|
let pathAndExtension = (rest || !(state2.features & 32 /* EsmMode */)) && loadModuleFromFile(extensions2, candidate2, onlyRecordFailures, state2) || loadNodeModuleFromDirectoryWorker(
|
|
@@ -39405,7 +39363,7 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node
|
|
|
39405
39363
|
if (!pathAndExtension && packageInfo && (packageInfo.contents.packageJsonContent.exports === void 0 || packageInfo.contents.packageJsonContent.exports === null) && state2.features & 32 /* EsmMode */) {
|
|
39406
39364
|
pathAndExtension = loadModuleFromFile(extensions2, combinePaths(candidate2, "index.js"), onlyRecordFailures, state2);
|
|
39407
39365
|
}
|
|
39408
|
-
return withPackageId(packageInfo, pathAndExtension
|
|
39366
|
+
return withPackageId(packageInfo, pathAndExtension);
|
|
39409
39367
|
};
|
|
39410
39368
|
if (rest !== "") {
|
|
39411
39369
|
packageInfo = rootPackageInfo ?? getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state);
|
|
@@ -39612,7 +39570,7 @@ function resolveFromTypeRoot(moduleName, state) {
|
|
|
39612
39570
|
false,
|
|
39613
39571
|
state
|
|
39614
39572
|
) : void 0;
|
|
39615
|
-
return toSearchResult(withPackageId(packageInfo, resolvedFromFile
|
|
39573
|
+
return toSearchResult(withPackageId(packageInfo, resolvedFromFile));
|
|
39616
39574
|
}
|
|
39617
39575
|
const resolved = loadNodeModuleFromDirectory(4 /* Declaration */, candidate, !directoryExists, state);
|
|
39618
39576
|
if (resolved)
|
package/lib/tsserver.js
CHANGED
|
@@ -2340,7 +2340,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2340
2340
|
|
|
2341
2341
|
// src/compiler/corePublic.ts
|
|
2342
2342
|
var versionMajorMinor = "5.4";
|
|
2343
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2343
|
+
var version = `${versionMajorMinor}.0-insiders.20240123`;
|
|
2344
2344
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2345
2345
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2346
2346
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -10712,9 +10712,6 @@ var Diagnostics = {
|
|
|
10712
10712
|
There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings: diag(6278, 3 /* Message */, "There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278", `There are types at '{0}', but this result could not be resolved when respecting package.json "exports". The '{1}' library may need to update its package.json or typings.`),
|
|
10713
10713
|
Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update: diag(6279, 3 /* Message */, "Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_ne_6279", "Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update."),
|
|
10714
10714
|
There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler: diag(6280, 3 /* Message */, "There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setti_6280", "There are types at '{0}', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'."),
|
|
10715
|
-
package_json_has_a_peerDependencies_field: diag(6281, 3 /* Message */, "package_json_has_a_peerDependencies_field_6281", "'package.json' has a 'peerDependencies' field."),
|
|
10716
|
-
Found_peerDependency_0_with_1_version: diag(6282, 3 /* Message */, "Found_peerDependency_0_with_1_version_6282", "Found peerDependency '{0}' with '{1}' version."),
|
|
10717
|
-
Failed_to_find_peerDependency_0: diag(6283, 3 /* Message */, "Failed_to_find_peerDependency_0_6283", "Failed to find peerDependency '{0}'."),
|
|
10718
10715
|
Enable_project_compilation: diag(6302, 3 /* Message */, "Enable_project_compilation_6302", "Enable project compilation"),
|
|
10719
10716
|
Composite_projects_may_not_disable_declaration_emit: diag(6304, 1 /* Error */, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."),
|
|
10720
10717
|
Output_file_0_has_not_been_built_from_source_file_1: diag(6305, 1 /* Error */, "Output_file_0_has_not_been_built_from_source_file_1_6305", "Output file '{0}' has not been built from source file '{1}'."),
|
|
@@ -15352,13 +15349,13 @@ function createModuleNotFoundChain(sourceFile, host, moduleReference, mode, pack
|
|
|
15352
15349
|
return result;
|
|
15353
15350
|
}
|
|
15354
15351
|
function packageIdIsEqual(a, b) {
|
|
15355
|
-
return a === b || !!a && !!b && a.name === b.name && a.subModuleName === b.subModuleName && a.version === b.version
|
|
15352
|
+
return a === b || !!a && !!b && a.name === b.name && a.subModuleName === b.subModuleName && a.version === b.version;
|
|
15356
15353
|
}
|
|
15357
15354
|
function packageIdToPackageName({ name, subModuleName }) {
|
|
15358
15355
|
return subModuleName ? `${name}/${subModuleName}` : name;
|
|
15359
15356
|
}
|
|
15360
15357
|
function packageIdToString(packageId) {
|
|
15361
|
-
return `${packageIdToPackageName(packageId)}@${packageId.version}
|
|
15358
|
+
return `${packageIdToPackageName(packageId)}@${packageId.version}`;
|
|
15362
15359
|
}
|
|
15363
15360
|
function typeDirectiveIsEqualTo(oldResolution, newResolution) {
|
|
15364
15361
|
return oldResolution === newResolution || oldResolution.resolvedTypeReferenceDirective === newResolution.resolvedTypeReferenceDirective || !!oldResolution.resolvedTypeReferenceDirective && !!newResolution.resolvedTypeReferenceDirective && oldResolution.resolvedTypeReferenceDirective.resolvedFileName === newResolution.resolvedTypeReferenceDirective.resolvedFileName && !!oldResolution.resolvedTypeReferenceDirective.primary === !!newResolution.resolvedTypeReferenceDirective.primary && oldResolution.resolvedTypeReferenceDirective.originalPath === newResolution.resolvedTypeReferenceDirective.originalPath;
|
|
@@ -41674,7 +41671,7 @@ function trace(host, message, ...args) {
|
|
|
41674
41671
|
function isTraceEnabled(compilerOptions, host) {
|
|
41675
41672
|
return !!compilerOptions.traceResolution && host.trace !== void 0;
|
|
41676
41673
|
}
|
|
41677
|
-
function withPackageId(packageInfo, r
|
|
41674
|
+
function withPackageId(packageInfo, r) {
|
|
41678
41675
|
let packageId;
|
|
41679
41676
|
if (r && packageInfo) {
|
|
41680
41677
|
const packageJsonContent = packageInfo.contents.packageJsonContent;
|
|
@@ -41682,8 +41679,7 @@ function withPackageId(packageInfo, r, state) {
|
|
|
41682
41679
|
packageId = {
|
|
41683
41680
|
name: packageJsonContent.name,
|
|
41684
41681
|
subModuleName: r.path.slice(packageInfo.packageDirectory.length + directorySeparator.length),
|
|
41685
|
-
version: packageJsonContent.version
|
|
41686
|
-
peerDependencies: getPeerDependenciesOfPackageJsonInfo(packageInfo, state)
|
|
41682
|
+
version: packageJsonContent.version
|
|
41687
41683
|
};
|
|
41688
41684
|
}
|
|
41689
41685
|
}
|
|
@@ -41693,9 +41689,7 @@ function noPackageId(r) {
|
|
|
41693
41689
|
return withPackageId(
|
|
41694
41690
|
/*packageInfo*/
|
|
41695
41691
|
void 0,
|
|
41696
|
-
r
|
|
41697
|
-
/*state*/
|
|
41698
|
-
void 0
|
|
41692
|
+
r
|
|
41699
41693
|
);
|
|
41700
41694
|
}
|
|
41701
41695
|
function removeIgnoredPackageId(r) {
|
|
@@ -42073,7 +42067,7 @@ function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFil
|
|
|
42073
42067
|
false,
|
|
42074
42068
|
moduleResolutionState
|
|
42075
42069
|
) : void 0;
|
|
42076
|
-
return resolvedTypeScriptOnly(withPackageId(packageInfo, resolvedFromFile
|
|
42070
|
+
return resolvedTypeScriptOnly(withPackageId(packageInfo, resolvedFromFile));
|
|
42077
42071
|
}
|
|
42078
42072
|
}
|
|
42079
42073
|
return resolvedTypeScriptOnly(
|
|
@@ -43047,7 +43041,7 @@ function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures,
|
|
|
43047
43041
|
false,
|
|
43048
43042
|
state
|
|
43049
43043
|
) : void 0;
|
|
43050
|
-
return withPackageId(packageInfo, resolvedFromFile
|
|
43044
|
+
return withPackageId(packageInfo, resolvedFromFile);
|
|
43051
43045
|
}
|
|
43052
43046
|
}
|
|
43053
43047
|
if (!onlyRecordFailures) {
|
|
@@ -43190,7 +43184,7 @@ function loadNodeModuleFromDirectory(extensions, candidate, onlyRecordFailures,
|
|
|
43190
43184
|
const packageInfo = considerPackageJson ? getPackageJsonInfo(candidate, onlyRecordFailures, state) : void 0;
|
|
43191
43185
|
const packageJsonContent = packageInfo && packageInfo.contents.packageJsonContent;
|
|
43192
43186
|
const versionPaths = packageInfo && getVersionPathsOfPackageJsonInfo(packageInfo, state);
|
|
43193
|
-
return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJsonContent, versionPaths)
|
|
43187
|
+
return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJsonContent, versionPaths));
|
|
43194
43188
|
}
|
|
43195
43189
|
function getEntrypointsFromPackageJsonInfo(packageJsonInfo, options, host, cache, resolveJs) {
|
|
43196
43190
|
if (!resolveJs && packageJsonInfo.contents.resolvedEntrypoints !== void 0) {
|
|
@@ -43346,42 +43340,6 @@ function getVersionPathsOfPackageJsonInfo(packageJsonInfo, state) {
|
|
|
43346
43340
|
}
|
|
43347
43341
|
return packageJsonInfo.contents.versionPaths || void 0;
|
|
43348
43342
|
}
|
|
43349
|
-
function getPeerDependenciesOfPackageJsonInfo(packageJsonInfo, state) {
|
|
43350
|
-
if (packageJsonInfo.contents.peerDependencies === void 0) {
|
|
43351
|
-
packageJsonInfo.contents.peerDependencies = readPackageJsonPeerDependencies(packageJsonInfo, state) || false;
|
|
43352
|
-
}
|
|
43353
|
-
return packageJsonInfo.contents.peerDependencies || void 0;
|
|
43354
|
-
}
|
|
43355
|
-
function readPackageJsonPeerDependencies(packageJsonInfo, state) {
|
|
43356
|
-
const peerDependencies = readPackageJsonField(packageJsonInfo.contents.packageJsonContent, "peerDependencies", "object", state);
|
|
43357
|
-
if (peerDependencies === void 0)
|
|
43358
|
-
return void 0;
|
|
43359
|
-
if (state.traceEnabled)
|
|
43360
|
-
trace(state.host, Diagnostics.package_json_has_a_peerDependencies_field);
|
|
43361
|
-
const packageDirectory = realPath(packageJsonInfo.packageDirectory, state.host, state.traceEnabled);
|
|
43362
|
-
const nodeModules = packageDirectory.substring(0, packageDirectory.lastIndexOf("node_modules") + "node_modules".length) + directorySeparator;
|
|
43363
|
-
let result = "";
|
|
43364
|
-
for (const key in peerDependencies) {
|
|
43365
|
-
if (hasProperty(peerDependencies, key)) {
|
|
43366
|
-
const peerPackageJson = getPackageJsonInfo(
|
|
43367
|
-
nodeModules + key,
|
|
43368
|
-
/*onlyRecordFailures*/
|
|
43369
|
-
false,
|
|
43370
|
-
state
|
|
43371
|
-
);
|
|
43372
|
-
if (peerPackageJson) {
|
|
43373
|
-
const version2 = peerPackageJson.contents.packageJsonContent.version;
|
|
43374
|
-
result += `+${key}@${version2}`;
|
|
43375
|
-
if (state.traceEnabled)
|
|
43376
|
-
trace(state.host, Diagnostics.Found_peerDependency_0_with_1_version, key, version2);
|
|
43377
|
-
} else {
|
|
43378
|
-
if (state.traceEnabled)
|
|
43379
|
-
trace(state.host, Diagnostics.Failed_to_find_peerDependency_0, key);
|
|
43380
|
-
}
|
|
43381
|
-
}
|
|
43382
|
-
}
|
|
43383
|
-
return result;
|
|
43384
|
-
}
|
|
43385
43343
|
function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) {
|
|
43386
43344
|
var _a, _b, _c, _d, _e, _f;
|
|
43387
43345
|
const { host, traceEnabled } = state;
|
|
@@ -43410,7 +43368,7 @@ function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) {
|
|
|
43410
43368
|
if (traceEnabled) {
|
|
43411
43369
|
trace(host, Diagnostics.Found_package_json_at_0, packageJsonPath);
|
|
43412
43370
|
}
|
|
43413
|
-
const result = { packageDirectory, contents: { packageJsonContent, versionPaths: void 0, resolvedEntrypoints: void 0
|
|
43371
|
+
const result = { packageDirectory, contents: { packageJsonContent, versionPaths: void 0, resolvedEntrypoints: void 0 } };
|
|
43414
43372
|
if (state.packageJsonInfoCache && !state.packageJsonInfoCache.isReadonly)
|
|
43415
43373
|
state.packageJsonInfoCache.setPackageJsonInfo(packageJsonPath, result);
|
|
43416
43374
|
(_e = state.affectingLocations) == null ? void 0 : _e.push(packageJsonPath);
|
|
@@ -43818,7 +43776,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
|
|
|
43818
43776
|
/*onlyRecordFailures*/
|
|
43819
43777
|
false,
|
|
43820
43778
|
state
|
|
43821
|
-
)
|
|
43779
|
+
)));
|
|
43822
43780
|
} else if (typeof target === "object" && target !== null) {
|
|
43823
43781
|
if (!Array.isArray(target)) {
|
|
43824
43782
|
traceIfEnabled(state, Diagnostics.Entering_conditional_exports);
|
|
@@ -43932,7 +43890,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
|
|
|
43932
43890
|
/*onlyRecordFailures*/
|
|
43933
43891
|
false,
|
|
43934
43892
|
state
|
|
43935
|
-
)
|
|
43893
|
+
)));
|
|
43936
43894
|
}
|
|
43937
43895
|
}
|
|
43938
43896
|
}
|
|
@@ -44063,7 +44021,7 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node
|
|
|
44063
44021
|
packageInfo.contents.packageJsonContent,
|
|
44064
44022
|
getVersionPathsOfPackageJsonInfo(packageInfo, state)
|
|
44065
44023
|
);
|
|
44066
|
-
return withPackageId(packageInfo, fromDirectory
|
|
44024
|
+
return withPackageId(packageInfo, fromDirectory);
|
|
44067
44025
|
}
|
|
44068
44026
|
const loader = (extensions2, candidate2, onlyRecordFailures, state2) => {
|
|
44069
44027
|
let pathAndExtension = (rest || !(state2.features & 32 /* EsmMode */)) && loadModuleFromFile(extensions2, candidate2, onlyRecordFailures, state2) || loadNodeModuleFromDirectoryWorker(
|
|
@@ -44077,7 +44035,7 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node
|
|
|
44077
44035
|
if (!pathAndExtension && packageInfo && (packageInfo.contents.packageJsonContent.exports === void 0 || packageInfo.contents.packageJsonContent.exports === null) && state2.features & 32 /* EsmMode */) {
|
|
44078
44036
|
pathAndExtension = loadModuleFromFile(extensions2, combinePaths(candidate2, "index.js"), onlyRecordFailures, state2);
|
|
44079
44037
|
}
|
|
44080
|
-
return withPackageId(packageInfo, pathAndExtension
|
|
44038
|
+
return withPackageId(packageInfo, pathAndExtension);
|
|
44081
44039
|
};
|
|
44082
44040
|
if (rest !== "") {
|
|
44083
44041
|
packageInfo = rootPackageInfo ?? getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state);
|
|
@@ -44284,7 +44242,7 @@ function resolveFromTypeRoot(moduleName, state) {
|
|
|
44284
44242
|
false,
|
|
44285
44243
|
state
|
|
44286
44244
|
) : void 0;
|
|
44287
|
-
return toSearchResult(withPackageId(packageInfo, resolvedFromFile
|
|
44245
|
+
return toSearchResult(withPackageId(packageInfo, resolvedFromFile));
|
|
44288
44246
|
}
|
|
44289
44247
|
const resolved = loadNodeModuleFromDirectory(4 /* Declaration */, candidate, !directoryExists, state);
|
|
44290
44248
|
if (resolved)
|