@@ -67,7 +67,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
67
67
var ts;
68
68
(function (ts) {
69
69
ts.versionMajorMinor = "3.9";
70
- ts.version = "3.9.9 ";
70
+ ts.version = "3.9.10 ";
71
71
function tryGetNativeMap() {
72
72
return typeof Map !== "undefined" && "entries" in Map.prototype ? Map : undefined;
73
73
}
@@ -3279,8 +3279,8 @@ var ts;
3279
3279
},
3280
3280
getFileSize: function (path) {
3281
3281
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()) {
3284
3284
return stat.size;
3285
3285
}
3286
3286
}
@@ -3325,6 +3325,9 @@ var ts;
3325
3325
}
3326
3326
};
3327
3327
return nodeSystem;
3328
+ function statSync(path) {
3329
+ return _fs.statSync(path, { throwIfNoEntry: false });
3330
+ }
3328
3331
function enableCPUProfiler(path, cb) {
3329
3332
if (activeSession) {
3330
3333
cb();
@@ -3370,19 +3373,20 @@ var ts;
3370
3373
if (activeSession && activeSession !== "stopping") {
3371
3374
var s_1 = activeSession;
3372
3375
activeSession.post("Profiler.stop", function (err, _a) {
3376
+ var _b;
3373
3377
var profile = _a.profile;
3374
3378
if (!err) {
3375
3379
try {
3376
- if (_fs. statSync(profilePath).isDirectory()) {
3380
+ if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b .isDirectory()) {
3377
3381
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-") + "+P" + process.pid + ".cpuprofile");
3378
3382
}
3379
3383
}
3380
- catch (_b ) {
3384
+ catch (_c ) {
3381
3385
}
3382
3386
try {
3383
3387
_fs.mkdirSync(_path.dirname(profilePath), { recursive: true });
3384
3388
}
3385
- catch (_c ) {
3389
+ catch (_d ) {
3386
3390
}
3387
3391
_fs.writeFileSync(profilePath, JSON.stringify(cleanupPaths(profile)));
3388
3392
}
@@ -3571,7 +3575,10 @@ var ts;
3571
3575
if (typeof dirent === "string" || dirent.isSymbolicLink()) {
3572
3576
var name = ts.combinePaths(path, entry);
3573
3577
try {
3574
- stat = _fs.statSync(name);
3578
+ stat = statSync(name);
3579
+ if (!stat) {
3580
+ continue;
3581
+ }
3575
3582
}
3576
3583
catch (e) {
3577
3584
continue;
@@ -3600,7 +3607,10 @@ var ts;
3600
3607
}
3601
3608
function fileSystemEntryExists(path, entryKind) {
3602
3609
try {
3603
- var stat = _fs.statSync(path);
3610
+ var stat = statSync(path);
3611
+ if (!stat) {
3612
+ return false;
3613
+ }
3604
3614
switch (entryKind) {
3605
3615
case 0: return stat.isFile();
3606
3616
case 1: return stat.isDirectory();
@@ -3629,8 +3639,9 @@ var ts;
3629
3639
}
3630
3640
}
3631
3641
function getModifiedTime(path) {
3642
+ var _a;
3632
3643
try {
3633
- return _fs. statSync(path).mtime;
3644
+ return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a .mtime;
3634
3645
}
3635
3646
catch (e) {
3636
3647
return undefined;
0 commit comments