From 4a39186fea72301eb2e659cc351561250f4bac7c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 25 Aug 2024 14:24:53 +0000 Subject: [PATCH] chore(deps): update dependency @types/node to v18.19.45 --- .pnp.cjs | 68 ++++++++++++++++++++++++++++++++++++++++++++----- .pnp.loader.mjs | 52 ++++++++++++++++++++++++++++++++----- package.json | 2 +- yarn.lock | 10 ++++---- 4 files changed, 114 insertions(+), 18 deletions(-) diff --git a/.pnp.cjs b/.pnp.cjs index c4b8412..50c8f6b 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -1,5 +1,6 @@ #!/usr/bin/env node /* eslint-disable */ +// @ts-nocheck "use strict"; const RAW_RUNTIME_STATE = @@ -36,7 +37,7 @@ const RAW_RUNTIME_STATE = ["@testing-library/react-hooks", "virtual:2a4e9dace022057175a083496c0ac5b75c33c32a608467b972f1b2536df13ef41f37b30a5cc92f9313818befb060475002505ecbb105b86b1a7fbf67cdbfb676#npm:8.0.1"],\ ["@testing-library/user-event", "virtual:2a4e9dace022057175a083496c0ac5b75c33c32a608467b972f1b2536df13ef41f37b30a5cc92f9313818befb060475002505ecbb105b86b1a7fbf67cdbfb676#npm:14.5.2"],\ ["@types/jest", "npm:29.5.12"],\ - ["@types/node", "npm:18.19.34"],\ + ["@types/node", "npm:18.19.45"],\ ["@types/react", "npm:18.3.3"],\ ["@types/react-dom", "npm:18.3.0"],\ ["@typescript-eslint/eslint-plugin", "virtual:2a4e9dace022057175a083496c0ac5b75c33c32a608467b972f1b2536df13ef41f37b30a5cc92f9313818befb060475002505ecbb105b86b1a7fbf67cdbfb676#npm:5.62.0"],\ @@ -2431,10 +2432,10 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["@types/node", [\ - ["npm:18.19.34", {\ - "packageLocation": "../../../../cache/others/berry/cache/@types-node-npm-18.19.34-b0a29e4dd3-10c0.zip/node_modules/@types/node/",\ + ["npm:18.19.45", {\ + "packageLocation": "../../../../cache/others/berry/cache/@types-node-npm-18.19.45-e36a9d09d6-10c0.zip/node_modules/@types/node/",\ "packageDependencies": [\ - ["@types/node", "npm:18.19.34"],\ + ["@types/node", "npm:18.19.45"],\ ["undici-types", "npm:5.26.5"]\ ],\ "linkType": "HARD"\ @@ -10793,7 +10794,7 @@ const RAW_RUNTIME_STATE = ["@testing-library/react-hooks", "virtual:2a4e9dace022057175a083496c0ac5b75c33c32a608467b972f1b2536df13ef41f37b30a5cc92f9313818befb060475002505ecbb105b86b1a7fbf67cdbfb676#npm:8.0.1"],\ ["@testing-library/user-event", "virtual:2a4e9dace022057175a083496c0ac5b75c33c32a608467b972f1b2536df13ef41f37b30a5cc92f9313818befb060475002505ecbb105b86b1a7fbf67cdbfb676#npm:14.5.2"],\ ["@types/jest", "npm:29.5.12"],\ - ["@types/node", "npm:18.19.34"],\ + ["@types/node", "npm:18.19.45"],\ ["@types/react", "npm:18.3.3"],\ ["@types/react-dom", "npm:18.3.0"],\ ["@typescript-eslint/eslint-plugin", "virtual:2a4e9dace022057175a083496c0ac5b75c33c32a608467b972f1b2536df13ef41f37b30a5cc92f9313818befb060475002505ecbb105b86b1a7fbf67cdbfb676#npm:5.62.0"],\ @@ -12680,7 +12681,7 @@ const RAW_RUNTIME_STATE = "packageDependencies": [\ ["vite", "virtual:2a4e9dace022057175a083496c0ac5b75c33c32a608467b972f1b2536df13ef41f37b30a5cc92f9313818befb060475002505ecbb105b86b1a7fbf67cdbfb676#npm:3.2.10"],\ ["@types/less", null],\ - ["@types/node", "npm:18.19.34"],\ + ["@types/node", "npm:18.19.45"],\ ["@types/sass", null],\ ["@types/stylus", null],\ ["@types/sugarss", null],\ @@ -14783,6 +14784,12 @@ class ProxiedFS extends FakeFS { rmdirSync(p, opts) { return this.baseFs.rmdirSync(this.mapToBase(p), opts); } + async rmPromise(p, opts) { + return this.baseFs.rmPromise(this.mapToBase(p), opts); + } + rmSync(p, opts) { + return this.baseFs.rmSync(this.mapToBase(p), opts); + } async linkPromise(existingP, newP) { return this.baseFs.linkPromise(this.mapToBase(existingP), this.mapToBase(newP)); } @@ -15164,6 +15171,18 @@ class NodeFS extends BasePortableFakeFS { rmdirSync(p, opts) { return this.realFs.rmdirSync(npath.fromPortablePath(p), opts); } + async rmPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (opts) { + this.realFs.rm(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.rm(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + } + }); + } + rmSync(p, opts) { + return this.realFs.rmSync(npath.fromPortablePath(p), opts); + } async linkPromise(existingP, newP) { return await new Promise((resolve, reject) => { this.realFs.link(npath.fromPortablePath(existingP), npath.fromPortablePath(newP), this.makeCallback(resolve, reject)); @@ -15819,6 +15838,20 @@ class MountFS extends BasePortableFakeFS { return mountFs.rmdirSync(subPath, opts); }); } + async rmPromise(p, opts) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.rmPromise(p, opts); + }, async (mountFs, { subPath }) => { + return await mountFs.rmPromise(subPath, opts); + }); + } + rmSync(p, opts) { + return this.makeCallSync(p, () => { + return this.baseFs.rmSync(p, opts); + }, (mountFs, { subPath }) => { + return mountFs.rmSync(subPath, opts); + }); + } async linkPromise(existingP, newP) { return await this.makeCallPromise(newP, async () => { return await this.baseFs.linkPromise(existingP, newP); @@ -16457,6 +16490,7 @@ const SYNC_IMPLEMENTATIONS = /* @__PURE__ */ new Set([ `realpathSync`, `renameSync`, `rmdirSync`, + `rmSync`, `statSync`, `symlinkSync`, `truncateSync`, @@ -16492,6 +16526,7 @@ const ASYNC_IMPLEMENTATIONS = /* @__PURE__ */ new Set([ `readlinkPromise`, `renamePromise`, `rmdirPromise`, + `rmPromise`, `statPromise`, `symlinkPromise`, `truncatePromise`, @@ -18517,6 +18552,27 @@ class ZipFS extends BasePortableFakeFS { throw EINVAL(`rmdir '${p}'`); this.deleteEntry(p, index); } + async rmPromise(p, opts) { + return this.rmSync(p, opts); + } + rmSync(p, { recursive = false } = {}) { + if (this.readOnly) + throw EROFS(`rm '${p}'`); + if (recursive) { + this.removeSync(p); + return; + } + const resolvedP = this.resolveFilename(`rm '${p}'`, p); + const directoryListing = this.listings.get(resolvedP); + if (!directoryListing) + throw ENOTDIR(`rm '${p}'`); + if (directoryListing.size > 0) + throw ENOTEMPTY(`rm '${p}'`); + const index = this.entries.get(resolvedP); + if (typeof index === `undefined`) + throw EINVAL(`rm '${p}'`); + this.deleteEntry(p, index); + } hydrateDirectory(resolvedP) { const index = this.libzip.dir.add(this.zip, ppath.relative(PortablePath.root, resolvedP)); if (index === -1) diff --git a/.pnp.loader.mjs b/.pnp.loader.mjs index 81ae9a6..0d28791 100644 --- a/.pnp.loader.mjs +++ b/.pnp.loader.mjs @@ -1,9 +1,12 @@ +/* eslint-disable */ +// @ts-nocheck + import fs from 'fs'; import { URL as URL$1, fileURLToPath, pathToFileURL } from 'url'; import path from 'path'; import { createHash } from 'crypto'; import { EOL } from 'os'; -import moduleExports, { isBuiltin } from 'module'; +import esmModule, { createRequire, isBuiltin } from 'module'; import assert from 'assert'; const SAFE_TIME = 456789e3; @@ -830,6 +833,12 @@ class ProxiedFS extends FakeFS { rmdirSync(p, opts) { return this.baseFs.rmdirSync(this.mapToBase(p), opts); } + async rmPromise(p, opts) { + return this.baseFs.rmPromise(this.mapToBase(p), opts); + } + rmSync(p, opts) { + return this.baseFs.rmSync(this.mapToBase(p), opts); + } async linkPromise(existingP, newP) { return this.baseFs.linkPromise(this.mapToBase(existingP), this.mapToBase(newP)); } @@ -1211,6 +1220,18 @@ class NodeFS extends BasePortableFakeFS { rmdirSync(p, opts) { return this.realFs.rmdirSync(npath.fromPortablePath(p), opts); } + async rmPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (opts) { + this.realFs.rm(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.rm(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + } + }); + } + rmSync(p, opts) { + return this.realFs.rmSync(npath.fromPortablePath(p), opts); + } async linkPromise(existingP, newP) { return await new Promise((resolve, reject) => { this.realFs.link(npath.fromPortablePath(existingP), npath.fromPortablePath(newP), this.makeCallback(resolve, reject)); @@ -1403,6 +1424,8 @@ const URL = Number(process.versions.node.split('.', 1)[0]) < 20 ? URL$1 : global const [major, minor] = process.versions.node.split(`.`).map((value) => parseInt(value, 10)); const WATCH_MODE_MESSAGE_USES_ARRAYS = major > 19 || major === 19 && minor >= 2 || major === 18 && minor >= 13; const HAS_LAZY_LOADED_TRANSLATORS = major === 20 && minor < 6 || major === 19 && minor >= 3; +const SUPPORTS_IMPORT_ATTRIBUTES = major >= 21 || major === 20 && minor >= 10 || major === 18 && minor >= 20; +const SUPPORTS_IMPORT_ATTRIBUTES_ONLY = major >= 22; function readPackageScope(checkPath) { const rootSeparatorIndex = checkPath.indexOf(npath.sep); @@ -1493,10 +1516,21 @@ async function load$1(urlString, context, nextLoad) { const format = getFileFormat(filePath); if (!format) return nextLoad(urlString, context, nextLoad); - if (format === `json` && context.importAssertions?.type !== `json`) { - const err = new TypeError(`[ERR_IMPORT_ASSERTION_TYPE_MISSING]: Module "${urlString}" needs an import assertion of type "json"`); - err.code = `ERR_IMPORT_ASSERTION_TYPE_MISSING`; - throw err; + if (format === `json`) { + if (SUPPORTS_IMPORT_ATTRIBUTES_ONLY) { + if (context.importAttributes?.type !== `json`) { + const err = new TypeError(`[ERR_IMPORT_ATTRIBUTE_MISSING]: Module "${urlString}" needs an import attribute of "type: json"`); + err.code = `ERR_IMPORT_ATTRIBUTE_MISSING`; + throw err; + } + } else { + const type = `importAttributes` in context ? context.importAttributes?.type : context.importAssertions?.type; + if (type !== `json`) { + const err = new TypeError(`[ERR_IMPORT_ASSERTION_TYPE_MISSING]: Module "${urlString}" needs an import ${SUPPORTS_IMPORT_ATTRIBUTES ? `attribute` : `assertion`} of type "json"`); + err.code = `ERR_IMPORT_ASSERTION_TYPE_MISSING`; + throw err; + } + } } if (process.env.WATCH_REPORT_DEPENDENCIES && process.send) { const pathToSend = pathToFileURL( @@ -1941,6 +1975,13 @@ function packageImportsResolve({ name, base, conditions, readFileSyncFn }) { throwImportNotDefined(name, packageJSONUrl, base); } +let findPnpApi = esmModule.findPnpApi; +if (!findPnpApi) { + const require = createRequire(import.meta.url); + const pnpApi = require(`./.pnp.cjs`); + pnpApi.setup(); + findPnpApi = esmModule.findPnpApi; +} const pathRegExp = /^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/; const isRelativeRegexp = /^\.{0,2}\//; function tryReadFile(filePath) { @@ -1968,7 +2009,6 @@ async function resolvePrivateRequest(specifier, issuer, context, nextResolve) { } } async function resolve$1(originalSpecifier, context, nextResolve) { - const { findPnpApi } = moduleExports; if (!findPnpApi || isBuiltin(originalSpecifier)) return nextResolve(originalSpecifier, context, nextResolve); let specifier = originalSpecifier; diff --git a/package.json b/package.json index d91c1d6..ab84fc4 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@testing-library/react-hooks": "8.0.1", "@testing-library/user-event": "14.5.2", "@types/jest": "29.5.12", - "@types/node": "18.19.34", + "@types/node": "18.19.45", "@types/react": "18.3.3", "@types/react-dom": "18.3.0", "@typescript-eslint/eslint-plugin": "5.62.0", diff --git a/yarn.lock b/yarn.lock index dbfe1b4..13dcdb4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1908,12 +1908,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:18.19.34": - version: 18.19.34 - resolution: "@types/node@npm:18.19.34" +"@types/node@npm:18.19.45": + version: 18.19.45 + resolution: "@types/node@npm:18.19.45" dependencies: undici-types: "npm:~5.26.4" - checksum: 10c0/e985f50684def801801069e236165ee511f9195fc04ad4a2af7642d86aeaeaf7bfe34c147f894a48618a5c71c15b388ca91341a244792149543a712e38351988 + checksum: 10c0/79c324176411dcfa92f76b0ffc0673aa4bd8da82d003b44633e927c9493cdc46c35f04c0873b096b23b12bab090a6bbdea21242b3bbb2ea5dc1d9bf72adaa04f languageName: node linkType: hard @@ -8971,7 +8971,7 @@ __metadata: "@testing-library/react-hooks": "npm:8.0.1" "@testing-library/user-event": "npm:14.5.2" "@types/jest": "npm:29.5.12" - "@types/node": "npm:18.19.34" + "@types/node": "npm:18.19.45" "@types/react": "npm:18.3.3" "@types/react-dom": "npm:18.3.0" "@typescript-eslint/eslint-plugin": "npm:5.62.0"