Skip to content

Commit

Permalink
Bump version to 4.1.2 and LKG
Browse files Browse the repository at this point in the history
  • Loading branch information
typescript-bot committed Nov 15, 2020
1 parent c12cc53 commit ba1b9d2
Show file tree
Hide file tree
Showing 11 changed files with 176 additions and 202 deletions.
56 changes: 26 additions & 30 deletions lib/tsc.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
var ts;
(function (ts) {
ts.versionMajorMinor = "4.1";
ts.version = "4.1.1-rc";
ts.version = "4.1.2";
var NativeCollections;
(function (NativeCollections) {
function tryGetNativeMap() {
Expand Down Expand Up @@ -5154,8 +5154,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.", undefined, true),
Expand Down Expand Up @@ -10703,6 +10701,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,
Expand Down Expand Up @@ -13195,16 +13205,7 @@ var ts;
var filePath = ts.getNormalizedAbsolutePath(fileName, host.getCurrentDirectory());
var relativePath = ts.getRelativePathToDirectoryOrUrl(dir, filePath, dir, getCanonicalFileName, 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) {
Expand Down Expand Up @@ -29658,13 +29659,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",
Expand Down Expand Up @@ -36021,6 +36015,14 @@ var ts;
}
}
function errorOrSuggestion(isError, location, message, arg0, arg1, arg2, arg3) {
if (location.pos < 0 || location.end < 0) {
if (!isError) {
return;
}
var file = ts.getSourceFileOfNode(location);
addErrorOrSuggestion(isError, "message" in message ? ts.createFileDiagnostic(file, 0, 0, message, arg0, arg1, arg2, arg3) : ts.createDiagnosticForFileFromMessageChain(file, message));
return;
}
addErrorOrSuggestion(isError, "message" in message ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2, arg3) : ts.createDiagnosticForNodeFromMessageChain(location, message));
}
function errorAndMaybeSuggestAwait(location, maybeMissingAwait, message, arg0, arg1, arg2, arg3) {
Expand Down Expand Up @@ -38591,7 +38593,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,
Expand Down Expand Up @@ -39973,8 +39974,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);
Expand Down Expand Up @@ -88061,9 +88061,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"));
}
}
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");
Expand Down Expand Up @@ -90458,7 +90455,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) {
Expand All @@ -90469,9 +90466,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;
Expand Down
Loading

0 comments on commit ba1b9d2

Please sign in to comment.