X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=.config%2Fcoc%2Fextensions%2Fnode_modules%2Fcoc-prettier%2Fnode_modules%2Fprettier-eslint%2Fnode_modules%2Ftypescript%2Flib%2FtypingsInstaller.js;h=9ddfa75a59e2f9cd149a8fdb1a25a69afa9c4e77;hb=3be0a9efc698a9570a44456009afc6014812625a;hp=a990920d8e94885d2727c1458936e8aee3555201;hpb=3c06164f15bd10aed7d66b6314764a2961a14762;p=dotfiles%2F.git diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/prettier-eslint/node_modules/typescript/lib/typingsInstaller.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/prettier-eslint/node_modules/typescript/lib/typingsInstaller.js index a990920d..9ddfa75a 100644 --- a/.config/coc/extensions/node_modules/coc-prettier/node_modules/prettier-eslint/node_modules/typescript/lib/typingsInstaller.js +++ b/.config/coc/extensions/node_modules/coc-prettier/node_modules/prettier-eslint/node_modules/typescript/lib/typingsInstaller.js @@ -83,7 +83,7 @@ var ts; // If changing the text in this section, be sure to test `configurePrerelease` too. ts.versionMajorMinor = "3.9"; /** The version of the TypeScript compiler release */ - ts.version = "3.9.9"; + ts.version = "3.9.10"; /** * Returns the native Map implementation if it is available and compatible (i.e. supports iteration). */ @@ -5505,8 +5505,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; } } @@ -5552,6 +5552,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 @@ -5606,20 +5615,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))); @@ -5858,7 +5868,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; @@ -5887,7 +5900,10 @@ var ts; } function fileSystemEntryExists(path, entryKind) { 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(); @@ -5916,8 +5932,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;