diff --git a/.changeset/soft-beans-explode.md b/.changeset/soft-beans-explode.md new file mode 100644 index 000000000000..ae05c86927d4 --- /dev/null +++ b/.changeset/soft-beans-explode.md @@ -0,0 +1,7 @@ +--- +"@cloudflare/vitest-pool-workers": minor +--- + +feat: Support Vitest v2.0.x + +This drops support for Vitest@1, due to the issues described in [workers-sdk#6071](https://github.com/cloudflare/workers-sdk/issues/6071) diff --git a/fixtures/asset-config/package.json b/fixtures/asset-config/package.json index 2d586aeb77d1..7e97ab43d165 100644 --- a/fixtures/asset-config/package.json +++ b/fixtures/asset-config/package.json @@ -15,7 +15,7 @@ "@cloudflare/workers-types": "^4.20240821.1", "run-script-os": "^1.1.6", "undici": "^5.28.4", - "vitest": "1.5.0", + "vitest": "catalog:default", "wrangler": "workspace:*" }, "volta": { diff --git a/fixtures/asset-config/vitest.config.ts b/fixtures/asset-config/vitest.config.ts index 7b56e08d5da4..77629eb23e7d 100644 --- a/fixtures/asset-config/vitest.config.ts +++ b/fixtures/asset-config/vitest.config.ts @@ -32,15 +32,15 @@ export default defineWorkersConfig({ // always "externalised", meaning they're imported directly by Node. server: { deps: { - // Vitest automatically adds `/^(?!.*(?:node_modules)).*\.mjs$/` as an - // `inline` RegExp: https://github.com/vitest-dev/vitest/blob/v1.5.0/packages/vitest/src/node/config.ts#L236 + // Vitest automatically adds `/^(?!.*node_modules).*\.mjs$/` as an + // `inline` RegExp: https://github.com/vitest-dev/vitest/blob/v2.0.5/packages/vitest/src/constants.ts#L9 // We'd like `packages/vitest-pool-workers/dist/pool/index.mjs` to be // externalised though. Unfortunately, `inline`s are checked before // `external`s, so there's no nice way we can override this. Instead, // we prevent the extra `inline` being added in the first place. inline: new FilteredPushArray((item) => { const str = `${item}`; - return str !== "/^(?!.*(?:node_modules)).*\\.mjs$/"; + return str !== "/^(?!.*node_modules).*\\.mjs$/"; }), external: [ /packages\/vitest-pool-workers\/dist/, diff --git a/fixtures/local-mode-tests/tests/logging.test.ts b/fixtures/local-mode-tests/tests/logging.test.ts index 797e14db18b4..16de0376d6cf 100644 --- a/fixtures/local-mode-tests/tests/logging.test.ts +++ b/fixtures/local-mode-tests/tests/logging.test.ts @@ -1,12 +1,12 @@ import path from "node:path"; import { setTimeout } from "node:timers/promises"; import util from "node:util"; -import { afterEach, beforeEach, expect, it, vi } from "vitest"; +import { afterEach, beforeEach, expect, it, Mock, vi } from "vitest"; import { unstable_dev } from "wrangler"; let output = ""; function spyOnConsoleMethod(name: keyof typeof console) { - vi.spyOn(console, name).mockImplementation((...args: unknown[]) => { + (vi.spyOn(console, name) as Mock).mockImplementation((...args: unknown[]) => { output += util.format(...args) + "\n"; }); } diff --git a/fixtures/vitest-pool-workers-examples/package.json b/fixtures/vitest-pool-workers-examples/package.json index 9f7c6791f032..3d299052e5f4 100644 --- a/fixtures/vitest-pool-workers-examples/package.json +++ b/fixtures/vitest-pool-workers-examples/package.json @@ -4,6 +4,7 @@ "type": "module", "scripts": { "check:type": "node tsc-all.mjs", + "list": "vitest --config vitest.workers.config.ts list", "test": "vitest --config vitest.workers.config.ts --reporter basic", "test:ci": "vitest run --config vitest.workers.config.ts --reporter basic" }, @@ -16,7 +17,7 @@ "miniflare": "workspace:*", "toucan-js": "^3.3.1", "typescript": "^5.5.2", - "vitest": "1.5.0", + "vitest": "catalog:default", "wrangler": "workspace:*" }, "volta": { diff --git a/fixtures/vitest-pool-workers-examples/vitest.workers.config.ts b/fixtures/vitest-pool-workers-examples/vitest.workers.config.ts index 95faac914adf..fcebfd7199a3 100644 --- a/fixtures/vitest-pool-workers-examples/vitest.workers.config.ts +++ b/fixtures/vitest-pool-workers-examples/vitest.workers.config.ts @@ -23,15 +23,15 @@ export default defineConfig({ // always "externalised", meaning they're imported directly by Node. server: { deps: { - // Vitest automatically adds `/^(?!.*(?:node_modules)).*\.mjs$/` as an - // `inline` RegExp: https://github.com/vitest-dev/vitest/blob/v1.5.0/packages/vitest/src/node/config.ts#L236 + // Vitest automatically adds `/^(?!.*node_modules).*\.mjs$/` as an + // `inline` RegExp: https://github.com/vitest-dev/vitest/blob/v2.0.5/packages/vitest/src/constants.ts#L9 // We'd like `packages/vitest-pool-workers/dist/pool/index.mjs` to be // externalised though. Unfortunately, `inline`s are checked before // `external`s, so there's no nice way we can override this. Instead, // we prevent the extra `inline` being added in the first place. inline: new FilteredPushArray((item) => { const str = item.toString(); - return str !== "/^(?!.*(?:node_modules)).*\\.mjs$/"; + return str !== "/^(?!.*node_modules).*\\.mjs$/"; }), external: [ /packages\/vitest-pool-workers\/dist/, diff --git a/package.json b/package.json index 4f5d36ae11cf..70f49c38d52f 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "turbo": "^1.10.14", "typescript": "^5.5.2", "vite": "^5.0.12", - "vitest": "^1.2.2" + "vitest": "catalog:default" }, "packageManager": "pnpm@9.1.3", "engines": { @@ -75,7 +75,7 @@ "@types/react-transition-group>@types/react": "^18", "@cloudflare/elements>@types/react": "^18", "capnpc-ts>typescript": "4.2.4", - "vitest@1.5.0>@types/node": "$@types/node" + "vitest>@types/node": "$@types/node" }, "patchedDependencies": { "ink@3.2.0": "patches/ink@3.2.0.patch", diff --git a/packages/create-cloudflare/e2e-tests/helpers.ts b/packages/create-cloudflare/e2e-tests/helpers.ts index 4e594de94f49..c608f02ce9ce 100644 --- a/packages/create-cloudflare/e2e-tests/helpers.ts +++ b/packages/create-cloudflare/e2e-tests/helpers.ts @@ -1,3 +1,4 @@ +import assert from "assert"; import { createWriteStream, mkdirSync, @@ -284,6 +285,7 @@ export const waitForExit = async ( export const createTestLogStream = (ctx: TaskContext) => { // The .ansi extension allows for editor extensions that format ansi terminal codes const fileName = `${normalizeTestName(ctx)}.ansi`; + assert(ctx.task.suite, "Suite must be defined"); return createWriteStream(path.join(getLogPath(ctx.task.suite), fileName), { flags: "a", }); diff --git a/packages/miniflare/src/index.ts b/packages/miniflare/src/index.ts index 2251c9883810..13c04c773503 100644 --- a/packages/miniflare/src/index.ts +++ b/packages/miniflare/src/index.ts @@ -13,7 +13,12 @@ import zlib from "zlib"; import exitHook from "exit-hook"; import { $ as colors$ } from "kleur/colors"; import stoppable from "stoppable"; -import { Dispatcher, getGlobalDispatcher, Pool } from "undici"; +import { + Dispatcher, + getGlobalDispatcher, + Pool, + Response as UndiciResponse, +} from "undici"; import SCRIPT_MINIFLARE_SHARED from "worker:shared/index"; import SCRIPT_MINIFLARE_ZOD from "worker:shared/zod"; import { WebSocketServer } from "ws"; @@ -830,7 +835,12 @@ export class Miniflare { // Should only define custom service bindings if `service` is a function assert(typeof service === "function"); try { - const response = await service(request, this); + let response: UndiciResponse | Response = await service(request, this); + + if (!(response instanceof Response)) { + response = new Response(response.body, response); + } + // Validate return type as `service` is a user defined function // TODO: should we validate outside this try/catch? return z.instanceof(Response).parse(response); diff --git a/packages/vitest-pool-workers/package.json b/packages/vitest-pool-workers/package.json index 119f29ea88ee..f0ac9e55f362 100644 --- a/packages/vitest-pool-workers/package.json +++ b/packages/vitest-pool-workers/package.json @@ -67,19 +67,19 @@ "@cloudflare/workers-types": "^4.20240909.0", "@types/node": "20.8.3", "@types/semver": "^7.5.1", - "@vitest/runner": "1.3.x - 1.5.x", - "@vitest/snapshot": "1.3.x - 1.5.x", + "@vitest/runner": "catalog:default", + "@vitest/snapshot": "catalog:default", "capnp-ts": "^0.7.0", "capnpc-ts": "^0.7.0", "ts-dedent": "^2.2.0", "typescript": "^5.5.2", "undici": "^5.28.4", - "vitest": "1.5.0" + "vitest": "catalog:default" }, "peerDependencies": { - "@vitest/runner": "1.3.x - 1.5.x", - "@vitest/snapshot": "1.3.x - 1.5.x", - "vitest": "1.3.x - 1.5.x" + "@vitest/runner": "2.0.x", + "@vitest/snapshot": "2.0.x", + "vitest": "2.0.x" }, "volta": { "extends": "../../package.json" diff --git a/packages/vitest-pool-workers/src/config/index.ts b/packages/vitest-pool-workers/src/config/index.ts index 058a08a3fed2..1a077004fbd9 100644 --- a/packages/vitest-pool-workers/src/config/index.ts +++ b/packages/vitest-pool-workers/src/config/index.ts @@ -123,7 +123,7 @@ function createConfigPlugin(): Plugin { }, }, // Run after `vitest:project` plugin: - // https://github.com/vitest-dev/vitest/blob/8014614475afa880f4e583b166bb91dea5415cc6/packages/vitest/src/node/plugins/workspace.ts#L26 + // https://github.com/vitest-dev/vitest/blob/v2.0.5/packages/vitest/src/node/plugins/workspace.ts#L34 config(config) { config.resolve ??= {}; config.resolve.conditions ??= []; @@ -140,7 +140,7 @@ function createConfigPlugin(): Plugin { ensureArrayIncludes(config.resolve.conditions, requiredConditions); // Vitest sets this to an empty array if unset, so restore Vite defaults: - // https://github.com/vitest-dev/vitest/blob/v1.5.0/packages/vitest/src/node/plugins/index.ts#L77 + // https://github.com/vitest-dev/vitest/blob/v2.0.5/packages/vitest/src/node/plugins/index.ts#L93 ensureArrayIncludes(config.resolve.mainFields, requiredMainFields); // Apply `package.json` `browser` field remapping in SSR mode: diff --git a/packages/vitest-pool-workers/src/pool/config.ts b/packages/vitest-pool-workers/src/pool/config.ts index 6ffb251f610c..7c856f58efc2 100644 --- a/packages/vitest-pool-workers/src/pool/config.ts +++ b/packages/vitest-pool-workers/src/pool/config.ts @@ -250,7 +250,7 @@ export async function parseProjectOptions( let workersPoolOptions = poolOptions?.workers ?? {}; try { if (typeof workersPoolOptions === "function") { - // https://github.com/vitest-dev/vitest/blob/v1.5.0/packages/vitest/src/integrations/inject.ts + // https://github.com/vitest-dev/vitest/blob/v2.0.5/packages/vitest/src/integrations/inject.ts const inject = ( key: K ): ProvidedContext[K] => { diff --git a/packages/vitest-pool-workers/src/pool/index.ts b/packages/vitest-pool-workers/src/pool/index.ts index 291b2fb4cd49..81f2a64a2ea3 100644 --- a/packages/vitest-pool-workers/src/pool/index.ts +++ b/packages/vitest-pool-workers/src/pool/index.ts @@ -56,14 +56,23 @@ import type { import type { Readable } from "node:stream"; import type { MessagePort } from "node:worker_threads"; import type { - ResolvedConfig, RunnerRPC, RuntimeRPC, + SerializedConfig, WorkerContext, } from "vitest"; import type { ProcessPool, Vitest, WorkspaceProject } from "vitest/node"; -// https://github.com/vitest-dev/vitest/blob/v1.5.0/packages/vite-node/src/client.ts#L386 +interface SerializedOptions { + main?: string; + durableObjectBindingDesignators?: Map< + string /* bound name */, + DurableObjectDesignator + >; + isolatedStorage?: boolean; +} + +// https://github.com/vitest-dev/vitest/blob/v2.0.5/packages/vite-node/src/client.ts#L468 declare const __vite_ssr_import__: unknown; assert( typeof __vite_ssr_import__ === "undefined", @@ -71,6 +80,21 @@ assert( ); function structuredSerializableStringify(value: unknown): string { + // Vitest v2+ sends a sourcemap to it's runner, which we can't serialise currently + // Deleting it doesn't seem to cause any problems, and error stack traces etc... + // still seem to work + // TODO: Figure out how to serialise SourceMap instances + if ( + value && + typeof value === "object" && + "r" in value && + value.r && + typeof value.r === "object" && + "map" in value.r && + value.r.map + ) { + delete value.r.map; + } return devalue.stringify(value, structuredSerializableReducers); } function structuredSerializableParse(value: string): unknown { @@ -663,7 +687,7 @@ async function runTests( mf: Miniflare, workerName: string, project: Project, - config: ResolvedConfig, + config: SerializedConfig, files: string[], invalidates: string[] = [] ) { @@ -740,7 +764,9 @@ async function runTests( const rules = project.options.miniflare?.modulesRules; const compiledRules = compileModuleRules(rules ?? []); - const localRpcFunctions = createMethodsRPC(project.project); + const localRpcFunctions = createMethodsRPC(project.project, { + cacheFs: false, + }); const patchedLocalRpcFunctions: RuntimeRPC = { ...localRpcFunctions, async fetch(...args) { @@ -953,6 +979,7 @@ export default function (ctx: Vitest): ProcessPool { // serialisable. `getSerializableConfig()` may also return references to // the same objects, so override it with a new object. config.poolOptions = { + // @ts-expect-error Vitest provides no way to extend this type threads: { // Allow workers to be re-used by removing the isolation requirement isolate: false, @@ -974,7 +1001,7 @@ export default function (ctx: Vitest): ProcessPool { // project, so we know whether to call out to the loopback service // to push/pop the storage stack between tests. isolatedStorage: project.options.isolatedStorage, - }, + } satisfies SerializedOptions, }; const mf = await getProjectMiniflare(ctx, project); @@ -1046,6 +1073,12 @@ export default function (ctx: Vitest): ProcessPool { // assert(testModule && thingModule); // thingModule.importers.add(testModule); }, + async collectTests(_specs, _invalidates) { + // TODO: This is a new API introduced in Vitest v2+ which we should consider supporting at some point + throw new Error( + "The Cloudflare Workers Vitest integration does not support the `.collect()` or `vitest list` APIs" + ); + }, async close() { // `close()` will be called when shutting down Vitest or updating config log.debug("Shutting down runtimes..."); diff --git a/packages/vitest-pool-workers/src/pool/module-fallback.ts b/packages/vitest-pool-workers/src/pool/module-fallback.ts index b65bd64682a1..f7d0d63d4492 100644 --- a/packages/vitest-pool-workers/src/pool/module-fallback.ts +++ b/packages/vitest-pool-workers/src/pool/module-fallback.ts @@ -305,11 +305,23 @@ async function viteResolve( if (workerdBuiltinModules.has(id)) { return `/${id}`; } + if (id.startsWith("node:")) { + throw new Error("Not found"); + } + id = `node:${id}`; if (workerdBuiltinModules.has(id)) { return `/${id}`; } - throw new Error("Not found"); + + // If we get this far, we have something that: + // - looks like a built-in node module but wasn't imported with a `node:` prefix + // - and isn't provided by workerd natively + // In that case, _try_ and load the identifier with a `node:` prefix. + // This will potentially load one of the Node.js polyfills provided by `vitest-pool-workers` + // Note: User imports should never get here! This is only meant to cater for Vitest internals + // (Specifically, the "tinyrainbow" module imports `node:tty` as `tty`) + return id; } return resolved.id; } diff --git a/packages/vitest-pool-workers/src/worker/lib/cloudflare/test-runner.ts b/packages/vitest-pool-workers/src/worker/lib/cloudflare/test-runner.ts index 5cd5ae011715..d6f62cc6c215 100644 --- a/packages/vitest-pool-workers/src/worker/lib/cloudflare/test-runner.ts +++ b/packages/vitest-pool-workers/src/worker/lib/cloudflare/test-runner.ts @@ -11,7 +11,7 @@ import { import { VitestTestRunner } from "vitest/runners"; import workerdUnsafe from "workerd:unsafe"; import type { CancelReason, Suite, Test } from "@vitest/runner"; -import type { ResolvedConfig, WorkerGlobalState, WorkerRPC } from "vitest"; +import type { SerializedConfig, WorkerGlobalState, WorkerRPC } from "vitest"; // When `DEBUG` is `true`, runner operations will be logged and slowed down // TODO(soon): remove this @@ -114,7 +114,7 @@ export default class WorkersTestRunner extends VitestTestRunner { readonly state: WorkerGlobalState; readonly isolatedStorage: boolean; - constructor(config: ResolvedConfig) { + constructor(config: SerializedConfig) { super(config); // @ts-expect-error `this.workerState` has "private" access, how quaint :D diff --git a/packages/vitest-pool-workers/src/worker/lib/node/fs.ts b/packages/vitest-pool-workers/src/worker/lib/node/fs.ts index b70924f6bec5..ddc4646a9ab9 100644 --- a/packages/vitest-pool-workers/src/worker/lib/node/fs.ts +++ b/packages/vitest-pool-workers/src/worker/lib/node/fs.ts @@ -18,4 +18,4 @@ export function statSync(_path: string) { export const promises = {}; -export default {}; +export default { existsSync }; diff --git a/packages/vitest-pool-workers/test/console.test.ts b/packages/vitest-pool-workers/test/console.test.ts index 2c1a09113ce2..3a7a8199e865 100644 --- a/packages/vitest-pool-workers/test/console.test.ts +++ b/packages/vitest-pool-workers/test/console.test.ts @@ -19,8 +19,7 @@ test.skipIf(process.platform === "win32")( }); const result = vitestDev(); await waitFor(() => { - expect(result.stdout).toMatch("stdout | index.test.ts:2:9\nglobal"); - expect(result.stdout).toMatch("stdout | index.test.ts:4:10\ndescribe"); + expect(result.stdout).toMatch("stdout | index.test.ts\nglobal\ndescribe"); expect(result.stdout).toMatch( "stdout | index.test.ts > thing > does something\ntest" ); @@ -42,10 +41,10 @@ test.skipIf(process.platform === "win32")( `, }); await waitFor(() => { - expect(result.stdout).toMatch("stdout | index.test.ts:2:9\nnew global"); expect(result.stdout).toMatch( - "stdout | index.test.ts:4:10\nnew describe" + "stdout | index.test.ts\nnew global\nnew describe" ); + expect(result.stdout).toMatch( "stdout | index.test.ts > new thing > does something else\nnew test" ); diff --git a/packages/vitest-pool-workers/test/global-setup.ts b/packages/vitest-pool-workers/test/global-setup.ts index d8450a91229d..a3c191f37943 100644 --- a/packages/vitest-pool-workers/test/global-setup.ts +++ b/packages/vitest-pool-workers/test/global-setup.ts @@ -86,7 +86,10 @@ export default async function ({ provide }: GlobalSetupContext) { }, }; await fs.writeFile(packageJsonPath, JSON.stringify(packageJson)); - childProcess.execSync("pnpm install", { cwd: tmpPath, stdio: "inherit" }); + childProcess.execSync("pnpm install", { + cwd: tmpPath, + stdio: "inherit", + }); provide("tmpPoolInstallationPath", tmpPath); diff --git a/packages/workers-shared/package.json b/packages/workers-shared/package.json index 62f08e2d794b..5a0e4d674088 100644 --- a/packages/workers-shared/package.json +++ b/packages/workers-shared/package.json @@ -54,7 +54,7 @@ "rimraf": "^6.0.1", "toucan-js": "^3.3.1", "typescript": "^5.5.4", - "vitest": "1.5.0" + "vitest": "catalog:default" }, "engines": { "node": ">=16.7.0" diff --git a/packages/workers.new/package.json b/packages/workers.new/package.json index b2c0aa3e5c70..5647282cc99e 100644 --- a/packages/workers.new/package.json +++ b/packages/workers.new/package.json @@ -15,7 +15,7 @@ "@types/node": "20.8.3", "miniflare": "workspace:*", "typescript": "^5.5.2", - "vitest": "1.5.0", + "vitest": "catalog:default", "wrangler": "workspace:*" }, "volta": { diff --git a/packages/workers.new/tests/vitest.config.mts b/packages/workers.new/tests/vitest.config.mts index 5105d6a9f935..7e9a810de959 100644 --- a/packages/workers.new/tests/vitest.config.mts +++ b/packages/workers.new/tests/vitest.config.mts @@ -34,15 +34,15 @@ export default defineWorkersProject({ // always "externalised", meaning they're imported directly by Node. server: { deps: { - // Vitest automatically adds `/^(?!.*(?:node_modules)).*\.mjs$/` as an - // `inline` RegExp: https://github.com/vitest-dev/vitest/blob/v1.5.0/packages/vitest/src/node/config.ts#L236 + // Vitest automatically adds `/^(?!.*node_modules).*\.mjs$/` as an + // `inline` RegExp: https://github.com/vitest-dev/vitest/blob/v2.0.5/packages/vitest/src/constants.ts#L9 // We'd like `packages/vitest-pool-workers/dist/pool/index.mjs` to be // externalised though. Unfortunately, `inline`s are checked before // `external`s, so there's no nice way we can override this. Instead, // we prevent the extra `inline` being added in the first place. inline: new FilteredPushArray((item) => { const str = `${item}`; - return str !== "/^(?!.*(?:node_modules)).*\\.mjs$/"; + return str !== "/^(?!.*node_modules).*\\.mjs$/"; }), external: [ /packages\/vitest-pool-workers\/dist/, diff --git a/packages/wrangler/package.json b/packages/wrangler/package.json index 842faa4b18a4..0b336af7d9c4 100644 --- a/packages/wrangler/package.json +++ b/packages/wrangler/package.json @@ -169,7 +169,7 @@ "ts-json-schema-generator": "^1.5.0", "undici": "^5.28.4", "update-check": "^1.5.4", - "vitest": "^1.6.0", + "vitest": "catalog:default", "vitest-websocket-mock": "^0.3.0", "ws": "^8.17.1", "xdg-app-paths": "^8.3.0", diff --git a/packages/wrangler/src/__tests__/vitest.setup.ts b/packages/wrangler/src/__tests__/vitest.setup.ts index 17d12cc4e615..887e6a48b519 100644 --- a/packages/wrangler/src/__tests__/vitest.setup.ts +++ b/packages/wrangler/src/__tests__/vitest.setup.ts @@ -206,7 +206,7 @@ vi.mock("execa", async (importOriginal) => { const realModule = await importOriginal(); return { ...realModule, - execa: vi.fn>((...args) => { + execa: vi.fn((...args: Parameters) => { return args[0] === "mockpm" ? Promise.resolve() : realModule.execa(...args); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d7e09797695a..8f929bc31e44 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,13 +4,25 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +catalogs: + default: + '@vitest/runner': + specifier: ~2.0.5 + version: 2.0.5 + '@vitest/snapshot': + specifier: ~2.0.5 + version: 2.0.5 + vitest: + specifier: ~2.0.5 + version: 2.0.5 + overrides: '@types/react-dom@18>@types/react': ^18 '@types/react-tabs>@types/react': ^18 '@types/react-transition-group>@types/react': ^18 '@cloudflare/elements>@types/react': ^18 capnpc-ts>typescript: 4.2.4 - vitest@1.5.0>@types/node: 20.8.3 + vitest>@types/node: 20.8.3 patchedDependencies: '@cloudflare/component-listbox@1.10.6': @@ -100,8 +112,8 @@ importers: specifier: ^5.0.12 version: 5.0.12(@types/node@20.8.3) vitest: - specifier: ^1.2.2 - version: 1.6.0(@types/node@20.8.3)(@vitest/ui@1.6.0) + specifier: catalog:default + version: 2.0.5(@types/node@20.8.3)(@vitest/ui@1.6.0)(supports-color@9.2.2) fixtures/additional-modules: devDependencies: @@ -148,8 +160,8 @@ importers: specifier: ^5.28.4 version: 5.28.4 vitest: - specifier: 1.5.0 - version: 1.5.0(@types/node@20.8.3)(@vitest/ui@1.6.0(vitest@1.6.0)) + specifier: catalog:default + version: 2.0.5(@types/node@20.8.3)(@vitest/ui@1.6.0)(supports-color@9.2.2) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -688,8 +700,8 @@ importers: specifier: ^5.5.2 version: 5.5.2 vitest: - specifier: 1.5.0 - version: 1.5.0(@types/node@20.8.3)(@vitest/ui@1.6.0(vitest@1.6.0)) + specifier: catalog:default + version: 2.0.5(@types/node@20.8.3)(@vitest/ui@1.6.0)(supports-color@9.2.2) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1373,11 +1385,11 @@ importers: specifier: ^7.5.1 version: 7.5.1 '@vitest/runner': - specifier: 1.3.x - 1.5.x - version: 1.5.0 + specifier: catalog:default + version: 2.0.5 '@vitest/snapshot': - specifier: 1.3.x - 1.5.x - version: 1.5.0 + specifier: catalog:default + version: 2.0.5 capnp-ts: specifier: ^0.7.0 version: 0.7.0(patch_hash=l4yimnxyvkiyj6alnps2ec3sii) @@ -1394,8 +1406,8 @@ importers: specifier: ^5.28.4 version: 5.28.4 vitest: - specifier: 1.5.0 - version: 1.5.0(@types/node@20.8.3)(@vitest/ui@1.6.0(vitest@1.6.0)) + specifier: catalog:default + version: 2.0.5(@types/node@20.8.3)(@vitest/ui@1.6.0)(supports-color@9.2.2) packages/workers-editor-shared: dependencies: @@ -1607,8 +1619,8 @@ importers: specifier: ^5.5.4 version: 5.5.4 vitest: - specifier: 1.5.0 - version: 1.5.0(@types/node@20.8.3)(@vitest/ui@1.6.0(vitest@1.6.0)) + specifier: catalog:default + version: 2.0.5(@types/node@20.8.3)(@vitest/ui@1.6.0)(supports-color@9.2.2) packages/workers-tsconfig: {} @@ -1630,8 +1642,8 @@ importers: specifier: ^5.5.2 version: 5.5.2 vitest: - specifier: 1.5.0 - version: 1.5.0(@types/node@20.8.3)(@vitest/ui@1.6.0(vitest@1.6.0)) + specifier: catalog:default + version: 2.0.5(@types/node@20.8.3)(@vitest/ui@1.6.0)(supports-color@9.2.2) wrangler: specifier: workspace:* version: link:../wrangler @@ -1723,7 +1735,7 @@ importers: version: 3.0.0 '@microsoft/api-extractor': specifier: ^7.47.0 - version: 7.47.0(@types/node@20.12.12) + version: 7.47.0(@types/node@20.8.3) '@sentry/node': specifier: ^7.86.0 version: 7.87.0(supports-color@9.2.2) @@ -1786,7 +1798,7 @@ importers: version: 17.0.24 '@vitest/ui': specifier: ^1.6.0 - version: 1.6.0(vitest@1.6.0) + version: 1.6.0(vitest@2.0.5) '@webcontainer/env': specifier: ^1.1.0 version: 1.1.0 @@ -1938,11 +1950,11 @@ importers: specifier: ^1.5.4 version: 1.5.4 vitest: - specifier: ^1.6.0 - version: 1.6.0(@types/node@20.12.12)(@vitest/ui@1.6.0)(supports-color@9.2.2) + specifier: catalog:default + version: 2.0.5(@types/node@20.8.3)(@vitest/ui@1.6.0)(supports-color@9.2.2) vitest-websocket-mock: specifier: ^0.3.0 - version: 0.3.0(vitest@1.6.0(@types/node@20.12.12)(@vitest/ui@1.6.0)(supports-color@9.2.2)) + version: 0.3.0(vitest@2.0.5(@types/node@20.8.3)(@vitest/ui@1.6.0)(supports-color@9.2.2)) ws: specifier: ^8.17.1 version: 8.17.1 @@ -2011,6 +2023,10 @@ packages: resolution: {integrity: sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==} engines: {node: '>=6.0.0'} + '@ampproject/remapping@2.3.0': + resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} + engines: {node: '>=6.0.0'} + '@ava/typescript@4.1.0': resolution: {integrity: sha512-1iWZQ/nr9iflhLK9VN8H+1oDZqe93qxNnyYUz+jTzkYPAHc5fdZXBrqmNIgIfFhWYXK5OaQ5YtC7OmLeTNhVEg==} engines: {node: ^14.19 || ^16.15 || ^18 || ^20} @@ -3940,41 +3956,35 @@ packages: peerDependencies: vite: ^4.2.0 - '@vitest/expect@1.5.0': - resolution: {integrity: sha512-0pzuCI6KYi2SIC3LQezmxujU9RK/vwC1U9R0rLuGlNGcOuDWxqWKu6nUdFsX9tH1WU0SXtAxToOsEjeUn1s3hA==} - - '@vitest/expect@1.6.0': - resolution: {integrity: sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==} + '@vitest/expect@2.0.5': + resolution: {integrity: sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==} - '@vitest/runner@1.5.0': - resolution: {integrity: sha512-7HWwdxXP5yDoe7DTpbif9l6ZmDwCzcSIK38kTSIt6CFEpMjX4EpCgT6wUmS0xTXqMI6E/ONmfgRKmaujpabjZQ==} + '@vitest/pretty-format@2.0.5': + resolution: {integrity: sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==} - '@vitest/runner@1.6.0': - resolution: {integrity: sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg==} + '@vitest/pretty-format@2.1.0': + resolution: {integrity: sha512-7sxf2F3DNYatgmzXXcTh6cq+/fxwB47RIQqZJFoSH883wnVAoccSRT6g+dTKemUBo8Q5N4OYYj1EBXLuRKvp3Q==} - '@vitest/snapshot@1.5.0': - resolution: {integrity: sha512-qpv3fSEuNrhAO3FpH6YYRdaECnnRjg9VxbhdtPwPRnzSfHVXnNzzrpX4cJxqiwgRMo7uRMWDFBlsBq4Cr+rO3A==} + '@vitest/runner@2.0.5': + resolution: {integrity: sha512-TfRfZa6Bkk9ky4tW0z20WKXFEwwvWhRY+84CnSEtq4+3ZvDlJyY32oNTJtM7AW9ihW90tX/1Q78cb6FjoAs+ig==} - '@vitest/snapshot@1.6.0': - resolution: {integrity: sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ==} + '@vitest/snapshot@2.0.5': + resolution: {integrity: sha512-SgCPUeDFLaM0mIUHfaArq8fD2WbaXG/zVXjRupthYfYGzc8ztbFbu6dUNOblBG7XLMR1kEhS/DNnfCZ2IhdDew==} - '@vitest/spy@1.5.0': - resolution: {integrity: sha512-vu6vi6ew5N5MMHJjD5PoakMRKYdmIrNJmyfkhRpQt5d9Ewhw9nZ5Aqynbi3N61bvk9UvZ5UysMT6ayIrZ8GA9w==} - - '@vitest/spy@1.6.0': - resolution: {integrity: sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==} + '@vitest/spy@2.0.5': + resolution: {integrity: sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA==} '@vitest/ui@1.6.0': resolution: {integrity: sha512-k3Lyo+ONLOgylctiGovRKy7V4+dIN2yxstX3eY5cWFXH6WP+ooVX79YSyi0GagdTQzLmT43BF27T0s6dOIPBXA==} peerDependencies: vitest: 1.6.0 - '@vitest/utils@1.5.0': - resolution: {integrity: sha512-BDU0GNL8MWkRkSRdNFvCUCAVOeHaUlVJ9Tx0TYBZyXaaOTmGtUFObzchCivIBrIwKzvZA7A9sCejVhXM2aY98A==} - '@vitest/utils@1.6.0': resolution: {integrity: sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==} + '@vitest/utils@2.0.5': + resolution: {integrity: sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==} + '@volar/language-core@2.3.4': resolution: {integrity: sha512-wXBhY11qG6pCDAqDnbBRFIDSIwbqkWI7no+lj5+L7IlA7HRIjRP7YQLGzT0LF4lS6eHkMSsclXqy9DwYJasZTQ==} @@ -4240,8 +4250,9 @@ packages: assert@2.0.0: resolution: {integrity: sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==} - assertion-error@1.1.0: - resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} ast-types@0.13.4: resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==} @@ -4467,9 +4478,9 @@ packages: resolution: {integrity: sha512-JPypkxsB10s9QOWwa6zwPzqE1Md3vqpPc+cai4sAecuCsRyAtAl/pMyhPlMbT/xtPnm2dznJZYRLui57qiRhaQ==} engines: {node: '>=16'} - chai@4.3.10: - resolution: {integrity: sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==} - engines: {node: '>=4'} + chai@5.1.1: + resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==} + engines: {node: '>=12'} chainsaw@0.1.0: resolution: {integrity: sha512-75kWfWt6MEKNC8xYXIdRpDehRYY/tNSgwKaJq+dbbDcxORuVrrQ+SEHoWsniVn9XPYfP4gmdWIeDk/4YNp1rNQ==} @@ -4500,8 +4511,9 @@ packages: chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} - check-error@1.0.3: - resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} + check-error@2.1.1: + resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} + engines: {node: '>= 16'} chokidar@3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} @@ -4881,8 +4893,8 @@ packages: resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} engines: {node: '>=10'} - deep-eql@4.1.3: - resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} + deep-eql@5.0.2: + resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} engines: {node: '>=6'} deep-extend@0.6.0: @@ -6243,9 +6255,6 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - js-tokens@8.0.3: - resolution: {integrity: sha512-UfJMcSJc+SEXEl9lH/VLHSZbThQyLpw1vLO1Lb+j4RWDvG3N2f7yj3PVQA3cmkTBNldJ9eFnM+xEXxHIXrYiJw==} - js-yaml@3.14.1: resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} hasBin: true @@ -6443,6 +6452,9 @@ packages: loupe@2.3.7: resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} + loupe@3.1.1: + resolution: {integrity: sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==} + lower-case-first@1.0.2: resolution: {integrity: sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA==} @@ -6957,10 +6969,6 @@ packages: resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - p-limit@5.0.0: - resolution: {integrity: sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==} - engines: {node: '>=18'} - p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} @@ -7136,8 +7144,9 @@ packages: pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} - pathval@1.1.1: - resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + pathval@2.0.0: + resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} + engines: {node: '>= 14.16'} performance-now@2.1.0: resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==} @@ -8040,9 +8049,6 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - strip-literal@2.0.0: - resolution: {integrity: sha512-f9vHgsCWBq2ugHAkGMiiYY+AYG0D/cbloKKg0nhaaaSNsujdGIpVXCNsrJpCKr5M0f4aI31mr13UjY6GAuXCKA==} - stripe@9.16.0: resolution: {integrity: sha512-Dn8K+jSoQcXjxCobRI4HXUdHjOXsiF/KszK49fJnkbeCFjZ3EZxLG2JiM/CX+Hcq27NBDtv/Sxhvy+HhTmvyaQ==} engines: {node: ^8.1 || >=10.*} @@ -8121,9 +8127,6 @@ packages: timeago.js@4.0.2: resolution: {integrity: sha512-a7wPxPdVlQL7lqvitHGGRsofhdwtkoSXPGATFuSOA2i1ZNQEPLrGnj68vOp2sOJTCFAQVXPeNMX/GctBaO9L2w==} - tinybench@2.6.0: - resolution: {integrity: sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==} - tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} @@ -8133,12 +8136,16 @@ packages: tinygradient@1.1.5: resolution: {integrity: sha512-8nIfc2vgQ4TeLnk2lFj4tRLvvJwEfQuabdsmvDdQPT0xlk9TaNtpGd6nNRxXoK6vQhN6RSzj+Cnp5tTQmpxmbw==} - tinypool@0.8.3: - resolution: {integrity: sha512-Ud7uepAklqRH1bvwy22ynrliC7Dljz7Tm8M/0RBUW+YRa4YHhZ6e4PpgE+fu1zr/WqB1kbeuVrdfeuyIBpy4tw==} + tinypool@1.0.1: + resolution: {integrity: sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==} + engines: {node: ^18.0.0 || >=20.0.0} + + tinyrainbow@1.2.0: + resolution: {integrity: sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==} engines: {node: '>=14.0.0'} - tinyspy@2.2.0: - resolution: {integrity: sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==} + tinyspy@3.0.2: + resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} engines: {node: '>=14.0.0'} title-case@2.1.1: @@ -8305,10 +8312,6 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} - type-detect@4.0.8: - resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} - engines: {node: '>=4'} - type-fest@0.12.0: resolution: {integrity: sha512-53RyidyjvkGpnWPMF9bQgFtWp+Sl8O2Rp13VavmJgfAP9WWG6q6TkrKU8iyJdnwnfgHI6k2hTlgqH4aSdjoTbg==} engines: {node: '>=10'} @@ -8526,13 +8529,8 @@ packages: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} - vite-node@1.5.0: - resolution: {integrity: sha512-tV8h6gMj6vPzVCa7l+VGq9lwoJjW8Y79vst8QZZGiuRAfijU+EEWuc0kFpmndQrWhMMhet1jdSF+40KSZUqIIw==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - - vite-node@1.6.0: - resolution: {integrity: sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==} + vite-node@2.0.5: + resolution: {integrity: sha512-LdsW4pxj0Ot69FAoXZ1yTnA9bjGohr2yNBU7QKRxpz8ITSkhuDl6h3zS/tvgz4qrNjeRnvrWeXQ8ZF7Um4W00Q==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -8594,40 +8592,15 @@ packages: peerDependencies: vitest: '>=1 <2' - vitest@1.5.0: - resolution: {integrity: sha512-d8UKgR0m2kjdxDWX6911uwxout6GHS0XaGH1cksSIVVG8kRlE7G7aBw7myKQCvDI5dT4j7ZMa+l706BIORMDLw==} + vitest@2.0.5: + resolution: {integrity: sha512-8GUxONfauuIdeSl5f9GTgVEpg5BTOlplET4WEDaeY2QBiN8wSm68vxN/tb5z405OwppfoCavnwXafiaYBC/xOA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/node': 20.8.3 - '@vitest/browser': 1.5.0 - '@vitest/ui': 1.5.0 - happy-dom: '*' - jsdom: '*' - peerDependenciesMeta: - '@edge-runtime/vm': - optional: true - '@types/node': - optional: true - '@vitest/browser': - optional: true - '@vitest/ui': - optional: true - happy-dom: - optional: true - jsdom: - optional: true - - vitest@1.6.0: - resolution: {integrity: sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - peerDependencies: - '@edge-runtime/vm': '*' - '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': 1.6.0 - '@vitest/ui': 1.6.0 + '@vitest/browser': 2.0.5 + '@vitest/ui': 2.0.5 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -8707,11 +8680,6 @@ packages: engines: {node: '>= 8'} hasBin: true - why-is-node-running@2.2.2: - resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} - engines: {node: '>=8'} - hasBin: true - why-is-node-running@2.3.0: resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} engines: {node: '>=8'} @@ -8925,6 +8893,11 @@ snapshots: '@jridgewell/gen-mapping': 0.1.1 '@jridgewell/trace-mapping': 0.3.25 + '@ampproject/remapping@2.3.0': + dependencies: + '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/trace-mapping': 0.3.25 + '@ava/typescript@4.1.0': dependencies: escape-string-regexp: 5.0.0 @@ -10205,14 +10178,6 @@ snapshots: - encoding - supports-color - '@microsoft/api-extractor-model@7.29.2(@types/node@20.12.12)': - dependencies: - '@microsoft/tsdoc': 0.15.0 - '@microsoft/tsdoc-config': 0.17.0 - '@rushstack/node-core-library': 5.4.1(@types/node@20.12.12) - transitivePeerDependencies: - - '@types/node' - '@microsoft/api-extractor-model@7.29.2(@types/node@20.8.3)': dependencies: '@microsoft/tsdoc': 0.15.0 @@ -10229,24 +10194,6 @@ snapshots: transitivePeerDependencies: - '@types/node' - '@microsoft/api-extractor@7.47.0(@types/node@20.12.12)': - dependencies: - '@microsoft/api-extractor-model': 7.29.2(@types/node@20.12.12) - '@microsoft/tsdoc': 0.15.0 - '@microsoft/tsdoc-config': 0.17.0 - '@rushstack/node-core-library': 5.4.1(@types/node@20.12.12) - '@rushstack/rig-package': 0.5.2 - '@rushstack/terminal': 0.13.0(@types/node@20.12.12) - '@rushstack/ts-command-line': 4.22.0(@types/node@20.12.12) - lodash: 4.17.21 - minimatch: 3.0.8 - resolve: 1.22.8 - semver: 7.5.4 - source-map: 0.6.1 - typescript: 5.4.2 - transitivePeerDependencies: - - '@types/node' - '@microsoft/api-extractor@7.47.0(@types/node@20.8.3)': dependencies: '@microsoft/api-extractor-model': 7.29.2(@types/node@20.8.3) @@ -10654,19 +10601,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.9.6': optional: true - '@rushstack/node-core-library@5.4.1(@types/node@20.12.12)': - dependencies: - ajv: 8.13.0 - ajv-draft-04: 1.0.0(ajv@8.13.0) - ajv-formats: 3.0.1(ajv@8.13.0) - fs-extra: 7.0.1 - import-lazy: 4.0.0 - jju: 1.4.0 - resolve: 1.22.8 - semver: 7.5.4 - optionalDependencies: - '@types/node': 20.12.12 - '@rushstack/node-core-library@5.4.1(@types/node@20.8.3)': dependencies: ajv: 8.13.0 @@ -10703,13 +10637,6 @@ snapshots: resolve: 1.22.8 strip-json-comments: 3.1.1 - '@rushstack/terminal@0.13.0(@types/node@20.12.12)': - dependencies: - '@rushstack/node-core-library': 5.4.1(@types/node@20.12.12) - supports-color: 8.1.1 - optionalDependencies: - '@types/node': 20.12.12 - '@rushstack/terminal@0.13.0(@types/node@20.8.3)': dependencies: '@rushstack/node-core-library': 5.4.1(@types/node@20.8.3) @@ -10724,15 +10651,6 @@ snapshots: optionalDependencies: '@types/node': 20.12.12 - '@rushstack/ts-command-line@4.22.0(@types/node@20.12.12)': - dependencies: - '@rushstack/terminal': 0.13.0(@types/node@20.12.12) - '@types/argparse': 1.0.38 - argparse: 1.0.10 - string-argv: 0.3.1 - transitivePeerDependencies: - - '@types/node' - '@rushstack/ts-command-line@4.22.0(@types/node@20.8.3)': dependencies: '@rushstack/terminal': 0.13.0(@types/node@20.8.3) @@ -11188,7 +11106,7 @@ snapshots: dependencies: '@typescript-eslint/typescript-estree': 6.10.0(typescript@5.5.4) '@typescript-eslint/utils': 6.10.0(eslint@8.49.0)(typescript@5.5.4) - debug: 4.3.6(supports-color@9.2.2) + debug: 4.3.5 eslint: 8.49.0 ts-api-utils: 1.0.3(typescript@5.5.4) optionalDependencies: @@ -11287,51 +11205,37 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitest/expect@1.5.0': + '@vitest/expect@2.0.5': dependencies: - '@vitest/spy': 1.5.0 - '@vitest/utils': 1.5.0 - chai: 4.3.10 + '@vitest/spy': 2.0.5 + '@vitest/utils': 2.0.5 + chai: 5.1.1 + tinyrainbow: 1.2.0 - '@vitest/expect@1.6.0': + '@vitest/pretty-format@2.0.5': dependencies: - '@vitest/spy': 1.6.0 - '@vitest/utils': 1.6.0 - chai: 4.3.10 + tinyrainbow: 1.2.0 - '@vitest/runner@1.5.0': + '@vitest/pretty-format@2.1.0': dependencies: - '@vitest/utils': 1.5.0 - p-limit: 5.0.0 - pathe: 1.1.1 + tinyrainbow: 1.2.0 - '@vitest/runner@1.6.0': + '@vitest/runner@2.0.5': dependencies: - '@vitest/utils': 1.6.0 - p-limit: 5.0.0 + '@vitest/utils': 2.0.5 pathe: 1.1.2 - '@vitest/snapshot@1.5.0': - dependencies: - magic-string: 0.30.5 - pathe: 1.1.1 - pretty-format: 29.7.0 - - '@vitest/snapshot@1.6.0': + '@vitest/snapshot@2.0.5': dependencies: + '@vitest/pretty-format': 2.0.5 magic-string: 0.30.11 pathe: 1.1.2 - pretty-format: 29.7.0 - - '@vitest/spy@1.5.0': - dependencies: - tinyspy: 2.2.0 - '@vitest/spy@1.6.0': + '@vitest/spy@2.0.5': dependencies: - tinyspy: 2.2.0 + tinyspy: 3.0.2 - '@vitest/ui@1.6.0(vitest@1.6.0)': + '@vitest/ui@1.6.0(vitest@2.0.5)': dependencies: '@vitest/utils': 1.6.0 fast-glob: 3.3.2 @@ -11340,21 +11244,21 @@ snapshots: pathe: 1.1.1 picocolors: 1.0.1 sirv: 2.0.4 - vitest: 1.6.0(@types/node@20.12.12)(@vitest/ui@1.6.0)(supports-color@9.2.2) + vitest: 2.0.5(@types/node@20.8.3)(@vitest/ui@1.6.0)(supports-color@9.2.2) - '@vitest/utils@1.5.0': + '@vitest/utils@1.6.0': dependencies: diff-sequences: 29.6.3 estree-walker: 3.0.3 loupe: 2.3.7 pretty-format: 29.7.0 - '@vitest/utils@1.6.0': + '@vitest/utils@2.0.5': dependencies: - diff-sequences: 29.6.3 + '@vitest/pretty-format': 2.0.5 estree-walker: 3.0.3 - loupe: 2.3.7 - pretty-format: 29.7.0 + loupe: 3.1.1 + tinyrainbow: 1.2.0 '@volar/language-core@2.3.4': dependencies: @@ -11688,7 +11592,7 @@ snapshots: object-is: 1.1.5 util: 0.12.5 - assertion-error@1.1.0: {} + assertion-error@2.0.1: {} ast-types@0.13.4: dependencies: @@ -11969,15 +11873,13 @@ snapshots: dependencies: nofilter: 3.1.0 - chai@4.3.10: + chai@5.1.1: dependencies: - assertion-error: 1.1.0 - check-error: 1.0.3 - deep-eql: 4.1.3 - get-func-name: 2.0.2 - loupe: 2.3.7 - pathval: 1.1.1 - type-detect: 4.0.8 + assertion-error: 2.0.1 + check-error: 2.1.1 + deep-eql: 5.0.2 + loupe: 3.1.1 + pathval: 2.0.0 chainsaw@0.1.0: dependencies: @@ -12026,9 +11928,7 @@ snapshots: chardet@0.7.0: {} - check-error@1.0.3: - dependencies: - get-func-name: 2.0.2 + check-error@2.1.1: {} chokidar@3.5.3: dependencies: @@ -12366,9 +12266,7 @@ snapshots: dependencies: mimic-response: 3.1.0 - deep-eql@4.1.3: - dependencies: - type-detect: 4.0.8 + deep-eql@5.0.2: {} deep-extend@0.6.0: {} @@ -14053,8 +13951,6 @@ snapshots: js-tokens@4.0.0: {} - js-tokens@8.0.3: {} - js-yaml@3.14.1: dependencies: argparse: 1.0.10 @@ -14243,6 +14139,10 @@ snapshots: dependencies: get-func-name: 2.0.2 + loupe@3.1.1: + dependencies: + get-func-name: 2.0.2 + lower-case-first@1.0.2: dependencies: lower-case: 1.1.4 @@ -14754,10 +14654,6 @@ snapshots: dependencies: yocto-queue: 1.0.0 - p-limit@5.0.0: - dependencies: - yocto-queue: 1.0.0 - p-locate@4.1.0: dependencies: p-limit: 2.3.0 @@ -14928,7 +14824,7 @@ snapshots: pathe@1.1.2: {} - pathval@1.1.1: {} + pathval@2.0.0: {} performance-now@2.1.0: {} @@ -15894,10 +15790,6 @@ snapshots: strip-json-comments@3.1.1: {} - strip-literal@2.0.0: - dependencies: - js-tokens: 8.0.3 - stripe@9.16.0: dependencies: '@types/node': 20.8.3 @@ -15997,8 +15889,6 @@ snapshots: timeago.js@4.0.2: {} - tinybench@2.6.0: {} - tinybench@2.9.0: {} tinycolor2@1.6.0: {} @@ -16008,9 +15898,11 @@ snapshots: '@types/tinycolor2': 1.4.4 tinycolor2: 1.6.0 - tinypool@0.8.3: {} + tinypool@1.0.1: {} - tinyspy@2.2.0: {} + tinyrainbow@1.2.0: {} + + tinyspy@3.0.2: {} title-case@2.1.1: dependencies: @@ -16176,8 +16068,6 @@ snapshots: dependencies: prelude-ls: 1.2.1 - type-detect@4.0.8: {} - type-fest@0.12.0: {} type-fest@0.13.1: {} @@ -16364,46 +16254,12 @@ snapshots: vary@1.1.2: {} - vite-node@1.5.0(@types/node@20.8.3): + vite-node@2.0.5(@types/node@20.8.3)(supports-color@9.2.2): dependencies: cac: 6.7.14 debug: 4.3.6(supports-color@9.2.2) pathe: 1.1.2 - picocolors: 1.0.1 - vite: 5.0.12(@types/node@20.8.3) - transitivePeerDependencies: - - '@types/node' - - less - - lightningcss - - sass - - stylus - - sugarss - - supports-color - - terser - - vite-node@1.6.0(@types/node@20.12.12)(supports-color@9.2.2): - dependencies: - cac: 6.7.14 - debug: 4.3.6(supports-color@9.2.2) - pathe: 1.1.2 - picocolors: 1.0.1 - vite: 5.0.12(@types/node@20.12.12) - transitivePeerDependencies: - - '@types/node' - - less - - lightningcss - - sass - - stylus - - sugarss - - supports-color - - terser - - vite-node@1.6.0(@types/node@20.8.3): - dependencies: - cac: 6.7.14 - debug: 4.3.6(supports-color@9.2.2) - pathe: 1.1.2 - picocolors: 1.0.1 + tinyrainbow: 1.2.0 vite: 5.0.12(@types/node@20.8.3) transitivePeerDependencies: - '@types/node' @@ -16469,105 +16325,36 @@ snapshots: '@types/node': 20.8.3 fsevents: 2.3.3 - vitest-websocket-mock@0.3.0(vitest@1.6.0(@types/node@20.12.12)(@vitest/ui@1.6.0)(supports-color@9.2.2)): + vitest-websocket-mock@0.3.0(vitest@2.0.5(@types/node@20.8.3)(@vitest/ui@1.6.0)(supports-color@9.2.2)): dependencies: jest-diff: 29.7.0 mock-socket: 9.3.1 - vitest: 1.6.0(@types/node@20.12.12)(@vitest/ui@1.6.0)(supports-color@9.2.2) - - vitest@1.5.0(@types/node@20.8.3)(@vitest/ui@1.6.0(vitest@1.6.0)): - dependencies: - '@vitest/expect': 1.5.0 - '@vitest/runner': 1.5.0 - '@vitest/snapshot': 1.5.0 - '@vitest/spy': 1.5.0 - '@vitest/utils': 1.5.0 - acorn-walk: 8.3.2 - chai: 4.3.10 + vitest: 2.0.5(@types/node@20.8.3)(@vitest/ui@1.6.0)(supports-color@9.2.2) + + vitest@2.0.5(@types/node@20.8.3)(@vitest/ui@1.6.0)(supports-color@9.2.2): + dependencies: + '@ampproject/remapping': 2.3.0 + '@vitest/expect': 2.0.5 + '@vitest/pretty-format': 2.1.0 + '@vitest/runner': 2.0.5 + '@vitest/snapshot': 2.0.5 + '@vitest/spy': 2.0.5 + '@vitest/utils': 2.0.5 + chai: 5.1.1 debug: 4.3.6(supports-color@9.2.2) execa: 8.0.1 - local-pkg: 0.5.0 magic-string: 0.30.11 pathe: 1.1.2 - picocolors: 1.0.1 std-env: 3.7.0 - strip-literal: 2.0.0 tinybench: 2.9.0 - tinypool: 0.8.3 + tinypool: 1.0.1 + tinyrainbow: 1.2.0 vite: 5.0.12(@types/node@20.8.3) - vite-node: 1.5.0(@types/node@20.8.3) + vite-node: 2.0.5(@types/node@20.8.3)(supports-color@9.2.2) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 20.8.3 - '@vitest/ui': 1.6.0(vitest@1.6.0) - transitivePeerDependencies: - - less - - lightningcss - - sass - - stylus - - sugarss - - supports-color - - terser - - vitest@1.6.0(@types/node@20.12.12)(@vitest/ui@1.6.0)(supports-color@9.2.2): - dependencies: - '@vitest/expect': 1.6.0 - '@vitest/runner': 1.6.0 - '@vitest/snapshot': 1.6.0 - '@vitest/spy': 1.6.0 - '@vitest/utils': 1.6.0 - acorn-walk: 8.3.2 - chai: 4.3.10 - debug: 4.3.4(supports-color@9.2.2) - execa: 8.0.1 - local-pkg: 0.5.0 - magic-string: 0.30.5 - pathe: 1.1.1 - picocolors: 1.0.1 - std-env: 3.7.0 - strip-literal: 2.0.0 - tinybench: 2.6.0 - tinypool: 0.8.3 - vite: 5.0.12(@types/node@20.12.12) - vite-node: 1.6.0(@types/node@20.12.12)(supports-color@9.2.2) - why-is-node-running: 2.2.2 - optionalDependencies: - '@types/node': 20.12.12 - '@vitest/ui': 1.6.0(vitest@1.6.0) - transitivePeerDependencies: - - less - - lightningcss - - sass - - stylus - - sugarss - - supports-color - - terser - - vitest@1.6.0(@types/node@20.8.3)(@vitest/ui@1.6.0): - dependencies: - '@vitest/expect': 1.6.0 - '@vitest/runner': 1.6.0 - '@vitest/snapshot': 1.6.0 - '@vitest/spy': 1.6.0 - '@vitest/utils': 1.6.0 - acorn-walk: 8.3.2 - chai: 4.3.10 - debug: 4.3.4(supports-color@9.2.2) - execa: 8.0.1 - local-pkg: 0.5.0 - magic-string: 0.30.5 - pathe: 1.1.1 - picocolors: 1.0.1 - std-env: 3.7.0 - strip-literal: 2.0.0 - tinybench: 2.6.0 - tinypool: 0.8.3 - vite: 5.0.12(@types/node@20.8.3) - vite-node: 1.6.0(@types/node@20.8.3) - why-is-node-running: 2.2.2 - optionalDependencies: - '@types/node': 20.8.3 - '@vitest/ui': 1.6.0(vitest@1.6.0) + '@vitest/ui': 1.6.0(vitest@2.0.5) transitivePeerDependencies: - less - lightningcss @@ -16662,11 +16449,6 @@ snapshots: dependencies: isexe: 2.0.0 - why-is-node-running@2.2.2: - dependencies: - siginfo: 2.0.0 - stackback: 0.0.2 - why-is-node-running@2.3.0: dependencies: siginfo: 2.0.0 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index ae60fd954eec..33a729826603 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -2,3 +2,8 @@ packages: - "packages/*" - "fixtures/*" - "tools" + +catalog: + vitest: ~2.0.5 + "@vitest/runner": ~2.0.5 + "@vitest/snapshot": ~2.0.5 diff --git a/tools/dependabot/__tests__/generate-dependabot-pr-changesets.test.ts b/tools/dependabot/__tests__/generate-dependabot-pr-changesets.test.ts index 2890e5dd7afb..a21724d6bff1 100644 --- a/tools/dependabot/__tests__/generate-dependabot-pr-changesets.test.ts +++ b/tools/dependabot/__tests__/generate-dependabot-pr-changesets.test.ts @@ -159,10 +159,10 @@ describe("writeChangeSet()", () => { `; writeChangeSet("some-prefix", "1234", header, body); expect(writeFileSync).toHaveBeenCalledOnce(); - expect((writeFileSync as Mock).mock.lastCall[0]).toMatchInlineSnapshot( + expect((writeFileSync as Mock).mock.lastCall?.[0]).toMatchInlineSnapshot( `".changeset/some-prefix-1234.md"` ); - expect((writeFileSync as Mock).mock.lastCall[1]).toMatchInlineSnapshot(` + expect((writeFileSync as Mock).mock.lastCall?.[1]).toMatchInlineSnapshot(` "--- "package-name": patch ---