typescript 4.1.5 → 4.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +20 -9
- package/lib/tsserver.js +27 -9
- package/lib/tsserverlibrary.js +26 -9
- package/lib/typescript.js +26 -9
- package/lib/typescriptServices.js +26 -9
- package/lib/typingsInstaller.js +26 -9
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -67,7 +67,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
67
67
|
var ts;
|
|
68
68
|
(function (ts) {
|
|
69
69
|
ts.versionMajorMinor = "4.1";
|
|
70
|
-
ts.version = "4.1.
|
|
70
|
+
ts.version = "4.1.6";
|
|
71
71
|
var NativeCollections;
|
|
72
72
|
(function (NativeCollections) {
|
|
73
73
|
function tryGetNativeMap() {
|
|
@@ -4448,8 +4448,8 @@ var ts;
|
|
|
4448
4448
|
},
|
|
4449
4449
|
getFileSize: function (path) {
|
|
4450
4450
|
try {
|
|
4451
|
-
var stat =
|
|
4452
|
-
if (stat.isFile()) {
|
|
4451
|
+
var stat = statSync(path);
|
|
4452
|
+
if (stat === null || stat === void 0 ? void 0 : stat.isFile()) {
|
|
4453
4453
|
return stat.size;
|
|
4454
4454
|
}
|
|
4455
4455
|
}
|
|
@@ -4494,6 +4494,9 @@ var ts;
|
|
|
4494
4494
|
}
|
|
4495
4495
|
};
|
|
4496
4496
|
return nodeSystem;
|
|
4497
|
+
function statSync(path) {
|
|
4498
|
+
return _fs.statSync(path, { throwIfNoEntry: false });
|
|
4499
|
+
}
|
|
4497
4500
|
function enableCPUProfiler(path, cb) {
|
|
4498
4501
|
if (activeSession) {
|
|
4499
4502
|
cb();
|
|
@@ -4539,19 +4542,20 @@ var ts;
|
|
|
4539
4542
|
if (activeSession && activeSession !== "stopping") {
|
|
4540
4543
|
var s_1 = activeSession;
|
|
4541
4544
|
activeSession.post("Profiler.stop", function (err, _a) {
|
|
4545
|
+
var _b;
|
|
4542
4546
|
var profile = _a.profile;
|
|
4543
4547
|
if (!err) {
|
|
4544
4548
|
try {
|
|
4545
|
-
if (
|
|
4549
|
+
if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
|
|
4546
4550
|
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-") + "+P" + process.pid + ".cpuprofile");
|
|
4547
4551
|
}
|
|
4548
4552
|
}
|
|
4549
|
-
catch (
|
|
4553
|
+
catch (_c) {
|
|
4550
4554
|
}
|
|
4551
4555
|
try {
|
|
4552
4556
|
_fs.mkdirSync(_path.dirname(profilePath), { recursive: true });
|
|
4553
4557
|
}
|
|
4554
|
-
catch (
|
|
4558
|
+
catch (_d) {
|
|
4555
4559
|
}
|
|
4556
4560
|
_fs.writeFileSync(profilePath, JSON.stringify(cleanupPaths(profile)));
|
|
4557
4561
|
}
|
|
@@ -4740,7 +4744,10 @@ var ts;
|
|
|
4740
4744
|
if (typeof dirent === "string" || dirent.isSymbolicLink()) {
|
|
4741
4745
|
var name = ts.combinePaths(path, entry);
|
|
4742
4746
|
try {
|
|
4743
|
-
stat =
|
|
4747
|
+
stat = statSync(name);
|
|
4748
|
+
if (!stat) {
|
|
4749
|
+
continue;
|
|
4750
|
+
}
|
|
4744
4751
|
}
|
|
4745
4752
|
catch (e) {
|
|
4746
4753
|
continue;
|
|
@@ -4771,7 +4778,10 @@ var ts;
|
|
|
4771
4778
|
var originalStackTraceLimit = Error.stackTraceLimit;
|
|
4772
4779
|
Error.stackTraceLimit = 0;
|
|
4773
4780
|
try {
|
|
4774
|
-
var stat =
|
|
4781
|
+
var stat = statSync(path);
|
|
4782
|
+
if (!stat) {
|
|
4783
|
+
return false;
|
|
4784
|
+
}
|
|
4775
4785
|
switch (entryKind) {
|
|
4776
4786
|
case 0: return stat.isFile();
|
|
4777
4787
|
case 1: return stat.isDirectory();
|
|
@@ -4803,8 +4813,9 @@ var ts;
|
|
|
4803
4813
|
}
|
|
4804
4814
|
}
|
|
4805
4815
|
function getModifiedTime(path) {
|
|
4816
|
+
var _a;
|
|
4806
4817
|
try {
|
|
4807
|
-
return
|
|
4818
|
+
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
|
|
4808
4819
|
}
|
|
4809
4820
|
catch (e) {
|
|
4810
4821
|
return undefined;
|
package/lib/tsserver.js
CHANGED
|
@@ -94,7 +94,7 @@ var ts;
|
|
|
94
94
|
// If changing the text in this section, be sure to test `configurePrerelease` too.
|
|
95
95
|
ts.versionMajorMinor = "4.1";
|
|
96
96
|
/** The version of the TypeScript compiler release */
|
|
97
|
-
ts.version = "4.1.
|
|
97
|
+
ts.version = "4.1.6";
|
|
98
98
|
/* @internal */
|
|
99
99
|
var Comparison;
|
|
100
100
|
(function (Comparison) {
|
|
@@ -7022,8 +7022,8 @@ var ts;
|
|
|
7022
7022
|
},
|
|
7023
7023
|
getFileSize: function (path) {
|
|
7024
7024
|
try {
|
|
7025
|
-
var stat =
|
|
7026
|
-
if (stat.isFile()) {
|
|
7025
|
+
var stat = statSync(path);
|
|
7026
|
+
if (stat === null || stat === void 0 ? void 0 : stat.isFile()) {
|
|
7027
7027
|
return stat.size;
|
|
7028
7028
|
}
|
|
7029
7029
|
}
|
|
@@ -7069,6 +7069,15 @@ var ts;
|
|
|
7069
7069
|
}
|
|
7070
7070
|
};
|
|
7071
7071
|
return nodeSystem;
|
|
7072
|
+
/**
|
|
7073
|
+
* `throwIfNoEntry` was added so recently that it's not in the node types.
|
|
7074
|
+
* This helper encapsulates the mitigating usage of `any`.
|
|
7075
|
+
* See https://github.com/nodejs/node/pull/33716
|
|
7076
|
+
*/
|
|
7077
|
+
function statSync(path) {
|
|
7078
|
+
// throwIfNoEntry will be ignored by older versions of node
|
|
7079
|
+
return _fs.statSync(path, { throwIfNoEntry: false });
|
|
7080
|
+
}
|
|
7072
7081
|
/**
|
|
7073
7082
|
* Uses the builtin inspector APIs to capture a CPU profile
|
|
7074
7083
|
* See https://nodejs.org/api/inspector.html#inspector_example_usage for details
|
|
@@ -7123,20 +7132,21 @@ var ts;
|
|
|
7123
7132
|
if (activeSession && activeSession !== "stopping") {
|
|
7124
7133
|
var s_1 = activeSession;
|
|
7125
7134
|
activeSession.post("Profiler.stop", function (err, _a) {
|
|
7135
|
+
var _b;
|
|
7126
7136
|
var profile = _a.profile;
|
|
7127
7137
|
if (!err) {
|
|
7128
7138
|
try {
|
|
7129
|
-
if (
|
|
7139
|
+
if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
|
|
7130
7140
|
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-") + "+P" + process.pid + ".cpuprofile");
|
|
7131
7141
|
}
|
|
7132
7142
|
}
|
|
7133
|
-
catch (
|
|
7143
|
+
catch (_c) {
|
|
7134
7144
|
// do nothing and ignore fallible fs operation
|
|
7135
7145
|
}
|
|
7136
7146
|
try {
|
|
7137
7147
|
_fs.mkdirSync(_path.dirname(profilePath), { recursive: true });
|
|
7138
7148
|
}
|
|
7139
|
-
catch (
|
|
7149
|
+
catch (_d) {
|
|
7140
7150
|
// do nothing and ignore fallible fs operation
|
|
7141
7151
|
}
|
|
7142
7152
|
_fs.writeFileSync(profilePath, JSON.stringify(cleanupPaths(profile)));
|
|
@@ -7375,7 +7385,10 @@ var ts;
|
|
|
7375
7385
|
if (typeof dirent === "string" || dirent.isSymbolicLink()) {
|
|
7376
7386
|
var name = ts.combinePaths(path, entry);
|
|
7377
7387
|
try {
|
|
7378
|
-
stat =
|
|
7388
|
+
stat = statSync(name);
|
|
7389
|
+
if (!stat) {
|
|
7390
|
+
continue;
|
|
7391
|
+
}
|
|
7379
7392
|
}
|
|
7380
7393
|
catch (e) {
|
|
7381
7394
|
continue;
|
|
@@ -7408,7 +7421,10 @@ var ts;
|
|
|
7408
7421
|
var originalStackTraceLimit = Error.stackTraceLimit;
|
|
7409
7422
|
Error.stackTraceLimit = 0;
|
|
7410
7423
|
try {
|
|
7411
|
-
var stat =
|
|
7424
|
+
var stat = statSync(path);
|
|
7425
|
+
if (!stat) {
|
|
7426
|
+
return false;
|
|
7427
|
+
}
|
|
7412
7428
|
switch (entryKind) {
|
|
7413
7429
|
case 0 /* File */: return stat.isFile();
|
|
7414
7430
|
case 1 /* Directory */: return stat.isDirectory();
|
|
@@ -7440,8 +7456,9 @@ var ts;
|
|
|
7440
7456
|
}
|
|
7441
7457
|
}
|
|
7442
7458
|
function getModifiedTime(path) {
|
|
7459
|
+
var _a;
|
|
7443
7460
|
try {
|
|
7444
|
-
return
|
|
7461
|
+
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
|
|
7445
7462
|
}
|
|
7446
7463
|
catch (e) {
|
|
7447
7464
|
return undefined;
|
|
@@ -160609,6 +160626,7 @@ var ts;
|
|
|
160609
160626
|
var nextFileToCheck = 0;
|
|
160610
160627
|
return { getModifiedTime: getModifiedTime, poll: poll, startWatchTimer: startWatchTimer, addFile: addFile, removeFile: removeFile };
|
|
160611
160628
|
function getModifiedTime(fileName) {
|
|
160629
|
+
// Caller guarantees that `fileName` exists, so there'd be no benefit from throwIfNoEntry
|
|
160612
160630
|
return fs.statSync(fileName).mtime;
|
|
160613
160631
|
}
|
|
160614
160632
|
function poll(checkedIndex) {
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -288,7 +288,7 @@ var ts;
|
|
|
288
288
|
// If changing the text in this section, be sure to test `configurePrerelease` too.
|
|
289
289
|
ts.versionMajorMinor = "4.1";
|
|
290
290
|
/** The version of the TypeScript compiler release */
|
|
291
|
-
ts.version = "4.1.
|
|
291
|
+
ts.version = "4.1.6";
|
|
292
292
|
/* @internal */
|
|
293
293
|
var Comparison;
|
|
294
294
|
(function (Comparison) {
|
|
@@ -7216,8 +7216,8 @@ var ts;
|
|
|
7216
7216
|
},
|
|
7217
7217
|
getFileSize: function (path) {
|
|
7218
7218
|
try {
|
|
7219
|
-
var stat =
|
|
7220
|
-
if (stat.isFile()) {
|
|
7219
|
+
var stat = statSync(path);
|
|
7220
|
+
if (stat === null || stat === void 0 ? void 0 : stat.isFile()) {
|
|
7221
7221
|
return stat.size;
|
|
7222
7222
|
}
|
|
7223
7223
|
}
|
|
@@ -7263,6 +7263,15 @@ var ts;
|
|
|
7263
7263
|
}
|
|
7264
7264
|
};
|
|
7265
7265
|
return nodeSystem;
|
|
7266
|
+
/**
|
|
7267
|
+
* `throwIfNoEntry` was added so recently that it's not in the node types.
|
|
7268
|
+
* This helper encapsulates the mitigating usage of `any`.
|
|
7269
|
+
* See https://github.com/nodejs/node/pull/33716
|
|
7270
|
+
*/
|
|
7271
|
+
function statSync(path) {
|
|
7272
|
+
// throwIfNoEntry will be ignored by older versions of node
|
|
7273
|
+
return _fs.statSync(path, { throwIfNoEntry: false });
|
|
7274
|
+
}
|
|
7266
7275
|
/**
|
|
7267
7276
|
* Uses the builtin inspector APIs to capture a CPU profile
|
|
7268
7277
|
* See https://nodejs.org/api/inspector.html#inspector_example_usage for details
|
|
@@ -7317,20 +7326,21 @@ var ts;
|
|
|
7317
7326
|
if (activeSession && activeSession !== "stopping") {
|
|
7318
7327
|
var s_1 = activeSession;
|
|
7319
7328
|
activeSession.post("Profiler.stop", function (err, _a) {
|
|
7329
|
+
var _b;
|
|
7320
7330
|
var profile = _a.profile;
|
|
7321
7331
|
if (!err) {
|
|
7322
7332
|
try {
|
|
7323
|
-
if (
|
|
7333
|
+
if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
|
|
7324
7334
|
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-") + "+P" + process.pid + ".cpuprofile");
|
|
7325
7335
|
}
|
|
7326
7336
|
}
|
|
7327
|
-
catch (
|
|
7337
|
+
catch (_c) {
|
|
7328
7338
|
// do nothing and ignore fallible fs operation
|
|
7329
7339
|
}
|
|
7330
7340
|
try {
|
|
7331
7341
|
_fs.mkdirSync(_path.dirname(profilePath), { recursive: true });
|
|
7332
7342
|
}
|
|
7333
|
-
catch (
|
|
7343
|
+
catch (_d) {
|
|
7334
7344
|
// do nothing and ignore fallible fs operation
|
|
7335
7345
|
}
|
|
7336
7346
|
_fs.writeFileSync(profilePath, JSON.stringify(cleanupPaths(profile)));
|
|
@@ -7569,7 +7579,10 @@ var ts;
|
|
|
7569
7579
|
if (typeof dirent === "string" || dirent.isSymbolicLink()) {
|
|
7570
7580
|
var name = ts.combinePaths(path, entry);
|
|
7571
7581
|
try {
|
|
7572
|
-
stat =
|
|
7582
|
+
stat = statSync(name);
|
|
7583
|
+
if (!stat) {
|
|
7584
|
+
continue;
|
|
7585
|
+
}
|
|
7573
7586
|
}
|
|
7574
7587
|
catch (e) {
|
|
7575
7588
|
continue;
|
|
@@ -7602,7 +7615,10 @@ var ts;
|
|
|
7602
7615
|
var originalStackTraceLimit = Error.stackTraceLimit;
|
|
7603
7616
|
Error.stackTraceLimit = 0;
|
|
7604
7617
|
try {
|
|
7605
|
-
var stat =
|
|
7618
|
+
var stat = statSync(path);
|
|
7619
|
+
if (!stat) {
|
|
7620
|
+
return false;
|
|
7621
|
+
}
|
|
7606
7622
|
switch (entryKind) {
|
|
7607
7623
|
case 0 /* File */: return stat.isFile();
|
|
7608
7624
|
case 1 /* Directory */: return stat.isDirectory();
|
|
@@ -7634,8 +7650,9 @@ var ts;
|
|
|
7634
7650
|
}
|
|
7635
7651
|
}
|
|
7636
7652
|
function getModifiedTime(path) {
|
|
7653
|
+
var _a;
|
|
7637
7654
|
try {
|
|
7638
|
-
return
|
|
7655
|
+
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
|
|
7639
7656
|
}
|
|
7640
7657
|
catch (e) {
|
|
7641
7658
|
return undefined;
|
package/lib/typescript.js
CHANGED
|
@@ -288,7 +288,7 @@ var ts;
|
|
|
288
288
|
// If changing the text in this section, be sure to test `configurePrerelease` too.
|
|
289
289
|
ts.versionMajorMinor = "4.1";
|
|
290
290
|
/** The version of the TypeScript compiler release */
|
|
291
|
-
ts.version = "4.1.
|
|
291
|
+
ts.version = "4.1.6";
|
|
292
292
|
/* @internal */
|
|
293
293
|
var Comparison;
|
|
294
294
|
(function (Comparison) {
|
|
@@ -7216,8 +7216,8 @@ var ts;
|
|
|
7216
7216
|
},
|
|
7217
7217
|
getFileSize: function (path) {
|
|
7218
7218
|
try {
|
|
7219
|
-
var stat =
|
|
7220
|
-
if (stat.isFile()) {
|
|
7219
|
+
var stat = statSync(path);
|
|
7220
|
+
if (stat === null || stat === void 0 ? void 0 : stat.isFile()) {
|
|
7221
7221
|
return stat.size;
|
|
7222
7222
|
}
|
|
7223
7223
|
}
|
|
@@ -7263,6 +7263,15 @@ var ts;
|
|
|
7263
7263
|
}
|
|
7264
7264
|
};
|
|
7265
7265
|
return nodeSystem;
|
|
7266
|
+
/**
|
|
7267
|
+
* `throwIfNoEntry` was added so recently that it's not in the node types.
|
|
7268
|
+
* This helper encapsulates the mitigating usage of `any`.
|
|
7269
|
+
* See https://github.com/nodejs/node/pull/33716
|
|
7270
|
+
*/
|
|
7271
|
+
function statSync(path) {
|
|
7272
|
+
// throwIfNoEntry will be ignored by older versions of node
|
|
7273
|
+
return _fs.statSync(path, { throwIfNoEntry: false });
|
|
7274
|
+
}
|
|
7266
7275
|
/**
|
|
7267
7276
|
* Uses the builtin inspector APIs to capture a CPU profile
|
|
7268
7277
|
* See https://nodejs.org/api/inspector.html#inspector_example_usage for details
|
|
@@ -7317,20 +7326,21 @@ var ts;
|
|
|
7317
7326
|
if (activeSession && activeSession !== "stopping") {
|
|
7318
7327
|
var s_1 = activeSession;
|
|
7319
7328
|
activeSession.post("Profiler.stop", function (err, _a) {
|
|
7329
|
+
var _b;
|
|
7320
7330
|
var profile = _a.profile;
|
|
7321
7331
|
if (!err) {
|
|
7322
7332
|
try {
|
|
7323
|
-
if (
|
|
7333
|
+
if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
|
|
7324
7334
|
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-") + "+P" + process.pid + ".cpuprofile");
|
|
7325
7335
|
}
|
|
7326
7336
|
}
|
|
7327
|
-
catch (
|
|
7337
|
+
catch (_c) {
|
|
7328
7338
|
// do nothing and ignore fallible fs operation
|
|
7329
7339
|
}
|
|
7330
7340
|
try {
|
|
7331
7341
|
_fs.mkdirSync(_path.dirname(profilePath), { recursive: true });
|
|
7332
7342
|
}
|
|
7333
|
-
catch (
|
|
7343
|
+
catch (_d) {
|
|
7334
7344
|
// do nothing and ignore fallible fs operation
|
|
7335
7345
|
}
|
|
7336
7346
|
_fs.writeFileSync(profilePath, JSON.stringify(cleanupPaths(profile)));
|
|
@@ -7569,7 +7579,10 @@ var ts;
|
|
|
7569
7579
|
if (typeof dirent === "string" || dirent.isSymbolicLink()) {
|
|
7570
7580
|
var name = ts.combinePaths(path, entry);
|
|
7571
7581
|
try {
|
|
7572
|
-
stat =
|
|
7582
|
+
stat = statSync(name);
|
|
7583
|
+
if (!stat) {
|
|
7584
|
+
continue;
|
|
7585
|
+
}
|
|
7573
7586
|
}
|
|
7574
7587
|
catch (e) {
|
|
7575
7588
|
continue;
|
|
@@ -7602,7 +7615,10 @@ var ts;
|
|
|
7602
7615
|
var originalStackTraceLimit = Error.stackTraceLimit;
|
|
7603
7616
|
Error.stackTraceLimit = 0;
|
|
7604
7617
|
try {
|
|
7605
|
-
var stat =
|
|
7618
|
+
var stat = statSync(path);
|
|
7619
|
+
if (!stat) {
|
|
7620
|
+
return false;
|
|
7621
|
+
}
|
|
7606
7622
|
switch (entryKind) {
|
|
7607
7623
|
case 0 /* File */: return stat.isFile();
|
|
7608
7624
|
case 1 /* Directory */: return stat.isDirectory();
|
|
@@ -7634,8 +7650,9 @@ var ts;
|
|
|
7634
7650
|
}
|
|
7635
7651
|
}
|
|
7636
7652
|
function getModifiedTime(path) {
|
|
7653
|
+
var _a;
|
|
7637
7654
|
try {
|
|
7638
|
-
return
|
|
7655
|
+
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
|
|
7639
7656
|
}
|
|
7640
7657
|
catch (e) {
|
|
7641
7658
|
return undefined;
|
|
@@ -288,7 +288,7 @@ var ts;
|
|
|
288
288
|
// If changing the text in this section, be sure to test `configurePrerelease` too.
|
|
289
289
|
ts.versionMajorMinor = "4.1";
|
|
290
290
|
/** The version of the TypeScript compiler release */
|
|
291
|
-
ts.version = "4.1.
|
|
291
|
+
ts.version = "4.1.6";
|
|
292
292
|
/* @internal */
|
|
293
293
|
var Comparison;
|
|
294
294
|
(function (Comparison) {
|
|
@@ -7216,8 +7216,8 @@ var ts;
|
|
|
7216
7216
|
},
|
|
7217
7217
|
getFileSize: function (path) {
|
|
7218
7218
|
try {
|
|
7219
|
-
var stat =
|
|
7220
|
-
if (stat.isFile()) {
|
|
7219
|
+
var stat = statSync(path);
|
|
7220
|
+
if (stat === null || stat === void 0 ? void 0 : stat.isFile()) {
|
|
7221
7221
|
return stat.size;
|
|
7222
7222
|
}
|
|
7223
7223
|
}
|
|
@@ -7263,6 +7263,15 @@ var ts;
|
|
|
7263
7263
|
}
|
|
7264
7264
|
};
|
|
7265
7265
|
return nodeSystem;
|
|
7266
|
+
/**
|
|
7267
|
+
* `throwIfNoEntry` was added so recently that it's not in the node types.
|
|
7268
|
+
* This helper encapsulates the mitigating usage of `any`.
|
|
7269
|
+
* See https://github.com/nodejs/node/pull/33716
|
|
7270
|
+
*/
|
|
7271
|
+
function statSync(path) {
|
|
7272
|
+
// throwIfNoEntry will be ignored by older versions of node
|
|
7273
|
+
return _fs.statSync(path, { throwIfNoEntry: false });
|
|
7274
|
+
}
|
|
7266
7275
|
/**
|
|
7267
7276
|
* Uses the builtin inspector APIs to capture a CPU profile
|
|
7268
7277
|
* See https://nodejs.org/api/inspector.html#inspector_example_usage for details
|
|
@@ -7317,20 +7326,21 @@ var ts;
|
|
|
7317
7326
|
if (activeSession && activeSession !== "stopping") {
|
|
7318
7327
|
var s_1 = activeSession;
|
|
7319
7328
|
activeSession.post("Profiler.stop", function (err, _a) {
|
|
7329
|
+
var _b;
|
|
7320
7330
|
var profile = _a.profile;
|
|
7321
7331
|
if (!err) {
|
|
7322
7332
|
try {
|
|
7323
|
-
if (
|
|
7333
|
+
if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
|
|
7324
7334
|
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-") + "+P" + process.pid + ".cpuprofile");
|
|
7325
7335
|
}
|
|
7326
7336
|
}
|
|
7327
|
-
catch (
|
|
7337
|
+
catch (_c) {
|
|
7328
7338
|
// do nothing and ignore fallible fs operation
|
|
7329
7339
|
}
|
|
7330
7340
|
try {
|
|
7331
7341
|
_fs.mkdirSync(_path.dirname(profilePath), { recursive: true });
|
|
7332
7342
|
}
|
|
7333
|
-
catch (
|
|
7343
|
+
catch (_d) {
|
|
7334
7344
|
// do nothing and ignore fallible fs operation
|
|
7335
7345
|
}
|
|
7336
7346
|
_fs.writeFileSync(profilePath, JSON.stringify(cleanupPaths(profile)));
|
|
@@ -7569,7 +7579,10 @@ var ts;
|
|
|
7569
7579
|
if (typeof dirent === "string" || dirent.isSymbolicLink()) {
|
|
7570
7580
|
var name = ts.combinePaths(path, entry);
|
|
7571
7581
|
try {
|
|
7572
|
-
stat =
|
|
7582
|
+
stat = statSync(name);
|
|
7583
|
+
if (!stat) {
|
|
7584
|
+
continue;
|
|
7585
|
+
}
|
|
7573
7586
|
}
|
|
7574
7587
|
catch (e) {
|
|
7575
7588
|
continue;
|
|
@@ -7602,7 +7615,10 @@ var ts;
|
|
|
7602
7615
|
var originalStackTraceLimit = Error.stackTraceLimit;
|
|
7603
7616
|
Error.stackTraceLimit = 0;
|
|
7604
7617
|
try {
|
|
7605
|
-
var stat =
|
|
7618
|
+
var stat = statSync(path);
|
|
7619
|
+
if (!stat) {
|
|
7620
|
+
return false;
|
|
7621
|
+
}
|
|
7606
7622
|
switch (entryKind) {
|
|
7607
7623
|
case 0 /* File */: return stat.isFile();
|
|
7608
7624
|
case 1 /* Directory */: return stat.isDirectory();
|
|
@@ -7634,8 +7650,9 @@ var ts;
|
|
|
7634
7650
|
}
|
|
7635
7651
|
}
|
|
7636
7652
|
function getModifiedTime(path) {
|
|
7653
|
+
var _a;
|
|
7637
7654
|
try {
|
|
7638
|
-
return
|
|
7655
|
+
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
|
|
7639
7656
|
}
|
|
7640
7657
|
catch (e) {
|
|
7641
7658
|
return undefined;
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -83,7 +83,7 @@ var ts;
|
|
|
83
83
|
// If changing the text in this section, be sure to test `configurePrerelease` too.
|
|
84
84
|
ts.versionMajorMinor = "4.1";
|
|
85
85
|
/** The version of the TypeScript compiler release */
|
|
86
|
-
ts.version = "4.1.
|
|
86
|
+
ts.version = "4.1.6";
|
|
87
87
|
/* @internal */
|
|
88
88
|
var Comparison;
|
|
89
89
|
(function (Comparison) {
|
|
@@ -7011,8 +7011,8 @@ var ts;
|
|
|
7011
7011
|
},
|
|
7012
7012
|
getFileSize: function (path) {
|
|
7013
7013
|
try {
|
|
7014
|
-
var stat =
|
|
7015
|
-
if (stat.isFile()) {
|
|
7014
|
+
var stat = statSync(path);
|
|
7015
|
+
if (stat === null || stat === void 0 ? void 0 : stat.isFile()) {
|
|
7016
7016
|
return stat.size;
|
|
7017
7017
|
}
|
|
7018
7018
|
}
|
|
@@ -7058,6 +7058,15 @@ var ts;
|
|
|
7058
7058
|
}
|
|
7059
7059
|
};
|
|
7060
7060
|
return nodeSystem;
|
|
7061
|
+
/**
|
|
7062
|
+
* `throwIfNoEntry` was added so recently that it's not in the node types.
|
|
7063
|
+
* This helper encapsulates the mitigating usage of `any`.
|
|
7064
|
+
* See https://github.com/nodejs/node/pull/33716
|
|
7065
|
+
*/
|
|
7066
|
+
function statSync(path) {
|
|
7067
|
+
// throwIfNoEntry will be ignored by older versions of node
|
|
7068
|
+
return _fs.statSync(path, { throwIfNoEntry: false });
|
|
7069
|
+
}
|
|
7061
7070
|
/**
|
|
7062
7071
|
* Uses the builtin inspector APIs to capture a CPU profile
|
|
7063
7072
|
* See https://nodejs.org/api/inspector.html#inspector_example_usage for details
|
|
@@ -7112,20 +7121,21 @@ var ts;
|
|
|
7112
7121
|
if (activeSession && activeSession !== "stopping") {
|
|
7113
7122
|
var s_1 = activeSession;
|
|
7114
7123
|
activeSession.post("Profiler.stop", function (err, _a) {
|
|
7124
|
+
var _b;
|
|
7115
7125
|
var profile = _a.profile;
|
|
7116
7126
|
if (!err) {
|
|
7117
7127
|
try {
|
|
7118
|
-
if (
|
|
7128
|
+
if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
|
|
7119
7129
|
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-") + "+P" + process.pid + ".cpuprofile");
|
|
7120
7130
|
}
|
|
7121
7131
|
}
|
|
7122
|
-
catch (
|
|
7132
|
+
catch (_c) {
|
|
7123
7133
|
// do nothing and ignore fallible fs operation
|
|
7124
7134
|
}
|
|
7125
7135
|
try {
|
|
7126
7136
|
_fs.mkdirSync(_path.dirname(profilePath), { recursive: true });
|
|
7127
7137
|
}
|
|
7128
|
-
catch (
|
|
7138
|
+
catch (_d) {
|
|
7129
7139
|
// do nothing and ignore fallible fs operation
|
|
7130
7140
|
}
|
|
7131
7141
|
_fs.writeFileSync(profilePath, JSON.stringify(cleanupPaths(profile)));
|
|
@@ -7364,7 +7374,10 @@ var ts;
|
|
|
7364
7374
|
if (typeof dirent === "string" || dirent.isSymbolicLink()) {
|
|
7365
7375
|
var name = ts.combinePaths(path, entry);
|
|
7366
7376
|
try {
|
|
7367
|
-
stat =
|
|
7377
|
+
stat = statSync(name);
|
|
7378
|
+
if (!stat) {
|
|
7379
|
+
continue;
|
|
7380
|
+
}
|
|
7368
7381
|
}
|
|
7369
7382
|
catch (e) {
|
|
7370
7383
|
continue;
|
|
@@ -7397,7 +7410,10 @@ var ts;
|
|
|
7397
7410
|
var originalStackTraceLimit = Error.stackTraceLimit;
|
|
7398
7411
|
Error.stackTraceLimit = 0;
|
|
7399
7412
|
try {
|
|
7400
|
-
var stat =
|
|
7413
|
+
var stat = statSync(path);
|
|
7414
|
+
if (!stat) {
|
|
7415
|
+
return false;
|
|
7416
|
+
}
|
|
7401
7417
|
switch (entryKind) {
|
|
7402
7418
|
case 0 /* File */: return stat.isFile();
|
|
7403
7419
|
case 1 /* Directory */: return stat.isDirectory();
|
|
@@ -7429,8 +7445,9 @@ var ts;
|
|
|
7429
7445
|
}
|
|
7430
7446
|
}
|
|
7431
7447
|
function getModifiedTime(path) {
|
|
7448
|
+
var _a;
|
|
7432
7449
|
try {
|
|
7433
|
-
return
|
|
7450
|
+
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
|
|
7434
7451
|
}
|
|
7435
7452
|
catch (e) {
|
|
7436
7453
|
return undefined;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "4.1.
|
|
5
|
+
"version": "4.1.6",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|