@typescript-deploys/pr-build 4.9.0-pr-50293-2 → 4.9.0-pr-50306-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/cs/diagnosticMessages.generated.json +1 -0
- package/lib/de/diagnosticMessages.generated.json +1 -0
- package/lib/es/diagnosticMessages.generated.json +1 -0
- package/lib/fr/diagnosticMessages.generated.json +1 -0
- package/lib/it/diagnosticMessages.generated.json +1 -0
- package/lib/ja/diagnosticMessages.generated.json +1 -0
- package/lib/ko/diagnosticMessages.generated.json +1 -0
- package/lib/pl/diagnosticMessages.generated.json +1 -0
- package/lib/pt-br/diagnosticMessages.generated.json +1 -0
- package/lib/ru/diagnosticMessages.generated.json +1 -0
- package/lib/tr/diagnosticMessages.generated.json +1 -0
- package/lib/tsc.js +152 -310
- package/lib/tsserver.js +111 -112
- package/lib/tsserverlibrary.d.ts +2 -2
- package/lib/tsserverlibrary.js +111 -112
- package/lib/typescript.d.ts +2 -2
- package/lib/typescript.js +111 -112
- package/lib/typescriptServices.d.ts +2 -2
- package/lib/typescriptServices.js +111 -112
- package/lib/typingsInstaller.js +111 -112
- package/lib/zh-cn/diagnosticMessages.generated.json +1 -0
- package/lib/zh-tw/diagnosticMessages.generated.json +1 -0
- package/package.json +2 -1
package/lib/typingsInstaller.js
CHANGED
|
@@ -89,7 +89,7 @@ var ts;
|
|
|
89
89
|
// The following is baselined as a literal template type without intervention
|
|
90
90
|
/** The version of the TypeScript compiler release */
|
|
91
91
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
92
|
-
ts.version = ts.versionMajorMinor + ".0-insiders.
|
|
92
|
+
ts.version = ts.versionMajorMinor + ".0-insiders.20220815";
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -7010,7 +7010,6 @@ var ts;
|
|
|
7010
7010
|
// not actually work.
|
|
7011
7011
|
var byteOrderMarkIndicator = "\uFEFF";
|
|
7012
7012
|
function getNodeSystem() {
|
|
7013
|
-
var _a;
|
|
7014
7013
|
var nativePattern = /^native |^\([^)]+\)$|^(internal[\\/]|[a-zA-Z0-9_\s]+(\.js)?$)/;
|
|
7015
7014
|
var _fs = require("fs");
|
|
7016
7015
|
var _path = require("path");
|
|
@@ -7020,7 +7019,7 @@ var ts;
|
|
|
7020
7019
|
try {
|
|
7021
7020
|
_crypto = require("crypto");
|
|
7022
7021
|
}
|
|
7023
|
-
catch (
|
|
7022
|
+
catch (_a) {
|
|
7024
7023
|
_crypto = undefined;
|
|
7025
7024
|
}
|
|
7026
7025
|
var activeSession;
|
|
@@ -7031,10 +7030,10 @@ var ts;
|
|
|
7031
7030
|
var isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin";
|
|
7032
7031
|
var platform = _os.platform();
|
|
7033
7032
|
var useCaseSensitiveFileNames = isFileSystemCaseSensitive();
|
|
7034
|
-
var
|
|
7033
|
+
var fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;
|
|
7035
7034
|
var fsSupportsRecursiveFsWatch = isNode4OrLater && (process.platform === "win32" || process.platform === "darwin");
|
|
7036
7035
|
var getCurrentDirectory = ts.memoize(function () { return process.cwd(); });
|
|
7037
|
-
var
|
|
7036
|
+
var _b = createSystemWatchFunctions({
|
|
7038
7037
|
pollingWatchFile: createSingleFileWatcherPerName(fsWatchFileWorker, useCaseSensitiveFileNames),
|
|
7039
7038
|
getModifiedTime: getModifiedTime,
|
|
7040
7039
|
setTimeout: setTimeout,
|
|
@@ -7054,7 +7053,7 @@ var ts;
|
|
|
7054
7053
|
defaultWatchFileKind: function () { var _a, _b; return (_b = (_a = sys).defaultWatchFileKind) === null || _b === void 0 ? void 0 : _b.call(_a); },
|
|
7055
7054
|
inodeWatching: isLinuxOrMacOs,
|
|
7056
7055
|
sysLog: sysLog,
|
|
7057
|
-
}), watchFile =
|
|
7056
|
+
}), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory;
|
|
7058
7057
|
var nodeSystem = {
|
|
7059
7058
|
args: process.argv.slice(2),
|
|
7060
7059
|
newLine: _os.EOL,
|
|
@@ -7447,9 +7446,12 @@ var ts;
|
|
|
7447
7446
|
function getDirectories(path) {
|
|
7448
7447
|
return getAccessibleFileSystemEntries(path).directories.slice();
|
|
7449
7448
|
}
|
|
7449
|
+
function fsRealPathHandlingLongPath(path) {
|
|
7450
|
+
return path.length < 260 ? _fs.realpathSync.native(path) : _fs.realpathSync(path);
|
|
7451
|
+
}
|
|
7450
7452
|
function realpath(path) {
|
|
7451
7453
|
try {
|
|
7452
|
-
return
|
|
7454
|
+
return fsRealpath(path);
|
|
7453
7455
|
}
|
|
7454
7456
|
catch (_a) {
|
|
7455
7457
|
return path;
|
|
@@ -27740,12 +27742,10 @@ var ts;
|
|
|
27740
27742
|
node.helpers = ts.map(bundleFileInfo.sources && bundleFileInfo.sources.helpers, function (name) { return ts.getAllUnscopedEmitHelpers().get(name); });
|
|
27741
27743
|
return node;
|
|
27742
27744
|
}
|
|
27743
|
-
function createInputFiles(javascriptTextOrReadFileText, declarationTextOrJavascriptPath, javascriptMapPath, javascriptMapTextOrDeclarationPath, declarationMapPath, declarationMapTextOrBuildInfoPath,
|
|
27745
|
+
function createInputFiles(javascriptTextOrReadFileText, declarationTextOrJavascriptPath, javascriptMapPath, javascriptMapTextOrDeclarationPath, declarationMapPath, declarationMapTextOrBuildInfoPath, javascriptPath, declarationPath, buildInfoPath, buildInfo, oldFileOfCurrentEmit) {
|
|
27744
27746
|
var node = ts.parseNodeFactory.createInputFiles();
|
|
27745
27747
|
if (!ts.isString(javascriptTextOrReadFileText)) {
|
|
27746
27748
|
var cache_1 = new ts.Map();
|
|
27747
|
-
var host_1 = javascriptPathOrHost;
|
|
27748
|
-
var options_1 = declarationPathOrOptions;
|
|
27749
27749
|
var textGetter_1 = function (path) {
|
|
27750
27750
|
if (path === undefined)
|
|
27751
27751
|
return undefined;
|
|
@@ -27761,18 +27761,11 @@ var ts;
|
|
|
27761
27761
|
return result !== undefined ? result : "/* Input file " + path + " was missing */\r\n";
|
|
27762
27762
|
};
|
|
27763
27763
|
var buildInfo_1;
|
|
27764
|
-
var
|
|
27765
|
-
var _a
|
|
27766
|
-
if (buildInfo_1 === undefined
|
|
27767
|
-
|
|
27768
|
-
|
|
27769
|
-
}
|
|
27770
|
-
else {
|
|
27771
|
-
var result = textGetter_1(declarationMapTextOrBuildInfoPath);
|
|
27772
|
-
if (result)
|
|
27773
|
-
(_b = host_1 === null || host_1 === void 0 ? void 0 : host_1.buildInfoCallbacks) === null || _b === void 0 ? void 0 : _b.onRead(result.length, options_1);
|
|
27774
|
-
buildInfo_1 = result !== undefined ? (_c = ts.getBuildInfo(declarationMapTextOrBuildInfoPath, result)) !== null && _c !== void 0 ? _c : false : false;
|
|
27775
|
-
}
|
|
27764
|
+
var getAndCacheBuildInfo_1 = function (getText) {
|
|
27765
|
+
var _a;
|
|
27766
|
+
if (buildInfo_1 === undefined) {
|
|
27767
|
+
var result = getText();
|
|
27768
|
+
buildInfo_1 = result !== undefined ? (_a = ts.getBuildInfo(node.buildInfoPath, result)) !== null && _a !== void 0 ? _a : false : false;
|
|
27776
27769
|
}
|
|
27777
27770
|
return buildInfo_1 || undefined;
|
|
27778
27771
|
};
|
|
@@ -27786,7 +27779,7 @@ var ts;
|
|
|
27786
27779
|
javascriptMapText: { get: function () { return textGetter_1(javascriptMapPath); } },
|
|
27787
27780
|
declarationText: { get: function () { return definedTextGetter_1(ts.Debug.checkDefined(javascriptMapTextOrDeclarationPath)); } },
|
|
27788
27781
|
declarationMapText: { get: function () { return textGetter_1(declarationMapPath); } },
|
|
27789
|
-
buildInfo: { get:
|
|
27782
|
+
buildInfo: { get: function () { return getAndCacheBuildInfo_1(function () { return textGetter_1(declarationMapTextOrBuildInfoPath); }); } }
|
|
27790
27783
|
});
|
|
27791
27784
|
}
|
|
27792
27785
|
else {
|
|
@@ -27796,8 +27789,8 @@ var ts;
|
|
|
27796
27789
|
node.declarationText = declarationTextOrJavascriptPath;
|
|
27797
27790
|
node.declarationMapPath = declarationMapPath;
|
|
27798
27791
|
node.declarationMapText = declarationMapTextOrBuildInfoPath;
|
|
27799
|
-
node.javascriptPath =
|
|
27800
|
-
node.declarationPath =
|
|
27792
|
+
node.javascriptPath = javascriptPath;
|
|
27793
|
+
node.declarationPath = declarationPath;
|
|
27801
27794
|
node.buildInfoPath = buildInfoPath;
|
|
27802
27795
|
node.buildInfo = buildInfo;
|
|
27803
27796
|
node.oldFileOfCurrentEmit = oldFileOfCurrentEmit;
|
|
@@ -41814,8 +41807,8 @@ var ts;
|
|
|
41814
41807
|
entries.push({ value: "" });
|
|
41815
41808
|
}
|
|
41816
41809
|
entries.push({ value: "/* " + category + " */" });
|
|
41817
|
-
for (var _i = 0,
|
|
41818
|
-
var option =
|
|
41810
|
+
for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
|
|
41811
|
+
var option = options_1[_i];
|
|
41819
41812
|
var optionName = void 0;
|
|
41820
41813
|
if (compilerOptionsMap.has(option.name)) {
|
|
41821
41814
|
optionName = "\"" + option.name + "\": " + JSON.stringify(compilerOptionsMap.get(option.name)) + ((seenKnownKeys += 1) === compilerOptionsMap.size ? "" : ",");
|
|
@@ -86871,9 +86864,9 @@ var ts;
|
|
|
86871
86864
|
var paramTag = node.parent.parent;
|
|
86872
86865
|
if (ts.isJSDocTypeExpression(node.parent) && ts.isJSDocParameterTag(paramTag)) {
|
|
86873
86866
|
// Else we will add a diagnostic, see `checkJSDocVariadicType`.
|
|
86874
|
-
var
|
|
86867
|
+
var host_1 = ts.getHostSignatureFromJSDoc(paramTag);
|
|
86875
86868
|
var isCallbackTag = ts.isJSDocCallbackTag(paramTag.parent.parent);
|
|
86876
|
-
if (
|
|
86869
|
+
if (host_1 || isCallbackTag) {
|
|
86877
86870
|
/*
|
|
86878
86871
|
Only return an array type if the corresponding parameter is marked as a rest parameter, or if there are no parameters.
|
|
86879
86872
|
So in the following situation we will not create an array type:
|
|
@@ -86883,7 +86876,7 @@ var ts;
|
|
|
86883
86876
|
*/
|
|
86884
86877
|
var lastParamDeclaration = isCallbackTag
|
|
86885
86878
|
? ts.lastOrUndefined(paramTag.parent.parent.typeExpression.parameters)
|
|
86886
|
-
: ts.lastOrUndefined(
|
|
86879
|
+
: ts.lastOrUndefined(host_1.parameters);
|
|
86887
86880
|
var symbol = ts.getParameterSymbolFromJSDoc(paramTag);
|
|
86888
86881
|
if (!lastParamDeclaration ||
|
|
86889
86882
|
symbol && lastParamDeclaration.symbol === symbol && ts.isRestParameter(lastParamDeclaration)) {
|
|
@@ -89668,9 +89661,9 @@ var ts;
|
|
|
89668
89661
|
}
|
|
89669
89662
|
var parent = ts.walkUpParenthesizedTypes(node.parent);
|
|
89670
89663
|
if (ts.isInJSFile(parent) && ts.isJSDocTypeExpression(parent)) {
|
|
89671
|
-
var
|
|
89672
|
-
if (
|
|
89673
|
-
parent = ts.getSingleVariableOfVariableStatement(
|
|
89664
|
+
var host_2 = ts.getJSDocHost(parent);
|
|
89665
|
+
if (host_2) {
|
|
89666
|
+
parent = ts.getSingleVariableOfVariableStatement(host_2) || host_2;
|
|
89674
89667
|
}
|
|
89675
89668
|
}
|
|
89676
89669
|
switch (parent.kind) {
|
|
@@ -111674,7 +111667,6 @@ var ts;
|
|
|
111674
111667
|
}
|
|
111675
111668
|
}
|
|
111676
111669
|
function emitBuildInfo(bundle, buildInfoPath) {
|
|
111677
|
-
var _a;
|
|
111678
111670
|
// Write build information if applicable
|
|
111679
111671
|
if (!buildInfoPath || targetSourceFile || emitSkipped)
|
|
111680
111672
|
return;
|
|
@@ -111685,10 +111677,8 @@ var ts;
|
|
|
111685
111677
|
}
|
|
111686
111678
|
var version = ts.version; // Extracted into a const so the form is stable between namespace and module
|
|
111687
111679
|
var buildInfo = { bundle: bundle, program: program, version: version };
|
|
111688
|
-
var buildInfoText = getBuildInfoText(buildInfo);
|
|
111689
|
-
(_a = host.buildInfoCallbacks) === null || _a === void 0 ? void 0 : _a.onWrite(buildInfoText.length);
|
|
111690
111680
|
// Pass buildinfo as additional data to avoid having to reparse
|
|
111691
|
-
ts.writeFile(host, emitterDiagnostics, buildInfoPath,
|
|
111681
|
+
ts.writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText(buildInfo), /*writeByteOrderMark*/ false, /*sourceFiles*/ undefined, { buildInfo: buildInfo });
|
|
111692
111682
|
}
|
|
111693
111683
|
function emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath, relativeToBuildInfo) {
|
|
111694
111684
|
if (!sourceFileOrBundle || emitOnlyDtsFiles || !jsFilePath) {
|
|
@@ -111995,20 +111985,19 @@ var ts;
|
|
|
111995
111985
|
}
|
|
111996
111986
|
/*@internal*/
|
|
111997
111987
|
function emitUsingBuildInfo(config, host, getCommandLine, customTransformers) {
|
|
111998
|
-
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("emit" /* Emit */, "emitUsingBuildInfo", {}, /*separateBeginAndEnd*/ true);
|
|
111999
|
-
ts.performance.mark("beforeEmit");
|
|
112000
|
-
var result = emitUsingBuildInfoWorker(config, host, getCommandLine, customTransformers);
|
|
112001
|
-
ts.performance.mark("afterEmit");
|
|
112002
|
-
ts.performance.measure("Emit", "beforeEmit", "afterEmit");
|
|
112003
|
-
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
|
|
112004
|
-
return result;
|
|
112005
|
-
}
|
|
112006
|
-
ts.emitUsingBuildInfo = emitUsingBuildInfo;
|
|
112007
|
-
function emitUsingBuildInfoWorker(config, host, getCommandLine, customTransformers) {
|
|
112008
111988
|
var createHash = ts.maybeBind(host, host.createHash);
|
|
112009
111989
|
var _a = getOutputPathsForBundle(config.options, /*forceDtsPaths*/ false), buildInfoPath = _a.buildInfoPath, jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath, declarationMapPath = _a.declarationMapPath;
|
|
112010
|
-
|
|
112011
|
-
|
|
111990
|
+
var buildInfo;
|
|
111991
|
+
if (host.getBuildInfo) {
|
|
111992
|
+
// If host directly provides buildinfo we can get it directly. This allows host to cache the buildinfo
|
|
111993
|
+
buildInfo = host.getBuildInfo(buildInfoPath, config.options.configFilePath);
|
|
111994
|
+
}
|
|
111995
|
+
else {
|
|
111996
|
+
var buildInfoText = host.readFile(buildInfoPath);
|
|
111997
|
+
if (!buildInfoText)
|
|
111998
|
+
return buildInfoPath;
|
|
111999
|
+
buildInfo = getBuildInfo(buildInfoPath, buildInfoText);
|
|
112000
|
+
}
|
|
112012
112001
|
if (!buildInfo)
|
|
112013
112002
|
return buildInfoPath;
|
|
112014
112003
|
if (!buildInfo.bundle || !buildInfo.bundle.js || (declarationFilePath && !buildInfo.bundle.dts))
|
|
@@ -112041,7 +112030,7 @@ var ts;
|
|
|
112041
112030
|
var ownPrependInput = ts.createInputFiles(jsFileText, declarationText, sourceMapFilePath, sourceMapText, declarationMapPath, declarationMapText, jsFilePath, declarationFilePath, buildInfoPath, buildInfo,
|
|
112042
112031
|
/*onlyOwnText*/ true);
|
|
112043
112032
|
var outputFiles = [];
|
|
112044
|
-
var prependNodes = ts.createPrependNodes(config.projectReferences, getCommandLine, function (f) { return host.readFile(f); }
|
|
112033
|
+
var prependNodes = ts.createPrependNodes(config.projectReferences, getCommandLine, function (f) { return host.readFile(f); });
|
|
112045
112034
|
var sourceFilesForJsEmit = createSourceFilesFromBundleBuildInfo(buildInfo.bundle, buildInfoDirectory, host);
|
|
112046
112035
|
var changedDtsText;
|
|
112047
112036
|
var changedDtsData;
|
|
@@ -112084,8 +112073,7 @@ var ts;
|
|
|
112084
112073
|
newBuildInfo.bundle.dts.sources = dts.sources;
|
|
112085
112074
|
}
|
|
112086
112075
|
newBuildInfo.bundle.sourceFiles = sourceFiles;
|
|
112087
|
-
|
|
112088
|
-
outputFiles.push({ name: name, text: newBuildInfoText, writeByteOrderMark: writeByteOrderMark, buildInfo: newBuildInfo });
|
|
112076
|
+
outputFiles.push({ name: name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark: writeByteOrderMark, buildInfo: newBuildInfo });
|
|
112089
112077
|
return;
|
|
112090
112078
|
case declarationFilePath:
|
|
112091
112079
|
if (declarationText === text)
|
|
@@ -112111,12 +112099,12 @@ var ts;
|
|
|
112111
112099
|
redirectTargetsMap: ts.createMultiMap(),
|
|
112112
112100
|
getFileIncludeReasons: ts.notImplemented,
|
|
112113
112101
|
createHash: createHash,
|
|
112114
|
-
buildInfoCallbacks: host.buildInfoCallbacks,
|
|
112115
112102
|
};
|
|
112116
112103
|
emitFiles(ts.notImplementedResolver, emitHost,
|
|
112117
112104
|
/*targetSourceFile*/ undefined, ts.getTransformers(config.options, customTransformers));
|
|
112118
112105
|
return outputFiles;
|
|
112119
112106
|
}
|
|
112107
|
+
ts.emitUsingBuildInfo = emitUsingBuildInfo;
|
|
112120
112108
|
var PipelinePhase;
|
|
112121
112109
|
(function (PipelinePhase) {
|
|
112122
112110
|
PipelinePhase[PipelinePhase["Notification"] = 0] = "Notification";
|
|
@@ -117231,12 +117219,15 @@ var ts;
|
|
|
117231
117219
|
}
|
|
117232
117220
|
ts.createCompilerHost = createCompilerHost;
|
|
117233
117221
|
/*@internal*/
|
|
117234
|
-
function
|
|
117235
|
-
|
|
117222
|
+
function createCompilerHostWorker(options, setParentNodes, system) {
|
|
117223
|
+
if (system === void 0) { system = ts.sys; }
|
|
117224
|
+
var existingDirectories = new ts.Map();
|
|
117225
|
+
var getCanonicalFileName = ts.createGetCanonicalFileName(system.useCaseSensitiveFileNames);
|
|
117226
|
+
function getSourceFile(fileName, languageVersionOrOptions, onError) {
|
|
117236
117227
|
var text;
|
|
117237
117228
|
try {
|
|
117238
117229
|
ts.performance.mark("beforeIORead");
|
|
117239
|
-
text = readFile(fileName
|
|
117230
|
+
text = compilerHost.readFile(fileName);
|
|
117240
117231
|
ts.performance.mark("afterIORead");
|
|
117241
117232
|
ts.performance.measure("I/O Read", "beforeIORead", "afterIORead");
|
|
117242
117233
|
}
|
|
@@ -117247,18 +117238,24 @@ var ts;
|
|
|
117247
117238
|
text = "";
|
|
117248
117239
|
}
|
|
117249
117240
|
return text !== undefined ? ts.createSourceFile(fileName, text, languageVersionOrOptions, setParentNodes) : undefined;
|
|
117250
|
-
}
|
|
117251
|
-
|
|
117252
|
-
|
|
117253
|
-
|
|
117254
|
-
|
|
117255
|
-
|
|
117241
|
+
}
|
|
117242
|
+
function directoryExists(directoryPath) {
|
|
117243
|
+
if (existingDirectories.has(directoryPath)) {
|
|
117244
|
+
return true;
|
|
117245
|
+
}
|
|
117246
|
+
if ((compilerHost.directoryExists || system.directoryExists)(directoryPath)) {
|
|
117247
|
+
existingDirectories.set(directoryPath, true);
|
|
117248
|
+
return true;
|
|
117249
|
+
}
|
|
117250
|
+
return false;
|
|
117251
|
+
}
|
|
117252
|
+
function writeFile(fileName, data, writeByteOrderMark, onError) {
|
|
117256
117253
|
try {
|
|
117257
117254
|
ts.performance.mark("beforeIOWrite");
|
|
117258
117255
|
// NOTE: If patchWriteFileEnsuringDirectory has been called,
|
|
117259
117256
|
// the system.writeFile will do its own directory creation and
|
|
117260
117257
|
// the ensureDirectoriesExist call will always be redundant.
|
|
117261
|
-
ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, writeFile, createDirectory, directoryExists);
|
|
117258
|
+
ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, function (path, data, writeByteOrderMark) { return system.writeFile(path, data, writeByteOrderMark); }, function (path) { return (compilerHost.createDirectory || system.createDirectory)(path); }, function (path) { return directoryExists(path); });
|
|
117262
117259
|
ts.performance.mark("afterIOWrite");
|
|
117263
117260
|
ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite");
|
|
117264
117261
|
}
|
|
@@ -117267,23 +117264,6 @@ var ts;
|
|
|
117267
117264
|
onError(e.message);
|
|
117268
117265
|
}
|
|
117269
117266
|
}
|
|
117270
|
-
};
|
|
117271
|
-
}
|
|
117272
|
-
ts.createWriteFile = createWriteFile;
|
|
117273
|
-
/*@internal*/
|
|
117274
|
-
function createCompilerHostWorker(options, setParentNodes, system) {
|
|
117275
|
-
if (system === void 0) { system = ts.sys; }
|
|
117276
|
-
var existingDirectories = new ts.Map();
|
|
117277
|
-
var getCanonicalFileName = ts.createGetCanonicalFileName(system.useCaseSensitiveFileNames);
|
|
117278
|
-
function directoryExists(directoryPath) {
|
|
117279
|
-
if (existingDirectories.has(directoryPath)) {
|
|
117280
|
-
return true;
|
|
117281
|
-
}
|
|
117282
|
-
if ((compilerHost.directoryExists || system.directoryExists)(directoryPath)) {
|
|
117283
|
-
existingDirectories.set(directoryPath, true);
|
|
117284
|
-
return true;
|
|
117285
|
-
}
|
|
117286
|
-
return false;
|
|
117287
117267
|
}
|
|
117288
117268
|
function getDefaultLibLocation() {
|
|
117289
117269
|
return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath()));
|
|
@@ -117291,10 +117271,10 @@ var ts;
|
|
|
117291
117271
|
var newLine = ts.getNewLineCharacter(options, function () { return system.newLine; });
|
|
117292
117272
|
var realpath = system.realpath && (function (path) { return system.realpath(path); });
|
|
117293
117273
|
var compilerHost = {
|
|
117294
|
-
getSourceFile:
|
|
117274
|
+
getSourceFile: getSourceFile,
|
|
117295
117275
|
getDefaultLibLocation: getDefaultLibLocation,
|
|
117296
117276
|
getDefaultLibFileName: function (options) { return ts.combinePaths(getDefaultLibLocation(), ts.getDefaultLibFileName(options)); },
|
|
117297
|
-
writeFile:
|
|
117277
|
+
writeFile: writeFile,
|
|
117298
117278
|
getCurrentDirectory: ts.memoize(function () { return system.getCurrentDirectory(); }),
|
|
117299
117279
|
useCaseSensitiveFileNames: function () { return system.useCaseSensitiveFileNames; },
|
|
117300
117280
|
getCanonicalFileName: getCanonicalFileName,
|
|
@@ -118905,7 +118885,6 @@ var ts;
|
|
|
118905
118885
|
redirectTargetsMap: redirectTargetsMap,
|
|
118906
118886
|
getFileIncludeReasons: program.getFileIncludeReasons,
|
|
118907
118887
|
createHash: ts.maybeBind(host, host.createHash),
|
|
118908
|
-
buildInfoCallbacks: host.buildInfoCallbacks,
|
|
118909
118888
|
};
|
|
118910
118889
|
}
|
|
118911
118890
|
function writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
@@ -118936,7 +118915,7 @@ var ts;
|
|
|
118936
118915
|
var path = toPath(fileName);
|
|
118937
118916
|
var sourceFile = getSourceFileByPath(path);
|
|
118938
118917
|
return sourceFile ? sourceFile.text : filesByName.has(path) ? undefined : host.readFile(path);
|
|
118939
|
-
}
|
|
118918
|
+
});
|
|
118940
118919
|
}
|
|
118941
118920
|
function isSourceFileFromExternalLibrary(file) {
|
|
118942
118921
|
return !!sourceFilesFoundSearchingNodeModules.get(file.path);
|
|
@@ -120919,7 +120898,7 @@ var ts;
|
|
|
120919
120898
|
}
|
|
120920
120899
|
ts.parseConfigHostFromCompilerHostLike = parseConfigHostFromCompilerHostLike;
|
|
120921
120900
|
/* @internal */
|
|
120922
|
-
function createPrependNodes(projectReferences, getCommandLine, readFile
|
|
120901
|
+
function createPrependNodes(projectReferences, getCommandLine, readFile) {
|
|
120923
120902
|
if (!projectReferences)
|
|
120924
120903
|
return ts.emptyArray;
|
|
120925
120904
|
var nodes;
|
|
@@ -120932,7 +120911,7 @@ var ts;
|
|
|
120932
120911
|
if (!out)
|
|
120933
120912
|
continue;
|
|
120934
120913
|
var _a = ts.getOutputPathsForBundle(resolvedRefOpts.options, /*forceDtsPaths*/ true), jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath, declarationMapPath = _a.declarationMapPath, buildInfoPath = _a.buildInfoPath;
|
|
120935
|
-
var node = ts.createInputFiles(readFile, jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath, buildInfoPath
|
|
120914
|
+
var node = ts.createInputFiles(readFile, jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath, buildInfoPath);
|
|
120936
120915
|
(nodes || (nodes = [])).push(node);
|
|
120937
120916
|
}
|
|
120938
120917
|
}
|
|
@@ -121749,10 +121728,10 @@ var ts;
|
|
|
121749
121728
|
if (!state.cleanedDiagnosticsOfLibFiles) {
|
|
121750
121729
|
state.cleanedDiagnosticsOfLibFiles = true;
|
|
121751
121730
|
var program_1 = ts.Debug.checkDefined(state.program);
|
|
121752
|
-
var
|
|
121731
|
+
var options_2 = program_1.getCompilerOptions();
|
|
121753
121732
|
ts.forEach(program_1.getSourceFiles(), function (f) {
|
|
121754
121733
|
return program_1.isSourceFileDefaultLibrary(f) &&
|
|
121755
|
-
!ts.skipTypeChecking(f,
|
|
121734
|
+
!ts.skipTypeChecking(f, options_2, program_1) &&
|
|
121756
121735
|
removeSemanticDiagnosticsOf(state, f.resolvedPath);
|
|
121757
121736
|
});
|
|
121758
121737
|
}
|
|
@@ -124937,11 +124916,25 @@ var ts;
|
|
|
124937
124916
|
var useCaseSensitiveFileNames = host.useCaseSensitiveFileNames();
|
|
124938
124917
|
var hostGetNewLine = ts.memoize(function () { return host.getNewLine(); });
|
|
124939
124918
|
return {
|
|
124940
|
-
getSourceFile:
|
|
124941
|
-
|
|
124919
|
+
getSourceFile: function (fileName, languageVersionOrOptions, onError) {
|
|
124920
|
+
var text;
|
|
124921
|
+
try {
|
|
124922
|
+
ts.performance.mark("beforeIORead");
|
|
124923
|
+
text = host.readFile(fileName, getCompilerOptions().charset);
|
|
124924
|
+
ts.performance.mark("afterIORead");
|
|
124925
|
+
ts.performance.measure("I/O Read", "beforeIORead", "afterIORead");
|
|
124926
|
+
}
|
|
124927
|
+
catch (e) {
|
|
124928
|
+
if (onError) {
|
|
124929
|
+
onError(e.message);
|
|
124930
|
+
}
|
|
124931
|
+
text = "";
|
|
124932
|
+
}
|
|
124933
|
+
return text !== undefined ? ts.createSourceFile(fileName, text, languageVersionOrOptions) : undefined;
|
|
124934
|
+
},
|
|
124942
124935
|
getDefaultLibLocation: ts.maybeBind(host, host.getDefaultLibLocation),
|
|
124943
124936
|
getDefaultLibFileName: function (options) { return host.getDefaultLibFileName(options); },
|
|
124944
|
-
writeFile:
|
|
124937
|
+
writeFile: writeFile,
|
|
124945
124938
|
getCurrentDirectory: ts.memoize(function () { return host.getCurrentDirectory(); }),
|
|
124946
124939
|
useCaseSensitiveFileNames: function () { return useCaseSensitiveFileNames; },
|
|
124947
124940
|
getCanonicalFileName: ts.createGetCanonicalFileName(useCaseSensitiveFileNames),
|
|
@@ -124957,8 +124950,23 @@ var ts;
|
|
|
124957
124950
|
readDirectory: ts.maybeBind(host, host.readDirectory),
|
|
124958
124951
|
disableUseFileVersionAsSignature: host.disableUseFileVersionAsSignature,
|
|
124959
124952
|
storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit,
|
|
124960
|
-
buildInfoCallbacks: host.buildInfoCallbacks,
|
|
124961
124953
|
};
|
|
124954
|
+
function writeFile(fileName, text, writeByteOrderMark, onError) {
|
|
124955
|
+
try {
|
|
124956
|
+
ts.performance.mark("beforeIOWrite");
|
|
124957
|
+
// NOTE: If patchWriteFileEnsuringDirectory has been called,
|
|
124958
|
+
// the host.writeFile will do its own directory creation and
|
|
124959
|
+
// the ensureDirectoriesExist call will always be redundant.
|
|
124960
|
+
ts.writeFileEnsuringDirectories(fileName, text, writeByteOrderMark, function (path, data, writeByteOrderMark) { return host.writeFile(path, data, writeByteOrderMark); }, function (path) { return host.createDirectory(path); }, function (path) { return host.directoryExists(path); });
|
|
124961
|
+
ts.performance.mark("afterIOWrite");
|
|
124962
|
+
ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite");
|
|
124963
|
+
}
|
|
124964
|
+
catch (e) {
|
|
124965
|
+
if (onError) {
|
|
124966
|
+
onError(e.message);
|
|
124967
|
+
}
|
|
124968
|
+
}
|
|
124969
|
+
}
|
|
124962
124970
|
}
|
|
124963
124971
|
ts.createCompilerHostFromProgramHost = createCompilerHostFromProgramHost;
|
|
124964
124972
|
function setGetSourceFileAsHashVersioned(compilerHost, host) {
|
|
@@ -125070,20 +125078,18 @@ var ts;
|
|
|
125070
125078
|
var ts;
|
|
125071
125079
|
(function (ts) {
|
|
125072
125080
|
function readBuilderProgram(compilerOptions, host) {
|
|
125073
|
-
var _a;
|
|
125074
125081
|
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(compilerOptions);
|
|
125075
125082
|
if (!buildInfoPath)
|
|
125076
125083
|
return undefined;
|
|
125077
125084
|
var buildInfo;
|
|
125078
125085
|
if (host.getBuildInfo) {
|
|
125079
125086
|
// host provides buildinfo, get it from there. This allows host to cache it
|
|
125080
|
-
buildInfo = host.getBuildInfo(buildInfoPath, compilerOptions);
|
|
125087
|
+
buildInfo = host.getBuildInfo(buildInfoPath, compilerOptions.configFilePath);
|
|
125081
125088
|
}
|
|
125082
125089
|
else {
|
|
125083
125090
|
var content = host.readFile(buildInfoPath);
|
|
125084
125091
|
if (!content)
|
|
125085
125092
|
return undefined;
|
|
125086
|
-
(_a = host.buildInfoCallbacks) === null || _a === void 0 ? void 0 : _a.onRead(content.length, compilerOptions);
|
|
125087
125093
|
buildInfo = ts.getBuildInfo(buildInfoPath, content);
|
|
125088
125094
|
}
|
|
125089
125095
|
if (!buildInfo || buildInfo.version !== ts.version || !buildInfo.program)
|
|
@@ -125326,7 +125332,7 @@ var ts;
|
|
|
125326
125332
|
}
|
|
125327
125333
|
reportFileChangeDetectedOnCreateProgram = false;
|
|
125328
125334
|
if (host.afterProgramCreate && program !== builderProgram) {
|
|
125329
|
-
host.afterProgramCreate(builderProgram
|
|
125335
|
+
host.afterProgramCreate(builderProgram);
|
|
125330
125336
|
}
|
|
125331
125337
|
compilerHost.readFile = originalReadFile;
|
|
125332
125338
|
compilerHost.fileExists = originalFileExists;
|
|
@@ -125964,7 +125970,7 @@ var ts;
|
|
|
125964
125970
|
return ts.loadWithTypeDirectiveCache(ts.Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, containingFileMode, loader_4);
|
|
125965
125971
|
};
|
|
125966
125972
|
}
|
|
125967
|
-
compilerHost.getBuildInfo = function (fileName,
|
|
125973
|
+
compilerHost.getBuildInfo = function (fileName, configFilePath) { return getBuildInfo(state, fileName, toResolvedConfigFilePath(state, configFilePath), /*modifiedTime*/ undefined); };
|
|
125968
125974
|
var _a = ts.createWatchFactory(hostWithWatch, options), watchFile = _a.watchFile, watchDirectory = _a.watchDirectory, writeLog = _a.writeLog;
|
|
125969
125975
|
var state = {
|
|
125970
125976
|
host: host,
|
|
@@ -126416,7 +126422,7 @@ var ts;
|
|
|
126416
126422
|
}
|
|
126417
126423
|
function emit(writeFileCallback, cancellationToken, customTransformers) {
|
|
126418
126424
|
var _a;
|
|
126419
|
-
var _b, _c, _d
|
|
126425
|
+
var _b, _c, _d;
|
|
126420
126426
|
ts.Debug.assertIsDefined(program);
|
|
126421
126427
|
ts.Debug.assert(step === BuildStep.Emit);
|
|
126422
126428
|
// Before emitting lets backup state, so we can revert it back if there are declaration errors to handle emit and declaration errors correctly
|
|
@@ -126431,8 +126437,6 @@ var ts;
|
|
|
126431
126437
|
// Don't emit .d.ts if there are decl file errors
|
|
126432
126438
|
if (declDiagnostics) {
|
|
126433
126439
|
program.restoreEmitState(saved);
|
|
126434
|
-
// Revert buildInfo write size
|
|
126435
|
-
(_d = state.compilerHost.buildInfoCallbacks) === null || _d === void 0 ? void 0 : _d.revertLastWrite();
|
|
126436
126440
|
(_a = buildErrors(state, projectPath, program, config, declDiagnostics, BuildResultFlags.DeclarationEmitErrors, "Declaration file"), buildResult = _a.buildResult, step = _a.step);
|
|
126437
126441
|
return {
|
|
126438
126442
|
emitSkipped: true,
|
|
@@ -126441,8 +126445,7 @@ var ts;
|
|
|
126441
126445
|
}
|
|
126442
126446
|
// Actual Emit
|
|
126443
126447
|
var host = state.host, compilerHost = state.compilerHost;
|
|
126444
|
-
(
|
|
126445
|
-
var resultFlags = ((_f = program.hasChangedEmitSignature) === null || _f === void 0 ? void 0 : _f.call(program)) ? BuildResultFlags.None : BuildResultFlags.DeclarationOutputUnchanged;
|
|
126448
|
+
var resultFlags = ((_d = program.hasChangedEmitSignature) === null || _d === void 0 ? void 0 : _d.call(program)) ? BuildResultFlags.None : BuildResultFlags.DeclarationOutputUnchanged;
|
|
126446
126449
|
var emitterDiagnostics = ts.createDiagnosticCollection();
|
|
126447
126450
|
var emittedOutputs = new ts.Map();
|
|
126448
126451
|
var options = program.getCompilerOptions();
|
|
@@ -126509,7 +126512,7 @@ var ts;
|
|
|
126509
126512
|
return emitDiagnostics;
|
|
126510
126513
|
}
|
|
126511
126514
|
function emitBundle(writeFileCallback, customTransformers) {
|
|
126512
|
-
var _a, _b
|
|
126515
|
+
var _a, _b;
|
|
126513
126516
|
ts.Debug.assert(kind === InvalidatedProjectKind.UpdateBundle);
|
|
126514
126517
|
if (state.options.dry) {
|
|
126515
126518
|
reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_output_of_project_0, project);
|
|
@@ -126522,11 +126525,10 @@ var ts;
|
|
|
126522
126525
|
// Update js, and source map
|
|
126523
126526
|
var compilerHost = state.compilerHost;
|
|
126524
126527
|
state.projectCompilerOptions = config.options;
|
|
126525
|
-
(_b = (_a = state.host).beforeEmitBundle) === null || _b === void 0 ? void 0 : _b.call(_a, config, compilerHost);
|
|
126526
126528
|
var outputFiles = ts.emitUsingBuildInfo(config, compilerHost, function (ref) {
|
|
126527
126529
|
var refName = resolveProjectName(state, ref.path);
|
|
126528
126530
|
return parseConfigFile(state, refName, toResolvedConfigFilePath(state, refName));
|
|
126529
|
-
}, customTransformers || ((
|
|
126531
|
+
}, customTransformers || ((_b = (_a = state.host).getCustomTransformers) === null || _b === void 0 ? void 0 : _b.call(_a, project)));
|
|
126530
126532
|
if (ts.isString(outputFiles)) {
|
|
126531
126533
|
reportStatus(state, ts.Diagnostics.Cannot_update_output_of_project_0_because_there_was_error_reading_file_1, project, relName(state, outputFiles));
|
|
126532
126534
|
step = BuildStep.BuildInvalidatedProjectOfBundle;
|
|
@@ -126724,12 +126726,12 @@ var ts;
|
|
|
126724
126726
|
if (state.write)
|
|
126725
126727
|
ts.listFiles(program, state.write);
|
|
126726
126728
|
if (state.host.afterProgramEmitAndDiagnostics) {
|
|
126727
|
-
state.host.afterProgramEmitAndDiagnostics(program
|
|
126729
|
+
state.host.afterProgramEmitAndDiagnostics(program);
|
|
126728
126730
|
}
|
|
126729
126731
|
program.releaseProgram();
|
|
126730
126732
|
}
|
|
126731
126733
|
else if (state.host.afterEmitBundle) {
|
|
126732
|
-
state.host.afterEmitBundle(config
|
|
126734
|
+
state.host.afterEmitBundle(config);
|
|
126733
126735
|
}
|
|
126734
126736
|
state.projectCompilerOptions = state.baseCompilerOptions;
|
|
126735
126737
|
}
|
|
@@ -126829,16 +126831,13 @@ var ts;
|
|
|
126829
126831
|
var existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
126830
126832
|
return (existing === null || existing === void 0 ? void 0 : existing.path) === path ? existing : undefined;
|
|
126831
126833
|
}
|
|
126832
|
-
function getBuildInfo(state, buildInfoPath,
|
|
126833
|
-
var _a;
|
|
126834
|
+
function getBuildInfo(state, buildInfoPath, resolvedConfigPath, modifiedTime) {
|
|
126834
126835
|
var path = toPath(state, buildInfoPath);
|
|
126835
126836
|
var existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
126836
126837
|
if (existing !== undefined && existing.path === path) {
|
|
126837
126838
|
return existing.buildInfo || undefined;
|
|
126838
126839
|
}
|
|
126839
126840
|
var value = state.readFileWithCache(buildInfoPath);
|
|
126840
|
-
if (value)
|
|
126841
|
-
(_a = (modifiedTime ? state.host : state.compilerHost).buildInfoCallbacks) === null || _a === void 0 ? void 0 : _a.onRead(value.length, options);
|
|
126842
126841
|
var buildInfo = value ? ts.getBuildInfo(buildInfoPath, value) : undefined;
|
|
126843
126842
|
state.buildInfoCache.set(resolvedConfigPath, { path: path, buildInfo: buildInfo || false, modifiedTime: modifiedTime || ts.missingFileModifiedTime });
|
|
126844
126843
|
return buildInfo;
|
|
@@ -126924,7 +126923,7 @@ var ts;
|
|
|
126924
126923
|
missingOutputFileName: buildInfoPath
|
|
126925
126924
|
};
|
|
126926
126925
|
}
|
|
126927
|
-
var buildInfo = getBuildInfo(state, buildInfoPath,
|
|
126926
|
+
var buildInfo = getBuildInfo(state, buildInfoPath, resolvedPath, buildInfoTime);
|
|
126928
126927
|
if (!buildInfo) {
|
|
126929
126928
|
// Error reading buildInfo
|
|
126930
126929
|
return {
|
|
@@ -1103,6 +1103,7 @@
|
|
|
1103
1103
|
"Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352": "项目“{0}”已过期,因为输出文件“{1}”不存在",
|
|
1104
1104
|
"Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381": "项目 \"{0}\" 已过期,因为其输出是使用与当前版本 \"{2}\" 不同的版本 \"{1}\" 生成的",
|
|
1105
1105
|
"Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372": "项目 \"{0}\" 已过期,因为其依赖项 \"{1}\" 的输出已更改",
|
|
1106
|
+
"Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401": "项目“{0}”已过期,因为读取文件“{1}”时出错",
|
|
1106
1107
|
"Project_0_is_up_to_date_6361": "“{0}”项目已是最新",
|
|
1107
1108
|
"Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351": "项目“{0}”是最新的,因为最新的输入“{1}”早于输出“{2}”",
|
|
1108
1109
|
"Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400": "项目“{0}”是最新的,但需要更新早于输入文件的输出文件的时间戳",
|
|
@@ -1103,6 +1103,7 @@
|
|
|
1103
1103
|
"Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352": "因為輸出檔案 '{1}' 不存在,所以專案 '{0}' 已過期",
|
|
1104
1104
|
"Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381": "因為專案 '{0}' 的輸出使用版本 '{1}' 產生而成,與目前的版本 '{2}' 不同,所以該專案已過期",
|
|
1105
1105
|
"Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372": "因為專案 '{0}' 的相依性 '{1}' 輸出已變更,所以該專案已過期",
|
|
1106
|
+
"Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401": "專案 '{0}' 已過期,因為讀取檔案 '{1}' 時發生錯誤",
|
|
1106
1107
|
"Project_0_is_up_to_date_6361": "專案 '{0}' 為最新狀態",
|
|
1107
1108
|
"Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351": "因為最新的輸入 '{1}' 早於最舊的輸出 '{2}',所以專案 '{0}' 為最新狀態",
|
|
1108
1109
|
"Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400": "專案 '{0}' 為最新狀態,但需要更新比輸入檔案還舊的輸出檔案時間戳記",
|
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": "4.9.0-pr-
|
|
5
|
+
"version": "4.9.0-pr-50306-2",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
"typescript": "^4.5.5",
|
|
89
89
|
"vinyl": "latest",
|
|
90
90
|
"vinyl-sourcemaps-apply": "latest",
|
|
91
|
+
"which": "^2.0.2",
|
|
91
92
|
"xml2js": "^0.4.23"
|
|
92
93
|
},
|
|
93
94
|
"overrides": {
|