Bump version to 4.1.2 and LKG

This commit is contained in:
TypeScript Bot
2020-11-15 05:55:58 +00:00
parent c12cc533b2
commit ba1b9d2d6d
11 changed files with 176 additions and 202 deletions
+30 -34
View File
@@ -288,7 +288,7 @@ var ts;
// If changing the text in this section, be sure to test `configurePrerelease` too.
ts.versionMajorMinor = "4.1";
/** The version of the TypeScript compiler release */
ts.version = "4.1.1-rc";
ts.version = "4.1.2";
/* @internal */
var Comparison;
(function (Comparison) {
@@ -7991,8 +7991,6 @@ var ts;
Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: diag(1387, ts.DiagnosticCategory.Error, "Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387", "Function type notation must be parenthesized when used in an intersection type."),
Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: diag(1388, ts.DiagnosticCategory.Error, "Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388", "Constructor type notation must be parenthesized when used in an intersection type."),
_0_is_not_allowed_as_a_variable_declaration_name: diag(1389, ts.DiagnosticCategory.Error, "_0_is_not_allowed_as_a_variable_declaration_name_1389", "'{0}' is not allowed as a variable declaration name."),
Provides_a_root_package_name_when_using_outFile_with_declarations: diag(1390, ts.DiagnosticCategory.Message, "Provides_a_root_package_name_when_using_outFile_with_declarations_1390", "Provides a root package name when using outFile with declarations."),
The_bundledPackageName_option_must_be_provided_when_using_outFile_and_node_module_resolution_with_declaration_emit: diag(1391, ts.DiagnosticCategory.Error, "The_bundledPackageName_option_must_be_provided_when_using_outFile_and_node_module_resolution_with_de_1391", "The `bundledPackageName` option must be provided when using outFile and node module resolution with declaration emit."),
The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true),
@@ -14241,6 +14239,18 @@ var ts;
};
}
ts.createDiagnosticForNodeFromMessageChain = createDiagnosticForNodeFromMessageChain;
function createDiagnosticForFileFromMessageChain(sourceFile, messageChain, relatedInformation) {
return {
file: sourceFile,
start: 0,
length: 0,
code: messageChain.code,
category: messageChain.category,
messageText: messageChain.next ? messageChain : messageChain.messageText,
relatedInformation: relatedInformation
};
}
ts.createDiagnosticForFileFromMessageChain = createDiagnosticForFileFromMessageChain;
function createDiagnosticForRange(sourceFile, range, message) {
return {
file: sourceFile,
@@ -17150,16 +17160,7 @@ var ts;
var filePath = ts.getNormalizedAbsolutePath(fileName, host.getCurrentDirectory());
var relativePath = ts.getRelativePathToDirectoryOrUrl(dir, filePath, dir, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false);
var extensionless = removeFileExtension(relativePath);
if (referencePath) {
return ts.ensurePathIsNonModuleName(extensionless);
}
var options = host.getCompilerOptions();
var rootPkgName = options.bundledPackageName || "";
var newPath = ts.combinePaths(rootPkgName, extensionless);
if (rootPkgName && getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeJs && ts.endsWith(newPath, "/index")) {
return newPath.slice(0, newPath.length - "/index".length);
}
return newPath;
return referencePath ? ts.ensurePathIsNonModuleName(extensionless) : extensionless;
}
ts.getExternalModuleNameFromPath = getExternalModuleNameFromPath;
function getOwnEmitOutputFilePath(fileName, host, extension) {
@@ -36741,13 +36742,6 @@ var ts;
category: ts.Diagnostics.Advanced_Options,
description: ts.Diagnostics.Emit_class_fields_with_Define_instead_of_Set,
},
{
name: "bundledPackageName",
type: "string",
affectsEmit: true,
category: ts.Diagnostics.Advanced_Options,
description: ts.Diagnostics.Provides_a_root_package_name_when_using_outFile_with_declarations,
},
{
name: "keyofStringsOnly",
type: "boolean",
@@ -44309,6 +44303,16 @@ var ts;
}
}
function errorOrSuggestion(isError, location, message, arg0, arg1, arg2, arg3) {
// Pseudo-synthesized input node
if (location.pos < 0 || location.end < 0) {
if (!isError) {
return; // Drop suggestions (we have no span to suggest on)
}
// Issue errors globally
var file = ts.getSourceFileOfNode(location);
addErrorOrSuggestion(isError, "message" in message ? ts.createFileDiagnostic(file, 0, 0, message, arg0, arg1, arg2, arg3) : ts.createDiagnosticForFileFromMessageChain(file, message)); // eslint-disable-line no-in-operator
return;
}
addErrorOrSuggestion(isError, "message" in message ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2, arg3) : ts.createDiagnosticForNodeFromMessageChain(location, message)); // eslint-disable-line no-in-operator
}
function errorAndMaybeSuggestAwait(location, maybeMissingAwait, message, arg0, arg1, arg2, arg3) {
@@ -47311,7 +47315,6 @@ var ts;
getProjectReferenceRedirect: function (fileName) { return host.getProjectReferenceRedirect(fileName); },
isSourceOfProjectReferenceRedirect: function (fileName) { return host.isSourceOfProjectReferenceRedirect(fileName); },
fileExists: function (fileName) { return host.fileExists(fileName); },
getCompilerOptions: function () { return host.getCompilerOptions(); }
} : undefined },
encounteredError: false,
visitedTypes: undefined,
@@ -48790,8 +48793,7 @@ var ts;
var resolverHost = {
getCanonicalFileName: getCanonicalFileName,
getCurrentDirectory: function () { return context.tracker.moduleResolverHost.getCurrentDirectory(); },
getCommonSourceDirectory: function () { return context.tracker.moduleResolverHost.getCommonSourceDirectory(); },
getCompilerOptions: function () { return context.tracker.moduleResolverHost.getCompilerOptions(); }
getCommonSourceDirectory: function () { return context.tracker.moduleResolverHost.getCommonSourceDirectory(); }
};
var newName = ts.getResolvedExternalModuleName(resolverHost, targetFile);
return ts.factory.createStringLiteral(newName);
@@ -107394,10 +107396,6 @@ var ts;
programDiagnostics.add(ts.createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, ts.Diagnostics.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system, options.out ? "out" : "outFile"));
}
}
// Without a package name, for multiple files being bundled into a .d.ts file you basically get a file which doesn't wrk
if (outputFile && ts.getEmitDeclarations(options) && ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeJs && !options.bundledPackageName) {
createDiagnosticForOptionName(ts.Diagnostics.The_bundledPackageName_option_must_be_provided_when_using_outFile_and_node_module_resolution_with_declaration_emit, options.out ? "out" : "outFile");
}
if (options.resolveJsonModule) {
if (ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs) {
createDiagnosticForOptionName(ts.Diagnostics.Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy, "resolveJsonModule");
@@ -110254,7 +110252,7 @@ var ts;
function getLocalModuleSpecifier(moduleFileName, _a, compilerOptions, host, _b) {
var getCanonicalFileName = _a.getCanonicalFileName, sourceDirectory = _a.sourceDirectory;
var ending = _b.ending, relativePreference = _b.relativePreference;
var baseUrl = compilerOptions.baseUrl, paths = compilerOptions.paths, rootDirs = compilerOptions.rootDirs, bundledPackageName = compilerOptions.bundledPackageName;
var baseUrl = compilerOptions.baseUrl, paths = compilerOptions.paths, rootDirs = compilerOptions.rootDirs;
var relativePath = rootDirs && tryGetModuleNameFromRootDirs(rootDirs, moduleFileName, sourceDirectory, getCanonicalFileName, ending, compilerOptions) ||
removeExtensionAndIndexPostFix(ts.ensurePathIsNonModuleName(ts.getRelativePathFromDirectory(sourceDirectory, moduleFileName, getCanonicalFileName)), ending, compilerOptions);
if (!baseUrl && !paths || relativePreference === 0 /* Relative */) {
@@ -110265,9 +110263,8 @@ var ts;
if (!relativeToBaseUrl) {
return relativePath;
}
var bundledPkgReference = bundledPackageName ? ts.combinePaths(bundledPackageName, relativeToBaseUrl) : relativeToBaseUrl;
var importRelativeToBaseUrl = removeExtensionAndIndexPostFix(bundledPkgReference, ending, compilerOptions);
var fromPaths = paths && tryGetModuleNameFromPaths(ts.removeFileExtension(bundledPkgReference), importRelativeToBaseUrl, paths);
var importRelativeToBaseUrl = removeExtensionAndIndexPostFix(relativeToBaseUrl, ending, compilerOptions);
var fromPaths = paths && tryGetModuleNameFromPaths(ts.removeFileExtension(relativeToBaseUrl), importRelativeToBaseUrl, paths);
var nonRelative = fromPaths === undefined && baseUrl !== undefined ? importRelativeToBaseUrl : fromPaths;
if (!nonRelative) {
return relativePath;
@@ -115417,8 +115414,7 @@ var ts;
getSourceFiles: function () { return program.getSourceFiles(); },
redirectTargetsMap: program.redirectTargetsMap,
getProjectReferenceRedirect: function (fileName) { return program.getProjectReferenceRedirect(fileName); },
isSourceOfProjectReferenceRedirect: function (fileName) { return program.isSourceOfProjectReferenceRedirect(fileName); },
getCompilerOptions: function () { return program.getCompilerOptions(); }
isSourceOfProjectReferenceRedirect: function (fileName) { return program.isSourceOfProjectReferenceRedirect(fileName); }
};
}
ts.createModuleSpecifierResolutionHost = createModuleSpecifierResolutionHost;
@@ -147433,7 +147429,7 @@ var ts;
* This is a semantic operation.
*/
function getSignatureHelpItems(fileName, position, _a) {
var triggerReason = (_a === void 0 ? ts.emptyOptions : _a).triggerReason;
var _b = _a === void 0 ? ts.emptyOptions : _a, triggerReason = _b.triggerReason;
synchronizeHostData();
var sourceFile = getValidSourceFile(fileName);
return ts.SignatureHelp.getSignatureHelpItems(program, sourceFile, position, triggerReason, cancellationToken);