Skip to content

Commit b7de5e3

Browse files
Bump version to 3.9.10 and LKG
1 parent 022bdea commit b7de5e3

File tree

8 files changed

+153
-56
lines changed

8 files changed

+153
-56
lines changed

lib/tsc.js

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
6767
var ts;
6868
(function (ts) {
6969
ts.versionMajorMinor = "3.9";
70-
ts.version = "3.9.9";
70+
ts.version = "3.9.10";
7171
function tryGetNativeMap() {
7272
return typeof Map !== "undefined" && "entries" in Map.prototype ? Map : undefined;
7373
}
@@ -3279,8 +3279,8 @@ var ts;
32793279
},
32803280
getFileSize: function (path) {
32813281
try {
3282-
var stat = _fs.statSync(path);
3283-
if (stat.isFile()) {
3282+
var stat = statSync(path);
3283+
if (stat === null || stat === void 0 ? void 0 : stat.isFile()) {
32843284
return stat.size;
32853285
}
32863286
}
@@ -3325,6 +3325,9 @@ var ts;
33253325
}
33263326
};
33273327
return nodeSystem;
3328+
function statSync(path) {
3329+
return _fs.statSync(path, { throwIfNoEntry: false });
3330+
}
33283331
function enableCPUProfiler(path, cb) {
33293332
if (activeSession) {
33303333
cb();
@@ -3370,19 +3373,20 @@ var ts;
33703373
if (activeSession && activeSession !== "stopping") {
33713374
var s_1 = activeSession;
33723375
activeSession.post("Profiler.stop", function (err, _a) {
3376+
var _b;
33733377
var profile = _a.profile;
33743378
if (!err) {
33753379
try {
3376-
if (_fs.statSync(profilePath).isDirectory()) {
3380+
if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
33773381
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-") + "+P" + process.pid + ".cpuprofile");
33783382
}
33793383
}
3380-
catch (_b) {
3384+
catch (_c) {
33813385
}
33823386
try {
33833387
_fs.mkdirSync(_path.dirname(profilePath), { recursive: true });
33843388
}
3385-
catch (_c) {
3389+
catch (_d) {
33863390
}
33873391
_fs.writeFileSync(profilePath, JSON.stringify(cleanupPaths(profile)));
33883392
}
@@ -3571,7 +3575,10 @@ var ts;
35713575
if (typeof dirent === "string" || dirent.isSymbolicLink()) {
35723576
var name = ts.combinePaths(path, entry);
35733577
try {
3574-
stat = _fs.statSync(name);
3578+
stat = statSync(name);
3579+
if (!stat) {
3580+
continue;
3581+
}
35753582
}
35763583
catch (e) {
35773584
continue;
@@ -3600,7 +3607,10 @@ var ts;
36003607
}
36013608
function fileSystemEntryExists(path, entryKind) {
36023609
try {
3603-
var stat = _fs.statSync(path);
3610+
var stat = statSync(path);
3611+
if (!stat) {
3612+
return false;
3613+
}
36043614
switch (entryKind) {
36053615
case 0: return stat.isFile();
36063616
case 1: return stat.isDirectory();
@@ -3629,8 +3639,9 @@ var ts;
36293639
}
36303640
}
36313641
function getModifiedTime(path) {
3642+
var _a;
36323643
try {
3633-
return _fs.statSync(path).mtime;
3644+
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
36343645
}
36353646
catch (e) {
36363647
return undefined;

lib/tsserver.js

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ var ts;
9494
// If changing the text in this section, be sure to test `configurePrerelease` too.
9595
ts.versionMajorMinor = "3.9";
9696
/** The version of the TypeScript compiler release */
97-
ts.version = "3.9.9";
97+
ts.version = "3.9.10";
9898
/**
9999
* Returns the native Map implementation if it is available and compatible (i.e. supports iteration).
100100
*/
@@ -5516,8 +5516,8 @@ var ts;
55165516
},
55175517
getFileSize: function (path) {
55185518
try {
5519-
var stat = _fs.statSync(path);
5520-
if (stat.isFile()) {
5519+
var stat = statSync(path);
5520+
if (stat === null || stat === void 0 ? void 0 : stat.isFile()) {
55215521
return stat.size;
55225522
}
55235523
}
@@ -5563,6 +5563,15 @@ var ts;
55635563
}
55645564
};
55655565
return nodeSystem;
5566+
/**
5567+
* `throwIfNoEntry` was added so recently that it's not in the node types.
5568+
* This helper encapsulates the mitigating usage of `any`.
5569+
* See https://github.com/nodejs/node/pull/33716
5570+
*/
5571+
function statSync(path) {
5572+
// throwIfNoEntry will be ignored by older versions of node
5573+
return _fs.statSync(path, { throwIfNoEntry: false });
5574+
}
55665575
/**
55675576
* Uses the builtin inspector APIs to capture a CPU profile
55685577
* See https://nodejs.org/api/inspector.html#inspector_example_usage for details
@@ -5617,20 +5626,21 @@ var ts;
56175626
if (activeSession && activeSession !== "stopping") {
56185627
var s_1 = activeSession;
56195628
activeSession.post("Profiler.stop", function (err, _a) {
5629+
var _b;
56205630
var profile = _a.profile;
56215631
if (!err) {
56225632
try {
5623-
if (_fs.statSync(profilePath).isDirectory()) {
5633+
if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
56245634
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-") + "+P" + process.pid + ".cpuprofile");
56255635
}
56265636
}
5627-
catch (_b) {
5637+
catch (_c) {
56285638
// do nothing and ignore fallible fs operation
56295639
}
56305640
try {
56315641
_fs.mkdirSync(_path.dirname(profilePath), { recursive: true });
56325642
}
5633-
catch (_c) {
5643+
catch (_d) {
56345644
// do nothing and ignore fallible fs operation
56355645
}
56365646
_fs.writeFileSync(profilePath, JSON.stringify(cleanupPaths(profile)));
@@ -5869,7 +5879,10 @@ var ts;
58695879
if (typeof dirent === "string" || dirent.isSymbolicLink()) {
58705880
var name = ts.combinePaths(path, entry);
58715881
try {
5872-
stat = _fs.statSync(name);
5882+
stat = statSync(name);
5883+
if (!stat) {
5884+
continue;
5885+
}
58735886
}
58745887
catch (e) {
58755888
continue;
@@ -5898,7 +5911,10 @@ var ts;
58985911
}
58995912
function fileSystemEntryExists(path, entryKind) {
59005913
try {
5901-
var stat = _fs.statSync(path);
5914+
var stat = statSync(path);
5915+
if (!stat) {
5916+
return false;
5917+
}
59025918
switch (entryKind) {
59035919
case 0 /* File */: return stat.isFile();
59045920
case 1 /* Directory */: return stat.isDirectory();
@@ -5927,8 +5943,9 @@ var ts;
59275943
}
59285944
}
59295945
function getModifiedTime(path) {
5946+
var _a;
59305947
try {
5931-
return _fs.statSync(path).mtime;
5948+
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
59325949
}
59335950
catch (e) {
59345951
return undefined;
@@ -150988,6 +151005,7 @@ var ts;
150988151005
var nextFileToCheck = 0;
150989151006
return { getModifiedTime: getModifiedTime, poll: poll, startWatchTimer: startWatchTimer, addFile: addFile, removeFile: removeFile };
150990151007
function getModifiedTime(fileName) {
151008+
// Caller guarantees that `fileName` exists, so there'd be no benefit from throwIfNoEntry
150991151009
return fs.statSync(fileName).mtime;
150992151010
}
150993151011
function poll(checkedIndex) {

lib/tsserverlibrary.js

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ var ts;
244244
// If changing the text in this section, be sure to test `configurePrerelease` too.
245245
ts.versionMajorMinor = "3.9";
246246
/** The version of the TypeScript compiler release */
247-
ts.version = "3.9.9";
247+
ts.version = "3.9.10";
248248
/**
249249
* Returns the native Map implementation if it is available and compatible (i.e. supports iteration).
250250
*/
@@ -5666,8 +5666,8 @@ var ts;
56665666
},
56675667
getFileSize: function (path) {
56685668
try {
5669-
var stat = _fs.statSync(path);
5670-
if (stat.isFile()) {
5669+
var stat = statSync(path);
5670+
if (stat === null || stat === void 0 ? void 0 : stat.isFile()) {
56715671
return stat.size;
56725672
}
56735673
}
@@ -5713,6 +5713,15 @@ var ts;
57135713
}
57145714
};
57155715
return nodeSystem;
5716+
/**
5717+
* `throwIfNoEntry` was added so recently that it's not in the node types.
5718+
* This helper encapsulates the mitigating usage of `any`.
5719+
* See https://github.com/nodejs/node/pull/33716
5720+
*/
5721+
function statSync(path) {
5722+
// throwIfNoEntry will be ignored by older versions of node
5723+
return _fs.statSync(path, { throwIfNoEntry: false });
5724+
}
57165725
/**
57175726
* Uses the builtin inspector APIs to capture a CPU profile
57185727
* See https://nodejs.org/api/inspector.html#inspector_example_usage for details
@@ -5767,20 +5776,21 @@ var ts;
57675776
if (activeSession && activeSession !== "stopping") {
57685777
var s_1 = activeSession;
57695778
activeSession.post("Profiler.stop", function (err, _a) {
5779+
var _b;
57705780
var profile = _a.profile;
57715781
if (!err) {
57725782
try {
5773-
if (_fs.statSync(profilePath).isDirectory()) {
5783+
if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
57745784
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-") + "+P" + process.pid + ".cpuprofile");
57755785
}
57765786
}
5777-
catch (_b) {
5787+
catch (_c) {
57785788
// do nothing and ignore fallible fs operation
57795789
}
57805790
try {
57815791
_fs.mkdirSync(_path.dirname(profilePath), { recursive: true });
57825792
}
5783-
catch (_c) {
5793+
catch (_d) {
57845794
// do nothing and ignore fallible fs operation
57855795
}
57865796
_fs.writeFileSync(profilePath, JSON.stringify(cleanupPaths(profile)));
@@ -6019,7 +6029,10 @@ var ts;
60196029
if (typeof dirent === "string" || dirent.isSymbolicLink()) {
60206030
var name = ts.combinePaths(path, entry);
60216031
try {
6022-
stat = _fs.statSync(name);
6032+
stat = statSync(name);
6033+
if (!stat) {
6034+
continue;
6035+
}
60236036
}
60246037
catch (e) {
60256038
continue;
@@ -6048,7 +6061,10 @@ var ts;
60486061
}
60496062
function fileSystemEntryExists(path, entryKind) {
60506063
try {
6051-
var stat = _fs.statSync(path);
6064+
var stat = statSync(path);
6065+
if (!stat) {
6066+
return false;
6067+
}
60526068
switch (entryKind) {
60536069
case 0 /* File */: return stat.isFile();
60546070
case 1 /* Directory */: return stat.isDirectory();
@@ -6077,8 +6093,9 @@ var ts;
60776093
}
60786094
}
60796095
function getModifiedTime(path) {
6096+
var _a;
60806097
try {
6081-
return _fs.statSync(path).mtime;
6098+
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
60826099
}
60836100
catch (e) {
60846101
return undefined;

lib/typescript.js

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ var ts;
244244
// If changing the text in this section, be sure to test `configurePrerelease` too.
245245
ts.versionMajorMinor = "3.9";
246246
/** The version of the TypeScript compiler release */
247-
ts.version = "3.9.9";
247+
ts.version = "3.9.10";
248248
/**
249249
* Returns the native Map implementation if it is available and compatible (i.e. supports iteration).
250250
*/
@@ -5666,8 +5666,8 @@ var ts;
56665666
},
56675667
getFileSize: function (path) {
56685668
try {
5669-
var stat = _fs.statSync(path);
5670-
if (stat.isFile()) {
5669+
var stat = statSync(path);
5670+
if (stat === null || stat === void 0 ? void 0 : stat.isFile()) {
56715671
return stat.size;
56725672
}
56735673
}
@@ -5713,6 +5713,15 @@ var ts;
57135713
}
57145714
};
57155715
return nodeSystem;
5716+
/**
5717+
* `throwIfNoEntry` was added so recently that it's not in the node types.
5718+
* This helper encapsulates the mitigating usage of `any`.
5719+
* See https://github.com/nodejs/node/pull/33716
5720+
*/
5721+
function statSync(path) {
5722+
// throwIfNoEntry will be ignored by older versions of node
5723+
return _fs.statSync(path, { throwIfNoEntry: false });
5724+
}
57165725
/**
57175726
* Uses the builtin inspector APIs to capture a CPU profile
57185727
* See https://nodejs.org/api/inspector.html#inspector_example_usage for details
@@ -5767,20 +5776,21 @@ var ts;
57675776
if (activeSession && activeSession !== "stopping") {
57685777
var s_1 = activeSession;
57695778
activeSession.post("Profiler.stop", function (err, _a) {
5779+
var _b;
57705780
var profile = _a.profile;
57715781
if (!err) {
57725782
try {
5773-
if (_fs.statSync(profilePath).isDirectory()) {
5783+
if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
57745784
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-") + "+P" + process.pid + ".cpuprofile");
57755785
}
57765786
}
5777-
catch (_b) {
5787+
catch (_c) {
57785788
// do nothing and ignore fallible fs operation
57795789
}
57805790
try {
57815791
_fs.mkdirSync(_path.dirname(profilePath), { recursive: true });
57825792
}
5783-
catch (_c) {
5793+
catch (_d) {
57845794
// do nothing and ignore fallible fs operation
57855795
}
57865796
_fs.writeFileSync(profilePath, JSON.stringify(cleanupPaths(profile)));
@@ -6019,7 +6029,10 @@ var ts;
60196029
if (typeof dirent === "string" || dirent.isSymbolicLink()) {
60206030
var name = ts.combinePaths(path, entry);
60216031
try {
6022-
stat = _fs.statSync(name);
6032+
stat = statSync(name);
6033+
if (!stat) {
6034+
continue;
6035+
}
60236036
}
60246037
catch (e) {
60256038
continue;
@@ -6048,7 +6061,10 @@ var ts;
60486061
}
60496062
function fileSystemEntryExists(path, entryKind) {
60506063
try {
6051-
var stat = _fs.statSync(path);
6064+
var stat = statSync(path);
6065+
if (!stat) {
6066+
return false;
6067+
}
60526068
switch (entryKind) {
60536069
case 0 /* File */: return stat.isFile();
60546070
case 1 /* Directory */: return stat.isDirectory();
@@ -6077,8 +6093,9 @@ var ts;
60776093
}
60786094
}
60796095
function getModifiedTime(path) {
6096+
var _a;
60806097
try {
6081-
return _fs.statSync(path).mtime;
6098+
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
60826099
}
60836100
catch (e) {
60846101
return undefined;

0 commit comments

Comments
 (0)