Skip to content

Commit ba1b9d2

Browse files
Bump version to 4.1.2 and LKG
1 parent c12cc53 commit ba1b9d2

11 files changed

+176
-202
lines changed

lib/tsc.js

+26-30
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
6767
var ts;
6868
(function (ts) {
6969
ts.versionMajorMinor = "4.1";
70-
ts.version = "4.1.1-rc";
70+
ts.version = "4.1.2";
7171
var NativeCollections;
7272
(function (NativeCollections) {
7373
function tryGetNativeMap() {
@@ -5154,8 +5154,6 @@ var ts;
51545154
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."),
51555155
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."),
51565156
_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."),
5157-
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."),
5158-
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."),
51595157
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."),
51605158
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."),
51615159
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),
@@ -10703,6 +10701,18 @@ var ts;
1070310701
};
1070410702
}
1070510703
ts.createDiagnosticForNodeFromMessageChain = createDiagnosticForNodeFromMessageChain;
10704+
function createDiagnosticForFileFromMessageChain(sourceFile, messageChain, relatedInformation) {
10705+
return {
10706+
file: sourceFile,
10707+
start: 0,
10708+
length: 0,
10709+
code: messageChain.code,
10710+
category: messageChain.category,
10711+
messageText: messageChain.next ? messageChain : messageChain.messageText,
10712+
relatedInformation: relatedInformation
10713+
};
10714+
}
10715+
ts.createDiagnosticForFileFromMessageChain = createDiagnosticForFileFromMessageChain;
1070610716
function createDiagnosticForRange(sourceFile, range, message) {
1070710717
return {
1070810718
file: sourceFile,
@@ -13195,16 +13205,7 @@ var ts;
1319513205
var filePath = ts.getNormalizedAbsolutePath(fileName, host.getCurrentDirectory());
1319613206
var relativePath = ts.getRelativePathToDirectoryOrUrl(dir, filePath, dir, getCanonicalFileName, false);
1319713207
var extensionless = removeFileExtension(relativePath);
13198-
if (referencePath) {
13199-
return ts.ensurePathIsNonModuleName(extensionless);
13200-
}
13201-
var options = host.getCompilerOptions();
13202-
var rootPkgName = options.bundledPackageName || "";
13203-
var newPath = ts.combinePaths(rootPkgName, extensionless);
13204-
if (rootPkgName && getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeJs && ts.endsWith(newPath, "/index")) {
13205-
return newPath.slice(0, newPath.length - "/index".length);
13206-
}
13207-
return newPath;
13208+
return referencePath ? ts.ensurePathIsNonModuleName(extensionless) : extensionless;
1320813209
}
1320913210
ts.getExternalModuleNameFromPath = getExternalModuleNameFromPath;
1321013211
function getOwnEmitOutputFilePath(fileName, host, extension) {
@@ -29658,13 +29659,6 @@ var ts;
2965829659
category: ts.Diagnostics.Advanced_Options,
2965929660
description: ts.Diagnostics.Emit_class_fields_with_Define_instead_of_Set,
2966029661
},
29661-
{
29662-
name: "bundledPackageName",
29663-
type: "string",
29664-
affectsEmit: true,
29665-
category: ts.Diagnostics.Advanced_Options,
29666-
description: ts.Diagnostics.Provides_a_root_package_name_when_using_outFile_with_declarations,
29667-
},
2966829662
{
2966929663
name: "keyofStringsOnly",
2967029664
type: "boolean",
@@ -36021,6 +36015,14 @@ var ts;
3602136015
}
3602236016
}
3602336017
function errorOrSuggestion(isError, location, message, arg0, arg1, arg2, arg3) {
36018+
if (location.pos < 0 || location.end < 0) {
36019+
if (!isError) {
36020+
return;
36021+
}
36022+
var file = ts.getSourceFileOfNode(location);
36023+
addErrorOrSuggestion(isError, "message" in message ? ts.createFileDiagnostic(file, 0, 0, message, arg0, arg1, arg2, arg3) : ts.createDiagnosticForFileFromMessageChain(file, message));
36024+
return;
36025+
}
3602436026
addErrorOrSuggestion(isError, "message" in message ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2, arg3) : ts.createDiagnosticForNodeFromMessageChain(location, message));
3602536027
}
3602636028
function errorAndMaybeSuggestAwait(location, maybeMissingAwait, message, arg0, arg1, arg2, arg3) {
@@ -38591,7 +38593,6 @@ var ts;
3859138593
getProjectReferenceRedirect: function (fileName) { return host.getProjectReferenceRedirect(fileName); },
3859238594
isSourceOfProjectReferenceRedirect: function (fileName) { return host.isSourceOfProjectReferenceRedirect(fileName); },
3859338595
fileExists: function (fileName) { return host.fileExists(fileName); },
38594-
getCompilerOptions: function () { return host.getCompilerOptions(); }
3859538596
} : undefined },
3859638597
encounteredError: false,
3859738598
visitedTypes: undefined,
@@ -39973,8 +39974,7 @@ var ts;
3997339974
var resolverHost = {
3997439975
getCanonicalFileName: getCanonicalFileName,
3997539976
getCurrentDirectory: function () { return context.tracker.moduleResolverHost.getCurrentDirectory(); },
39976-
getCommonSourceDirectory: function () { return context.tracker.moduleResolverHost.getCommonSourceDirectory(); },
39977-
getCompilerOptions: function () { return context.tracker.moduleResolverHost.getCompilerOptions(); }
39977+
getCommonSourceDirectory: function () { return context.tracker.moduleResolverHost.getCommonSourceDirectory(); }
3997839978
};
3997939979
var newName = ts.getResolvedExternalModuleName(resolverHost, targetFile);
3998039980
return ts.factory.createStringLiteral(newName);
@@ -88061,9 +88061,6 @@ var ts;
8806188061
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"));
8806288062
}
8806388063
}
88064-
if (outputFile && ts.getEmitDeclarations(options) && ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeJs && !options.bundledPackageName) {
88065-
createDiagnosticForOptionName(ts.Diagnostics.The_bundledPackageName_option_must_be_provided_when_using_outFile_and_node_module_resolution_with_declaration_emit, options.out ? "out" : "outFile");
88066-
}
8806788064
if (options.resolveJsonModule) {
8806888065
if (ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs) {
8806988066
createDiagnosticForOptionName(ts.Diagnostics.Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy, "resolveJsonModule");
@@ -90458,7 +90455,7 @@ var ts;
9045890455
function getLocalModuleSpecifier(moduleFileName, _a, compilerOptions, host, _b) {
9045990456
var getCanonicalFileName = _a.getCanonicalFileName, sourceDirectory = _a.sourceDirectory;
9046090457
var ending = _b.ending, relativePreference = _b.relativePreference;
90461-
var baseUrl = compilerOptions.baseUrl, paths = compilerOptions.paths, rootDirs = compilerOptions.rootDirs, bundledPackageName = compilerOptions.bundledPackageName;
90458+
var baseUrl = compilerOptions.baseUrl, paths = compilerOptions.paths, rootDirs = compilerOptions.rootDirs;
9046290459
var relativePath = rootDirs && tryGetModuleNameFromRootDirs(rootDirs, moduleFileName, sourceDirectory, getCanonicalFileName, ending, compilerOptions) ||
9046390460
removeExtensionAndIndexPostFix(ts.ensurePathIsNonModuleName(ts.getRelativePathFromDirectory(sourceDirectory, moduleFileName, getCanonicalFileName)), ending, compilerOptions);
9046490461
if (!baseUrl && !paths || relativePreference === 0) {
@@ -90469,9 +90466,8 @@ var ts;
9046990466
if (!relativeToBaseUrl) {
9047090467
return relativePath;
9047190468
}
90472-
var bundledPkgReference = bundledPackageName ? ts.combinePaths(bundledPackageName, relativeToBaseUrl) : relativeToBaseUrl;
90473-
var importRelativeToBaseUrl = removeExtensionAndIndexPostFix(bundledPkgReference, ending, compilerOptions);
90474-
var fromPaths = paths && tryGetModuleNameFromPaths(ts.removeFileExtension(bundledPkgReference), importRelativeToBaseUrl, paths);
90469+
var importRelativeToBaseUrl = removeExtensionAndIndexPostFix(relativeToBaseUrl, ending, compilerOptions);
90470+
var fromPaths = paths && tryGetModuleNameFromPaths(ts.removeFileExtension(relativeToBaseUrl), importRelativeToBaseUrl, paths);
9047590471
var nonRelative = fromPaths === undefined && baseUrl !== undefined ? importRelativeToBaseUrl : fromPaths;
9047690472
if (!nonRelative) {
9047790473
return relativePath;

0 commit comments

Comments
 (0)