Skip to content

Commit 107f832

Browse files
authoredNov 1, 2022
Update LKG.
1 parent 31bee56 commit 107f832

7 files changed

+85
-61
lines changed
 

‎lib/cancellationToken.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/tsc.js

+14-10
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
4545
function verb(n) { return function (v) { return step([n, v]); }; }
4646
function step(op) {
4747
if (f) throw new TypeError("Generator is already executing.");
48-
while (_) try {
48+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
4949
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
5050
if (y = 0, t) op = [op[0] & 2, t.value];
5151
switch (op[0]) {
@@ -98124,14 +98124,16 @@ var ts;
9812498124
}
9812598125
return setReadFileCache(key, fileName);
9812698126
};
98127-
var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersion, onError, shouldCreateNewSourceFile) {
98127+
var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
9812898128
var key = toPath(fileName);
98129-
var value = sourceFileCache.get(key);
98129+
var impliedNodeFormat = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : undefined;
98130+
var forImpliedNodeFormat = sourceFileCache.get(impliedNodeFormat);
98131+
var value = forImpliedNodeFormat === null || forImpliedNodeFormat === void 0 ? void 0 : forImpliedNodeFormat.get(key);
9813098132
if (value)
9813198133
return value;
98132-
var sourceFile = getSourceFile(fileName, languageVersion, onError, shouldCreateNewSourceFile);
98134+
var sourceFile = getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile);
9813398135
if (sourceFile && (ts.isDeclarationFileName(fileName) || ts.fileExtensionIs(fileName, ".json"))) {
98134-
sourceFileCache.set(key, sourceFile);
98136+
sourceFileCache.set(impliedNodeFormat, (forImpliedNodeFormat || new ts.Map()).set(key, sourceFile));
9813598137
}
9813698138
return sourceFile;
9813798139
} : undefined;
@@ -98155,13 +98157,15 @@ var ts;
9815598157
var value = readFileCache.get(key);
9815698158
if (value !== undefined && value !== data) {
9815798159
readFileCache.delete(key);
98158-
sourceFileCache.delete(key);
98160+
sourceFileCache.forEach(function (map) { return map.delete(key); });
9815998161
}
9816098162
else if (getSourceFileWithCache) {
98161-
var sourceFile = sourceFileCache.get(key);
98162-
if (sourceFile && sourceFile.text !== data) {
98163-
sourceFileCache.delete(key);
98164-
}
98163+
sourceFileCache.forEach(function (map) {
98164+
var sourceFile = map.get(key);
98165+
if (sourceFile && sourceFile.text !== data) {
98166+
map.delete(key);
98167+
}
98168+
});
9816598169
}
9816698170
originalWriteFile.call.apply(originalWriteFile, __spreadArray([host, fileName, data], rest, false));
9816798171
};

‎lib/tsserver.js

+14-10
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
4545
function verb(n) { return function (v) { return step([n, v]); }; }
4646
function step(op) {
4747
if (f) throw new TypeError("Generator is already executing.");
48-
while (_) try {
48+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
4949
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
5050
if (y = 0, t) op = [op[0] & 2, t.value];
5151
switch (op[0]) {
@@ -118604,14 +118604,16 @@ var ts;
118604118604
}
118605118605
return setReadFileCache(key, fileName);
118606118606
};
118607-
var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersion, onError, shouldCreateNewSourceFile) {
118607+
var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
118608118608
var key = toPath(fileName);
118609-
var value = sourceFileCache.get(key);
118609+
var impliedNodeFormat = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : undefined;
118610+
var forImpliedNodeFormat = sourceFileCache.get(impliedNodeFormat);
118611+
var value = forImpliedNodeFormat === null || forImpliedNodeFormat === void 0 ? void 0 : forImpliedNodeFormat.get(key);
118610118612
if (value)
118611118613
return value;
118612-
var sourceFile = getSourceFile(fileName, languageVersion, onError, shouldCreateNewSourceFile);
118614+
var sourceFile = getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile);
118613118615
if (sourceFile && (ts.isDeclarationFileName(fileName) || ts.fileExtensionIs(fileName, ".json" /* Extension.Json */))) {
118614-
sourceFileCache.set(key, sourceFile);
118616+
sourceFileCache.set(impliedNodeFormat, (forImpliedNodeFormat || new ts.Map()).set(key, sourceFile));
118615118617
}
118616118618
return sourceFile;
118617118619
} : undefined;
@@ -118636,13 +118638,15 @@ var ts;
118636118638
var value = readFileCache.get(key);
118637118639
if (value !== undefined && value !== data) {
118638118640
readFileCache.delete(key);
118639-
sourceFileCache.delete(key);
118641+
sourceFileCache.forEach(function (map) { return map.delete(key); });
118640118642
}
118641118643
else if (getSourceFileWithCache) {
118642-
var sourceFile = sourceFileCache.get(key);
118643-
if (sourceFile && sourceFile.text !== data) {
118644-
sourceFileCache.delete(key);
118645-
}
118644+
sourceFileCache.forEach(function (map) {
118645+
var sourceFile = map.get(key);
118646+
if (sourceFile && sourceFile.text !== data) {
118647+
map.delete(key);
118648+
}
118649+
});
118646118650
}
118647118651
originalWriteFile.call.apply(originalWriteFile, __spreadArray([host, fileName, data], rest, false));
118648118652
};

‎lib/tsserverlibrary.js

+14-10
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
4444
function verb(n) { return function (v) { return step([n, v]); }; }
4545
function step(op) {
4646
if (f) throw new TypeError("Generator is already executing.");
47-
while (_) try {
47+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
4848
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
4949
if (y = 0, t) op = [op[0] & 2, t.value];
5050
switch (op[0]) {
@@ -118603,14 +118603,16 @@ var ts;
118603118603
}
118604118604
return setReadFileCache(key, fileName);
118605118605
};
118606-
var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersion, onError, shouldCreateNewSourceFile) {
118606+
var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
118607118607
var key = toPath(fileName);
118608-
var value = sourceFileCache.get(key);
118608+
var impliedNodeFormat = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : undefined;
118609+
var forImpliedNodeFormat = sourceFileCache.get(impliedNodeFormat);
118610+
var value = forImpliedNodeFormat === null || forImpliedNodeFormat === void 0 ? void 0 : forImpliedNodeFormat.get(key);
118609118611
if (value)
118610118612
return value;
118611-
var sourceFile = getSourceFile(fileName, languageVersion, onError, shouldCreateNewSourceFile);
118613+
var sourceFile = getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile);
118612118614
if (sourceFile && (ts.isDeclarationFileName(fileName) || ts.fileExtensionIs(fileName, ".json" /* Extension.Json */))) {
118613-
sourceFileCache.set(key, sourceFile);
118615+
sourceFileCache.set(impliedNodeFormat, (forImpliedNodeFormat || new ts.Map()).set(key, sourceFile));
118614118616
}
118615118617
return sourceFile;
118616118618
} : undefined;
@@ -118635,13 +118637,15 @@ var ts;
118635118637
var value = readFileCache.get(key);
118636118638
if (value !== undefined && value !== data) {
118637118639
readFileCache.delete(key);
118638-
sourceFileCache.delete(key);
118640+
sourceFileCache.forEach(function (map) { return map.delete(key); });
118639118641
}
118640118642
else if (getSourceFileWithCache) {
118641-
var sourceFile = sourceFileCache.get(key);
118642-
if (sourceFile && sourceFile.text !== data) {
118643-
sourceFileCache.delete(key);
118644-
}
118643+
sourceFileCache.forEach(function (map) {
118644+
var sourceFile = map.get(key);
118645+
if (sourceFile && sourceFile.text !== data) {
118646+
map.delete(key);
118647+
}
118648+
});
118645118649
}
118646118650
originalWriteFile.call.apply(originalWriteFile, __spreadArray([host, fileName, data], rest, false));
118647118651
};

‎lib/typescript.js

+14-10
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
4444
function verb(n) { return function (v) { return step([n, v]); }; }
4545
function step(op) {
4646
if (f) throw new TypeError("Generator is already executing.");
47-
while (_) try {
47+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
4848
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
4949
if (y = 0, t) op = [op[0] & 2, t.value];
5050
switch (op[0]) {
@@ -118594,14 +118594,16 @@ var ts;
118594118594
}
118595118595
return setReadFileCache(key, fileName);
118596118596
};
118597-
var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersion, onError, shouldCreateNewSourceFile) {
118597+
var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
118598118598
var key = toPath(fileName);
118599-
var value = sourceFileCache.get(key);
118599+
var impliedNodeFormat = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : undefined;
118600+
var forImpliedNodeFormat = sourceFileCache.get(impliedNodeFormat);
118601+
var value = forImpliedNodeFormat === null || forImpliedNodeFormat === void 0 ? void 0 : forImpliedNodeFormat.get(key);
118600118602
if (value)
118601118603
return value;
118602-
var sourceFile = getSourceFile(fileName, languageVersion, onError, shouldCreateNewSourceFile);
118604+
var sourceFile = getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile);
118603118605
if (sourceFile && (ts.isDeclarationFileName(fileName) || ts.fileExtensionIs(fileName, ".json" /* Extension.Json */))) {
118604-
sourceFileCache.set(key, sourceFile);
118606+
sourceFileCache.set(impliedNodeFormat, (forImpliedNodeFormat || new ts.Map()).set(key, sourceFile));
118605118607
}
118606118608
return sourceFile;
118607118609
} : undefined;
@@ -118626,13 +118628,15 @@ var ts;
118626118628
var value = readFileCache.get(key);
118627118629
if (value !== undefined && value !== data) {
118628118630
readFileCache.delete(key);
118629-
sourceFileCache.delete(key);
118631+
sourceFileCache.forEach(function (map) { return map.delete(key); });
118630118632
}
118631118633
else if (getSourceFileWithCache) {
118632-
var sourceFile = sourceFileCache.get(key);
118633-
if (sourceFile && sourceFile.text !== data) {
118634-
sourceFileCache.delete(key);
118635-
}
118634+
sourceFileCache.forEach(function (map) {
118635+
var sourceFile = map.get(key);
118636+
if (sourceFile && sourceFile.text !== data) {
118637+
map.delete(key);
118638+
}
118639+
});
118636118640
}
118637118641
originalWriteFile.call.apply(originalWriteFile, __spreadArray([host, fileName, data], rest, false));
118638118642
};

‎lib/typescriptServices.js

+14-10
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
4444
function verb(n) { return function (v) { return step([n, v]); }; }
4545
function step(op) {
4646
if (f) throw new TypeError("Generator is already executing.");
47-
while (_) try {
47+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
4848
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
4949
if (y = 0, t) op = [op[0] & 2, t.value];
5050
switch (op[0]) {
@@ -118594,14 +118594,16 @@ var ts;
118594118594
}
118595118595
return setReadFileCache(key, fileName);
118596118596
};
118597-
var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersion, onError, shouldCreateNewSourceFile) {
118597+
var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
118598118598
var key = toPath(fileName);
118599-
var value = sourceFileCache.get(key);
118599+
var impliedNodeFormat = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : undefined;
118600+
var forImpliedNodeFormat = sourceFileCache.get(impliedNodeFormat);
118601+
var value = forImpliedNodeFormat === null || forImpliedNodeFormat === void 0 ? void 0 : forImpliedNodeFormat.get(key);
118600118602
if (value)
118601118603
return value;
118602-
var sourceFile = getSourceFile(fileName, languageVersion, onError, shouldCreateNewSourceFile);
118604+
var sourceFile = getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile);
118603118605
if (sourceFile && (ts.isDeclarationFileName(fileName) || ts.fileExtensionIs(fileName, ".json" /* Extension.Json */))) {
118604-
sourceFileCache.set(key, sourceFile);
118606+
sourceFileCache.set(impliedNodeFormat, (forImpliedNodeFormat || new ts.Map()).set(key, sourceFile));
118605118607
}
118606118608
return sourceFile;
118607118609
} : undefined;
@@ -118626,13 +118628,15 @@ var ts;
118626118628
var value = readFileCache.get(key);
118627118629
if (value !== undefined && value !== data) {
118628118630
readFileCache.delete(key);
118629-
sourceFileCache.delete(key);
118631+
sourceFileCache.forEach(function (map) { return map.delete(key); });
118630118632
}
118631118633
else if (getSourceFileWithCache) {
118632-
var sourceFile = sourceFileCache.get(key);
118633-
if (sourceFile && sourceFile.text !== data) {
118634-
sourceFileCache.delete(key);
118635-
}
118634+
sourceFileCache.forEach(function (map) {
118635+
var sourceFile = map.get(key);
118636+
if (sourceFile && sourceFile.text !== data) {
118637+
map.delete(key);
118638+
}
118639+
});
118636118640
}
118637118641
originalWriteFile.call.apply(originalWriteFile, __spreadArray([host, fileName, data], rest, false));
118638118642
};

‎lib/typingsInstaller.js

+14-10
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
4545
function verb(n) { return function (v) { return step([n, v]); }; }
4646
function step(op) {
4747
if (f) throw new TypeError("Generator is already executing.");
48-
while (_) try {
48+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
4949
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
5050
if (y = 0, t) op = [op[0] & 2, t.value];
5151
switch (op[0]) {
@@ -118584,14 +118584,16 @@ var ts;
118584118584
}
118585118585
return setReadFileCache(key, fileName);
118586118586
};
118587-
var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersion, onError, shouldCreateNewSourceFile) {
118587+
var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
118588118588
var key = toPath(fileName);
118589-
var value = sourceFileCache.get(key);
118589+
var impliedNodeFormat = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : undefined;
118590+
var forImpliedNodeFormat = sourceFileCache.get(impliedNodeFormat);
118591+
var value = forImpliedNodeFormat === null || forImpliedNodeFormat === void 0 ? void 0 : forImpliedNodeFormat.get(key);
118590118592
if (value)
118591118593
return value;
118592-
var sourceFile = getSourceFile(fileName, languageVersion, onError, shouldCreateNewSourceFile);
118594+
var sourceFile = getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile);
118593118595
if (sourceFile && (ts.isDeclarationFileName(fileName) || ts.fileExtensionIs(fileName, ".json" /* Extension.Json */))) {
118594-
sourceFileCache.set(key, sourceFile);
118596+
sourceFileCache.set(impliedNodeFormat, (forImpliedNodeFormat || new ts.Map()).set(key, sourceFile));
118595118597
}
118596118598
return sourceFile;
118597118599
} : undefined;
@@ -118616,13 +118618,15 @@ var ts;
118616118618
var value = readFileCache.get(key);
118617118619
if (value !== undefined && value !== data) {
118618118620
readFileCache.delete(key);
118619-
sourceFileCache.delete(key);
118621+
sourceFileCache.forEach(function (map) { return map.delete(key); });
118620118622
}
118621118623
else if (getSourceFileWithCache) {
118622-
var sourceFile = sourceFileCache.get(key);
118623-
if (sourceFile && sourceFile.text !== data) {
118624-
sourceFileCache.delete(key);
118625-
}
118624+
sourceFileCache.forEach(function (map) {
118625+
var sourceFile = map.get(key);
118626+
if (sourceFile && sourceFile.text !== data) {
118627+
map.delete(key);
118628+
}
118629+
});
118626118630
}
118627118631
originalWriteFile.call.apply(originalWriteFile, __spreadArray([host, fileName, data], rest, false));
118628118632
};

0 commit comments

Comments
 (0)