Merge pull request #20180 from amcasey/CaseSensitiveSafeList
Convert legacy safe list keys to lowercase on construction
This commit is contained in:
commit
b6799d7c3d
2 changed files with 10 additions and 2 deletions
|
@ -1561,7 +1561,11 @@ namespace ts.projectSystem {
|
|||
path: "/a/b/foo.js",
|
||||
content: ""
|
||||
};
|
||||
const host = createServerHost([file1, file2, customTypesMap]);
|
||||
const file3 = {
|
||||
path: "/a/b/Bacon.js",
|
||||
content: "let y = 5"
|
||||
};
|
||||
const host = createServerHost([file1, file2, file3, customTypesMap]);
|
||||
const projectService = createProjectService(host);
|
||||
try {
|
||||
projectService.openExternalProject({ projectFileName: "project", options: {}, rootFiles: toExternalFiles([file1.path, file2.path]), typeAcquisition: { enable: true } });
|
||||
|
|
|
@ -527,7 +527,11 @@ namespace ts.server {
|
|||
}
|
||||
// raw is now fixed and ready
|
||||
this.safelist = raw.typesMap;
|
||||
this.legacySafelist = raw.simpleMap;
|
||||
for (const key in raw.simpleMap) {
|
||||
if (raw.simpleMap.hasOwnProperty(key)) {
|
||||
this.legacySafelist[key] = raw.simpleMap[key].toLowerCase();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
this.logger.info(`Error loading types map: ${e}`);
|
||||
|
|
Loading…
Reference in a new issue