Skip to content

Commit

Permalink
Bump version to 4.1.6 and LKG
Browse files Browse the repository at this point in the history
  • Loading branch information
typescript-bot committed Jun 16, 2021
1 parent 13e7ae7 commit a1e2a4b
Show file tree
Hide file tree
Showing 8 changed files with 153 additions and 56 deletions.
29 changes: 20 additions & 9 deletions lib/tsc.js
Expand Up @@ -67,7 +67,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
var ts;
(function (ts) {
ts.versionMajorMinor = "4.1";
ts.version = "4.1.5";
ts.version = "4.1.6";
var NativeCollections;
(function (NativeCollections) {
function tryGetNativeMap() {
Expand Down Expand Up @@ -4448,8 +4448,8 @@ var ts;
},
getFileSize: function (path) {
try {
var stat = _fs.statSync(path);
if (stat.isFile()) {
var stat = statSync(path);
if (stat === null || stat === void 0 ? void 0 : stat.isFile()) {
return stat.size;
}
}
Expand Down Expand Up @@ -4494,6 +4494,9 @@ var ts;
}
};
return nodeSystem;
function statSync(path) {
return _fs.statSync(path, { throwIfNoEntry: false });
}
function enableCPUProfiler(path, cb) {
if (activeSession) {
cb();
Expand Down Expand Up @@ -4539,19 +4542,20 @@ var ts;
if (activeSession && activeSession !== "stopping") {
var s_1 = activeSession;
activeSession.post("Profiler.stop", function (err, _a) {
var _b;
var profile = _a.profile;
if (!err) {
try {
if (_fs.statSync(profilePath).isDirectory()) {
if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-") + "+P" + process.pid + ".cpuprofile");
}
}
catch (_b) {
catch (_c) {
}
try {
_fs.mkdirSync(_path.dirname(profilePath), { recursive: true });
}
catch (_c) {
catch (_d) {
}
_fs.writeFileSync(profilePath, JSON.stringify(cleanupPaths(profile)));
}
Expand Down Expand Up @@ -4740,7 +4744,10 @@ var ts;
if (typeof dirent === "string" || dirent.isSymbolicLink()) {
var name = ts.combinePaths(path, entry);
try {
stat = _fs.statSync(name);
stat = statSync(name);
if (!stat) {
continue;
}
}
catch (e) {
continue;
Expand Down Expand Up @@ -4771,7 +4778,10 @@ var ts;
var originalStackTraceLimit = Error.stackTraceLimit;
Error.stackTraceLimit = 0;
try {
var stat = _fs.statSync(path);
var stat = statSync(path);
if (!stat) {
return false;
}
switch (entryKind) {
case 0: return stat.isFile();
case 1: return stat.isDirectory();
Expand Down Expand Up @@ -4803,8 +4813,9 @@ var ts;
}
}
function getModifiedTime(path) {
var _a;
try {
return _fs.statSync(path).mtime;
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
}
catch (e) {
return undefined;
Expand Down
36 changes: 27 additions & 9 deletions lib/tsserver.js
Expand Up @@ -94,7 +94,7 @@ var ts;
// If changing the text in this section, be sure to test `configurePrerelease` too.
ts.versionMajorMinor = "4.1";
/** The version of the TypeScript compiler release */
ts.version = "4.1.5";
ts.version = "4.1.6";
/* @internal */
var Comparison;
(function (Comparison) {
Expand Down Expand Up @@ -7022,8 +7022,8 @@ var ts;
},
getFileSize: function (path) {
try {
var stat = _fs.statSync(path);
if (stat.isFile()) {
var stat = statSync(path);
if (stat === null || stat === void 0 ? void 0 : stat.isFile()) {
return stat.size;
}
}
Expand Down Expand Up @@ -7069,6 +7069,15 @@ var ts;
}
};
return nodeSystem;
/**
* `throwIfNoEntry` was added so recently that it's not in the node types.
* This helper encapsulates the mitigating usage of `any`.
* See https://github.com/nodejs/node/pull/33716
*/
function statSync(path) {
// throwIfNoEntry will be ignored by older versions of node
return _fs.statSync(path, { throwIfNoEntry: false });
}
/**
* Uses the builtin inspector APIs to capture a CPU profile
* See https://nodejs.org/api/inspector.html#inspector_example_usage for details
Expand Down Expand Up @@ -7123,20 +7132,21 @@ var ts;
if (activeSession && activeSession !== "stopping") {
var s_1 = activeSession;
activeSession.post("Profiler.stop", function (err, _a) {
var _b;
var profile = _a.profile;
if (!err) {
try {
if (_fs.statSync(profilePath).isDirectory()) {
if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-") + "+P" + process.pid + ".cpuprofile");
}
}
catch (_b) {
catch (_c) {
// do nothing and ignore fallible fs operation
}
try {
_fs.mkdirSync(_path.dirname(profilePath), { recursive: true });
}
catch (_c) {
catch (_d) {
// do nothing and ignore fallible fs operation
}
_fs.writeFileSync(profilePath, JSON.stringify(cleanupPaths(profile)));
Expand Down Expand Up @@ -7375,7 +7385,10 @@ var ts;
if (typeof dirent === "string" || dirent.isSymbolicLink()) {
var name = ts.combinePaths(path, entry);
try {
stat = _fs.statSync(name);
stat = statSync(name);
if (!stat) {
continue;
}
}
catch (e) {
continue;
Expand Down Expand Up @@ -7408,7 +7421,10 @@ var ts;
var originalStackTraceLimit = Error.stackTraceLimit;
Error.stackTraceLimit = 0;
try {
var stat = _fs.statSync(path);
var stat = statSync(path);
if (!stat) {
return false;
}
switch (entryKind) {
case 0 /* File */: return stat.isFile();
case 1 /* Directory */: return stat.isDirectory();
Expand Down Expand Up @@ -7440,8 +7456,9 @@ var ts;
}
}
function getModifiedTime(path) {
var _a;
try {
return _fs.statSync(path).mtime;
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
}
catch (e) {
return undefined;
Expand Down Expand Up @@ -160609,6 +160626,7 @@ var ts;
var nextFileToCheck = 0;
return { getModifiedTime: getModifiedTime, poll: poll, startWatchTimer: startWatchTimer, addFile: addFile, removeFile: removeFile };
function getModifiedTime(fileName) {
// Caller guarantees that `fileName` exists, so there'd be no benefit from throwIfNoEntry
return fs.statSync(fileName).mtime;
}
function poll(checkedIndex) {
Expand Down
35 changes: 26 additions & 9 deletions lib/tsserverlibrary.js
Expand Up @@ -288,7 +288,7 @@ var ts;
// If changing the text in this section, be sure to test `configurePrerelease` too.
ts.versionMajorMinor = "4.1";
/** The version of the TypeScript compiler release */
ts.version = "4.1.5";
ts.version = "4.1.6";
/* @internal */
var Comparison;
(function (Comparison) {
Expand Down Expand Up @@ -7216,8 +7216,8 @@ var ts;
},
getFileSize: function (path) {
try {
var stat = _fs.statSync(path);
if (stat.isFile()) {
var stat = statSync(path);
if (stat === null || stat === void 0 ? void 0 : stat.isFile()) {
return stat.size;
}
}
Expand Down Expand Up @@ -7263,6 +7263,15 @@ var ts;
}
};
return nodeSystem;
/**
* `throwIfNoEntry` was added so recently that it's not in the node types.
* This helper encapsulates the mitigating usage of `any`.
* See https://github.com/nodejs/node/pull/33716
*/
function statSync(path) {
// throwIfNoEntry will be ignored by older versions of node
return _fs.statSync(path, { throwIfNoEntry: false });
}
/**
* Uses the builtin inspector APIs to capture a CPU profile
* See https://nodejs.org/api/inspector.html#inspector_example_usage for details
Expand Down Expand Up @@ -7317,20 +7326,21 @@ var ts;
if (activeSession && activeSession !== "stopping") {
var s_1 = activeSession;
activeSession.post("Profiler.stop", function (err, _a) {
var _b;
var profile = _a.profile;
if (!err) {
try {
if (_fs.statSync(profilePath).isDirectory()) {
if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-") + "+P" + process.pid + ".cpuprofile");
}
}
catch (_b) {
catch (_c) {
// do nothing and ignore fallible fs operation
}
try {
_fs.mkdirSync(_path.dirname(profilePath), { recursive: true });
}
catch (_c) {
catch (_d) {
// do nothing and ignore fallible fs operation
}
_fs.writeFileSync(profilePath, JSON.stringify(cleanupPaths(profile)));
Expand Down Expand Up @@ -7569,7 +7579,10 @@ var ts;
if (typeof dirent === "string" || dirent.isSymbolicLink()) {
var name = ts.combinePaths(path, entry);
try {
stat = _fs.statSync(name);
stat = statSync(name);
if (!stat) {
continue;
}
}
catch (e) {
continue;
Expand Down Expand Up @@ -7602,7 +7615,10 @@ var ts;
var originalStackTraceLimit = Error.stackTraceLimit;
Error.stackTraceLimit = 0;
try {
var stat = _fs.statSync(path);
var stat = statSync(path);
if (!stat) {
return false;
}
switch (entryKind) {
case 0 /* File */: return stat.isFile();
case 1 /* Directory */: return stat.isDirectory();
Expand Down Expand Up @@ -7634,8 +7650,9 @@ var ts;
}
}
function getModifiedTime(path) {
var _a;
try {
return _fs.statSync(path).mtime;
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
}
catch (e) {
return undefined;
Expand Down
35 changes: 26 additions & 9 deletions lib/typescript.js
Expand Up @@ -288,7 +288,7 @@ var ts;
// If changing the text in this section, be sure to test `configurePrerelease` too.
ts.versionMajorMinor = "4.1";
/** The version of the TypeScript compiler release */
ts.version = "4.1.5";
ts.version = "4.1.6";
/* @internal */
var Comparison;
(function (Comparison) {
Expand Down Expand Up @@ -7216,8 +7216,8 @@ var ts;
},
getFileSize: function (path) {
try {
var stat = _fs.statSync(path);
if (stat.isFile()) {
var stat = statSync(path);
if (stat === null || stat === void 0 ? void 0 : stat.isFile()) {
return stat.size;
}
}
Expand Down Expand Up @@ -7263,6 +7263,15 @@ var ts;
}
};
return nodeSystem;
/**
* `throwIfNoEntry` was added so recently that it's not in the node types.
* This helper encapsulates the mitigating usage of `any`.
* See https://github.com/nodejs/node/pull/33716
*/
function statSync(path) {
// throwIfNoEntry will be ignored by older versions of node
return _fs.statSync(path, { throwIfNoEntry: false });
}
/**
* Uses the builtin inspector APIs to capture a CPU profile
* See https://nodejs.org/api/inspector.html#inspector_example_usage for details
Expand Down Expand Up @@ -7317,20 +7326,21 @@ var ts;
if (activeSession && activeSession !== "stopping") {
var s_1 = activeSession;
activeSession.post("Profiler.stop", function (err, _a) {
var _b;
var profile = _a.profile;
if (!err) {
try {
if (_fs.statSync(profilePath).isDirectory()) {
if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-") + "+P" + process.pid + ".cpuprofile");
}
}
catch (_b) {
catch (_c) {
// do nothing and ignore fallible fs operation
}
try {
_fs.mkdirSync(_path.dirname(profilePath), { recursive: true });
}
catch (_c) {
catch (_d) {
// do nothing and ignore fallible fs operation
}
_fs.writeFileSync(profilePath, JSON.stringify(cleanupPaths(profile)));
Expand Down Expand Up @@ -7569,7 +7579,10 @@ var ts;
if (typeof dirent === "string" || dirent.isSymbolicLink()) {
var name = ts.combinePaths(path, entry);
try {
stat = _fs.statSync(name);
stat = statSync(name);
if (!stat) {
continue;
}
}
catch (e) {
continue;
Expand Down Expand Up @@ -7602,7 +7615,10 @@ var ts;
var originalStackTraceLimit = Error.stackTraceLimit;
Error.stackTraceLimit = 0;
try {
var stat = _fs.statSync(path);
var stat = statSync(path);
if (!stat) {
return false;
}
switch (entryKind) {
case 0 /* File */: return stat.isFile();
case 1 /* Directory */: return stat.isDirectory();
Expand Down Expand Up @@ -7634,8 +7650,9 @@ var ts;
}
}
function getModifiedTime(path) {
var _a;
try {
return _fs.statSync(path).mtime;
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
}
catch (e) {
return undefined;
Expand Down

0 comments on commit a1e2a4b

Please sign in to comment.