@typescript-deploys/pr-build 5.3.0-pr-55371-11 → 5.3.0-pr-55438-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/cancellationToken.js +1 -1
- package/lib/tsc.js +161 -218
- package/lib/tsserver.js +178 -253
- package/lib/typescript.js +180 -249
- package/lib/typingsInstaller.js +37 -104
- package/package.json +2 -2
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.3";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20230829`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -569,10 +569,7 @@ function getStringComparer(ignoreCase) {
|
|
|
569
569
|
return ignoreCase ? compareStringsCaseInsensitive : compareStringsCaseSensitive;
|
|
570
570
|
}
|
|
571
571
|
var createUIStringComparer = (() => {
|
|
572
|
-
|
|
573
|
-
let enUSComparer;
|
|
574
|
-
const stringComparerFactory = getStringComparerFactory();
|
|
575
|
-
return createStringComparer;
|
|
572
|
+
return createIntlCollatorStringComparer;
|
|
576
573
|
function compareWithCallback(a, b, comparer) {
|
|
577
574
|
if (a === b)
|
|
578
575
|
return 0 /* EqualTo */;
|
|
@@ -587,41 +584,6 @@ var createUIStringComparer = (() => {
|
|
|
587
584
|
const comparer = new Intl.Collator(locale, { usage: "sort", sensitivity: "variant" }).compare;
|
|
588
585
|
return (a, b) => compareWithCallback(a, b, comparer);
|
|
589
586
|
}
|
|
590
|
-
function createLocaleCompareStringComparer(locale) {
|
|
591
|
-
if (locale !== void 0)
|
|
592
|
-
return createFallbackStringComparer();
|
|
593
|
-
return (a, b) => compareWithCallback(a, b, compareStrings);
|
|
594
|
-
function compareStrings(a, b) {
|
|
595
|
-
return a.localeCompare(b);
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
function createFallbackStringComparer() {
|
|
599
|
-
return (a, b) => compareWithCallback(a, b, compareDictionaryOrder);
|
|
600
|
-
function compareDictionaryOrder(a, b) {
|
|
601
|
-
return compareStrings(a.toUpperCase(), b.toUpperCase()) || compareStrings(a, b);
|
|
602
|
-
}
|
|
603
|
-
function compareStrings(a, b) {
|
|
604
|
-
return a < b ? -1 /* LessThan */ : a > b ? 1 /* GreaterThan */ : 0 /* EqualTo */;
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
function getStringComparerFactory() {
|
|
608
|
-
if (typeof Intl === "object" && typeof Intl.Collator === "function") {
|
|
609
|
-
return createIntlCollatorStringComparer;
|
|
610
|
-
}
|
|
611
|
-
if (typeof String.prototype.localeCompare === "function" && typeof String.prototype.toLocaleUpperCase === "function" && "a".localeCompare("B") < 0) {
|
|
612
|
-
return createLocaleCompareStringComparer;
|
|
613
|
-
}
|
|
614
|
-
return createFallbackStringComparer;
|
|
615
|
-
}
|
|
616
|
-
function createStringComparer(locale) {
|
|
617
|
-
if (locale === void 0) {
|
|
618
|
-
return defaultComparer || (defaultComparer = stringComparerFactory(locale));
|
|
619
|
-
} else if (locale === "en-US") {
|
|
620
|
-
return enUSComparer || (enUSComparer = stringComparerFactory(locale));
|
|
621
|
-
} else {
|
|
622
|
-
return stringComparerFactory(locale);
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
587
|
})();
|
|
626
588
|
function getSpellingSuggestion(name, candidates, getName) {
|
|
627
589
|
const maximumLengthDifference = Math.max(2, Math.floor(name.length * 0.34));
|
|
@@ -693,9 +655,6 @@ function endsWith(str, suffix) {
|
|
|
693
655
|
const expectedPos = str.length - suffix.length;
|
|
694
656
|
return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos;
|
|
695
657
|
}
|
|
696
|
-
function stringContains(str, substring) {
|
|
697
|
-
return str.indexOf(substring) !== -1;
|
|
698
|
-
}
|
|
699
658
|
function removeMinAndVersionNumbers(fileName) {
|
|
700
659
|
let end = fileName.length;
|
|
701
660
|
for (let pos = end - 1; pos > 0; pos--) {
|
|
@@ -825,21 +784,6 @@ function enumerateInsertsAndDeletes(newItems, oldItems, comparer, inserted, dele
|
|
|
825
784
|
}
|
|
826
785
|
return hasChanges;
|
|
827
786
|
}
|
|
828
|
-
function padLeft(s, length2, padString = " ") {
|
|
829
|
-
return length2 <= s.length ? s : padString.repeat(length2 - s.length) + s;
|
|
830
|
-
}
|
|
831
|
-
var trimString = !!String.prototype.trim ? (s) => s.trim() : (s) => trimStringEnd(trimStringStart(s));
|
|
832
|
-
var trimStringEnd = !!String.prototype.trimEnd ? (s) => s.trimEnd() : trimEndImpl;
|
|
833
|
-
var trimStringStart = !!String.prototype.trimStart ? (s) => s.trimStart() : (s) => s.replace(/^\s+/g, "");
|
|
834
|
-
function trimEndImpl(s) {
|
|
835
|
-
let end = s.length - 1;
|
|
836
|
-
while (end >= 0) {
|
|
837
|
-
if (!isWhiteSpaceLike(s.charCodeAt(end)))
|
|
838
|
-
break;
|
|
839
|
-
end--;
|
|
840
|
-
}
|
|
841
|
-
return s.slice(0, end + 1);
|
|
842
|
-
}
|
|
843
787
|
function isNodeLikeSystem() {
|
|
844
788
|
return typeof process !== "undefined" && !!process.nextTick && !process.browser && typeof module === "object";
|
|
845
789
|
}
|
|
@@ -2027,18 +1971,18 @@ var hyphenRegExp = /^\s*([a-z0-9-+.*]+)\s+-\s+([a-z0-9-+.*]+)\s*$/i;
|
|
|
2027
1971
|
var rangeRegExp = /^(~|\^|<|<=|>|>=|=)?\s*([a-z0-9-+.*]+)$/i;
|
|
2028
1972
|
function parseRange(text) {
|
|
2029
1973
|
const alternatives = [];
|
|
2030
|
-
for (let range of
|
|
1974
|
+
for (let range of text.trim().split(logicalOrRegExp)) {
|
|
2031
1975
|
if (!range)
|
|
2032
1976
|
continue;
|
|
2033
1977
|
const comparators = [];
|
|
2034
|
-
range =
|
|
1978
|
+
range = range.trim();
|
|
2035
1979
|
const match = hyphenRegExp.exec(range);
|
|
2036
1980
|
if (match) {
|
|
2037
1981
|
if (!parseHyphen(match[1], match[2], comparators))
|
|
2038
1982
|
return void 0;
|
|
2039
1983
|
} else {
|
|
2040
1984
|
for (const simple of range.split(whitespaceRegExp)) {
|
|
2041
|
-
const match2 = rangeRegExp.exec(
|
|
1985
|
+
const match2 = rangeRegExp.exec(simple.trim());
|
|
2042
1986
|
if (!match2 || !parseComparator(match2[1], match2[2], comparators))
|
|
2043
1987
|
return void 0;
|
|
2044
1988
|
}
|
|
@@ -3927,11 +3871,11 @@ function createDirectoryWatcherSupportingRecursive({
|
|
|
3927
3871
|
return some(ignoredPaths, (searchPath) => isInPath(path2, searchPath)) || isIgnoredByWatchOptions(path2, options, useCaseSensitiveFileNames2, getCurrentDirectory);
|
|
3928
3872
|
}
|
|
3929
3873
|
function isInPath(path2, searchPath) {
|
|
3930
|
-
if (
|
|
3874
|
+
if (path2.includes(searchPath))
|
|
3931
3875
|
return true;
|
|
3932
3876
|
if (useCaseSensitiveFileNames2)
|
|
3933
3877
|
return false;
|
|
3934
|
-
return
|
|
3878
|
+
return toCanonicalFilePath(path2).includes(searchPath);
|
|
3935
3879
|
}
|
|
3936
3880
|
}
|
|
3937
3881
|
function createFileWatcherCallback(callback) {
|
|
@@ -4761,7 +4705,7 @@ function pathIsRelative(path2) {
|
|
|
4761
4705
|
return /^\.\.?($|[\\/])/.test(path2);
|
|
4762
4706
|
}
|
|
4763
4707
|
function hasExtension(fileName) {
|
|
4764
|
-
return
|
|
4708
|
+
return getBaseFileName(fileName).includes(".");
|
|
4765
4709
|
}
|
|
4766
4710
|
function fileExtensionIs(path2, extension) {
|
|
4767
4711
|
return path2.length > extension.length && endsWith(path2, extension);
|
|
@@ -4906,7 +4850,7 @@ function getPathFromPathComponents(pathComponents2, length2) {
|
|
|
4906
4850
|
return root + pathComponents2.slice(1, length2).join(directorySeparator);
|
|
4907
4851
|
}
|
|
4908
4852
|
function normalizeSlashes(path2) {
|
|
4909
|
-
return path2.
|
|
4853
|
+
return path2.includes("\\") ? path2.replace(backslashRegExp, directorySeparator) : path2;
|
|
4910
4854
|
}
|
|
4911
4855
|
function reducePathComponents(components) {
|
|
4912
4856
|
if (!some(components))
|
|
@@ -8178,7 +8122,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8178
8122
|
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
8179
8123
|
if (shouldEmitInvalidEscapeError) {
|
|
8180
8124
|
const code = parseInt(text.substring(start2 + 1, pos), 8);
|
|
8181
|
-
error(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start2, pos - start2, "\\x" +
|
|
8125
|
+
error(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start2, pos - start2, "\\x" + code.toString(16).padStart(2, "0"));
|
|
8182
8126
|
return String.fromCharCode(code);
|
|
8183
8127
|
}
|
|
8184
8128
|
return text.substring(start2, pos);
|
|
@@ -8981,7 +8925,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8981
8925
|
return token;
|
|
8982
8926
|
}
|
|
8983
8927
|
function appendIfCommentDirective(commentDirectives2, text2, commentDirectiveRegEx, lineStart) {
|
|
8984
|
-
const type = getDirectiveFromComment(
|
|
8928
|
+
const type = getDirectiveFromComment(text2.trimStart(), commentDirectiveRegEx);
|
|
8985
8929
|
if (type === void 0) {
|
|
8986
8930
|
return commentDirectives2;
|
|
8987
8931
|
}
|
|
@@ -9315,20 +9259,9 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
9315
9259
|
inJSDocType += inType ? 1 : -1;
|
|
9316
9260
|
}
|
|
9317
9261
|
}
|
|
9318
|
-
|
|
9319
|
-
|
|
9320
|
-
|
|
9321
|
-
return void 0;
|
|
9322
|
-
}
|
|
9323
|
-
const first2 = str.charCodeAt(i);
|
|
9324
|
-
if (first2 >= 55296 && first2 <= 56319 && size > i + 1) {
|
|
9325
|
-
const second = str.charCodeAt(i + 1);
|
|
9326
|
-
if (second >= 56320 && second <= 57343) {
|
|
9327
|
-
return (first2 - 55296) * 1024 + second - 56320 + 65536;
|
|
9328
|
-
}
|
|
9329
|
-
}
|
|
9330
|
-
return first2;
|
|
9331
|
-
};
|
|
9262
|
+
function codePointAt(s, i) {
|
|
9263
|
+
return s.codePointAt(i);
|
|
9264
|
+
}
|
|
9332
9265
|
function charSize(ch) {
|
|
9333
9266
|
if (ch >= 65536) {
|
|
9334
9267
|
return 2;
|
|
@@ -10155,7 +10088,7 @@ function getTextOfNodeFromSourceText(sourceText, node, includeTrivia = false) {
|
|
|
10155
10088
|
}
|
|
10156
10089
|
let text = sourceText.substring(includeTrivia ? node.pos : skipTrivia(sourceText, node.pos), node.end);
|
|
10157
10090
|
if (isJSDocTypeExpressionOrChild(node)) {
|
|
10158
|
-
text = text.split(/\r\n|\n|\r/).map((line) =>
|
|
10091
|
+
text = text.split(/\r\n|\n|\r/).map((line) => line.replace(/^\s*\*/, "").trimStart()).join("\n");
|
|
10159
10092
|
}
|
|
10160
10093
|
return text;
|
|
10161
10094
|
}
|
|
@@ -23607,7 +23540,7 @@ var Parser;
|
|
|
23607
23540
|
}
|
|
23608
23541
|
function parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiers, flags) {
|
|
23609
23542
|
const namespaceFlag = flags & 32 /* Namespace */;
|
|
23610
|
-
const name = parseIdentifier();
|
|
23543
|
+
const name = flags & 8 /* NestedNamespace */ ? parseIdentifierName() : parseIdentifier();
|
|
23611
23544
|
const body = parseOptional(25 /* DotToken */) ? parseModuleOrNamespaceDeclaration(
|
|
23612
23545
|
getNodePos(),
|
|
23613
23546
|
/*hasJSDoc*/
|
|
@@ -24077,8 +24010,6 @@ var Parser;
|
|
|
24077
24010
|
PropertyLikeParse2[PropertyLikeParse2["CallbackParameter"] = 4] = "CallbackParameter";
|
|
24078
24011
|
})(PropertyLikeParse || (PropertyLikeParse = {}));
|
|
24079
24012
|
function parseJSDocCommentWorker(start = 0, length2) {
|
|
24080
|
-
const saveParsingContext = parsingContext;
|
|
24081
|
-
parsingContext |= 1 << 25 /* JSDocComment */;
|
|
24082
24013
|
const content = sourceText;
|
|
24083
24014
|
const end = length2 === void 0 ? content.length : start + length2;
|
|
24084
24015
|
length2 = end - start;
|
|
@@ -24095,6 +24026,8 @@ var Parser;
|
|
|
24095
24026
|
let commentsPos;
|
|
24096
24027
|
let comments = [];
|
|
24097
24028
|
const parts = [];
|
|
24029
|
+
const saveParsingContext = parsingContext;
|
|
24030
|
+
parsingContext |= 1 << 25 /* JSDocComment */;
|
|
24098
24031
|
const result = scanner.scanRange(start + 3, length2 - 5, doJSDocScan);
|
|
24099
24032
|
parsingContext = saveParsingContext;
|
|
24100
24033
|
return result;
|
|
@@ -24186,7 +24119,7 @@ var Parser;
|
|
|
24186
24119
|
nextTokenJSDoc();
|
|
24187
24120
|
}
|
|
24188
24121
|
}
|
|
24189
|
-
const trimmedComments =
|
|
24122
|
+
const trimmedComments = comments.join("").trimEnd();
|
|
24190
24123
|
if (parts.length && trimmedComments.length) {
|
|
24191
24124
|
parts.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd ?? start, commentsPos));
|
|
24192
24125
|
}
|
|
@@ -24202,7 +24135,7 @@ var Parser;
|
|
|
24202
24135
|
}
|
|
24203
24136
|
function removeTrailingWhitespace(comments2) {
|
|
24204
24137
|
while (comments2.length) {
|
|
24205
|
-
const trimmed =
|
|
24138
|
+
const trimmed = comments2[comments2.length - 1].trimEnd();
|
|
24206
24139
|
if (trimmed === "") {
|
|
24207
24140
|
comments2.pop();
|
|
24208
24141
|
} else if (trimmed.length < comments2[comments2.length - 1].length) {
|
|
@@ -24442,7 +24375,7 @@ var Parser;
|
|
|
24442
24375
|
}
|
|
24443
24376
|
}
|
|
24444
24377
|
removeLeadingNewlines(comments2);
|
|
24445
|
-
const trimmedComments =
|
|
24378
|
+
const trimmedComments = comments2.join("").trimEnd();
|
|
24446
24379
|
if (parts2.length) {
|
|
24447
24380
|
if (trimmedComments.length) {
|
|
24448
24381
|
parts2.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd2 ?? commentsPos2));
|
|
@@ -25340,7 +25273,7 @@ var IncrementalParser;
|
|
|
25340
25273
|
})(InvalidPosition || (InvalidPosition = {}));
|
|
25341
25274
|
})(IncrementalParser || (IncrementalParser = {}));
|
|
25342
25275
|
function isDeclarationFileName(fileName) {
|
|
25343
|
-
return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions) || fileExtensionIs(fileName, ".ts" /* Ts */) &&
|
|
25276
|
+
return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions) || fileExtensionIs(fileName, ".ts" /* Ts */) && getBaseFileName(fileName).includes(".d.");
|
|
25344
25277
|
}
|
|
25345
25278
|
function parseResolutionMode(mode, pos, end, reportDiagnostic) {
|
|
25346
25279
|
if (!mode) {
|
|
@@ -25526,7 +25459,7 @@ function getNamedPragmaArguments(pragma, text) {
|
|
|
25526
25459
|
return {};
|
|
25527
25460
|
if (!pragma.args)
|
|
25528
25461
|
return {};
|
|
25529
|
-
const args =
|
|
25462
|
+
const args = text.trim().split(/\s+/);
|
|
25530
25463
|
const argMap = {};
|
|
25531
25464
|
for (let i = 0; i < pragma.args.length; i++) {
|
|
25532
25465
|
const argument = pragma.args[i];
|
|
@@ -27865,7 +27798,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
|
|
|
27865
27798
|
result = tryResolve(extensions, state);
|
|
27866
27799
|
}
|
|
27867
27800
|
let legacyResult;
|
|
27868
|
-
if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.isExternalLibraryImport) && !isConfigLookup && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && features & 8 /* Exports */ && !isExternalModuleNameRelative(moduleName) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension) && conditions.
|
|
27801
|
+
if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.isExternalLibraryImport) && !isConfigLookup && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && features & 8 /* Exports */ && !isExternalModuleNameRelative(moduleName) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension) && conditions.includes("import")) {
|
|
27869
27802
|
traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);
|
|
27870
27803
|
const diagnosticState = {
|
|
27871
27804
|
...state,
|
|
@@ -27909,7 +27842,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
|
|
|
27909
27842
|
resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);
|
|
27910
27843
|
}
|
|
27911
27844
|
if (!resolved2) {
|
|
27912
|
-
if (moduleName.
|
|
27845
|
+
if (moduleName.includes(":")) {
|
|
27913
27846
|
if (traceEnabled) {
|
|
27914
27847
|
trace(host, Diagnostics.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1, moduleName, formatExtensions(extensions2));
|
|
27915
27848
|
}
|
|
@@ -27999,7 +27932,7 @@ function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures,
|
|
|
27999
27932
|
}
|
|
28000
27933
|
var nodeModulesPathPart = "/node_modules/";
|
|
28001
27934
|
function pathContainsNodeModules(path2) {
|
|
28002
|
-
return
|
|
27935
|
+
return path2.includes(nodeModulesPathPart);
|
|
28003
27936
|
}
|
|
28004
27937
|
function parseNodeModuleFromPath(resolved, isFolder) {
|
|
28005
27938
|
const path2 = normalizePath(resolved);
|
|
@@ -28035,7 +27968,7 @@ function loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) {
|
|
|
28035
27968
|
}
|
|
28036
27969
|
function loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state) {
|
|
28037
27970
|
const filename = getBaseFileName(candidate);
|
|
28038
|
-
if (filename.
|
|
27971
|
+
if (!filename.includes(".")) {
|
|
28039
27972
|
return void 0;
|
|
28040
27973
|
}
|
|
28041
27974
|
let extensionless = removeFileExtension(candidate);
|
|
@@ -28443,7 +28376,7 @@ function comparePatternKeys(a, b) {
|
|
|
28443
28376
|
}
|
|
28444
28377
|
function loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, moduleName, lookupTable, scope, isImports) {
|
|
28445
28378
|
const loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports);
|
|
28446
|
-
if (!endsWith(moduleName, directorySeparator) && moduleName.
|
|
28379
|
+
if (!endsWith(moduleName, directorySeparator) && !moduleName.includes("*") && hasProperty(lookupTable, moduleName)) {
|
|
28447
28380
|
const target = lookupTable[moduleName];
|
|
28448
28381
|
return loadModuleFromTargetImportOrExport(
|
|
28449
28382
|
target,
|
|
@@ -28454,7 +28387,7 @@ function loadModuleFromImportsOrExports(extensions, state, cache, redirectedRefe
|
|
|
28454
28387
|
moduleName
|
|
28455
28388
|
);
|
|
28456
28389
|
}
|
|
28457
|
-
const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => k.
|
|
28390
|
+
const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => k.includes("*") || endsWith(k, "/")), comparePatternKeys);
|
|
28458
28391
|
for (const potentialTarget of expandingKeys) {
|
|
28459
28392
|
if (state.features & 16 /* ExportsPatternTrailers */ && matchesPatternWithTrailer(potentialTarget, moduleName)) {
|
|
28460
28393
|
const target = lookupTable[potentialTarget];
|
|
@@ -28548,7 +28481,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
|
|
|
28548
28481
|
}
|
|
28549
28482
|
const parts = pathIsRelative(target) ? getPathComponents(target).slice(1) : getPathComponents(target);
|
|
28550
28483
|
const partsAfterFirst = parts.slice(1);
|
|
28551
|
-
if (partsAfterFirst.
|
|
28484
|
+
if (partsAfterFirst.includes("..") || partsAfterFirst.includes(".") || partsAfterFirst.includes("node_modules")) {
|
|
28552
28485
|
if (state.traceEnabled) {
|
|
28553
28486
|
trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
|
|
28554
28487
|
}
|
|
@@ -28559,7 +28492,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
|
|
|
28559
28492
|
}
|
|
28560
28493
|
const resolvedTarget = combinePaths(scope.packageDirectory, target);
|
|
28561
28494
|
const subpathParts = getPathComponents(subpath);
|
|
28562
|
-
if (subpathParts.
|
|
28495
|
+
if (subpathParts.includes("..") || subpathParts.includes(".") || subpathParts.includes("node_modules")) {
|
|
28563
28496
|
if (state.traceEnabled) {
|
|
28564
28497
|
trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
|
|
28565
28498
|
}
|
|
@@ -28586,7 +28519,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
|
|
|
28586
28519
|
if (!Array.isArray(target)) {
|
|
28587
28520
|
traceIfEnabled(state, Diagnostics.Entering_conditional_exports);
|
|
28588
28521
|
for (const condition of getOwnKeys(target)) {
|
|
28589
|
-
if (condition === "default" || state.conditions.
|
|
28522
|
+
if (condition === "default" || state.conditions.includes(condition) || isApplicableVersionedTypesKey(state.conditions, condition)) {
|
|
28590
28523
|
traceIfEnabled(state, Diagnostics.Matched_0_condition_1, isImports ? "imports" : "exports", condition);
|
|
28591
28524
|
const subTarget = target[condition];
|
|
28592
28525
|
const result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern, key);
|
|
@@ -28647,7 +28580,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
|
|
|
28647
28580
|
}
|
|
28648
28581
|
function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) {
|
|
28649
28582
|
var _a, _b, _c, _d;
|
|
28650
|
-
if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.
|
|
28583
|
+
if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && !finalPath.includes("/node_modules/") && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) {
|
|
28651
28584
|
const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) });
|
|
28652
28585
|
const commonSourceDirGuesses = [];
|
|
28653
28586
|
if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {
|
|
@@ -28721,7 +28654,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
|
|
|
28721
28654
|
}
|
|
28722
28655
|
}
|
|
28723
28656
|
function isApplicableVersionedTypesKey(conditions, key) {
|
|
28724
|
-
if (conditions.
|
|
28657
|
+
if (!conditions.includes("types"))
|
|
28725
28658
|
return false;
|
|
28726
28659
|
if (!startsWith(key, "types@"))
|
|
28727
28660
|
return false;
|
|
@@ -31669,7 +31602,7 @@ var Arguments;
|
|
|
31669
31602
|
Arguments2.ValidateDefaultNpmLocation = "--validateDefaultNpmLocation";
|
|
31670
31603
|
})(Arguments || (Arguments = {}));
|
|
31671
31604
|
function hasArgument(argumentName) {
|
|
31672
|
-
return sys.args.
|
|
31605
|
+
return sys.args.includes(argumentName);
|
|
31673
31606
|
}
|
|
31674
31607
|
function findArgument(argumentName) {
|
|
31675
31608
|
const index = sys.args.indexOf(argumentName);
|
|
@@ -31677,7 +31610,7 @@ function findArgument(argumentName) {
|
|
|
31677
31610
|
}
|
|
31678
31611
|
function nowString() {
|
|
31679
31612
|
const d = /* @__PURE__ */ new Date();
|
|
31680
|
-
return `${
|
|
31613
|
+
return `${d.getHours().toString().padStart(2, "0")}:${d.getMinutes().toString().padStart(2, "0")}:${d.getSeconds().toString().padStart(2, "0")}.${d.getMilliseconds().toString().padStart(3, "0")}`;
|
|
31681
31614
|
}
|
|
31682
31615
|
|
|
31683
31616
|
// src/typingsInstallerCore/typingsInstaller.ts
|
|
@@ -32096,7 +32029,7 @@ var NodeTypingsInstaller = class extends TypingsInstaller {
|
|
|
32096
32029
|
log2
|
|
32097
32030
|
);
|
|
32098
32031
|
this.npmPath = npmLocation2 !== void 0 ? npmLocation2 : getDefaultNPMLocation(process.argv[0], validateDefaultNpmLocation2, this.installTypingHost);
|
|
32099
|
-
if (
|
|
32032
|
+
if (this.npmPath.includes(" ") && this.npmPath[0] !== `"`) {
|
|
32100
32033
|
this.npmPath = `"${this.npmPath}"`;
|
|
32101
32034
|
}
|
|
32102
32035
|
if (this.log.isEnabled()) {
|
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.3.0-pr-
|
|
5
|
+
"version": "5.3.0-pr-55438-2",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"node": "20.1.0",
|
|
114
114
|
"npm": "8.19.4"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "6889736b7b5cfbaed372a0f3ebce7662dbe02ed9"
|
|
117
117
|
}
|