From 7314857559ebff0e5b5fe19cfc6615c88e33389e Mon Sep 17 00:00:00 2001 From: Vladimir Date: Fri, 19 Jan 2024 18:55:03 +0100 Subject: [PATCH] fix(vite-node): provide import.meta.filename and dirname (#5011) --- package.json | 2 +- packages/vite-node/src/client.ts | 12 +- packages/vitest/package.json | 1 + .../vitest/src/runtime/external-executor.ts | 4 +- .../src/runtime/vm/commonjs-executor.ts | 4 + .../vitest/src/runtime/vm/esm-executor.ts | 11 +- pnpm-lock.yaml | 483 +++++------------- test/core/test/file-path.test.ts | 8 + 8 files changed, 176 insertions(+), 349 deletions(-) diff --git a/package.json b/package.json index f2b696067712..32ec511b52ce 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-json": "^6.0.1", "@rollup/plugin-node-resolve": "^15.2.3", - "@types/node": "^18.18.9", + "@types/node": "^20.11.5", "@types/ws": "^8.5.9", "@vitest/browser": "workspace:*", "@vitest/coverage-istanbul": "workspace:*", diff --git a/packages/vite-node/src/client.ts b/packages/vite-node/src/client.ts index 11bb58a5e765..6056c8395164 100644 --- a/packages/vite-node/src/client.ts +++ b/packages/vite-node/src/client.ts @@ -296,7 +296,14 @@ export class ViteNodeRunner { const modulePath = cleanUrl(moduleId) // disambiguate the `:/` on windows: see nodejs/node#31710 const href = pathToFileURL(modulePath).href - const meta = { url: href, env } + const __filename = fileURLToPath(href) + const __dirname = dirname(__filename) + const meta = { + url: href, + env, + filename: __filename, + dirname: __dirname, + } const exports = Object.create(null) Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module', @@ -344,7 +351,6 @@ export class ViteNodeRunner { }) Object.assign(mod, { code: transformed, exports }) - const __filename = fileURLToPath(href) const moduleProxy = { set exports(value) { exportAll(cjsExports, value) @@ -388,7 +394,7 @@ export class ViteNodeRunner { exports: cjsExports, module: moduleProxy, __filename, - __dirname: dirname(__filename), + __dirname, }) debugExecute(__filename) diff --git a/packages/vitest/package.json b/packages/vitest/package.json index aaf14b5d5f4f..4d9b21c66292 100644 --- a/packages/vitest/package.json +++ b/packages/vitest/package.json @@ -173,6 +173,7 @@ "@types/istanbul-reports": "^3.0.4", "@types/jsdom": "^21.1.6", "@types/micromatch": "^4.0.6", + "@types/node": "^20.11.5", "@types/prompts": "^2.4.9", "@types/sinonjs__fake-timers": "^8.1.5", "birpc": "0.2.14", diff --git a/packages/vitest/src/runtime/external-executor.ts b/packages/vitest/src/runtime/external-executor.ts index eb766ec6a750..7bb526005ae2 100644 --- a/packages/vitest/src/runtime/external-executor.ts +++ b/packages/vitest/src/runtime/external-executor.ts @@ -71,11 +71,11 @@ export class ExternalModulesExecutor { } public resolveModule = async (specifier: string, referencer: string) => { - const identifier = await this.resolve(specifier, referencer) + const identifier = this.resolve(specifier, referencer) return await this.createModule(identifier) } - public async resolve(specifier: string, parent: string) { + public resolve(specifier: string, parent: string) { for (const resolver of this.resolvers) { const id = resolver(specifier, parent) if (id) diff --git a/packages/vitest/src/runtime/vm/commonjs-executor.ts b/packages/vitest/src/runtime/vm/commonjs-executor.ts index 9e64bdc8279e..b958b9a235ec 100644 --- a/packages/vitest/src/runtime/vm/commonjs-executor.ts +++ b/packages/vitest/src/runtime/vm/commonjs-executor.ts @@ -76,6 +76,10 @@ export class CommonjsExecutor { return _require } + static register = () => { + throw new Error(`[vitest] "register" is not available when running in Vitest.`) + } + _compile(code: string, filename: string) { const cjsModule = Module.wrap(code) const script = new vm.Script(cjsModule, { diff --git a/packages/vitest/src/runtime/vm/esm-executor.ts b/packages/vitest/src/runtime/vm/esm-executor.ts index 0af0b2efd03e..4ca756164e80 100644 --- a/packages/vitest/src/runtime/vm/esm-executor.ts +++ b/packages/vitest/src/runtime/vm/esm-executor.ts @@ -1,6 +1,8 @@ /* eslint-disable antfu/no-cjs-exports */ import type vm from 'node:vm' +import { fileURLToPath } from 'node:url' +import { dirname } from 'node:path' import type { ExternalModulesExecutor } from '../external-executor' import type { VMModule } from './types' import { SourceTextModule, SyntheticModule } from './utils' @@ -62,8 +64,13 @@ export class EsmExecutor { importModuleDynamically: this.executor.importModuleDynamically, initializeImportMeta: (meta, mod) => { meta.url = mod.identifier - meta.resolve = (specifier: string, importer?: string) => { - return this.executor.resolve(specifier, importer ?? mod.identifier) + if (mod.identifier.startsWith('file:')) { + const filename = fileURLToPath(mod.identifier) + meta.filename = filename + meta.dirname = dirname(filename) + } + meta.resolve = (specifier: string, importer?: string | URL) => { + return this.executor.resolve(specifier, importer != null ? importer.toString() : mod.identifier) } }, }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a601c67f6ac2..9888a317f4b2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,8 +36,8 @@ importers: specifier: ^15.2.3 version: 15.2.3(rollup@4.4.0) '@types/node': - specifier: ^18.18.9 - version: 18.18.9 + specifier: ^20.11.5 + version: 20.11.5 '@types/ws': specifier: ^8.5.9 version: 8.5.9 @@ -103,7 +103,7 @@ importers: version: 5.2.2 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:packages/vitest @@ -149,13 +149,13 @@ importers: version: 0.25.2(rollup@2.79.1)(vue@3.3.8) vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vite-plugin-pwa: specifier: ^0.16.7 version: 0.16.7(vite@5.0.2)(workbox-build@7.0.0)(workbox-window@7.0.0) vitepress: specifier: ^1.0.0-rc.35 - version: 1.0.0-rc.35(@types/node@18.18.9)(postcss@8.4.32)(search-insights@2.9.0)(typescript@5.2.2) + version: 1.0.0-rc.35(@types/node@20.11.5)(postcss@8.4.32)(search-insights@2.9.0)(typescript@5.2.2) workbox-window: specifier: ^7.0.0 version: 7.0.0 @@ -167,7 +167,7 @@ importers: version: link:../../packages/ui vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -191,7 +191,7 @@ importers: version: 3.9.0 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -210,7 +210,7 @@ importers: version: link:../../packages/ui vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -225,7 +225,7 @@ importers: version: 4.5.1(jest@27.5.1) vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -247,7 +247,7 @@ importers: version: 22.1.0 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -277,7 +277,7 @@ importers: version: 5.32.0 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -305,7 +305,7 @@ importers: version: 11.6.16 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -363,7 +363,7 @@ importers: version: 1.41.0 vite: specifier: ^5.0.0 - version: 5.0.2 + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -403,7 +403,7 @@ importers: version: 5.2.2 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -437,7 +437,7 @@ importers: version: 17.0.2(react@17.0.2) vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -501,7 +501,7 @@ importers: version: 22.1.0 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -589,7 +589,7 @@ importers: version: 5.2.2 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -635,7 +635,7 @@ importers: version: 5.2.2 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -678,7 +678,7 @@ importers: version: 2.0.0(typescript@5.2.2) vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -696,7 +696,7 @@ importers: version: 22.1.0 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vite-plugin-ruby: specifier: ^3.2.2 version: 3.2.2(vite@5.0.2) @@ -724,7 +724,7 @@ importers: version: 22.1.0 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vite-plugin-solid: specifier: ^2.7.2 version: 2.7.2(solid-js@1.8.3)(vite@5.0.2) @@ -751,7 +751,7 @@ importers: version: 4.1.1 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -784,7 +784,7 @@ importers: version: 5.2.2 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -812,7 +812,7 @@ importers: version: 0.25.2(rollup@4.4.0)(vue@3.3.8) vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -834,7 +834,7 @@ importers: version: 22.1.0 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -855,7 +855,7 @@ importers: version: 22.1.0 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -907,7 +907,7 @@ importers: version: link:../vitest webdriverio: specifier: ^8.22.1 - version: 8.22.1 + version: 8.22.1(typescript@5.2.2) packages/coverage-istanbul: dependencies: @@ -1197,7 +1197,7 @@ importers: version: 0.25.2(rollup@4.4.0)(vue@3.3.8) vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vite-plugin-pages: specifier: ^0.31.0 version: 0.31.0(vite@5.0.2) @@ -1249,7 +1249,7 @@ importers: version: 1.0.0 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) devDependencies: '@jridgewell/trace-mapping': specifier: ^0.3.21 @@ -1260,9 +1260,6 @@ importers: packages/vitest: dependencies: - '@types/node': - specifier: ^18.0.0 || >=20.0.0 - version: 18.16.19 '@vitest/browser': specifier: ^1.0.0 version: link:../browser @@ -1325,7 +1322,7 @@ importers: version: 0.8.2 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.16.19) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vite-node: specifier: workspace:* version: link:../vite-node @@ -1360,6 +1357,9 @@ importers: '@types/micromatch': specifier: ^4.0.6 version: 4.0.6 + '@types/node': + specifier: ^20.11.5 + version: 20.11.5 '@types/prompts': specifier: ^2.4.9 version: 2.4.9 @@ -1460,7 +1460,7 @@ importers: version: link:../../packages/browser vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -1550,7 +1550,7 @@ importers: devDependencies: vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -1562,7 +1562,7 @@ importers: version: 8.0.1 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -1637,7 +1637,7 @@ importers: version: 0.3.3 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -1721,7 +1721,7 @@ importers: version: 12.10.3 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -1764,7 +1764,7 @@ importers: devDependencies: vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -1871,7 +1871,7 @@ importers: version: 7.1.1 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -1922,7 +1922,7 @@ importers: version: 7.0.1 vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vite-node: specifier: workspace:* version: link:../../packages/vite-node @@ -2013,7 +2013,7 @@ importers: version: link:../../packages/browser vite: specifier: ^5.0.0 - version: 5.0.2(@types/node@18.18.9)(less@4.1.3) + version: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitest: specifier: workspace:* version: link:../../packages/vitest @@ -5845,7 +5845,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 chalk: 4.1.2 jest-message-util: 27.5.1 jest-util: 27.5.1 @@ -5866,7 +5866,7 @@ packages: '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.8.1 @@ -5903,7 +5903,7 @@ packages: dependencies: '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 jest-mock: 27.5.1 dev: true @@ -5920,7 +5920,7 @@ packages: dependencies: '@jest/types': 27.5.1 '@sinonjs/fake-timers': 8.1.0 - '@types/node': 18.18.9 + '@types/node': 20.11.5 jest-message-util: 27.5.1 jest-mock: 27.5.1 jest-util: 27.5.1 @@ -5949,7 +5949,7 @@ packages: '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -6069,7 +6069,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 18.18.9 + '@types/node': 20.11.5 '@types/yargs': 15.0.14 chalk: 4.1.2 dev: true @@ -6080,7 +6080,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 18.18.9 + '@types/node': 20.11.5 '@types/yargs': 16.0.7 chalk: 4.1.2 dev: true @@ -6092,7 +6092,7 @@ packages: '@jest/schemas': 29.4.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 18.18.9 + '@types/node': 20.11.5 '@types/yargs': 17.0.12 chalk: 4.1.2 dev: true @@ -6108,7 +6108,7 @@ packages: magic-string: 0.26.7 react-docgen-typescript: 2.2.2(typescript@5.2.2) typescript: 5.2.2 - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) dev: true /@jridgewell/gen-mapping@0.3.2: @@ -6279,7 +6279,7 @@ packages: htmlparser2: 9.0.0 resolve: 1.22.8 resolve.exports: 2.0.2 - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) dev: true /@mdx-js/mdx@1.6.22: @@ -6935,7 +6935,7 @@ packages: debug: 4.3.4(supports-color@8.1.1) kolorist: 1.8.0 resolve: 1.22.8 - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) transitivePeerDependencies: - preact - supports-color @@ -6969,28 +6969,7 @@ packages: '@prefresh/utils': 1.2.0 '@rollup/pluginutils': 4.2.1 preact: 10.15.1 - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) - transitivePeerDependencies: - - supports-color - dev: true - - /@puppeteer/browsers@1.4.6: - resolution: {integrity: sha512-x4BEjr2SjOPowNeiguzjozQbsc6h437ovD/wu+JpaenxVLm3jkgzHY2xOslMTp50HoTvQreMjiexiGQw1sqZlQ==} - engines: {node: '>=16.3.0'} - hasBin: true - peerDependencies: - typescript: '>= 4.7.4' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - debug: 4.3.4 - extract-zip: 2.0.1 - progress: 2.0.3 - proxy-agent: 6.3.0 - tar-fs: 3.0.4 - unbzip2-stream: 1.4.3 - yargs: 17.7.1 + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) transitivePeerDependencies: - supports-color dev: true @@ -7022,8 +7001,8 @@ packages: engines: {node: '>=16.3.0'} hasBin: true dependencies: - debug: 4.3.4 - extract-zip: 2.0.1 + debug: 4.3.4(supports-color@8.1.1) + extract-zip: 2.0.1(supports-color@8.1.1) progress: 2.0.3 proxy-agent: 6.3.0 tar-fs: 3.0.4 @@ -7764,7 +7743,7 @@ packages: react-docgen: 6.0.0-alpha.3 slash: 3.0.0 sveltedoc-parser: 4.2.1 - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) transitivePeerDependencies: - '@babel/core' - react @@ -8849,7 +8828,7 @@ packages: svelte: 3.59.1 tiny-glob: 0.2.9 undici: 5.22.1 - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) transitivePeerDependencies: - supports-color dev: true @@ -8865,7 +8844,7 @@ packages: '@sveltejs/vite-plugin-svelte': 2.4.6(svelte@3.59.1)(vite@5.0.2) debug: 4.3.4(supports-color@8.1.1) svelte: 3.59.1 - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) transitivePeerDependencies: - supports-color dev: true @@ -8881,7 +8860,7 @@ packages: '@sveltejs/vite-plugin-svelte': 3.0.1(svelte@4.1.1)(vite@5.0.2) debug: 4.3.4(supports-color@8.1.1) svelte: 4.1.1 - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) transitivePeerDependencies: - supports-color dev: true @@ -8900,7 +8879,7 @@ packages: magic-string: 0.30.5 svelte: 3.59.1 svelte-hmr: 0.15.3(svelte@3.59.1) - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitefu: 0.2.4(vite@5.0.2) transitivePeerDependencies: - supports-color @@ -8920,7 +8899,7 @@ packages: magic-string: 0.30.5 svelte: 4.1.1 svelte-hmr: 0.15.3(svelte@4.1.1) - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitefu: 0.2.5(vite@5.0.2) transitivePeerDependencies: - supports-color @@ -9203,7 +9182,7 @@ packages: resolution: {integrity: sha512-N7UDG0/xiPQa2D/XrVJXjkWbpqHCd2sBaB32ggRF2l83RhPfamgKGF8gwwqyksS95qUS5ZYF9aF+lLPRlwI2UA==} dependencies: '@types/connect': 3.4.37 - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/braces@3.0.1: @@ -9224,7 +9203,7 @@ packages: /@types/connect@3.4.37: resolution: {integrity: sha512-zBUSRqkfZ59OcwXon4HVxhx5oWCJmc0OtBTK05M+p0dYjgN6iTwIL2T/WbsQZrEsdnwaF9cWQ+azOnpPvIqY3Q==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/cookie@0.4.1: @@ -9291,7 +9270,7 @@ packages: /@types/express-serve-static-core@4.17.39: resolution: {integrity: sha512-BiEUfAiGCOllomsRAZOiMFP7LAnrifHpt56pc4Z7l9K6ACyN06Ns1JLMBxwkfLOjJRlSf06NwWsT7yzfpaVpyQ==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 '@types/qs': 6.9.9 '@types/range-parser': 1.2.6 '@types/send': 0.17.3 @@ -9313,39 +9292,39 @@ packages: /@types/fs-extra@8.1.3: resolution: {integrity: sha512-7IdV01N0u/CaVO0fuY1YmEg14HQN3+EW8mpNgg6NEfxEl/lzCa5OxlBu3iFsCAdamnYOcTQ7oEi43Xc/67Rgzw==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/fs-extra@9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/glob@7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/glob@8.0.0: resolution: {integrity: sha512-l6NQsDDyQUVeoTynNpC9uRvCUint/gSUXQA2euwmTuWGvPY5LSDUu6tkCtJB2SvGQlJQzLaKqcGZP4//7EDveA==} dependencies: '@types/minimatch': 5.1.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/graceful-fs@4.1.5: resolution: {integrity: sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/graceful-fs@4.1.8: resolution: {integrity: sha512-NhRH7YzWq8WiNKVavKPBmtLYZHxNY19Hh+az28O/phfp68CF45pMFud+ZzJ8ewnxnC5smIdF3dqFeiSUQ5I+pw==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/hast@2.3.4: @@ -9421,7 +9400,7 @@ packages: /@types/jsdom@21.1.6: resolution: {integrity: sha512-/7kkMsC+/kMs7gAYmmBR9P0vGTnOoLhQhyhQJSlXGI5bzTHp6xdo0TtKWQAsz6pmSAeVqKSbqeyP6hytqr9FDw==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 '@types/tough-cookie': 4.0.2 parse5: 7.1.2 dev: true @@ -9488,14 +9467,14 @@ packages: /@types/node-fetch@2.6.2: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 form-data: 3.0.1 dev: true /@types/node-fetch@2.6.7: resolution: {integrity: sha512-lX17GZVpJ/fuCjguZ5b3TjEbSENxmEk1B2z02yoXSK9WMEWRivhdSY73wWMn6bpcCDAOh6qAdktpKHIlkDk2lg==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 form-data: 4.0.0 dev: true @@ -9503,27 +9482,17 @@ packages: resolution: {integrity: sha512-aFcUkv7EddxxOa/9f74DINReQ/celqH8DiB3fRYgVDM2Xm5QJL8sl80QKuAnGvwAsMn+H3IFA6WCrQh1CY7m1A==} dev: true - /@types/node@18.16.19: - resolution: {integrity: sha512-IXl7o+R9iti9eBW4Wg2hx1xQDig183jj7YLn8F7udNceyfkbn1ZxmzZXuak20gR40D7pIkIY1kYGx5VIGbaHKA==} - dev: false - /@types/node@18.18.9: resolution: {integrity: sha512-0f5klcuImLnG4Qreu9hPj/rEfFq6YRc5n2mAjSsH+ec/mJL+3voBH0+8T7o8RpFjH7ovc+TRsL/c7OYIQsPTfQ==} requiresBuild: true dependencies: undici-types: 5.26.5 - - /@types/node@20.10.5: - resolution: {integrity: sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==} - dependencies: - undici-types: 5.26.5 dev: true - /@types/node@20.9.4: - resolution: {integrity: sha512-wmyg8HUhcn6ACjsn8oKYjkN/zUzQeNtMy44weTJSM6p4MMzEOuKbA3OjJ267uPCOW7Xex9dyrNTful8XTQYoDA==} + /@types/node@20.11.5: + resolution: {integrity: sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==} dependencies: undici-types: 5.26.5 - dev: true /@types/node@20.9.5: resolution: {integrity: sha512-Uq2xbNq0chGg+/WQEU0LJTSs/1nKxz6u1iemLcGomkSnKokbW1fbLqc3HOqCf2JP7KjlL4QkS7oZZTrOQHQYgQ==} @@ -9565,7 +9534,7 @@ packages: /@types/prompts@2.4.9: resolution: {integrity: sha512-qTxFi6Buiu8+50/+3DGIWLHM6QuWsEKugJnnP6iv2Mc4ncxE4A/OJkjuVOA+5X0X1S/nq5VJRa8Lu+nwcvbrKA==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 kleur: 3.0.3 dev: true @@ -9675,7 +9644,7 @@ packages: /@types/resolve@1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/resolve@1.20.2: @@ -9693,7 +9662,7 @@ packages: resolution: {integrity: sha512-/7fKxvKUoETxjFUsuFlPB9YndePpxxRAOfGC/yJdc9kTjTeP5kRCTzfnE8kPUKCeyiyIZu0YQ76s50hCedI1ug==} dependencies: '@types/mime': 1.3.4 - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/serve-static@1.15.4: @@ -9701,13 +9670,13 @@ packages: dependencies: '@types/http-errors': 2.0.3 '@types/mime': 3.0.3 - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/set-cookie-parser@2.4.2: resolution: {integrity: sha512-fBZgytwhYAUkj/jC/FAV4RQ5EerRup1YQsXQCh8rZfiHkc4UahC192oH0smGwsXol3cL3A5oETuAHeQHmhXM4w==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/sinonjs__fake-timers@8.1.1: @@ -9757,7 +9726,7 @@ packages: /@types/through@0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /@types/tough-cookie@4.0.2: @@ -9795,7 +9764,7 @@ packages: /@types/webpack-sources@3.2.0: resolution: {integrity: sha512-Ft7YH3lEVRQ6ls8k4Ff1oB4jN6oy/XmU6tQISKdhfh+1mR+viZFphS6WL0IrtDOzvefmJg5a0s7ZQoRXwqTEFg==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 '@types/source-list-map': 0.1.2 source-map: 0.7.4 dev: true @@ -9803,7 +9772,7 @@ packages: /@types/webpack@4.41.32: resolution: {integrity: sha512-cb+0ioil/7oz5//7tZUSwbrSAN/NWHrQylz5cW8G0dWTcF/g+/dSdMlKVZspBYuMAN1+WnwHrkxiRrLcwd0Heg==} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 '@types/tapable': 1.0.8 '@types/uglify-js': 3.17.0 '@types/webpack-sources': 3.2.0 @@ -9818,7 +9787,7 @@ packages: /@types/ws@8.5.9: resolution: {integrity: sha512-jbdrY0a8lxfdTp/+r7Z4CkycbOFN8WX+IOchLJr3juT/xzbJ8URyTVSJ/hvNdadTgM1mnedb47n+Y31GsFnQlg==} dependencies: - '@types/node': 20.9.4 + '@types/node': 20.11.5 dev: true /@types/yargs-parser@21.0.0: @@ -9847,19 +9816,11 @@ packages: '@types/yargs-parser': 21.0.0 dev: true - /@types/yauzl@2.10.2: - resolution: {integrity: sha512-Km7XAtUIduROw7QPgvcft0lIupeG8a8rdKL8RiSyKvlE7dYY31fEn41HVuQsRFDuROA8tA4K2UVL+WdfFmErBA==} - requiresBuild: true - dependencies: - '@types/node': 18.18.9 - dev: true - optional: true - /@types/yauzl@2.10.3: resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} requiresBuild: true dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true optional: true @@ -10009,7 +9970,7 @@ packages: '@unocss/core': 0.57.4 '@unocss/reset': 0.57.4 '@unocss/vite': 0.57.4(rollup@2.79.1)(vite@5.0.2) - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) transitivePeerDependencies: - rollup dev: true @@ -10025,7 +9986,7 @@ packages: '@unocss/core': 0.57.4 '@unocss/reset': 0.57.4 '@unocss/vite': 0.57.4(rollup@4.4.0)(vite@5.0.2) - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) transitivePeerDependencies: - rollup dev: true @@ -10240,7 +10201,7 @@ packages: chokidar: 3.5.3 fast-glob: 3.3.2 magic-string: 0.30.5 - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) transitivePeerDependencies: - rollup dev: true @@ -10260,7 +10221,7 @@ packages: chokidar: 3.5.3 fast-glob: 3.3.2 magic-string: 0.30.5 - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) transitivePeerDependencies: - rollup dev: true @@ -10292,7 +10253,7 @@ packages: peerDependencies: vite: ^5.0.0 dependencies: - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) dev: true /@vitejs/plugin-react@1.3.2: @@ -10322,7 +10283,7 @@ packages: '@babel/plugin-transform-react-jsx-source': 7.22.5(@babel/core@7.23.3) '@types/babel__core': 7.20.3 react-refresh: 0.14.0 - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) transitivePeerDependencies: - supports-color dev: true @@ -10353,7 +10314,7 @@ packages: '@babel/core': 7.23.3 '@babel/plugin-transform-typescript': 7.22.15(@babel/core@7.23.3) '@vue/babel-plugin-jsx': 1.1.5(@babel/core@7.23.3) - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) vue: 3.3.8(typescript@5.2.2) transitivePeerDependencies: - supports-color @@ -10369,7 +10330,7 @@ packages: '@babel/core': 7.23.3 '@babel/plugin-transform-typescript': 7.23.4(@babel/core@7.23.3) '@vue/babel-plugin-jsx': 1.1.5(@babel/core@7.23.3) - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) vue: 3.3.8(typescript@5.2.2) transitivePeerDependencies: - supports-color @@ -10382,7 +10343,7 @@ packages: vite: ^5.0.0 vue: ^3.2.25 dependencies: - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) vue: 3.3.8(typescript@5.2.2) dev: true @@ -10393,7 +10354,7 @@ packages: vite: ^5.0.0 vue: ^3.2.25 dependencies: - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) vue: 3.3.8(typescript@5.2.2) dev: true @@ -10404,7 +10365,7 @@ packages: vite: ^5.0.0 vue: ^3.2.25 dependencies: - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) vue: 3.4.5(typescript@5.2.2) dev: true @@ -10887,28 +10848,28 @@ packages: resolution: {integrity: sha512-VZ1WFHTNKjR8Ga97TtV2SZM6fvRjWbYI2i/f4pJB4PtusorKvONAMJf2LQcUBIyzbVobqr7KSrcjmSwRolI+yw==} engines: {node: ^16.13 || >=18} dependencies: - '@types/node': 20.10.5 + '@types/node': 20.11.5 dev: true /@wdio/repl@8.23.1: resolution: {integrity: sha512-u6zG2cgBm67V5/WlQzadWqLGXs3moH8MOsgoljULQncelSBBZGZ5DyLB4p7jKcUAsKtMjgmFQmIvpQoqmyvdfg==} engines: {node: ^16.13 || >=18} dependencies: - '@types/node': 20.10.5 + '@types/node': 20.11.5 dev: true /@wdio/types@8.21.0: resolution: {integrity: sha512-mZFOipmu541z0BXBW7mBAUjM4zZWhNnP/w321OSYx082Jy4d0UHMFXYWaOC98DIMBPahJu/yLX2WH5iCrazKSA==} engines: {node: ^16.13 || >=18} dependencies: - '@types/node': 20.10.5 + '@types/node': 20.11.5 dev: true /@wdio/types@8.24.0: resolution: {integrity: sha512-FXbJnQCS1b39RKqBlW9HTNEP4vukxjFc+GiwvPS+XPtY+3Vn7eOyBv3X3CiH1K7C+tzelqlio/HgP68pV5cXsQ==} engines: {node: ^16.13 || >=18} dependencies: - '@types/node': 20.10.5 + '@types/node': 20.11.5 dev: true /@wdio/utils@8.22.0: @@ -11467,7 +11428,7 @@ packages: resolution: {integrity: sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==} engines: {node: '>= 14'} dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color dev: true @@ -14105,18 +14066,6 @@ packages: ms: 2.1.3 supports-color: 8.1.1 - /debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - dev: true - /debug@4.3.4(supports-color@8.1.1): resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -16111,20 +16060,6 @@ packages: parse-code-context: 1.0.0 dev: true - /extract-zip@2.0.1: - resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==} - engines: {node: '>= 10.17.0'} - hasBin: true - dependencies: - debug: 4.3.4 - get-stream: 5.2.0 - yauzl: 2.10.0 - optionalDependencies: - '@types/yauzl': 2.10.3 - transitivePeerDependencies: - - supports-color - dev: true - /extract-zip@2.0.1(supports-color@8.1.1): resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==} engines: {node: '>= 10.17.0'} @@ -16134,7 +16069,7 @@ packages: get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: - '@types/yauzl': 2.10.2 + '@types/yauzl': 2.10.3 transitivePeerDependencies: - supports-color dev: true @@ -16940,7 +16875,7 @@ packages: dependencies: basic-ftp: 5.0.3 data-uri-to-buffer: 5.0.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) fs-extra: 8.1.0 transitivePeerDependencies: - supports-color @@ -17708,7 +17643,7 @@ packages: engines: {node: '>= 14'} dependencies: agent-base: 7.1.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color dev: true @@ -17763,7 +17698,7 @@ packages: engines: {node: '>= 14'} dependencies: agent-base: 7.1.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color dev: true @@ -18631,7 +18566,7 @@ packages: '@jest/environment': 27.5.1 '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 chalk: 4.1.2 co: 4.6.0 dedent: 0.7.0 @@ -18766,7 +18701,7 @@ packages: '@jest/environment': 27.5.1 '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 jest-mock: 27.5.1 jest-util: 27.5.1 jsdom: 16.7.0 @@ -18784,7 +18719,7 @@ packages: '@jest/environment': 27.5.1 '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 jest-mock: 27.5.1 jest-util: 27.5.1 dev: true @@ -18805,7 +18740,7 @@ packages: dependencies: '@jest/types': 26.6.2 '@types/graceful-fs': 4.1.5 - '@types/node': 18.18.9 + '@types/node': 20.11.5 anymatch: 3.1.3 fb-watchman: 2.0.1 graceful-fs: 4.2.11 @@ -18828,7 +18763,7 @@ packages: dependencies: '@jest/types': 27.5.1 '@types/graceful-fs': 4.1.8 - '@types/node': 18.18.9 + '@types/node': 20.11.5 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -18868,7 +18803,7 @@ packages: '@jest/source-map': 27.5.1 '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 chalk: 4.1.2 co: 4.6.0 expect: 27.5.1 @@ -18948,7 +18883,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 dev: true /jest-pnp-resolver@1.2.3(jest-resolve@27.5.1): @@ -19009,7 +18944,7 @@ packages: '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 chalk: 4.1.2 emittery: 0.8.1 graceful-fs: 4.2.11 @@ -19066,7 +19001,7 @@ packages: resolution: {integrity: sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g==} engines: {node: '>= 10.14.2'} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 graceful-fs: 4.2.11 dev: true @@ -19074,7 +19009,7 @@ packages: resolution: {integrity: sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 graceful-fs: 4.2.11 dev: true @@ -19113,7 +19048,7 @@ packages: engines: {node: '>= 10.14.2'} dependencies: '@jest/types': 26.6.2 - '@types/node': 18.18.9 + '@types/node': 20.11.5 chalk: 4.1.2 graceful-fs: 4.2.11 is-ci: 2.0.0 @@ -19125,7 +19060,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -19137,7 +19072,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.0.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -19162,7 +19097,7 @@ packages: dependencies: '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.18.9 + '@types/node': 20.11.5 ansi-escapes: 4.3.2 chalk: 4.1.2 jest-util: 27.5.1 @@ -19173,7 +19108,7 @@ packages: resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 merge-stream: 2.0.0 supports-color: 7.2.0 dev: true @@ -19182,7 +19117,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true @@ -21464,7 +21399,7 @@ packages: dependencies: '@tootallnate/quickjs-emscripten': 0.23.0 agent-base: 7.1.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) get-uri: 6.0.1 http-proxy-agent: 7.0.0 https-proxy-agent: 7.0.2 @@ -22212,7 +22147,7 @@ packages: engines: {node: '>= 14'} dependencies: agent-base: 7.1.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) http-proxy-agent: 7.0.0 https-proxy-agent: 7.0.2 lru-cache: 7.18.3 @@ -22290,28 +22225,6 @@ packages: engines: {node: '>=6'} dev: true - /puppeteer-core@20.9.0: - resolution: {integrity: sha512-H9fYZQzMTRrkboEfPmf7m3CLDN6JvbxXA3qTtS+dFt27tR+CsFHzPsT6pzp6lYL6bJbAPaR0HaPO6uSi+F94Pg==} - engines: {node: '>=16.3.0'} - peerDependencies: - typescript: '>= 4.7.4' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@puppeteer/browsers': 1.4.6 - chromium-bidi: 0.4.16(devtools-protocol@0.0.1147663) - cross-fetch: 4.0.0 - debug: 4.3.4 - devtools-protocol: 0.0.1147663 - ws: 8.13.0 - transitivePeerDependencies: - - bufferutil - - encoding - - supports-color - - utf-8-validate - dev: true - /puppeteer-core@20.9.0(typescript@5.2.2): resolution: {integrity: sha512-H9fYZQzMTRrkboEfPmf7m3CLDN6JvbxXA3qTtS+dFt27tR+CsFHzPsT6pzp6lYL6bJbAPaR0HaPO6uSi+F94Pg==} engines: {node: '>=16.3.0'} @@ -24024,7 +23937,7 @@ packages: engines: {node: '>= 14'} dependencies: agent-base: 7.1.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) socks: 2.7.1 transitivePeerDependencies: - supports-color @@ -25800,7 +25713,7 @@ packages: '@unocss/transformer-directives': 0.57.4 '@unocss/transformer-variant-group': 0.57.4 '@unocss/vite': 0.57.4(rollup@2.79.1)(vite@5.0.2) - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) transitivePeerDependencies: - postcss - rollup @@ -25839,7 +25752,7 @@ packages: '@unocss/transformer-directives': 0.57.4 '@unocss/transformer-variant-group': 0.57.4 '@unocss/vite': 0.57.4(rollup@4.4.0)(vite@5.0.2) - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) transitivePeerDependencies: - postcss - rollup @@ -26219,7 +26132,7 @@ packages: json5: 2.2.3 local-pkg: 0.4.3 picocolors: 1.0.0 - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) yaml: 2.3.1 transitivePeerDependencies: - supports-color @@ -26236,7 +26149,7 @@ packages: debug: 4.3.4(supports-color@8.1.1) fast-glob: 3.3.2 pretty-bytes: 6.1.1 - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) workbox-build: 7.0.0 workbox-window: 7.0.0 transitivePeerDependencies: @@ -26250,7 +26163,7 @@ packages: dependencies: debug: 4.3.4(supports-color@8.1.1) fast-glob: 3.3.2 - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) transitivePeerDependencies: - supports-color dev: true @@ -26268,48 +26181,13 @@ packages: merge-anything: 5.1.7 solid-js: 1.8.3 solid-refresh: 0.5.3(solid-js@1.8.3) - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) vitefu: 0.2.4(vite@5.0.2) transitivePeerDependencies: - supports-color dev: true - /vite@5.0.2: - resolution: {integrity: sha512-6CCq1CAJCNM1ya2ZZA7+jS2KgnhbzvxakmlIjN24cF/PXhRMzpM/z8QgsVJA/Dm5fWUWnVEsmtBoMhmerPxT0g==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - peerDependencies: - '@types/node': ^18.0.0 || >=20.0.0 - less: '*' - lightningcss: ^1.21.0 - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - esbuild: 0.19.5 - postcss: 8.4.31 - rollup: 4.4.0 - optionalDependencies: - fsevents: 2.3.3 - dev: true - - /vite@5.0.2(@types/node@18.16.19): + /vite@5.0.2(@types/node@20.11.5)(less@4.1.3): resolution: {integrity: sha512-6CCq1CAJCNM1ya2ZZA7+jS2KgnhbzvxakmlIjN24cF/PXhRMzpM/z8QgsVJA/Dm5fWUWnVEsmtBoMhmerPxT0g==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -26337,43 +26215,7 @@ packages: terser: optional: true dependencies: - '@types/node': 18.16.19 - esbuild: 0.19.5 - postcss: 8.4.31 - rollup: 4.4.0 - optionalDependencies: - fsevents: 2.3.3 - dev: false - - /vite@5.0.2(@types/node@18.18.9)(less@4.1.3): - resolution: {integrity: sha512-6CCq1CAJCNM1ya2ZZA7+jS2KgnhbzvxakmlIjN24cF/PXhRMzpM/z8QgsVJA/Dm5fWUWnVEsmtBoMhmerPxT0g==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - peerDependencies: - '@types/node': ^18.0.0 || >=20.0.0 - less: '*' - lightningcss: ^1.21.0 - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - '@types/node': 18.18.9 + '@types/node': 20.11.5 esbuild: 0.19.5 less: 4.1.3 postcss: 8.4.31 @@ -26425,7 +26267,7 @@ packages: vite: optional: true dependencies: - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) dev: true /vitefu@0.2.5(vite@5.0.2): @@ -26436,10 +26278,10 @@ packages: vite: optional: true dependencies: - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) dev: true - /vitepress@1.0.0-rc.35(@types/node@18.18.9)(postcss@8.4.32)(search-insights@2.9.0)(typescript@5.2.2): + /vitepress@1.0.0-rc.35(@types/node@20.11.5)(postcss@8.4.32)(search-insights@2.9.0)(typescript@5.2.2): resolution: {integrity: sha512-+2VnFwtYIiKWWAnMjWg7ik0PfsUdrNoZIZKeu5dbJtrkzKO/mTvlA3owiT5VBKJsZAgI17B5UV37aYfUvGrN6g==} hasBin: true peerDependencies: @@ -26465,7 +26307,7 @@ packages: shikiji: 0.9.17 shikiji-core: 0.9.17 shikiji-transformers: 0.9.17 - vite: 5.0.2(@types/node@18.18.9)(less@4.1.3) + vite: 5.0.2(@types/node@20.11.5)(less@4.1.3) vue: 3.4.5(typescript@5.2.2) transitivePeerDependencies: - '@algolia/client-search' @@ -26691,7 +26533,7 @@ packages: dependencies: chalk: 4.1.2 commander: 9.5.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color dev: true @@ -26774,7 +26616,7 @@ packages: resolution: {integrity: sha512-EQY2YjbOZInuvYAqEEP7w7voWSy9cPMt3UB1o1+obKhrD8dkIDZNkPocpZUI59PokqHTXk4zIclV50k1KpyyiA==} engines: {node: ^16.13 || >=18} dependencies: - '@types/node': 20.10.5 + '@types/node': 20.11.5 '@types/ws': 8.5.9 '@wdio/config': 8.22.1 '@wdio/logger': 8.16.17 @@ -26795,7 +26637,7 @@ packages: resolution: {integrity: sha512-zI1zw4lbP2cg1NPikIaUBHQU3+xdvEEBi0Jrydhtp3VVeIEqJWwUFxG/P9LwJpiQ0PYMb/5cxoQrSRhrEXyXHQ==} engines: {node: ^16.13 || >=18} dependencies: - '@types/node': 20.10.5 + '@types/node': 20.11.5 '@types/ws': 8.5.9 '@wdio/config': 8.24.0 '@wdio/logger': 8.16.17 @@ -26812,47 +26654,6 @@ packages: - utf-8-validate dev: true - /webdriverio@8.22.1: - resolution: {integrity: sha512-SFqCKM93DPZU5Vn2r9OMi5EFbJHmWnIf8KXZvdzVOkGzQxFDtJ8LDgzwH1/LZxjG9nO+D7y+4wyQl7V24b8L+Q==} - engines: {node: ^16.13 || >=18} - peerDependencies: - devtools: ^8.14.0 - peerDependenciesMeta: - devtools: - optional: true - dependencies: - '@types/node': 20.9.4 - '@wdio/config': 8.22.1 - '@wdio/logger': 8.16.17 - '@wdio/protocols': 8.22.0 - '@wdio/repl': 8.10.1 - '@wdio/types': 8.21.0 - '@wdio/utils': 8.22.0 - archiver: 6.0.1 - aria-query: 5.3.0 - css-shorthand-properties: 1.1.1 - css-value: 0.0.1 - devtools-protocol: 0.0.1213968 - grapheme-splitter: 1.0.4 - import-meta-resolve: 3.0.0 - is-plain-obj: 4.1.0 - lodash.clonedeep: 4.5.0 - lodash.zip: 4.2.0 - minimatch: 9.0.3 - puppeteer-core: 20.9.0 - query-selector-shadow-dom: 1.0.1 - resq: 1.11.0 - rgb2hex: 0.2.5 - serialize-error: 11.0.2 - webdriver: 8.22.1 - transitivePeerDependencies: - - bufferutil - - encoding - - supports-color - - typescript - - utf-8-validate - dev: true - /webdriverio@8.22.1(typescript@5.2.2): resolution: {integrity: sha512-SFqCKM93DPZU5Vn2r9OMi5EFbJHmWnIf8KXZvdzVOkGzQxFDtJ8LDgzwH1/LZxjG9nO+D7y+4wyQl7V24b8L+Q==} engines: {node: ^16.13 || >=18} @@ -26862,7 +26663,7 @@ packages: devtools: optional: true dependencies: - '@types/node': 20.9.4 + '@types/node': 20.11.5 '@wdio/config': 8.22.1 '@wdio/logger': 8.16.17 '@wdio/protocols': 8.22.0 @@ -26903,7 +26704,7 @@ packages: devtools: optional: true dependencies: - '@types/node': 20.9.5 + '@types/node': 20.11.5 '@wdio/config': 8.24.0 '@wdio/logger': 8.16.17 '@wdio/protocols': 8.23.0 diff --git a/test/core/test/file-path.test.ts b/test/core/test/file-path.test.ts index d7c44a8f7aad..e0fb611f6160 100644 --- a/test/core/test/file-path.test.ts +++ b/test/core/test/file-path.test.ts @@ -5,6 +5,14 @@ import { isWindows, slash, toFilePath } from '../../../packages/vite-node/src/ut vi.mock('fs') describe('current url', () => { + it('__filename is equal to import.meta.url', () => { + expect(__filename).toEqual(import.meta.filename) + }) + + it('__dirname is equal to import.meta.dirname', () => { + expect(__dirname).toEqual(import.meta.dirname) + }) + describe.runIf(!isWindows)('unix', () => { it('__filename', () => { expect(__filename.startsWith('file://')).toBe(false)