Skip to content

Commit 0652f34

Browse files
Update LKG.
1 parent dd1f20e commit 0652f34

File tree

6 files changed

+62
-6
lines changed

6 files changed

+62
-6
lines changed

lib/tsc.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68828,6 +68828,11 @@ var ts;
6882868828
declFileName = paths.declarationFilePath || paths.jsFilePath || file.fileName;
6882968829
}
6883068830
if (declFileName) {
68831+
var specifier = ts.moduleSpecifiers.getModuleSpecifier(__assign(__assign({}, options), { baseUrl: options.baseUrl && ts.toPath(options.baseUrl, host.getCurrentDirectory(), host.getCanonicalFileName) }), currentSourceFile, ts.toPath(outputFilePath, host.getCurrentDirectory(), host.getCanonicalFileName), ts.toPath(declFileName, host.getCurrentDirectory(), host.getCanonicalFileName), host, host.getSourceFiles(), undefined, host.redirectTargetsMap);
68832+
if (!ts.pathIsRelative(specifier)) {
68833+
recordTypeReferenceDirectivesIfNecessary([specifier]);
68834+
return;
68835+
}
6883168836
var fileName = ts.getRelativePathToDirectoryOrUrl(outputFilePath, declFileName, host.getCurrentDirectory(), host.getCanonicalFileName, false);
6883268837
if (ts.startsWith(fileName, "./") && ts.hasExtension(fileName)) {
6883368838
fileName = fileName.substring(2);
@@ -70620,6 +70625,7 @@ var ts;
7062070625
useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); },
7062170626
getProgramBuildInfo: ts.returnUndefined,
7062270627
getSourceFileFromReference: ts.returnUndefined,
70628+
redirectTargetsMap: ts.createMultiMap()
7062370629
};
7062470630
emitFiles(ts.notImplementedResolver, emitHost, undefined, ts.getTransformers(config.options, customTransformers));
7062570631
return outputFiles;
@@ -75500,7 +75506,7 @@ var ts;
7550075506
if (ts.contains(missingFilePaths, path))
7550175507
return false;
7550275508
return host.fileExists(f);
75503-
} }, (host.directoryExists ? { directoryExists: function (f) { return host.directoryExists(f); } } : {})), { useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); }, getProgramBuildInfo: function () { return program.getProgramBuildInfo && program.getProgramBuildInfo(); }, getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); } });
75509+
} }, (host.directoryExists ? { directoryExists: function (f) { return host.directoryExists(f); } } : {})), { useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); }, getProgramBuildInfo: function () { return program.getProgramBuildInfo && program.getProgramBuildInfo(); }, getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); }, redirectTargetsMap: redirectTargetsMap });
7550475510
}
7550575511
function emitBuildInfo(writeFileCallback) {
7550675512
ts.Debug.assert(!options.out && !options.outFile);

lib/tsserver.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84562,6 +84562,15 @@ var ts;
8456284562
declFileName = paths.declarationFilePath || paths.jsFilePath || file.fileName;
8456384563
}
8456484564
if (declFileName) {
84565+
var specifier = ts.moduleSpecifiers.getModuleSpecifier(__assign(__assign({}, options), { baseUrl: options.baseUrl && ts.toPath(options.baseUrl, host.getCurrentDirectory(), host.getCanonicalFileName) }), currentSourceFile, ts.toPath(outputFilePath, host.getCurrentDirectory(), host.getCanonicalFileName), ts.toPath(declFileName, host.getCurrentDirectory(), host.getCanonicalFileName), host, host.getSourceFiles(),
84566+
/*preferences*/ undefined, host.redirectTargetsMap);
84567+
if (!ts.pathIsRelative(specifier)) {
84568+
// If some compiler option/symlink/whatever allows access to the file containing the ambient module declaration
84569+
// via a non-relative name, emit a type reference directive to that non-relative name, rather than
84570+
// a relative path to the declaration file
84571+
recordTypeReferenceDirectivesIfNecessary([specifier]);
84572+
return;
84573+
}
8456584574
var fileName = ts.getRelativePathToDirectoryOrUrl(outputFilePath, declFileName, host.getCurrentDirectory(), host.getCanonicalFileName,
8456684575
/*isAbsolutePathAnUrl*/ false);
8456784576
if (ts.startsWith(fileName, "./") && ts.hasExtension(fileName)) {
@@ -86614,6 +86623,7 @@ var ts;
8661486623
useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); },
8661586624
getProgramBuildInfo: ts.returnUndefined,
8661686625
getSourceFileFromReference: ts.returnUndefined,
86626+
redirectTargetsMap: ts.createMultiMap()
8661786627
};
8661886628
emitFiles(ts.notImplementedResolver, emitHost,
8661986629
/*targetSourceFile*/ undefined, ts.getTransformers(config.options, customTransformers));
@@ -92041,7 +92051,7 @@ var ts;
9204192051
return false;
9204292052
// Before falling back to the host
9204392053
return host.fileExists(f);
92044-
} }, (host.directoryExists ? { directoryExists: function (f) { return host.directoryExists(f); } } : {})), { useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); }, getProgramBuildInfo: function () { return program.getProgramBuildInfo && program.getProgramBuildInfo(); }, getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); } });
92054+
} }, (host.directoryExists ? { directoryExists: function (f) { return host.directoryExists(f); } } : {})), { useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); }, getProgramBuildInfo: function () { return program.getProgramBuildInfo && program.getProgramBuildInfo(); }, getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); }, redirectTargetsMap: redirectTargetsMap });
9204592055
}
9204692056
function emitBuildInfo(writeFileCallback) {
9204792057
ts.Debug.assert(!options.out && !options.outFile);

lib/tsserverlibrary.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84561,6 +84561,15 @@ var ts;
8456184561
declFileName = paths.declarationFilePath || paths.jsFilePath || file.fileName;
8456284562
}
8456384563
if (declFileName) {
84564+
var specifier = ts.moduleSpecifiers.getModuleSpecifier(__assign(__assign({}, options), { baseUrl: options.baseUrl && ts.toPath(options.baseUrl, host.getCurrentDirectory(), host.getCanonicalFileName) }), currentSourceFile, ts.toPath(outputFilePath, host.getCurrentDirectory(), host.getCanonicalFileName), ts.toPath(declFileName, host.getCurrentDirectory(), host.getCanonicalFileName), host, host.getSourceFiles(),
84565+
/*preferences*/ undefined, host.redirectTargetsMap);
84566+
if (!ts.pathIsRelative(specifier)) {
84567+
// If some compiler option/symlink/whatever allows access to the file containing the ambient module declaration
84568+
// via a non-relative name, emit a type reference directive to that non-relative name, rather than
84569+
// a relative path to the declaration file
84570+
recordTypeReferenceDirectivesIfNecessary([specifier]);
84571+
return;
84572+
}
8456484573
var fileName = ts.getRelativePathToDirectoryOrUrl(outputFilePath, declFileName, host.getCurrentDirectory(), host.getCanonicalFileName,
8456584574
/*isAbsolutePathAnUrl*/ false);
8456684575
if (ts.startsWith(fileName, "./") && ts.hasExtension(fileName)) {
@@ -86613,6 +86622,7 @@ var ts;
8661386622
useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); },
8661486623
getProgramBuildInfo: ts.returnUndefined,
8661586624
getSourceFileFromReference: ts.returnUndefined,
86625+
redirectTargetsMap: ts.createMultiMap()
8661686626
};
8661786627
emitFiles(ts.notImplementedResolver, emitHost,
8661886628
/*targetSourceFile*/ undefined, ts.getTransformers(config.options, customTransformers));
@@ -92040,7 +92050,7 @@ var ts;
9204092050
return false;
9204192051
// Before falling back to the host
9204292052
return host.fileExists(f);
92043-
} }, (host.directoryExists ? { directoryExists: function (f) { return host.directoryExists(f); } } : {})), { useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); }, getProgramBuildInfo: function () { return program.getProgramBuildInfo && program.getProgramBuildInfo(); }, getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); } });
92053+
} }, (host.directoryExists ? { directoryExists: function (f) { return host.directoryExists(f); } } : {})), { useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); }, getProgramBuildInfo: function () { return program.getProgramBuildInfo && program.getProgramBuildInfo(); }, getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); }, redirectTargetsMap: redirectTargetsMap });
9204492054
}
9204592055
function emitBuildInfo(writeFileCallback) {
9204692056
ts.Debug.assert(!options.out && !options.outFile);

lib/typescript.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84550,6 +84550,15 @@ var ts;
8455084550
declFileName = paths.declarationFilePath || paths.jsFilePath || file.fileName;
8455184551
}
8455284552
if (declFileName) {
84553+
var specifier = ts.moduleSpecifiers.getModuleSpecifier(__assign(__assign({}, options), { baseUrl: options.baseUrl && ts.toPath(options.baseUrl, host.getCurrentDirectory(), host.getCanonicalFileName) }), currentSourceFile, ts.toPath(outputFilePath, host.getCurrentDirectory(), host.getCanonicalFileName), ts.toPath(declFileName, host.getCurrentDirectory(), host.getCanonicalFileName), host, host.getSourceFiles(),
84554+
/*preferences*/ undefined, host.redirectTargetsMap);
84555+
if (!ts.pathIsRelative(specifier)) {
84556+
// If some compiler option/symlink/whatever allows access to the file containing the ambient module declaration
84557+
// via a non-relative name, emit a type reference directive to that non-relative name, rather than
84558+
// a relative path to the declaration file
84559+
recordTypeReferenceDirectivesIfNecessary([specifier]);
84560+
return;
84561+
}
8455384562
var fileName = ts.getRelativePathToDirectoryOrUrl(outputFilePath, declFileName, host.getCurrentDirectory(), host.getCanonicalFileName,
8455484563
/*isAbsolutePathAnUrl*/ false);
8455584564
if (ts.startsWith(fileName, "./") && ts.hasExtension(fileName)) {
@@ -86602,6 +86611,7 @@ var ts;
8660286611
useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); },
8660386612
getProgramBuildInfo: ts.returnUndefined,
8660486613
getSourceFileFromReference: ts.returnUndefined,
86614+
redirectTargetsMap: ts.createMultiMap()
8660586615
};
8660686616
emitFiles(ts.notImplementedResolver, emitHost,
8660786617
/*targetSourceFile*/ undefined, ts.getTransformers(config.options, customTransformers));
@@ -92029,7 +92039,7 @@ var ts;
9202992039
return false;
9203092040
// Before falling back to the host
9203192041
return host.fileExists(f);
92032-
} }, (host.directoryExists ? { directoryExists: function (f) { return host.directoryExists(f); } } : {})), { useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); }, getProgramBuildInfo: function () { return program.getProgramBuildInfo && program.getProgramBuildInfo(); }, getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); } });
92042+
} }, (host.directoryExists ? { directoryExists: function (f) { return host.directoryExists(f); } } : {})), { useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); }, getProgramBuildInfo: function () { return program.getProgramBuildInfo && program.getProgramBuildInfo(); }, getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); }, redirectTargetsMap: redirectTargetsMap });
9203392043
}
9203492044
function emitBuildInfo(writeFileCallback) {
9203592045
ts.Debug.assert(!options.out && !options.outFile);

lib/typescriptServices.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84550,6 +84550,15 @@ var ts;
8455084550
declFileName = paths.declarationFilePath || paths.jsFilePath || file.fileName;
8455184551
}
8455284552
if (declFileName) {
84553+
var specifier = ts.moduleSpecifiers.getModuleSpecifier(__assign(__assign({}, options), { baseUrl: options.baseUrl && ts.toPath(options.baseUrl, host.getCurrentDirectory(), host.getCanonicalFileName) }), currentSourceFile, ts.toPath(outputFilePath, host.getCurrentDirectory(), host.getCanonicalFileName), ts.toPath(declFileName, host.getCurrentDirectory(), host.getCanonicalFileName), host, host.getSourceFiles(),
84554+
/*preferences*/ undefined, host.redirectTargetsMap);
84555+
if (!ts.pathIsRelative(specifier)) {
84556+
// If some compiler option/symlink/whatever allows access to the file containing the ambient module declaration
84557+
// via a non-relative name, emit a type reference directive to that non-relative name, rather than
84558+
// a relative path to the declaration file
84559+
recordTypeReferenceDirectivesIfNecessary([specifier]);
84560+
return;
84561+
}
8455384562
var fileName = ts.getRelativePathToDirectoryOrUrl(outputFilePath, declFileName, host.getCurrentDirectory(), host.getCanonicalFileName,
8455484563
/*isAbsolutePathAnUrl*/ false);
8455584564
if (ts.startsWith(fileName, "./") && ts.hasExtension(fileName)) {
@@ -86602,6 +86611,7 @@ var ts;
8660286611
useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); },
8660386612
getProgramBuildInfo: ts.returnUndefined,
8660486613
getSourceFileFromReference: ts.returnUndefined,
86614+
redirectTargetsMap: ts.createMultiMap()
8660586615
};
8660686616
emitFiles(ts.notImplementedResolver, emitHost,
8660786617
/*targetSourceFile*/ undefined, ts.getTransformers(config.options, customTransformers));
@@ -92029,7 +92039,7 @@ var ts;
9202992039
return false;
9203092040
// Before falling back to the host
9203192041
return host.fileExists(f);
92032-
} }, (host.directoryExists ? { directoryExists: function (f) { return host.directoryExists(f); } } : {})), { useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); }, getProgramBuildInfo: function () { return program.getProgramBuildInfo && program.getProgramBuildInfo(); }, getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); } });
92042+
} }, (host.directoryExists ? { directoryExists: function (f) { return host.directoryExists(f); } } : {})), { useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); }, getProgramBuildInfo: function () { return program.getProgramBuildInfo && program.getProgramBuildInfo(); }, getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); }, redirectTargetsMap: redirectTargetsMap });
9203392043
}
9203492044
function emitBuildInfo(writeFileCallback) {
9203592045
ts.Debug.assert(!options.out && !options.outFile);

lib/typingsInstaller.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84551,6 +84551,15 @@ var ts;
8455184551
declFileName = paths.declarationFilePath || paths.jsFilePath || file.fileName;
8455284552
}
8455384553
if (declFileName) {
84554+
var specifier = ts.moduleSpecifiers.getModuleSpecifier(__assign(__assign({}, options), { baseUrl: options.baseUrl && ts.toPath(options.baseUrl, host.getCurrentDirectory(), host.getCanonicalFileName) }), currentSourceFile, ts.toPath(outputFilePath, host.getCurrentDirectory(), host.getCanonicalFileName), ts.toPath(declFileName, host.getCurrentDirectory(), host.getCanonicalFileName), host, host.getSourceFiles(),
84555+
/*preferences*/ undefined, host.redirectTargetsMap);
84556+
if (!ts.pathIsRelative(specifier)) {
84557+
// If some compiler option/symlink/whatever allows access to the file containing the ambient module declaration
84558+
// via a non-relative name, emit a type reference directive to that non-relative name, rather than
84559+
// a relative path to the declaration file
84560+
recordTypeReferenceDirectivesIfNecessary([specifier]);
84561+
return;
84562+
}
8455484563
var fileName = ts.getRelativePathToDirectoryOrUrl(outputFilePath, declFileName, host.getCurrentDirectory(), host.getCanonicalFileName,
8455584564
/*isAbsolutePathAnUrl*/ false);
8455684565
if (ts.startsWith(fileName, "./") && ts.hasExtension(fileName)) {
@@ -86603,6 +86612,7 @@ var ts;
8660386612
useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); },
8660486613
getProgramBuildInfo: ts.returnUndefined,
8660586614
getSourceFileFromReference: ts.returnUndefined,
86615+
redirectTargetsMap: ts.createMultiMap()
8660686616
};
8660786617
emitFiles(ts.notImplementedResolver, emitHost,
8660886618
/*targetSourceFile*/ undefined, ts.getTransformers(config.options, customTransformers));
@@ -92030,7 +92040,7 @@ var ts;
9203092040
return false;
9203192041
// Before falling back to the host
9203292042
return host.fileExists(f);
92033-
} }, (host.directoryExists ? { directoryExists: function (f) { return host.directoryExists(f); } } : {})), { useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); }, getProgramBuildInfo: function () { return program.getProgramBuildInfo && program.getProgramBuildInfo(); }, getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); } });
92043+
} }, (host.directoryExists ? { directoryExists: function (f) { return host.directoryExists(f); } } : {})), { useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); }, getProgramBuildInfo: function () { return program.getProgramBuildInfo && program.getProgramBuildInfo(); }, getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); }, redirectTargetsMap: redirectTargetsMap });
9203492044
}
9203592045
function emitBuildInfo(writeFileCallback) {
9203692046
ts.Debug.assert(!options.out && !options.outFile);

0 commit comments

Comments
 (0)