diff --git a/.pnp.cjs b/.pnp.cjs index 828212a..63b0f2d 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -30,7 +30,7 @@ const RAW_RUNTIME_STATE = ["@types/jest", "npm:29.5.14"],\ ["@types/node", "npm:22.13.10"],\ ["jest", "virtual:0bdaf34b18f64a61d994ea5745297b16ca55696ece813438927b218d5900be7b3b1afb8777870498f0544991088e71be7d6609a8d92700ec537ab224121fd8a4#npm:29.7.0"],\ - ["ts-jest", "virtual:0bdaf34b18f64a61d994ea5745297b16ca55696ece813438927b218d5900be7b3b1afb8777870498f0544991088e71be7d6609a8d92700ec537ab224121fd8a4#npm:29.2.6"],\ + ["ts-jest", "virtual:0bdaf34b18f64a61d994ea5745297b16ca55696ece813438927b218d5900be7b3b1afb8777870498f0544991088e71be7d6609a8d92700ec537ab224121fd8a4#npm:29.3.1"],\ ["ts-node", "virtual:0bdaf34b18f64a61d994ea5745297b16ca55696ece813438927b218d5900be7b3b1afb8777870498f0544991088e71be7d6609a8d92700ec537ab224121fd8a4#npm:10.9.2"],\ ["typescript", "patch:typescript@npm%3A5.8.2#optional!builtin::version=5.8.2&hash=5786d5"]\ ],\ @@ -1940,7 +1940,7 @@ const RAW_RUNTIME_STATE = ["@types/jest", "npm:29.5.14"],\ ["@types/node", "npm:22.13.10"],\ ["jest", "virtual:0bdaf34b18f64a61d994ea5745297b16ca55696ece813438927b218d5900be7b3b1afb8777870498f0544991088e71be7d6609a8d92700ec537ab224121fd8a4#npm:29.7.0"],\ - ["ts-jest", "virtual:0bdaf34b18f64a61d994ea5745297b16ca55696ece813438927b218d5900be7b3b1afb8777870498f0544991088e71be7d6609a8d92700ec537ab224121fd8a4#npm:29.2.6"],\ + ["ts-jest", "virtual:0bdaf34b18f64a61d994ea5745297b16ca55696ece813438927b218d5900be7b3b1afb8777870498f0544991088e71be7d6609a8d92700ec537ab224121fd8a4#npm:29.3.1"],\ ["ts-node", "virtual:0bdaf34b18f64a61d994ea5745297b16ca55696ece813438927b218d5900be7b3b1afb8777870498f0544991088e71be7d6609a8d92700ec537ab224121fd8a4#npm:10.9.2"],\ ["typescript", "patch:typescript@npm%3A5.8.2#optional!builtin::version=5.8.2&hash=5786d5"]\ ],\ @@ -4606,17 +4606,17 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["ts-jest", [\ - ["npm:29.2.6", {\ - "packageLocation": "../../../../cache/others/berry/cache/ts-jest-npm-29.2.6-81e5c09384-10c0.zip/node_modules/ts-jest/",\ + ["npm:29.3.1", {\ + "packageLocation": "../../../../cache/others/berry/cache/ts-jest-npm-29.3.1-c9a9791a5c-10c0.zip/node_modules/ts-jest/",\ "packageDependencies": [\ - ["ts-jest", "npm:29.2.6"]\ + ["ts-jest", "npm:29.3.1"]\ ],\ "linkType": "SOFT"\ }],\ - ["virtual:0bdaf34b18f64a61d994ea5745297b16ca55696ece813438927b218d5900be7b3b1afb8777870498f0544991088e71be7d6609a8d92700ec537ab224121fd8a4#npm:29.2.6", {\ - "packageLocation": "./.yarn/__virtual__/ts-jest-virtual-9864a8688e/5/cache/others/berry/cache/ts-jest-npm-29.2.6-81e5c09384-10c0.zip/node_modules/ts-jest/",\ + ["virtual:0bdaf34b18f64a61d994ea5745297b16ca55696ece813438927b218d5900be7b3b1afb8777870498f0544991088e71be7d6609a8d92700ec537ab224121fd8a4#npm:29.3.1", {\ + "packageLocation": "./.yarn/__virtual__/ts-jest-virtual-bf26aadcff/5/cache/others/berry/cache/ts-jest-npm-29.3.1-c9a9791a5c-10c0.zip/node_modules/ts-jest/",\ "packageDependencies": [\ - ["ts-jest", "virtual:0bdaf34b18f64a61d994ea5745297b16ca55696ece813438927b218d5900be7b3b1afb8777870498f0544991088e71be7d6609a8d92700ec537ab224121fd8a4#npm:29.2.6"],\ + ["ts-jest", "virtual:0bdaf34b18f64a61d994ea5745297b16ca55696ece813438927b218d5900be7b3b1afb8777870498f0544991088e71be7d6609a8d92700ec537ab224121fd8a4#npm:29.3.1"],\ ["@babel/core", null],\ ["@jest/transform", null],\ ["@jest/types", null],\ @@ -4638,6 +4638,7 @@ const RAW_RUNTIME_STATE = ["lodash.memoize", "npm:4.1.2"],\ ["make-error", "npm:1.3.6"],\ ["semver", "npm:7.7.1"],\ + ["type-fest", "npm:4.38.0"],\ ["typescript", "patch:typescript@npm%3A5.8.2#optional!builtin::version=5.8.2&hash=5786d5"],\ ["yargs-parser", "npm:21.1.1"]\ ],\ @@ -4721,6 +4722,13 @@ const RAW_RUNTIME_STATE = ["type-fest", "npm:0.21.3"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:4.38.0", {\ + "packageLocation": "../../../../cache/others/berry/cache/type-fest-npm-4.38.0-09166cbe0a-10c0.zip/node_modules/type-fest/",\ + "packageDependencies": [\ + ["type-fest", "npm:4.38.0"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["typescript", [\ @@ -5367,7 +5375,7 @@ async function copyImpl(prelayout, postlayout, destinationFs, destination, sourc async function maybeLStat(baseFs, p) { try { return await baseFs.lstatPromise(p); - } catch (e) { + } catch { return null; } } @@ -5626,7 +5634,7 @@ class CustomStatWatcher extends events.EventEmitter { stat() { try { return this.fakeFs.statSync(this.path, { bigint: this.bigint }); - } catch (error) { + } catch { const statInstance = this.bigint ? new BigIntStatsEntry() : new StatEntry(); return clearStats(statInstance); } @@ -5952,7 +5960,7 @@ class FakeFS { let current = Buffer.alloc(0); try { current = await this.readFilePromise(p); - } catch (error) { + } catch { } if (Buffer.compare(current, content) === 0) return; @@ -5962,7 +5970,7 @@ class FakeFS { let current = ``; try { current = await this.readFilePromise(p, `utf8`); - } catch (error) { + } catch { } const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; if (current === normalizedContent) @@ -5980,7 +5988,7 @@ class FakeFS { let current = Buffer.alloc(0); try { current = this.readFileSync(p); - } catch (error) { + } catch { } if (Buffer.compare(current, content) === 0) return; @@ -5990,7 +5998,7 @@ class FakeFS { let current = ``; try { current = this.readFileSync(p, `utf8`); - } catch (error) { + } catch { } const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; if (current === normalizedContent) @@ -6030,13 +6038,13 @@ class FakeFS { let pid; try { [pid] = await this.readJsonPromise(lockPath); - } catch (error) { + } catch { return Date.now() - startTime < 500; } try { process.kill(pid, 0); return true; - } catch (error) { + } catch { return false; } }; @@ -6049,7 +6057,7 @@ class FakeFS { try { await this.unlinkPromise(lockPath); continue; - } catch (error2) { + } catch { } } if (Date.now() - startTime < 60 * 1e3) { @@ -6069,7 +6077,7 @@ class FakeFS { try { await this.closePromise(fd); await this.unlinkPromise(lockPath); - } catch (error) { + } catch { } } } @@ -7219,7 +7227,7 @@ class MountFS extends BasePortableFakeFS { let content; try { content = await sourceFs.readFilePromise(sourceP2); - } catch (error) { + } catch { throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${sourceP2}' -> '${destP2}'`), { code: `EINVAL` }); } await destFs.writeFilePromise(destP2, content); @@ -7251,7 +7259,7 @@ class MountFS extends BasePortableFakeFS { let content; try { content = sourceFs.readFileSync(sourceP2); - } catch (error) { + } catch { throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${sourceP2}' -> '${destP2}'`), { code: `EINVAL` }); } destFs.writeFileSync(destP2, content); @@ -8166,7 +8174,7 @@ function patchFs(patchedFs, fakeFs) { setupFn(patchedFs, `existsSync`, (p) => { try { return fakeFs.existsSync(p); - } catch (error) { + } catch { return false; } }); @@ -9527,7 +9535,7 @@ class ZipFS extends BasePortableFakeFS { let resolvedP; try { resolvedP = this.resolveFilename(`stat '${p}'`, p, void 0, false); - } catch (error) { + } catch { return false; } if (resolvedP === void 0) @@ -10568,7 +10576,7 @@ Require stack: } else { resolution = originalFindPath.call(require$$0.Module, request, [path], isMain); } - } catch (error) { + } catch { continue; } if (resolution) { @@ -11651,7 +11659,7 @@ function makeApi(runtimeState, opts) { try { candidates.push(unqualifiedPath); stat = opts.fakeFs.statSync(unqualifiedPath); - } catch (error) { + } catch { } if (stat && !stat.isDirectory()) return opts.fakeFs.realpathSync(unqualifiedPath); @@ -11659,7 +11667,7 @@ function makeApi(runtimeState, opts) { let pkgJson; try { pkgJson = JSON.parse(opts.fakeFs.readFileSync(ppath.join(unqualifiedPath, Filename.manifest), `utf8`)); - } catch (error) { + } catch { } let nextUnqualifiedPath; if (pkgJson && pkgJson.main) diff --git a/.pnp.loader.mjs b/.pnp.loader.mjs index e5a5429..b743e03 100644 --- a/.pnp.loader.mjs +++ b/.pnp.loader.mjs @@ -131,7 +131,7 @@ async function copyImpl(prelayout, postlayout, destinationFs, destination, sourc async function maybeLStat(baseFs, p) { try { return await baseFs.lstatPromise(p); - } catch (e) { + } catch { return null; } } @@ -482,7 +482,7 @@ class FakeFS { let current = Buffer.alloc(0); try { current = await this.readFilePromise(p); - } catch (error) { + } catch { } if (Buffer.compare(current, content) === 0) return; @@ -492,7 +492,7 @@ class FakeFS { let current = ``; try { current = await this.readFilePromise(p, `utf8`); - } catch (error) { + } catch { } const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; if (current === normalizedContent) @@ -510,7 +510,7 @@ class FakeFS { let current = Buffer.alloc(0); try { current = this.readFileSync(p); - } catch (error) { + } catch { } if (Buffer.compare(current, content) === 0) return; @@ -520,7 +520,7 @@ class FakeFS { let current = ``; try { current = this.readFileSync(p, `utf8`); - } catch (error) { + } catch { } const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; if (current === normalizedContent) @@ -560,13 +560,13 @@ class FakeFS { let pid; try { [pid] = await this.readJsonPromise(lockPath); - } catch (error) { + } catch { return Date.now() - startTime < 500; } try { process.kill(pid, 0); return true; - } catch (error) { + } catch { return false; } }; @@ -579,7 +579,7 @@ class FakeFS { try { await this.unlinkPromise(lockPath); continue; - } catch (error2) { + } catch { } } if (Date.now() - startTime < 60 * 1e3) { @@ -599,7 +599,7 @@ class FakeFS { try { await this.closePromise(fd); await this.unlinkPromise(lockPath); - } catch (error) { + } catch { } } } diff --git a/yarn.lock b/yarn.lock index 816e8b8..99f4624 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3704,8 +3704,8 @@ __metadata: linkType: hard "ts-jest@npm:^29.2.5": - version: 29.2.6 - resolution: "ts-jest@npm:29.2.6" + version: 29.3.1 + resolution: "ts-jest@npm:29.3.1" dependencies: bs-logger: "npm:^0.2.6" ejs: "npm:^3.1.10" @@ -3715,6 +3715,7 @@ __metadata: lodash.memoize: "npm:^4.1.2" make-error: "npm:^1.3.6" semver: "npm:^7.7.1" + type-fest: "npm:^4.38.0" yargs-parser: "npm:^21.1.1" peerDependencies: "@babel/core": ">=7.0.0-beta.0 <8" @@ -3736,7 +3737,7 @@ __metadata: optional: true bin: ts-jest: cli.js - checksum: 10c0/2a79bdb2631bbd004cd6ec171d62dc3681b86e7d1c20eece7f56e7c3df11a0f5a14f4831960b1ba8d1836787395c8f9dcbd084fd7f59246bbee8048feb93f892 + checksum: 10c0/5df9239223b974fc61bbe018d4e72bbdbea530c4b624fab0936a152438a58e97ce0d0cee2258d10e7ecebbf0ab699ab41d0a52fc5b5f13201cdac4419ab0fe04 languageName: node linkType: hard @@ -3792,6 +3793,13 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^4.38.0": + version: 4.38.0 + resolution: "type-fest@npm:4.38.0" + checksum: 10c0/db9990d682a08697cf8ae67ac3cdbca734c742c96615e8888401d7d54e376b390e6a5d3be25fe3b4b439e1bb88a7da461da678a614ece8caccd9c0a07dd2e5f4 + languageName: node + linkType: hard + "typescript@npm:^5.6.2": version: 5.8.2 resolution: "typescript@npm:5.8.2"