From f6494132ceca499ae29bda03e195a6336872f3f7 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 18 Dec 2025 15:07:56 +0000 Subject: [PATCH 01/45] Support Vitest v4 --- .changeset/auth-token-command.md | 1 + .changeset/many-fishes-raise.md | 13 + fixtures/import-npm/package-lock.json | 2 +- .../ai-vectorize/vitest.config.ts | 19 +- .../vitest.config.ts | 75 +- .../vitest.config.ts | 32 +- .../container-app/vitest.config.ts | 20 +- .../context-exports/vitest.config.ts | 30 +- .../vitest.isolated-storage.config.ts | 27 - .../vitest.isolated_storage.config.ts | 29 + .../vitest.single-worker.config.ts | 28 - .../vitest.single_worker.config.ts | 30 + .../d1/test/queries.test.ts | 9 +- .../d1/test/routes.test.ts | 6 +- .../d1/vitest.config.ts | 34 +- .../test/direct-access.test.ts | 10 - .../durable-objects/vitest.config.ts | 21 +- .../hyperdrive/vitest.config.ts | 41 +- .../images/vitest.config.ts | 22 +- .../kv-r2-caches/test/isolation.test.ts | 59 - .../kv-r2-caches/test/kv.test.ts | 6 - .../kv-r2-caches/test/r2.test.ts | 6 - .../kv-r2-caches/vitest.config.ts | 22 +- .../misc/test/fetch-mock.test.ts | 156 -- .../misc/test/msw.test.ts | 61 + .../misc/test/server.ts | 3 + .../misc/test/setup.ts | 10 + .../misc/vitest.assets.config.ts | 33 +- .../misc/vitest.config.ts | 59 +- .../misc/vitest.nodejs.config.ts | 21 +- .../module-resolution/src/index.ts | 20 +- .../module-resolution/test/index.spec.ts | 15 +- .../module-resolution/vitest.config.ts | 25 +- .../module-resolution/wrangler.jsonc | 2 + .../multiple-workers/vitest.config.ts | 115 +- .../vitest-pool-workers-examples/package.json | 6 +- .../test/integration-self.test.ts | 6 - .../test/unit.test.ts | 13 - .../vitest.config.ts | 38 +- .../pages-with-config/vitest.config.ts | 19 +- .../pipelines/vitest.config.ts | 22 +- .../queues/vitest.config.ts | 37 +- .../request-mocking/test/declarative.test.ts | 57 +- .../request-mocking/test/server.ts | 3 + .../request-mocking/test/setup.ts | 10 + .../request-mocking/vitest.config.ts | 22 +- .../rpc/vitest.config.ts | 34 +- .../tsconfig.workerd-test.json | 3 +- .../vitest.config.ts | 35 - .../web-assembly/vitest.config.ts | 30 +- .../workers-assets-only/vitest.config.ts | 17 +- .../vitest.config.ts | 17 +- .../workers-assets/vitest.config.ts | 17 +- .../workflows/vitest.config.ts | 24 +- .../package.json | 2 +- .../workers-shared-asset-config/tsconfig.json | 2 +- .../vitest.config.ts | 55 +- .../package.json | 1 + .../tsconfig.json | 3 +- package.json | 5 +- packages/create-cloudflare/package.json | 2 +- packages/kv-asset-handler/package.json | 4 +- packages/kv-asset-handler/vitest.config.mts | 2 - packages/pages-shared/package.json | 4 +- packages/pages-shared/vitest.config.mts | 1 - .../spa-with-api.spec.ts | 28 +- packages/vitest-pool-workers/package.json | 20 +- .../vitest-pool-workers/scripts/bundle.mjs | 158 -- .../scripts/rtti/query.mjs | 60 +- .../vitest-pool-workers/src/config/index.ts | 240 -- .../src/mock-agent/client.cjs | 18 - .../src/mock-agent/dispatcher.cjs | 9 - .../src/mock-agent/index.cjs | 29 - .../pending-interceptor-formatter.cjs | 34 - .../src/mock-agent/pool.cjs | 9 - .../src/pool/cloudflare-pool-worker.ts | 230 ++ .../vitest-pool-workers/src/pool/config.ts | 89 +- .../src/{config => pool}/d1.ts | 0 .../vitest-pool-workers/src/pool/helpers.ts | 22 +- .../vitest-pool-workers/src/pool/index.ts | 716 +----- .../vitest-pool-workers/src/pool/loopback.ts | 408 +--- .../src/pool/module-fallback.ts | 12 +- .../src/{config => pool}/pages.ts | 0 .../vitest-pool-workers/src/pool/plugin.ts | 122 + packages/vitest-pool-workers/src/pool/pool.ts | 18 + .../src/shared/chunking-socket.ts | 60 - .../src/worker/durable-objects.ts | 5 +- .../src/worker/entrypoints.ts | 11 +- .../vitest-pool-workers/src/worker/env.ts | 19 +- .../src/worker/fetch-mock.ts | 198 +- .../vitest-pool-workers/src/worker/index.ts | 226 +- .../src/worker/lib/cloudflare/snapshot.ts | 43 + .../worker/lib/cloudflare/test-internal.ts | 3 +- .../src/worker/lib/cloudflare/test-runner.ts | 358 --- .../src/worker/lib/cloudflare/test.ts | 1 - .../src/worker/lib/debug.ts | 3 - .../src/worker/lib/mlly.ts | 48 - .../src/worker/lib/tinypool.ts | 1 - .../src/worker/types-ambient.d.ts | 8 +- .../vitest-pool-workers/test/bindings.test.ts | 21 +- .../vitest-pool-workers/test/chunking.test.ts | 30 +- .../vitest-pool-workers/test/console.test.ts | 32 +- .../test/filtering.test.ts | 4 +- .../vitest-pool-workers/test/global-setup.ts | 4 +- packages/vitest-pool-workers/test/helpers.ts | 43 +- .../test/inspector.test.ts | 66 +- .../test/isolation.test.ts | 516 ++-- .../test/snapshots.test.ts | 8 +- .../test/validation.test.ts | 170 +- .../vitest-pool-workers/test/watch.test.ts | 80 +- .../vitest-pool-workers/tsconfig.emit.json | 12 - packages/vitest-pool-workers/tsconfig.json | 9 +- packages/vitest-pool-workers/tsdown.config.ts | 85 + .../types/cloudflare-test.d.ts | 2 - packages/workers-shared/package.json | 4 +- packages/workflows-shared/package.json | 4 +- .../workflows-shared/tests/engine.test.ts | 7 +- packages/workflows-shared/vitest.config.ts | 2 - packages/wrangler/e2e/vitest.config.mts | 8 +- packages/wrangler/package.json | 6 +- packages/wrangler/src/__tests__/index.test.ts | 2 + packages/wrangler/src/codemod.ts | 225 ++ packages/wrangler/src/index.ts | 9 + pnpm-lock.yaml | 2169 ++++++----------- pnpm-workspace.yaml | 16 +- .../generate-dependabot-pr-changesets.test.ts | 1 + vitest.shared.ts | 3 - 127 files changed, 2832 insertions(+), 5465 deletions(-) create mode 100644 .changeset/many-fishes-raise.md delete mode 100644 fixtures/vitest-pool-workers-examples/context-exports/vitest.isolated-storage.config.ts create mode 100644 fixtures/vitest-pool-workers-examples/context-exports/vitest.isolated_storage.config.ts delete mode 100644 fixtures/vitest-pool-workers-examples/context-exports/vitest.single-worker.config.ts create mode 100644 fixtures/vitest-pool-workers-examples/context-exports/vitest.single_worker.config.ts delete mode 100644 fixtures/vitest-pool-workers-examples/kv-r2-caches/test/isolation.test.ts delete mode 100644 fixtures/vitest-pool-workers-examples/misc/test/fetch-mock.test.ts create mode 100644 fixtures/vitest-pool-workers-examples/misc/test/msw.test.ts create mode 100644 fixtures/vitest-pool-workers-examples/misc/test/server.ts create mode 100644 fixtures/vitest-pool-workers-examples/misc/test/setup.ts create mode 100644 fixtures/vitest-pool-workers-examples/request-mocking/test/server.ts create mode 100644 fixtures/vitest-pool-workers-examples/request-mocking/test/setup.ts delete mode 100644 packages/vitest-pool-workers/scripts/bundle.mjs delete mode 100644 packages/vitest-pool-workers/src/config/index.ts delete mode 100644 packages/vitest-pool-workers/src/mock-agent/client.cjs delete mode 100644 packages/vitest-pool-workers/src/mock-agent/dispatcher.cjs delete mode 100644 packages/vitest-pool-workers/src/mock-agent/index.cjs delete mode 100644 packages/vitest-pool-workers/src/mock-agent/pending-interceptor-formatter.cjs delete mode 100644 packages/vitest-pool-workers/src/mock-agent/pool.cjs create mode 100644 packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts rename packages/vitest-pool-workers/src/{config => pool}/d1.ts (100%) rename packages/vitest-pool-workers/src/{config => pool}/pages.ts (100%) create mode 100644 packages/vitest-pool-workers/src/pool/plugin.ts create mode 100644 packages/vitest-pool-workers/src/pool/pool.ts delete mode 100644 packages/vitest-pool-workers/src/shared/chunking-socket.ts create mode 100644 packages/vitest-pool-workers/src/worker/lib/cloudflare/snapshot.ts delete mode 100644 packages/vitest-pool-workers/src/worker/lib/cloudflare/test-runner.ts delete mode 100644 packages/vitest-pool-workers/src/worker/lib/debug.ts delete mode 100644 packages/vitest-pool-workers/src/worker/lib/mlly.ts delete mode 100644 packages/vitest-pool-workers/src/worker/lib/tinypool.ts delete mode 100644 packages/vitest-pool-workers/tsconfig.emit.json create mode 100644 packages/vitest-pool-workers/tsdown.config.ts create mode 100644 packages/wrangler/src/codemod.ts diff --git a/.changeset/auth-token-command.md b/.changeset/auth-token-command.md index 43b4961461f3..29bcc5c491bd 100644 --- a/.changeset/auth-token-command.md +++ b/.changeset/auth-token-command.md @@ -11,6 +11,7 @@ wrangler auth token ``` The command returns whichever authentication method is currently configured: + - OAuth token from `wrangler login` (automatically refreshed if expired) - API token from `CLOUDFLARE_API_TOKEN` environment variable diff --git a/.changeset/many-fishes-raise.md b/.changeset/many-fishes-raise.md new file mode 100644 index 000000000000..1a360dbe28d5 --- /dev/null +++ b/.changeset/many-fishes-raise.md @@ -0,0 +1,13 @@ +--- +"@cloudflare/vitest-pool-workers": minor +--- + +Support Vitest 4 in `@cloudflare/vitest-pool-workers`. + +This a breaking change to the `@cloudflare/vitest-pool-workers` integration in order to support Vitest v4. Along with supporting Vitest v4 (and dropping support for Vitest v2 and v3), we've made a number of changes that may require changes to your tests. Our aim has been to improve stability & the foundations of `@cloudflare/vitest-pool-workers` as we move towards a v1 release of the package. + +We've made a codemod to make the migration easier: `wrangler codemod vitest-pool-v3-to-v4`, which will make the required changes to your config file. + +- **`isolatedStorage` & `singleWorker`:** These have been removed in favour of a simpler isolation model that more closely matches Vitest. Storage isolation is now on a per test file basis, and you can make your test files share the same storage by using the Vitest flags `--max-workers=1 --no-isolate` +- **`import { env, SELF } from "cloudflare:test"`:** These have been removed in favour of `import { env, exports } from "cloudflare:workers"`. `exports.default.fetch()` has the same behaviour as `SELF.fetch()`, except that it doesn't expose Assets. To test your assets, use the `env.ASSETS` bindings or write an integration test using [`startDevWorker()` (recommended)](https://developers.cloudflare.com/workers/testing/unstable_startworker/) +- **`import { fetchMock } from "cloudflare:test"`:** This has been removed. Instead, [mock `globalThis.fetch`](https://github.com/cloudflare/workers-sdk/blob/main/fixtures/vitest-pool-workers-examples/request-mocking/test/imperative.test.ts) or use ecosystem libraries like [MSW (recommended)](https://mswjs.io/). diff --git a/fixtures/import-npm/package-lock.json b/fixtures/import-npm/package-lock.json index 2065f61f45bb..221014f97b21 100644 --- a/fixtures/import-npm/package-lock.json +++ b/fixtures/import-npm/package-lock.json @@ -84,7 +84,7 @@ "mime": "^3.0.0", "minimatch": "^5.1.0", "mock-socket": "^9.3.1", - "msw": "2.4.3", + "msw": "catalog:default", "node-forge": "^1.3.1", "open": "^8.4.0", "p-queue": "^7.2.0", diff --git a/fixtures/vitest-pool-workers-examples/ai-vectorize/vitest.config.ts b/fixtures/vitest-pool-workers-examples/ai-vectorize/vitest.config.ts index 01335d4d60b3..64d5b14ec898 100644 --- a/fixtures/vitest-pool-workers-examples/ai-vectorize/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/ai-vectorize/vitest.config.ts @@ -1,14 +1,15 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + plugins: [ + cloudflareTest({ + remoteBindings: false, + wrangler: { configPath: "./wrangler.jsonc" }, + }), + ], -export default defineWorkersProject({ test: { globalSetup: ["./global-setup.ts"], - poolOptions: { - workers: { - singleWorker: true, - remoteBindings: false, - wrangler: { configPath: "./wrangler.jsonc" }, - }, - }, }, }); diff --git a/fixtures/vitest-pool-workers-examples/basics-integration-auxiliary/vitest.config.ts b/fixtures/vitest-pool-workers-examples/basics-integration-auxiliary/vitest.config.ts index 8cd3a2ce8265..cb50080f7019 100644 --- a/fixtures/vitest-pool-workers-examples/basics-integration-auxiliary/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/basics-integration-auxiliary/vitest.config.ts @@ -1,42 +1,43 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; -export default defineWorkersProject({ - test: { - globalSetup: ["./global-setup.ts"], - poolOptions: { - workers: { - singleWorker: true, - miniflare: { - // Configuration for the test runner Worker - compatibilityDate: "2024-01-01", - compatibilityFlags: [ - // This illustrates a Worker that in production only wants v1 of Node.js compatibility. - // The Vitest pool integration will need to remove this flag since the `MockAgent` requires v2. - "no_nodejs_compat_v2", - "nodejs_compat", - // Required to use `WORKER.scheduled()`. This is an experimental - // compatibility flag, and cannot be enabled in production. - "service_binding_extra_handlers", - ], - serviceBindings: { - WORKER: "worker-under-test", - }, - - workers: [ - // Configuration for the "auxiliary" Worker under test. - // Unfortunately, auxiliary Workers cannot load their configuration - // from `wrangler.toml` files, and must be configured with Miniflare - // `WorkerOptions`. - { - name: "worker-under-test", - modules: true, - scriptPath: "./dist/index.js", // Built by `global-setup.ts` - compatibilityDate: "2024-01-01", - compatibilityFlags: ["nodejs_compat"], - }, - ], +export default defineConfig({ + plugins: [ + cloudflareTest({ + miniflare: { + // Configuration for the test runner Worker + compatibilityDate: "2024-01-01", + compatibilityFlags: [ + // This illustrates a Worker that in production only wants v1 of Node.js compatibility. + // The Vitest pool integration will need to remove this flag since the `MockAgent` requires v2. + "no_nodejs_compat_v2", + "nodejs_compat", + // Required to use `WORKER.scheduled()`. This is an experimental + // compatibility flag, and cannot be enabled in production. + "service_binding_extra_handlers", + ], + serviceBindings: { + WORKER: "worker-under-test", }, + + workers: [ + // Configuration for the "auxiliary" Worker under test. + // Unfortunately, auxiliary Workers cannot load their configuration + // from `wrangler.toml` files, and must be configured with Miniflare + // `WorkerOptions`. + { + name: "worker-under-test", + modules: true, + scriptPath: "./dist/index.js", // Built by `global-setup.ts` + compatibilityDate: "2024-01-01", + compatibilityFlags: ["nodejs_compat"], + }, + ], }, - }, + }), + ], + + test: { + globalSetup: ["./global-setup.ts"], }, }); diff --git a/fixtures/vitest-pool-workers-examples/basics-unit-integration-self/vitest.config.ts b/fixtures/vitest-pool-workers-examples/basics-unit-integration-self/vitest.config.ts index 1b738407bce0..1e79f1c6e71a 100644 --- a/fixtures/vitest-pool-workers-examples/basics-unit-integration-self/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/basics-unit-integration-self/vitest.config.ts @@ -1,19 +1,19 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; -export default defineWorkersProject({ - test: { - poolOptions: { - workers: { - singleWorker: true, - miniflare: { - // Required to use `SELF.scheduled()`. This is an experimental - // compatibility flag, and cannot be enabled in production. - compatibilityFlags: ["service_binding_extra_handlers"], - }, - wrangler: { - configPath: "./wrangler.jsonc", - }, +export default defineConfig({ + plugins: [ + cloudflareTest({ + miniflare: { + // Required to use `SELF.scheduled()`. This is an experimental + // compatibility flag, and cannot be enabled in production. + compatibilityFlags: ["service_binding_extra_handlers"], }, - }, - }, + wrangler: { + configPath: "./wrangler.jsonc", + }, + }), + ], + + test: {}, }); diff --git a/fixtures/vitest-pool-workers-examples/container-app/vitest.config.ts b/fixtures/vitest-pool-workers-examples/container-app/vitest.config.ts index ed7d33c5d8b2..ef0e590042db 100644 --- a/fixtures/vitest-pool-workers-examples/container-app/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/container-app/vitest.config.ts @@ -1,12 +1,12 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; -export default defineWorkersProject({ - test: { - poolOptions: { - workers: { - singleWorker: true, - wrangler: { configPath: "./wrangler.jsonc" }, - }, - }, - }, +export default defineConfig({ + plugins: [ + cloudflareTest({ + wrangler: { configPath: "./wrangler.jsonc" }, + }), + ], + + test: {}, }); diff --git a/fixtures/vitest-pool-workers-examples/context-exports/vitest.config.ts b/fixtures/vitest-pool-workers-examples/context-exports/vitest.config.ts index 9c45cb60458b..fc5f5c5ccef7 100644 --- a/fixtures/vitest-pool-workers-examples/context-exports/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/context-exports/vitest.config.ts @@ -1,4 +1,5 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; // Configuration for the "auxiliary" Worker under test. // Unfortunately, auxiliary Workers cannot load their configuration @@ -15,21 +16,22 @@ export const auxiliaryWorker = { }, }; -export default defineWorkersProject({ +export default defineConfig({ + plugins: [ + cloudflareTest({ + wrangler: { configPath: "./src/wrangler.jsonc" }, + miniflare: { + workers: [auxiliaryWorker], + }, + additionalExports: { + // This entrypoint is wildcard re-exported from a virtual module so we cannot automatically infer it. + ConfiguredVirtualEntryPoint: "WorkerEntrypoint", + }, + }), + ], + test: { globalSetup: ["./global-setup.ts"], - poolOptions: { - workers: { - wrangler: { configPath: "./src/wrangler.jsonc" }, - miniflare: { - workers: [auxiliaryWorker], - }, - additionalExports: { - // This entrypoint is wildcard re-exported from a virtual module so we cannot automatically infer it. - ConfiguredVirtualEntryPoint: "WorkerEntrypoint", - }, - }, - }, alias: { // This alias is used to simulate a virtual module that Vitest and TypeScript can understand, // but esbuild (used by the vitest-pool-workers to guess exports) cannot. diff --git a/fixtures/vitest-pool-workers-examples/context-exports/vitest.isolated-storage.config.ts b/fixtures/vitest-pool-workers-examples/context-exports/vitest.isolated-storage.config.ts deleted file mode 100644 index 2fb6a96f2b07..000000000000 --- a/fixtures/vitest-pool-workers-examples/context-exports/vitest.isolated-storage.config.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; -import { auxiliaryWorker } from "./vitest.config"; - -export default defineWorkersProject({ - test: { - name: "context-exports-isolated-storage", - globalSetup: ["./global-setup.ts"], - poolOptions: { - workers: { - isolatedStorage: true, - wrangler: { configPath: "./src/wrangler.jsonc" }, - miniflare: { - workers: [auxiliaryWorker], - }, - additionalExports: { - // This entrypoint is wildcard re-exported from a virtual module so we cannot automatically infer it. - ConfiguredVirtualEntryPoint: "WorkerEntrypoint", - }, - }, - }, - alias: { - // This alias is used to simulate a virtual module that Vitest and TypeScript can understand, - // but esbuild (used by the vitest-pool-workers to guess exports) cannot. - "@virtual-module": "./virtual.ts", - }, - }, -}); diff --git a/fixtures/vitest-pool-workers-examples/context-exports/vitest.isolated_storage.config.ts b/fixtures/vitest-pool-workers-examples/context-exports/vitest.isolated_storage.config.ts new file mode 100644 index 000000000000..c07c51a8f497 --- /dev/null +++ b/fixtures/vitest-pool-workers-examples/context-exports/vitest.isolated_storage.config.ts @@ -0,0 +1,29 @@ +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; +import { auxiliaryWorker } from "./vitest.config"; + +export default defineConfig({ + plugins: [ + cloudflareTest({ + wrangler: { configPath: "./src/wrangler.jsonc" }, + miniflare: { + workers: [auxiliaryWorker], + }, + additionalExports: { + // This entrypoint is wildcard re-exported from a virtual module so we cannot automatically infer it. + ConfiguredVirtualEntryPoint: "WorkerEntrypoint", + }, + }), + ], + + test: { + name: "context-exports-isolated-storage", + globalSetup: ["./global-setup.ts"], + + alias: { + // This alias is used to simulate a virtual module that Vitest and TypeScript can understand, + // but esbuild (used by the vitest-pool-workers to guess exports) cannot. + "@virtual-module": "./virtual.ts", + }, + }, +}); diff --git a/fixtures/vitest-pool-workers-examples/context-exports/vitest.single-worker.config.ts b/fixtures/vitest-pool-workers-examples/context-exports/vitest.single-worker.config.ts deleted file mode 100644 index 6e8010d36ce2..000000000000 --- a/fixtures/vitest-pool-workers-examples/context-exports/vitest.single-worker.config.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; -import { kCurrentWorker } from "../../../packages/miniflare/dist/src"; -import { auxiliaryWorker } from "./vitest.config"; - -export default defineWorkersProject({ - test: { - name: "context-exports-single-worker", - globalSetup: ["./global-setup.ts"], - poolOptions: { - workers: { - singleWorker: true, - wrangler: { configPath: "./src/wrangler.jsonc" }, - miniflare: { - workers: [auxiliaryWorker], - }, - additionalExports: { - // This entrypoint is wildcard re-exported from a virtual module so we cannot automatically infer it. - ConfiguredVirtualEntryPoint: "WorkerEntrypoint", - }, - }, - }, - alias: { - // This alias is used to simulate a virtual module that Vitest and TypeScript can understand, - // but esbuild (used by the vitest-pool-workers to guess exports) cannot. - "@virtual-module": "./virtual.ts", - }, - }, -}); diff --git a/fixtures/vitest-pool-workers-examples/context-exports/vitest.single_worker.config.ts b/fixtures/vitest-pool-workers-examples/context-exports/vitest.single_worker.config.ts new file mode 100644 index 000000000000..49b75c639696 --- /dev/null +++ b/fixtures/vitest-pool-workers-examples/context-exports/vitest.single_worker.config.ts @@ -0,0 +1,30 @@ +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; +import { kCurrentWorker } from "../../../packages/miniflare/dist/src"; +import { auxiliaryWorker } from "./vitest.config"; + +export default defineConfig({ + plugins: [ + cloudflareTest({ + wrangler: { configPath: "./src/wrangler.jsonc" }, + miniflare: { + workers: [auxiliaryWorker], + }, + additionalExports: { + // This entrypoint is wildcard re-exported from a virtual module so we cannot automatically infer it. + ConfiguredVirtualEntryPoint: "WorkerEntrypoint", + }, + }), + ], + + test: { + name: "context-exports-single-worker", + globalSetup: ["./global-setup.ts"], + + alias: { + // This alias is used to simulate a virtual module that Vitest and TypeScript can understand, + // but esbuild (used by the vitest-pool-workers to guess exports) cannot. + "@virtual-module": "./virtual.ts", + }, + }, +}); diff --git a/fixtures/vitest-pool-workers-examples/d1/test/queries.test.ts b/fixtures/vitest-pool-workers-examples/d1/test/queries.test.ts index 409438e3019b..4470aa3790a8 100644 --- a/fixtures/vitest-pool-workers-examples/d1/test/queries.test.ts +++ b/fixtures/vitest-pool-workers-examples/d1/test/queries.test.ts @@ -25,8 +25,9 @@ it("should list posts", async () => { await upsertPost(env, "/three", "3"); const posts = await listPosts(env); - expect(posts.length).toBe(3); // Note changes from previous test undone - expect(posts[0].body).toBe("1"); - expect(posts[1].body).toBe("2"); - expect(posts[2].body).toBe("3"); + expect(posts.length).toBe(4); + expect(posts[0].body).toBe("👋"); + expect(posts[1].body).toBe("1"); + expect(posts[2].body).toBe("2"); + expect(posts[3].body).toBe("3"); }); diff --git a/fixtures/vitest-pool-workers-examples/d1/test/routes.test.ts b/fixtures/vitest-pool-workers-examples/d1/test/routes.test.ts index f223e3430c97..80f526aa1124 100644 --- a/fixtures/vitest-pool-workers-examples/d1/test/routes.test.ts +++ b/fixtures/vitest-pool-workers-examples/d1/test/routes.test.ts @@ -22,7 +22,11 @@ it("should list posts", async () => { const response = await SELF.fetch("https://example.com/"); expect(response.status).toBe(200); expect(await response.text()).toMatchInlineSnapshot(` - "https://example.com/one + "https://example.com/hello + 👋 + + -------------------- + https://example.com/one 1 -------------------- diff --git a/fixtures/vitest-pool-workers-examples/d1/vitest.config.ts b/fixtures/vitest-pool-workers-examples/d1/vitest.config.ts index 48072e7bcb7d..6cf835fdcb2a 100644 --- a/fixtures/vitest-pool-workers-examples/d1/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/d1/vitest.config.ts @@ -1,31 +1,31 @@ import path from "node:path"; import { - defineWorkersProject, + cloudflareTest, readD1Migrations, -} from "@cloudflare/vitest-pool-workers/config"; +} from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; -export default defineWorkersProject(async () => { +export default defineConfig(async () => { // Read all migrations in the `migrations` directory const migrationsPath = path.join(__dirname, "migrations"); const migrations = await readD1Migrations(migrationsPath); return { + plugins: [ + cloudflareTest({ + wrangler: { + configPath: "./wrangler.jsonc", + environment: "production", + }, + miniflare: { + // Add a test-only binding for migrations, so we can apply them in a + // setup file + bindings: { TEST_MIGRATIONS: migrations }, + }, + }), + ], test: { setupFiles: ["./test/apply-migrations.ts"], - poolOptions: { - workers: { - singleWorker: true, - wrangler: { - configPath: "./wrangler.jsonc", - environment: "production", - }, - miniflare: { - // Add a test-only binding for migrations, so we can apply them in a - // setup file - bindings: { TEST_MIGRATIONS: migrations }, - }, - }, - }, }, }; }); diff --git a/fixtures/vitest-pool-workers-examples/durable-objects/test/direct-access.test.ts b/fixtures/vitest-pool-workers-examples/durable-objects/test/direct-access.test.ts index 6712fc1b1ec3..fd3fd2c8d1c3 100644 --- a/fixtures/vitest-pool-workers-examples/durable-objects/test/direct-access.test.ts +++ b/fixtures/vitest-pool-workers-examples/durable-objects/test/direct-access.test.ts @@ -33,13 +33,3 @@ it("increments count and allows direct access to instance/storage", async () => expect(ids.length).toBe(1); expect(ids[0].equals(id)).toBe(true); }); - -it("uses isolated storage for each test", async () => { - // Check Durable Object from previous test removed - const ids = await listDurableObjectIds(env.COUNTER); - expect(ids.length).toBe(0); - - // Check writes in previous test undone - const response = await SELF.fetch("https://example.com/path"); - expect(await response.text()).toBe("1"); -}); diff --git a/fixtures/vitest-pool-workers-examples/durable-objects/vitest.config.ts b/fixtures/vitest-pool-workers-examples/durable-objects/vitest.config.ts index 37061a9d29d5..ccf6ad0bc9ca 100644 --- a/fixtures/vitest-pool-workers-examples/durable-objects/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/durable-objects/vitest.config.ts @@ -1,15 +1,16 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + plugins: [ + cloudflareTest({ + wrangler: { + configPath: "./wrangler.jsonc", + }, + }), + ], -export default defineWorkersProject({ test: { name: "@scoped/durable-objects", - poolOptions: { - workers: { - singleWorker: true, - wrangler: { - configPath: "./wrangler.jsonc", - }, - }, - }, }, }); diff --git a/fixtures/vitest-pool-workers-examples/hyperdrive/vitest.config.ts b/fixtures/vitest-pool-workers-examples/hyperdrive/vitest.config.ts index 08468b45b3c4..1260a0a8f799 100644 --- a/fixtures/vitest-pool-workers-examples/hyperdrive/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/hyperdrive/vitest.config.ts @@ -1,25 +1,26 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; -export default defineWorkersProject({ - test: { - globalSetup: ["./global-setup.ts"], - poolOptions: { - workers: ({ inject }) => { - // Provided in `global-setup.ts` - const echoServerPort = inject("echoServerPort"); +export default defineConfig({ + plugins: [ + cloudflareTest(({ inject }) => { + // Provided in `global-setup.ts` + const echoServerPort = inject("echoServerPort"); - return { - singleWorker: true, - miniflare: { - hyperdrives: { - ECHO_SERVER_HYPERDRIVE: `postgres://user:pass@127.0.0.1:${echoServerPort}/db`, - }, - }, - wrangler: { - configPath: "./wrangler.jsonc", + return { + miniflare: { + hyperdrives: { + ECHO_SERVER_HYPERDRIVE: `postgres://user:pass@127.0.0.1:${echoServerPort}/db`, }, - }; - }, - }, + }, + wrangler: { + configPath: "./wrangler.jsonc", + }, + }; + }), + ], + + test: { + globalSetup: ["./global-setup.ts"], }, }); diff --git a/fixtures/vitest-pool-workers-examples/images/vitest.config.ts b/fixtures/vitest-pool-workers-examples/images/vitest.config.ts index 42e8f9ffd97f..b90cb174ce09 100644 --- a/fixtures/vitest-pool-workers-examples/images/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/images/vitest.config.ts @@ -1,14 +1,14 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; -export default defineWorkersProject({ - test: { - poolOptions: { - workers: { - singleWorker: true, - wrangler: { - configPath: "./wrangler.jsonc", - }, +export default defineConfig({ + plugins: [ + cloudflareTest({ + wrangler: { + configPath: "./wrangler.jsonc", }, - }, - }, + }), + ], + + test: {}, }); diff --git a/fixtures/vitest-pool-workers-examples/kv-r2-caches/test/isolation.test.ts b/fixtures/vitest-pool-workers-examples/kv-r2-caches/test/isolation.test.ts deleted file mode 100644 index cae744c3cd7a..000000000000 --- a/fixtures/vitest-pool-workers-examples/kv-r2-caches/test/isolation.test.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { env } from "cloudflare:test"; -import { beforeAll, beforeEach, describe, expect, test } from "vitest"; - -// Illustrative example for `isolatedStorage` option - -// Get the current list stored in a KV namespace -async function get(): Promise { - return (await env.KV_NAMESPACE.get("list", "json")) ?? []; -} -// Add an item to the end of the list -async function append(item: string) { - const value = await get(); - value.push(item); - await env.KV_NAMESPACE.put("list", JSON.stringify(value)); -} - -beforeAll(() => append("all")); -beforeEach(() => append("each")); - -test("one", async () => { - // Each test gets its own storage environment copied from the parent - await append("one"); - expect(await get()).toStrictEqual(["all", "each", "one"]); -}); -// `append("each")` and `append("one")` undone -test("two", async () => { - await append("two"); - expect(await get()).toStrictEqual(["all", "each", "two"]); -}); -// `append("each")` and `append("two")` undone - -describe("describe", async () => { - beforeAll(() => append("describe all")); - beforeEach(() => append("describe each")); - - test("three", async () => { - await append("three"); - expect(await get()).toStrictEqual([ - // All `beforeAll()`s run before `beforeEach()`s - "all", - "describe all", - "each", - "describe each", - "three", - ]); - }); - // `append("each")`, `append("describe each")` and `append("three")` undone - test("four", async () => { - await append("four"); - expect(await get()).toStrictEqual([ - "all", - "describe all", - "each", - "describe each", - "four", - ]); - }); - // `append("each")`, `append("describe each")` and `append("four")` undone -}); diff --git a/fixtures/vitest-pool-workers-examples/kv-r2-caches/test/kv.test.ts b/fixtures/vitest-pool-workers-examples/kv-r2-caches/test/kv.test.ts index f5a07677364f..040439964686 100644 --- a/fixtures/vitest-pool-workers-examples/kv-r2-caches/test/kv.test.ts +++ b/fixtures/vitest-pool-workers-examples/kv-r2-caches/test/kv.test.ts @@ -12,9 +12,3 @@ it("stores in KV namespace", async () => { expect(response.status).toBe(200); expect(await response.text()).toBe("value"); }); - -it("uses isolated storage for each test", async () => { - // Check write in previous test undone - const response = await SELF.fetch("https://example.com/kv/key"); - expect(response.status).toBe(204); -}); diff --git a/fixtures/vitest-pool-workers-examples/kv-r2-caches/test/r2.test.ts b/fixtures/vitest-pool-workers-examples/kv-r2-caches/test/r2.test.ts index 3560aadfbc6b..94085fdac716 100644 --- a/fixtures/vitest-pool-workers-examples/kv-r2-caches/test/r2.test.ts +++ b/fixtures/vitest-pool-workers-examples/kv-r2-caches/test/r2.test.ts @@ -31,9 +31,3 @@ it("stores in R2 bucket", async () => { expect(response.headers.get("CF-Cache-Status")).toBe("HIT"); expect(await response.text()).toBe("value"); }); - -it("uses isolated storage for each test", async () => { - // Check write in previous test undone - const response = await SELF.fetch("https://example.com/r2/key"); - expect(response.status).toBe(204); -}); diff --git a/fixtures/vitest-pool-workers-examples/kv-r2-caches/vitest.config.ts b/fixtures/vitest-pool-workers-examples/kv-r2-caches/vitest.config.ts index 42e8f9ffd97f..b90cb174ce09 100644 --- a/fixtures/vitest-pool-workers-examples/kv-r2-caches/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/kv-r2-caches/vitest.config.ts @@ -1,14 +1,14 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; -export default defineWorkersProject({ - test: { - poolOptions: { - workers: { - singleWorker: true, - wrangler: { - configPath: "./wrangler.jsonc", - }, +export default defineConfig({ + plugins: [ + cloudflareTest({ + wrangler: { + configPath: "./wrangler.jsonc", }, - }, - }, + }), + ], + + test: {}, }); diff --git a/fixtures/vitest-pool-workers-examples/misc/test/fetch-mock.test.ts b/fixtures/vitest-pool-workers-examples/misc/test/fetch-mock.test.ts deleted file mode 100644 index 7bfaa953c9ab..000000000000 --- a/fixtures/vitest-pool-workers-examples/misc/test/fetch-mock.test.ts +++ /dev/null @@ -1,156 +0,0 @@ -import { fetchMock } from "cloudflare:test"; -import { - afterAll, - afterEach, - beforeAll, - beforeEach, - describe, - expect, - it, - vi, -} from "vitest"; -import type { MockInstance } from "vitest"; - -beforeEach(() => fetchMock.activate()); -afterEach(() => { - fetchMock.assertNoPendingInterceptors(); - fetchMock.deactivate(); -}); - -it("falls through to global fetch() if unmatched", async () => { - fetchMock - .get("https://example.com") - .intercept({ path: "/" }) - .reply(200, "body"); - - let response = await fetch("https://example.com"); - expect(response.url).toEqual("https://example.com/"); - expect(await response.text()).toBe("body"); - - response = await fetch("https://example.com/bad"); - expect(response.url).toEqual("https://example.com/bad"); - expect(await response.text()).toBe("fallthrough:GET https://example.com/bad"); -}); - -it("intercepts URLs with query parameters with repeated keys", async () => { - fetchMock - .get("https://example.com") - .intercept({ path: "/foo", query: { key: "value" } }) - .reply(200, "foo"); - - fetchMock - .get("https://example.com") - .intercept({ path: "/bar?a=1&a=2" }) - .reply(200, "bar"); - - fetchMock - .get("https://example.com") - .intercept({ path: "/baz", query: { key1: ["a", "b"], key2: "c" } }) - .reply(200, "baz"); - - let response1 = await fetch("https://example.com/foo?key=value"); - expect(response1.url).toEqual("https://example.com/foo?key=value"); - expect(await response1.text()).toBe("foo"); - - let response2 = await fetch("https://example.com/bar?a=1&a=2"); - expect(response2.url).toEqual("https://example.com/bar?a=1&a=2"); - expect(await response2.text()).toBe("bar"); - - let response3 = await fetch("https://example.com/baz?key1=a&key2=c&key1=b"); - expect(response3.url).toEqual("https://example.com/baz?key1=a&key2=c&key1=b"); - expect(await response3.text()).toBe("baz"); -}); - -it("throws if you try to mutate the headers", async () => { - fetchMock - .get("https://example.com") - .intercept({ path: "/" }) - .reply(200, "body"); - - let response = await fetch("https://example.com"); - - expect(() => response.headers.set("foo", "bar")).toThrowError(); - expect(() => response.headers.append("foo", "baz")).toThrowError(); - expect(() => response.headers.delete("foo")).toThrowError(); -}); - -describe("AbortSignal", () => { - let abortSignalTimeoutMock: MockInstance; - - beforeAll(() => { - // Fake Timers does not mock AbortSignal.timeout - abortSignalTimeoutMock = vi - .spyOn(AbortSignal, "timeout") - .mockImplementation((ms: number) => { - const controller = new AbortController(); - setTimeout(() => { - controller.abort(); - }, ms); - return controller.signal; - }); - }); - - afterAll(() => abortSignalTimeoutMock.mockRestore()); - - beforeEach(() => vi.useFakeTimers()); - - afterEach(() => vi.useRealTimers()); - - it("aborts if an AbortSignal timeout is exceeded", async () => { - fetchMock - .get("https://example.com") - .intercept({ path: "/" }) - .reply(200, async () => { - await new Promise((resolve) => setTimeout(resolve, 5000)); - return "Delayed response"; - }); - - const fetchPromise = fetch("https://example.com", { - signal: AbortSignal.timeout(2000), - }); - - vi.advanceTimersByTime(10_000); - await expect(fetchPromise).rejects.toThrowErrorMatchingInlineSnapshot( - `[AbortError: The operation was aborted]` - ); - }); - - it("does not abort if an AbortSignal timeout is not exceeded", async () => { - fetchMock - .get("https://example.com") - .intercept({ path: "/" }) - .reply(200, async () => { - await new Promise((resolve) => setTimeout(resolve, 1000)); - return "Delayed response"; - }); - - const fetchPromise = fetch("https://example.com", { - signal: AbortSignal.timeout(2000), - }); - - vi.advanceTimersByTime(1500); - const response = await fetchPromise; - expect(response.status).toStrictEqual(200); - expect(await response.text()).toMatchInlineSnapshot(`"Delayed response"`); - }); - - it("aborts if an AbortSignal is already aborted", async () => { - const controller = new AbortController(); - controller.abort(); - - fetchMock - .get("https://example.com") - .intercept({ path: "/" }) - .reply(200, async () => { - return "Delayed response"; - }); - - const fetchPromise = fetch("https://example.com", { - signal: controller.signal, - }); - - await expect(fetchPromise).rejects.toThrowErrorMatchingInlineSnapshot( - `[AbortError: The operation was aborted]` - ); - }); -}); diff --git a/fixtures/vitest-pool-workers-examples/misc/test/msw.test.ts b/fixtures/vitest-pool-workers-examples/misc/test/msw.test.ts new file mode 100644 index 000000000000..aac8a34afff9 --- /dev/null +++ b/fixtures/vitest-pool-workers-examples/misc/test/msw.test.ts @@ -0,0 +1,61 @@ +import { http, HttpResponse } from "msw"; +import { expect, it } from "vitest"; +import { server } from "./server"; + +it("falls through to global fetch() if unmatched", async () => { + server.use( + http.get( + "https://example.com", + () => { + return HttpResponse.text("body"); + }, + { once: true } + ) + ); + + let response = await fetch("https://example.com"); + expect(response.url).toEqual("https://example.com/"); + expect(await response.text()).toBe("body"); + + response = await fetch("https://example.com/bad"); + expect(response.url).toEqual("https://example.com/bad"); + expect(await response.text()).toBe("fallthrough:GET https://example.com/bad"); +}); + +it("intercepts URLs with query parameters with repeated keys", async () => { + server.use( + http.get( + "https://example.com/foo?key=value", + () => { + return HttpResponse.text("foo"); + }, + { once: true } + ), + http.get( + "https://example.com/bar?a=1&a=2", + () => { + return HttpResponse.text("bar"); + }, + { once: true } + ), + http.get( + "https://example.com/baz?key1=a&key2=c&key1=b", + () => { + return HttpResponse.text("baz"); + }, + { once: true } + ) + ); + + let response1 = await fetch("https://example.com/foo?key=value"); + expect(response1.url).toEqual("https://example.com/foo?key=value"); + expect(await response1.text()).toBe("foo"); + + let response2 = await fetch("https://example.com/bar?a=1&a=2"); + expect(response2.url).toEqual("https://example.com/bar?a=1&a=2"); + expect(await response2.text()).toBe("bar"); + + let response3 = await fetch("https://example.com/baz?key1=a&key2=c&key1=b"); + expect(response3.url).toEqual("https://example.com/baz?key1=a&key2=c&key1=b"); + expect(await response3.text()).toBe("baz"); +}); diff --git a/fixtures/vitest-pool-workers-examples/misc/test/server.ts b/fixtures/vitest-pool-workers-examples/misc/test/server.ts new file mode 100644 index 000000000000..bd0bda57d85c --- /dev/null +++ b/fixtures/vitest-pool-workers-examples/misc/test/server.ts @@ -0,0 +1,3 @@ +import { setupServer } from "msw/node"; + +export const server = setupServer(); diff --git a/fixtures/vitest-pool-workers-examples/misc/test/setup.ts b/fixtures/vitest-pool-workers-examples/misc/test/setup.ts new file mode 100644 index 000000000000..f37c96ebdd3e --- /dev/null +++ b/fixtures/vitest-pool-workers-examples/misc/test/setup.ts @@ -0,0 +1,10 @@ +import { afterAll, afterEach, beforeAll } from "vitest"; +import { server } from "./server"; + +beforeAll(() => + server.listen({ + onUnhandledRequest: "bypass", + }) +); +afterEach(() => server.resetHandlers()); +afterAll(() => server.close()); diff --git a/fixtures/vitest-pool-workers-examples/misc/vitest.assets.config.ts b/fixtures/vitest-pool-workers-examples/misc/vitest.assets.config.ts index a7fa2cd31647..c0ec68a1ab66 100644 --- a/fixtures/vitest-pool-workers-examples/misc/vitest.assets.config.ts +++ b/fixtures/vitest-pool-workers-examples/misc/vitest.assets.config.ts @@ -1,22 +1,23 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + plugins: [ + cloudflareTest({ + miniflare: { + assets: { + directory: "./public", + binding: "ASSETS", + }, + }, + wrangler: { + configPath: "./wrangler.assets.jsonc", + }, + }), + ], -export default defineWorkersProject({ test: { name: "misc-assets", include: ["test/assets.test.ts"], - poolOptions: { - workers: { - singleWorker: true, - miniflare: { - assets: { - directory: "./public", - binding: "ASSETS", - }, - }, - wrangler: { - configPath: "./wrangler.assets.jsonc", - }, - }, - }, }, }); diff --git a/fixtures/vitest-pool-workers-examples/misc/vitest.config.ts b/fixtures/vitest-pool-workers-examples/misc/vitest.config.ts index 8a953362eb10..b3ee7098f7c0 100644 --- a/fixtures/vitest-pool-workers-examples/misc/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/misc/vitest.config.ts @@ -1,38 +1,41 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; import { Response } from "miniflare"; +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + plugins: [ + cloudflareTest({ + miniflare: { + kvNamespaces: ["KV_NAMESPACE"], + outboundService(request) { + return new Response(`fallthrough:${request.method} ${request.url}`); + }, + serviceBindings: { + ASSETS(request) { + return new Response(`assets:${request.method} ${request.url}`); + }, + }, + workers: [ + { + name: "other", + modules: true, + scriptPath: "./src/other-worker.mjs", + }, + ], + }, + wrangler: { + configPath: "./wrangler.jsonc", + }, + }), + ], -export default defineWorkersProject({ define: { CONFIG_DEFINED_THING: '"thing"', "CONFIG_NESTED.DEFINED.THING": "[1,2,3]", }, + test: { exclude: ["test/assets.test.ts", "test/nodejs.test.ts"], - poolOptions: { - workers: { - singleWorker: true, - miniflare: { - kvNamespaces: ["KV_NAMESPACE"], - outboundService(request) { - return new Response(`fallthrough:${request.method} ${request.url}`); - }, - serviceBindings: { - ASSETS(request) { - return new Response(`assets:${request.method} ${request.url}`); - }, - }, - workers: [ - { - name: "other", - modules: true, - scriptPath: "./src/other-worker.mjs", - }, - ], - }, - wrangler: { - configPath: "./wrangler.jsonc", - }, - }, - }, + setupFiles: ["test/setup.ts"], }, }); diff --git a/fixtures/vitest-pool-workers-examples/misc/vitest.nodejs.config.ts b/fixtures/vitest-pool-workers-examples/misc/vitest.nodejs.config.ts index c34715977fce..6ca44fadb166 100644 --- a/fixtures/vitest-pool-workers-examples/misc/vitest.nodejs.config.ts +++ b/fixtures/vitest-pool-workers-examples/misc/vitest.nodejs.config.ts @@ -1,16 +1,17 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + plugins: [ + cloudflareTest({ + wrangler: { + configPath: "./wrangler.nodejs.jsonc", + }, + }), + ], -export default defineWorkersProject({ test: { name: "misc-nodejs", include: ["test/nodejs.test.ts"], - poolOptions: { - workers: { - singleWorker: true, - wrangler: { - configPath: "./wrangler.nodejs.jsonc", - }, - }, - }, }, }); diff --git a/fixtures/vitest-pool-workers-examples/module-resolution/src/index.ts b/fixtures/vitest-pool-workers-examples/module-resolution/src/index.ts index e4bb52a21512..de54b91ac247 100644 --- a/fixtures/vitest-pool-workers-examples/module-resolution/src/index.ts +++ b/fixtures/vitest-pool-workers-examples/module-resolution/src/index.ts @@ -1,10 +1,14 @@ -import { Toucan } from "toucan-js"; -// Testing dependency without a main entrypoint -// @see https://github.com/cloudflare/workers-sdk/issues/6591 -import "discord-api-types/v10"; +import * as bAuthStripe from "@better-auth/stripe"; // Testing dependency with browser field mapping // @see https://github.com/cloudflare/workers-sdk/issues/6581 -import "@microlabs/otel-cf-workers"; +import * as otel from "@microlabs/otel-cf-workers"; +import * as bAuth from "better-auth"; +// Testing dependency without a main entrypoint +// @see https://github.com/cloudflare/workers-sdk/issues/6591 +import * as discord from "discord-api-types/v10"; +import * as jose from "jose"; +import Stripe from "stripe"; +import { Toucan } from "toucan-js"; export default { async fetch(): Promise { @@ -12,7 +16,11 @@ export default { const _ = new Toucan({ dsn: "https://foo@sentry.com/123456", }); + const a = Stripe; - return new Response("Hello World!"); + // Make sure none of the imports are tree shaken + return new Response( + JSON.stringify({ discord, otel, jose, bAuth, bAuthStripe, a }) + ); }, }; diff --git a/fixtures/vitest-pool-workers-examples/module-resolution/test/index.spec.ts b/fixtures/vitest-pool-workers-examples/module-resolution/test/index.spec.ts index 3b1ce706d030..247435cdfcb2 100644 --- a/fixtures/vitest-pool-workers-examples/module-resolution/test/index.spec.ts +++ b/fixtures/vitest-pool-workers-examples/module-resolution/test/index.spec.ts @@ -1,20 +1,29 @@ import { instrument } from "@microlabs/otel-cf-workers"; +import { SELF } from "cloudflare:test"; import { Utils } from "discord-api-types/v10"; import dep from "ext-dep"; -import { assert, describe, test } from "vitest"; +import { assert, describe, expect, test } from "vitest"; +import worker from "../src/index"; describe("test", () => { test("resolves commonjs directory dependencies correctly", async () => { assert.equal(dep, 123); }); - // This requires the `deps.optimizer` option to be set in the vitest config test("resolves dependency without a default entrypoint", async () => { assert.isFunction(Utils.isDMInteraction); }); - // This requires the `deps.optimizer` option to be set in the vitest config test("resolves dependency with mapping on the browser field", async () => { assert.isFunction(instrument); }); + + test("can use toucan-js (integration)", async () => { + expect((await SELF.fetch("http://example.com")).status).toBe(200); + }); + + test("can use toucan-js (unit)", async () => { + const response = await worker.fetch(); + expect(response.status).toBe(200); + }); }); diff --git a/fixtures/vitest-pool-workers-examples/module-resolution/vitest.config.ts b/fixtures/vitest-pool-workers-examples/module-resolution/vitest.config.ts index f47effc9d612..9b79788eddd6 100644 --- a/fixtures/vitest-pool-workers-examples/module-resolution/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/module-resolution/vitest.config.ts @@ -1,19 +1,10 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; -export default defineWorkersProject({ - test: { - deps: { - optimizer: { - ssr: { - enabled: true, - include: ["discord-api-types/v10", "@microlabs/otel-cf-workers"], - }, - }, - }, - poolOptions: { - workers: { - wrangler: { configPath: "./wrangler.jsonc" }, - }, - }, - }, +export default defineConfig({ + plugins: [ + cloudflareTest({ + wrangler: { configPath: "./wrangler.jsonc" }, + }), + ], }); diff --git a/fixtures/vitest-pool-workers-examples/module-resolution/wrangler.jsonc b/fixtures/vitest-pool-workers-examples/module-resolution/wrangler.jsonc index 5bac18d5ec57..2c5be6a6ee07 100644 --- a/fixtures/vitest-pool-workers-examples/module-resolution/wrangler.jsonc +++ b/fixtures/vitest-pool-workers-examples/module-resolution/wrangler.jsonc @@ -1,5 +1,7 @@ { "name": "module-resolution", "main": "src/index.ts", + "compatibility_date": "2025-12-13", + "compatibility_flags": ["nodejs_compat"], // don't provide compatibility_date so that vitest will infer the latest one } diff --git a/fixtures/vitest-pool-workers-examples/multiple-workers/vitest.config.ts b/fixtures/vitest-pool-workers-examples/multiple-workers/vitest.config.ts index e8df87f1b75d..80910868baaf 100644 --- a/fixtures/vitest-pool-workers-examples/multiple-workers/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/multiple-workers/vitest.config.ts @@ -1,7 +1,8 @@ import crypto from "node:crypto"; -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; import { importPKCS8, SignJWT } from "jose"; import { Request, Response } from "miniflare"; +import { defineConfig } from "vitest/config"; // Generate RSA keypair for signing/verifying JWTs const authKeypair = crypto.generateKeyPairSync("rsa", { @@ -56,64 +57,64 @@ async function handleAuthServiceOutbound(request: Request): Promise { return new Response("Not Found", { status: 404 }); } -export default defineWorkersProject({ - test: { - globalSetup: ["./global-setup.ts"], - poolOptions: { - workers: { - singleWorker: true, - // Configuration for the test runner and "API service" Worker - wrangler: { - configPath: "./api-service/wrangler.jsonc", +export default defineConfig({ + plugins: [ + cloudflareTest({ + // Configuration for the test runner and "API service" Worker + wrangler: { + configPath: "./api-service/wrangler.jsonc", + }, + miniflare: { + bindings: { + TEST_AUTH_PUBLIC_KEY: authKeypair.publicKey, }, - miniflare: { - bindings: { - TEST_AUTH_PUBLIC_KEY: authKeypair.publicKey, - }, - workers: [ - // Configuration for "auxiliary" Worker dependencies. - // Unfortunately, auxiliary Workers cannot load their configuration - // from `wrangler.toml` files, and must be configured with Miniflare - // `WorkerOptions`. - { - name: "auth-service", - modules: true, - scriptPath: "./auth-service/dist/index.js", // Built by `global-setup.ts` - compatibilityDate: "2024-01-01", - compatibilityFlags: ["nodejs_compat"], - bindings: { AUTH_PUBLIC_KEY: authKeypair.publicKey }, - // Mock outbound `fetch()`es from the `auth-service` - outboundService: handleAuthServiceOutbound, - }, - { - name: "database-service", - modules: true, - scriptPath: "./database-service/dist/index.js", // Built by `global-setup.ts` - compatibilityDate: "2024-01-01", - compatibilityFlags: ["nodejs_compat"], - kvNamespaces: ["KV_NAMESPACE"], - }, - { - name: "tail-consumer", - modules: [ - { - path: "index.js", - type: "ESModule", - contents: /* javascript */ ` - export default { - tail(event) { - console.log("tail event received") - } - } - `, - }, - ], - compatibilityDate: "2024-01-01", - }, - ], - }, + workers: [ + // Configuration for "auxiliary" Worker dependencies. + // Unfortunately, auxiliary Workers cannot load their configuration + // from `wrangler.toml` files, and must be configured with Miniflare + // `WorkerOptions`. + { + name: "auth-service", + modules: true, + scriptPath: "./auth-service/dist/index.js", // Built by `global-setup.ts` + compatibilityDate: "2024-01-01", + compatibilityFlags: ["nodejs_compat"], + bindings: { AUTH_PUBLIC_KEY: authKeypair.publicKey }, + // Mock outbound `fetch()`es from the `auth-service` + outboundService: handleAuthServiceOutbound, + }, + { + name: "database-service", + modules: true, + scriptPath: "./database-service/dist/index.js", // Built by `global-setup.ts` + compatibilityDate: "2024-01-01", + compatibilityFlags: ["nodejs_compat"], + kvNamespaces: ["KV_NAMESPACE"], + }, + { + name: "tail-consumer", + modules: [ + { + path: "index.js", + type: "ESModule", + contents: /* javascript */ ` + export default { + tail(event) { + console.log("tail event received") + } + } + `, + }, + ], + compatibilityDate: "2024-01-01", + }, + ], }, - }, + }), + ], + + test: { + globalSetup: ["./global-setup.ts"], }, }); diff --git a/fixtures/vitest-pool-workers-examples/package.json b/fixtures/vitest-pool-workers-examples/package.json index 6c2ea83065cc..91eef69f9fc6 100644 --- a/fixtures/vitest-pool-workers-examples/package.json +++ b/fixtures/vitest-pool-workers-examples/package.json @@ -11,16 +11,20 @@ "test:ci:win32": "vitest run --exclude test/sqlite-in-do.test.ts" }, "devDependencies": { + "@better-auth/stripe": "^1.4.6", "@cloudflare/containers": "^0.0.25", "@cloudflare/vitest-pool-workers": "workspace:*", "@cloudflare/workers-types": "catalog:default", "@microlabs/otel-cf-workers": "1.0.0-rc.45", "@types/node": "catalog:default", + "better-auth": "^1.4.6", "discord-api-types": "0.37.98", "ext-dep": "file:./module-resolution/vendor/ext-dep", - "jose": "^5.2.2", + "jose": "^5.9.3", "miniflare": "workspace:*", + "msw": "catalog:default", "run-script-os": "^1.1.6", + "stripe": "^20.0.0", "toucan-js": "4.0.0", "typescript": "catalog:default", "vite": "catalog:default", diff --git a/fixtures/vitest-pool-workers-examples/pages-functions-unit-integration-self/test/integration-self.test.ts b/fixtures/vitest-pool-workers-examples/pages-functions-unit-integration-self/test/integration-self.test.ts index 8234e0e17cbd..ecfb624ab1f0 100644 --- a/fixtures/vitest-pool-workers-examples/pages-functions-unit-integration-self/test/integration-self.test.ts +++ b/fixtures/vitest-pool-workers-examples/pages-functions-unit-integration-self/test/integration-self.test.ts @@ -22,12 +22,6 @@ describe("functions", () => { expect(response.status).toBe(200); expect(await response.text()).toBe("VALUE"); }); - - it("uses isolated storage for each test", async () => { - // Check write in previous test undone - const response = await SELF.fetch("https://example.com/api/kv/key"); - expect(response.status).toBe(204); - }); }); describe("assets", () => { diff --git a/fixtures/vitest-pool-workers-examples/pages-functions-unit-integration-self/test/unit.test.ts b/fixtures/vitest-pool-workers-examples/pages-functions-unit-integration-self/test/unit.test.ts index 62c380a35786..91b9163faf93 100644 --- a/fixtures/vitest-pool-workers-examples/pages-functions-unit-integration-self/test/unit.test.ts +++ b/fixtures/vitest-pool-workers-examples/pages-functions-unit-integration-self/test/unit.test.ts @@ -50,19 +50,6 @@ describe("functions", () => { expect(await response.text()).toBe("value"); }); - it("uses isolated storage for each test", async () => { - // Check write in previous test undone - const request = new IncomingRequest("http://example.com/api/kv/key"); - const ctx = createPagesEventContext({ - request, - data: { user: "test" }, - params: { key: "key" }, - }); - const response = await apiKVKeyFunction.onRequestGet(ctx); - await waitOnExecutionContext(ctx); - expect(response.status).toBe(204); - }); - it("calls middleware", async () => { const request = new IncomingRequest("http://example.com/api/ping"); const ctx = createPagesEventContext({ diff --git a/fixtures/vitest-pool-workers-examples/pages-functions-unit-integration-self/vitest.config.ts b/fixtures/vitest-pool-workers-examples/pages-functions-unit-integration-self/vitest.config.ts index b07237640b5f..99738defeaf4 100644 --- a/fixtures/vitest-pool-workers-examples/pages-functions-unit-integration-self/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/pages-functions-unit-integration-self/vitest.config.ts @@ -1,27 +1,29 @@ import path from "node:path"; import { buildPagesASSETSBinding, - defineWorkersProject, -} from "@cloudflare/vitest-pool-workers/config"; + cloudflareTest, +} from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; const assetsPath = path.join(__dirname, "public"); -export default defineWorkersProject(async () => ({ - test: { - globalSetup: ["./global-setup.ts"], // Only required for integration tests - poolOptions: { - workers: { - main: "./dist-functions/index.js", // Built by `global-setup.ts` - singleWorker: true, - miniflare: { - compatibilityFlags: ["nodejs_compat"], - compatibilityDate: "2024-01-01", - kvNamespaces: ["KV_NAMESPACE"], - serviceBindings: { - ASSETS: await buildPagesASSETSBinding(assetsPath), - }, +export default defineConfig({ + plugins: [ + cloudflareTest({ + main: "./dist-functions/index.js", // Built by `global-setup.ts` + miniflare: { + compatibilityFlags: ["nodejs_compat"], + compatibilityDate: "2024-01-01", + kvNamespaces: ["KV_NAMESPACE"], + serviceBindings: { + ASSETS: await buildPagesASSETSBinding(assetsPath), }, }, - }, + }), + ], + + test: { + // Only required for integration tests + globalSetup: ["./global-setup.ts"], }, -})); +}); diff --git a/fixtures/vitest-pool-workers-examples/pages-with-config/vitest.config.ts b/fixtures/vitest-pool-workers-examples/pages-with-config/vitest.config.ts index 80dc7d029de4..ef0e590042db 100644 --- a/fixtures/vitest-pool-workers-examples/pages-with-config/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/pages-with-config/vitest.config.ts @@ -1,11 +1,12 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; -export default defineWorkersProject({ - test: { - poolOptions: { - workers: { - wrangler: { configPath: "./wrangler.jsonc" }, - }, - }, - }, +export default defineConfig({ + plugins: [ + cloudflareTest({ + wrangler: { configPath: "./wrangler.jsonc" }, + }), + ], + + test: {}, }); diff --git a/fixtures/vitest-pool-workers-examples/pipelines/vitest.config.ts b/fixtures/vitest-pool-workers-examples/pipelines/vitest.config.ts index 42e8f9ffd97f..b90cb174ce09 100644 --- a/fixtures/vitest-pool-workers-examples/pipelines/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/pipelines/vitest.config.ts @@ -1,14 +1,14 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; -export default defineWorkersProject({ - test: { - poolOptions: { - workers: { - singleWorker: true, - wrangler: { - configPath: "./wrangler.jsonc", - }, +export default defineConfig({ + plugins: [ + cloudflareTest({ + wrangler: { + configPath: "./wrangler.jsonc", }, - }, - }, + }), + ], + + test: {}, }); diff --git a/fixtures/vitest-pool-workers-examples/queues/vitest.config.ts b/fixtures/vitest-pool-workers-examples/queues/vitest.config.ts index 7d743d6d2d3b..d74e76331ce9 100644 --- a/fixtures/vitest-pool-workers-examples/queues/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/queues/vitest.config.ts @@ -1,23 +1,22 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; -export default defineWorkersProject({ - test: { - poolOptions: { - workers: { - singleWorker: true, - miniflare: { - // Required to use `SELF.queue()`. This is an experimental - // compatibility flag, and cannot be enabled in production. - compatibilityFlags: ["service_binding_extra_handlers"], - // Use a shorter `max_batch_timeout` in tests - queueConsumers: { - queue: { maxBatchTimeout: 0.05 /* 50ms */ }, - }, - }, - wrangler: { - configPath: "./wrangler.jsonc", +export default defineConfig({ + plugins: [ + cloudflareTest({ + miniflare: { + // Required to use `SELF.queue()`. This is an experimental + // compatibility flag, and cannot be enabled in production. + compatibilityFlags: ["service_binding_extra_handlers"], + // Use a shorter `max_batch_timeout` in tests + queueConsumers: { + queue: { maxBatchTimeout: 0.05 /* 50ms */ }, }, }, - }, - }, + wrangler: { + configPath: "./wrangler.jsonc", + }, + }), + ], + test: {}, }); diff --git a/fixtures/vitest-pool-workers-examples/request-mocking/test/declarative.test.ts b/fixtures/vitest-pool-workers-examples/request-mocking/test/declarative.test.ts index f10afedde6fd..d08a40077e87 100644 --- a/fixtures/vitest-pool-workers-examples/request-mocking/test/declarative.test.ts +++ b/fixtures/vitest-pool-workers-examples/request-mocking/test/declarative.test.ts @@ -1,36 +1,31 @@ -import { fetchMock, SELF } from "cloudflare:test"; -import { afterEach, beforeAll, expect, it } from "vitest"; - -beforeAll(() => { - // Enable outbound request mocking... - fetchMock.activate(); - // ...and throw errors if an outbound request isn't mocked - fetchMock.disableNetConnect(); -}); - -// Ensure we matched every mock we defined -afterEach(() => fetchMock.assertNoPendingInterceptors()); +import { SELF } from "cloudflare:test"; +import { http, HttpResponse } from "msw"; +import { expect, it } from "vitest"; +import { server } from "./server"; it("mocks GET requests", async () => { - fetchMock - .get("https://cloudflare.com") - .intercept({ path: "/once" }) - .reply(200, "😉"); - fetchMock - .get("https://cloudflare.com") - .intercept({ path: "/persistent" }) - .reply(200, "📌") - .persist(); + server.use( + http.get( + "https://cloudflare.com/once", + () => { + return HttpResponse.text("😉"); + }, + { once: true } + ), + http.get("https://cloudflare.com/persistent", () => { + return HttpResponse.text("📌"); + }) + ); // Host `example.com` will be rewritten to `cloudflare.com` by the Worker let response = await SELF.fetch("https://example.com/once"); expect(response.status).toBe(200); expect(await response.text()).toBe("😉"); - // By default, each mock only matches once, so subsequent `fetch()`es fail... + // Subsequent `fetch()`es fail... response = await SELF.fetch("https://example.com/once"); expect(response.status).toBe(500); - expect(await response.text()).toMatch("MockNotMatchedError"); + expect(await response.text()).toMatch("Cannot bypass"); // ...but calling `.persist()` will match forever, with `.times(n)` matching // `n` times @@ -42,10 +37,16 @@ it("mocks GET requests", async () => { }); it("mocks POST requests", async () => { - fetchMock - .get("https://cloudflare.com") - .intercept({ method: "POST", path: "/path", body: "✨" }) - .reply(200, "✅"); + server.use( + http.post("https://cloudflare.com/path", async ({ request }) => { + const text = await request.text(); + console.log(text); + if (text !== "✨") { + return HttpResponse.error(); + } + return HttpResponse.text("✅"); + }) + ); // Sending a request without the expected body shouldn't match... let response = await SELF.fetch("https://example.com/path", { @@ -53,7 +54,7 @@ it("mocks POST requests", async () => { body: "🙃", }); expect(response.status).toBe(500); - expect(await response.text()).toMatch("MockNotMatchedError"); + expect(await response.text()).toMatch("TypeError: Failed to fetch"); // ...but the correct body should response = await SELF.fetch("https://example.com/path", { diff --git a/fixtures/vitest-pool-workers-examples/request-mocking/test/server.ts b/fixtures/vitest-pool-workers-examples/request-mocking/test/server.ts new file mode 100644 index 000000000000..bd0bda57d85c --- /dev/null +++ b/fixtures/vitest-pool-workers-examples/request-mocking/test/server.ts @@ -0,0 +1,3 @@ +import { setupServer } from "msw/node"; + +export const server = setupServer(); diff --git a/fixtures/vitest-pool-workers-examples/request-mocking/test/setup.ts b/fixtures/vitest-pool-workers-examples/request-mocking/test/setup.ts new file mode 100644 index 000000000000..891a47989654 --- /dev/null +++ b/fixtures/vitest-pool-workers-examples/request-mocking/test/setup.ts @@ -0,0 +1,10 @@ +import { afterAll, afterEach, beforeAll } from "vitest"; +import { server } from "./server"; + +beforeAll(() => + server.listen({ + onUnhandledRequest: "error", + }) +); +afterEach(() => server.resetHandlers()); +afterAll(() => server.close()); diff --git a/fixtures/vitest-pool-workers-examples/request-mocking/vitest.config.ts b/fixtures/vitest-pool-workers-examples/request-mocking/vitest.config.ts index 42e8f9ffd97f..8dd404945e9b 100644 --- a/fixtures/vitest-pool-workers-examples/request-mocking/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/request-mocking/vitest.config.ts @@ -1,14 +1,16 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; -export default defineWorkersProject({ - test: { - poolOptions: { - workers: { - singleWorker: true, - wrangler: { - configPath: "./wrangler.jsonc", - }, +export default defineConfig({ + plugins: [ + cloudflareTest({ + wrangler: { + configPath: "./wrangler.jsonc", }, - }, + }), + ], + + test: { + setupFiles: ["test/setup.ts"], }, }); diff --git a/fixtures/vitest-pool-workers-examples/rpc/vitest.config.ts b/fixtures/vitest-pool-workers-examples/rpc/vitest.config.ts index 8a6f5d2dc566..1208ae9ae511 100644 --- a/fixtures/vitest-pool-workers-examples/rpc/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/rpc/vitest.config.ts @@ -1,23 +1,17 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; -export default defineWorkersProject({ - esbuild: { - // Required for `using` support - target: "ES2022", - }, - test: { - poolOptions: { - workers: { - singleWorker: true, - miniflare: { - // Required to use `SELF.scheduled()`. This is an experimental - // compatibility flag, and cannot be enabled in production. - compatibilityFlags: ["service_binding_extra_handlers"], - }, - wrangler: { - configPath: "./wrangler.jsonc", - }, +export default defineConfig({ + plugins: [ + cloudflareTest({ + miniflare: { + // Required to use `SELF.scheduled()`. This is an experimental + // compatibility flag, and cannot be enabled in production. + compatibilityFlags: ["service_binding_extra_handlers", "nodejs_compat"], }, - }, - }, + wrangler: { + configPath: "./wrangler.jsonc", + }, + }), + ], }); diff --git a/fixtures/vitest-pool-workers-examples/tsconfig.workerd-test.json b/fixtures/vitest-pool-workers-examples/tsconfig.workerd-test.json index 892fbc62ea4b..f623da9c7b7f 100644 --- a/fixtures/vitest-pool-workers-examples/tsconfig.workerd-test.json +++ b/fixtures/vitest-pool-workers-examples/tsconfig.workerd-test.json @@ -3,7 +3,8 @@ "compilerOptions": { "types": [ "@cloudflare/workers-types/experimental", - "@cloudflare/vitest-pool-workers" // For `cloudflare:test` types + "@cloudflare/vitest-pool-workers/types", + "node" ] } } diff --git a/fixtures/vitest-pool-workers-examples/vitest.config.ts b/fixtures/vitest-pool-workers-examples/vitest.config.ts index 65496f8fd3dc..edc00aef4fb2 100644 --- a/fixtures/vitest-pool-workers-examples/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/vitest.config.ts @@ -2,45 +2,10 @@ // in the monorepo's `vitest.workspace.ts`. import { defineConfig } from "vitest/config"; -class FilteredPushArray extends Array { - constructor(private readonly predicate: (item: T) => boolean) { - super(); - } - - push(...items: T[]) { - return super.push(...items.filter(this.predicate)); - } -} - export default defineConfig({ test: { teardownTimeout: 1_000, projects: ["*/vitest.*config.*ts"], globalSetup: ["./vitest.global.ts"], - // Configure the `vite-node` server used by Vitest code to import configs, - // custom pools and tests. By default, Vitest effectively applies Vite - // transforms to all files outside `node_modules`. This means by default, - // our custom pool code is transformed by Vite during development, but not - // when published, leading to possible behaviour mismatches. To fix this, - // we ensure file paths containing `packages/vitest-pool-workers/dist` are - // 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/v2.1.1/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$/"; - }), - external: [ - /packages\/vitest-pool-workers\/dist/, - /packages\/wrangler\//, - ], - }, - }, }, }); diff --git a/fixtures/vitest-pool-workers-examples/web-assembly/vitest.config.ts b/fixtures/vitest-pool-workers-examples/web-assembly/vitest.config.ts index f3ee41341f45..38be25e8b0d6 100644 --- a/fixtures/vitest-pool-workers-examples/web-assembly/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/web-assembly/vitest.config.ts @@ -1,18 +1,18 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; -export default defineWorkersProject({ - test: { - poolOptions: { - workers: { - singleWorker: true, - // Specifying a `wrangler.configPath` will enable Wrangler's default - // module rules including support for `.wasm` files. Refer to - // https://developers.cloudflare.com/workers/wrangler/bundling/#files-which-will-not-be-bundled - // for more information. - wrangler: { - configPath: "./wrangler.jsonc", - }, +export default defineConfig({ + plugins: [ + cloudflareTest({ + // Specifying a `wrangler.configPath` will enable Wrangler's default + // module rules including support for `.wasm` files. Refer to + // https://developers.cloudflare.com/workers/wrangler/bundling/#files-which-will-not-be-bundled + // for more information. + wrangler: { + configPath: "./wrangler.jsonc", }, - }, - }, + }), + ], + + test: {}, }); diff --git a/fixtures/vitest-pool-workers-examples/workers-assets-only/vitest.config.ts b/fixtures/vitest-pool-workers-examples/workers-assets-only/vitest.config.ts index 80dc7d029de4..9b79788eddd6 100644 --- a/fixtures/vitest-pool-workers-examples/workers-assets-only/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/workers-assets-only/vitest.config.ts @@ -1,11 +1,10 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; -export default defineWorkersProject({ - test: { - poolOptions: { - workers: { - wrangler: { configPath: "./wrangler.jsonc" }, - }, - }, - }, +export default defineConfig({ + plugins: [ + cloudflareTest({ + wrangler: { configPath: "./wrangler.jsonc" }, + }), + ], }); diff --git a/fixtures/vitest-pool-workers-examples/workers-assets-run-worker-first/vitest.config.ts b/fixtures/vitest-pool-workers-examples/workers-assets-run-worker-first/vitest.config.ts index 80dc7d029de4..9b79788eddd6 100644 --- a/fixtures/vitest-pool-workers-examples/workers-assets-run-worker-first/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/workers-assets-run-worker-first/vitest.config.ts @@ -1,11 +1,10 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; -export default defineWorkersProject({ - test: { - poolOptions: { - workers: { - wrangler: { configPath: "./wrangler.jsonc" }, - }, - }, - }, +export default defineConfig({ + plugins: [ + cloudflareTest({ + wrangler: { configPath: "./wrangler.jsonc" }, + }), + ], }); diff --git a/fixtures/vitest-pool-workers-examples/workers-assets/vitest.config.ts b/fixtures/vitest-pool-workers-examples/workers-assets/vitest.config.ts index 80dc7d029de4..9b79788eddd6 100644 --- a/fixtures/vitest-pool-workers-examples/workers-assets/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/workers-assets/vitest.config.ts @@ -1,11 +1,10 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; -export default defineWorkersProject({ - test: { - poolOptions: { - workers: { - wrangler: { configPath: "./wrangler.jsonc" }, - }, - }, - }, +export default defineConfig({ + plugins: [ + cloudflareTest({ + wrangler: { configPath: "./wrangler.jsonc" }, + }), + ], }); diff --git a/fixtures/vitest-pool-workers-examples/workflows/vitest.config.ts b/fixtures/vitest-pool-workers-examples/workflows/vitest.config.ts index 23119b5bc991..6b7167c0eb6d 100644 --- a/fixtures/vitest-pool-workers-examples/workflows/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/workflows/vitest.config.ts @@ -1,18 +1,12 @@ -import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineProject } from "vitest/config"; -export default defineWorkersProject({ - esbuild: { - // Required for `using` support - target: "ES2022", - }, - test: { - poolOptions: { - workers: { - singleWorker: true, - wrangler: { - configPath: "./wrangler.jsonc", - }, +export default defineProject({ + plugins: [ + cloudflareTest({ + wrangler: { + configPath: "./wrangler.jsonc", }, - }, - }, + }), + ], }); diff --git a/fixtures/vitest-pool-workers-remote-bindings/package.json b/fixtures/vitest-pool-workers-remote-bindings/package.json index 1d7a5d62629a..1911efa8b702 100644 --- a/fixtures/vitest-pool-workers-remote-bindings/package.json +++ b/fixtures/vitest-pool-workers-remote-bindings/package.json @@ -9,7 +9,7 @@ "devDependencies": { "@cloudflare/vitest-pool-workers": "workspace:*", "typescript": "^5.5.2", - "vitest": "~3.0.7", + "vitest": "catalog:default", "wrangler": "workspace:*" } } diff --git a/fixtures/workers-shared-asset-config/tsconfig.json b/fixtures/workers-shared-asset-config/tsconfig.json index 168323a45c08..b562c4033bf9 100644 --- a/fixtures/workers-shared-asset-config/tsconfig.json +++ b/fixtures/workers-shared-asset-config/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "types": [ "@cloudflare/workers-types/experimental", - "@cloudflare/vitest-pool-workers" + "@cloudflare/vitest-pool-workers/types" ], "moduleResolution": "bundler" }, diff --git a/fixtures/workers-shared-asset-config/vitest.config.ts b/fixtures/workers-shared-asset-config/vitest.config.ts index 4e8996d0c17b..0e3fc0185f92 100644 --- a/fixtures/workers-shared-asset-config/vitest.config.ts +++ b/fixtures/workers-shared-asset-config/vitest.config.ts @@ -1,52 +1,17 @@ -import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; -class FilteredPushArray extends Array { - constructor(private readonly predicate: (item: T) => boolean) { - super(); - } - - push(...items: T[]) { - return super.push(...items.filter(this.predicate)); - } -} - -export default defineWorkersConfig({ +export default defineConfig({ + plugins: [ + cloudflareTest({ + wrangler: { + configPath: "../../packages/workers-shared/asset-worker/wrangler.jsonc", + }, + }), + ], test: { chaiConfig: { truncateThreshold: 80, }, - poolOptions: { - workers: { - wrangler: { - configPath: - "../../packages/workers-shared/asset-worker/wrangler.jsonc", - }, - }, - }, - // Configure the `vite-node` server used by Vitest code to import configs, - // custom pools and tests. By default, Vitest effectively applies Vite - // transforms to all files outside `node_modules`. This means by default, - // our custom pool code is transformed by Vite during development, but not - // when published, leading to possible behaviour mismatches. To fix this, - // we ensure file paths containing `packages/vitest-pool-workers/dist` are - // 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/v3.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$/"; - }), - external: [ - /packages\/vitest-pool-workers\/dist/, - /packages\/wrangler\//, - ], - }, - }, }, }); diff --git a/fixtures/workers-with-assets-static-routing/package.json b/fixtures/workers-with-assets-static-routing/package.json index e52950fe18ef..0a141ac8ce6a 100644 --- a/fixtures/workers-with-assets-static-routing/package.json +++ b/fixtures/workers-with-assets-static-routing/package.json @@ -13,6 +13,7 @@ "devDependencies": { "@cloudflare/workers-tsconfig": "workspace:*", "@cloudflare/workers-types": "catalog:default", + "@types/node": "catalog:default", "playwright-chromium": "catalog:default", "typescript": "catalog:default", "undici": "catalog:default", diff --git a/fixtures/workers-with-assets-static-routing/tsconfig.json b/fixtures/workers-with-assets-static-routing/tsconfig.json index ea70fcd94df4..6ec35310ea18 100644 --- a/fixtures/workers-with-assets-static-routing/tsconfig.json +++ b/fixtures/workers-with-assets-static-routing/tsconfig.json @@ -5,10 +5,9 @@ "lib": ["ES2020"], "types": ["@cloudflare/workers-types"], "moduleResolution": "node", - "esModuleInterop": true, "noEmit": true, "skipLibCheck": true }, "include": ["**/*.ts"], - "exclude": ["tests"] + "exclude": ["test"] } diff --git a/package.json b/package.json index a91e5f4f72e6..bed0d7702152 100644 --- a/package.json +++ b/package.json @@ -73,8 +73,9 @@ "@types/react-transition-group>@types/react": "^18", "@cloudflare/elements>@types/react": "^18", "@types/node": "$@types/node", - "vitest>vite": "^5.0.0", - "@types/node>undici-types": "catalog:default" + "@types/node>undici-types": "catalog:default", + "vitest@4>vite": "catalog:vite-plugin", + "vitest@3>vite": "^5.0.0" }, "patchedDependencies": { "@cloudflare/component-listbox@1.10.6": "patches/@cloudflare__component-listbox@1.10.6.patch", diff --git a/packages/create-cloudflare/package.json b/packages/create-cloudflare/package.json index 9df763a3c107..c1bd50a837d8 100644 --- a/packages/create-cloudflare/package.json +++ b/packages/create-cloudflare/package.json @@ -83,7 +83,7 @@ "smol-toml": "catalog:default", "typescript": "catalog:default", "undici": "catalog:default", - "vite": "catalog:default", + "vite": "catalog:vite-plugin", "vite-tsconfig-paths": "^4.0.8", "vitest": "catalog:default", "which-pm-runs": "^1.1.0", diff --git a/packages/kv-asset-handler/package.json b/packages/kv-asset-handler/package.json index 6554d88bb144..a25bfbe9cb13 100644 --- a/packages/kv-asset-handler/package.json +++ b/packages/kv-asset-handler/package.json @@ -41,13 +41,13 @@ }, "devDependencies": { "@cloudflare/eslint-config-shared": "workspace:*", - "@cloudflare/vitest-pool-workers": "^0.7.0", + "@cloudflare/vitest-pool-workers": "catalog:vitest-3", "@cloudflare/workers-types": "catalog:default", "@types/mime": "^3.0.4", "@types/node": "catalog:default", "eslint": "catalog:default", "tsup": "8.3.0", - "vitest": "~2.1.0" + "vitest": "catalog:vitest-3" }, "engines": { "node": ">=18.0.0" diff --git a/packages/kv-asset-handler/vitest.config.mts b/packages/kv-asset-handler/vitest.config.mts index f60be1b809a2..f89a7b51913b 100644 --- a/packages/kv-asset-handler/vitest.config.mts +++ b/packages/kv-asset-handler/vitest.config.mts @@ -4,8 +4,6 @@ export default defineWorkersConfig({ test: { poolOptions: { workers: { - singleWorker: false, - isolatedStorage: true, miniflare: { compatibilityDate: "2025-02-04", }, diff --git a/packages/pages-shared/package.json b/packages/pages-shared/package.json index bcaa578244d2..9f067d4e1620 100644 --- a/packages/pages-shared/package.json +++ b/packages/pages-shared/package.json @@ -26,7 +26,7 @@ }, "devDependencies": { "@cloudflare/eslint-config-shared": "workspace:*", - "@cloudflare/vitest-pool-workers": "^0.8.19", + "@cloudflare/vitest-pool-workers": "catalog:vitest-3", "@cloudflare/workers-shared": "workspace:*", "@cloudflare/workers-tsconfig": "workspace:*", "@cloudflare/workers-types": "catalog:default", @@ -37,7 +37,7 @@ "html-rewriter-wasm": "^0.4.1", "rimraf": "catalog:default", "typescript": "catalog:default", - "vitest": "catalog:default" + "vitest": "catalog:vitest-3" }, "volta": { "extends": "../../package.json" diff --git a/packages/pages-shared/vitest.config.mts b/packages/pages-shared/vitest.config.mts index 0661d7382795..b3958f8349e0 100644 --- a/packages/pages-shared/vitest.config.mts +++ b/packages/pages-shared/vitest.config.mts @@ -5,7 +5,6 @@ export default defineWorkersProject({ poolOptions: { workers: { isolatedStorage: false, - singleWorker: true, miniflare: { compatibilityDate: "2025-01-01", }, diff --git a/packages/vite-plugin-cloudflare/playground/spa-with-api/__tests__/custom-output-directories/spa-with-api.spec.ts b/packages/vite-plugin-cloudflare/playground/spa-with-api/__tests__/custom-output-directories/spa-with-api.spec.ts index 9b536db16a7b..ef61e6a9789f 100644 --- a/packages/vite-plugin-cloudflare/playground/spa-with-api/__tests__/custom-output-directories/spa-with-api.spec.ts +++ b/packages/vite-plugin-cloudflare/playground/spa-with-api/__tests__/custom-output-directories/spa-with-api.spec.ts @@ -5,20 +5,16 @@ import { isBuild, rootDir, WAIT_FOR_OPTIONS } from "../../../__test-utils__"; import "../base-tests"; describe.runIf(isBuild)("output directories", () => { - test( - "creates the correct output directories", - async () => { - await vi.waitFor(() => { - expect( - fs.existsSync( - path.join(rootDir, "custom-root-output-directory", "worker") - ) - ).toBe(true); - expect( - fs.existsSync(path.join(rootDir, "custom-client-output-directory")) - ).toBe(true); - }); - }, - WAIT_FOR_OPTIONS - ); + test("creates the correct output directories", WAIT_FOR_OPTIONS, async () => { + await vi.waitFor(() => { + expect( + fs.existsSync( + path.join(rootDir, "custom-root-output-directory", "worker") + ) + ).toBe(true); + expect( + fs.existsSync(path.join(rootDir, "custom-client-output-directory")) + ).toBe(true); + }); + }); }); diff --git a/packages/vitest-pool-workers/package.json b/packages/vitest-pool-workers/package.json index 02db62c62a32..1a699d474c8a 100644 --- a/packages/vitest-pool-workers/package.json +++ b/packages/vitest-pool-workers/package.json @@ -28,23 +28,21 @@ "type": "module", "exports": { ".": { - "types": "./types/cloudflare-test.d.ts", + "types": "./dist/pool/index.d.mts", "import": "./dist/pool/index.mjs" }, - "./config": { - "types": "./dist/config/index.d.ts", - "import": "./dist/config/index.cjs", - "require": "./dist/config/index.cjs" + "./types": { + "types": "./types/cloudflare-test.d.ts" } }, "main": "dist/pool/index.mjs", - "types": "types/cloudflare-test.d.ts", + "types": "dist/pool/index.d.mts", "files": [ "dist", "types/cloudflare-test.d.ts" ], "scripts": { - "build": "node scripts/bundle.mjs && tsc -p tsconfig.emit.json", + "build": "tsdown", "capnp:rtti": "capnp-es scripts/rtti/rtti.capnp -ojs", "check:lint": "eslint . --max-warnings=0", "check:type": "tsc && tsc -p src/worker/tsconfig.json && tsc -p types/tsconfig.json", @@ -53,7 +51,6 @@ "test:ci": "vitest run" }, "dependencies": { - "birpc": "0.2.14", "cjs-module-lexer": "^1.2.3", "devalue": "^5.3.2", "esbuild": "catalog:default", @@ -75,14 +72,15 @@ "capnp-es": "^0.0.11", "eslint": "catalog:default", "ts-dedent": "^2.2.0", + "tsdown": "0.16.3", "typescript": "catalog:default", "undici": "catalog:default", "vitest": "catalog:default" }, "peerDependencies": { - "@vitest/runner": "2.0.x - 3.2.x", - "@vitest/snapshot": "2.0.x - 3.2.x", - "vitest": "2.0.x - 3.2.x" + "@vitest/runner": "4.0.16", + "@vitest/snapshot": "4.0.16", + "vitest": "4.0.16" }, "volta": { "extends": "../../package.json" diff --git a/packages/vitest-pool-workers/scripts/bundle.mjs b/packages/vitest-pool-workers/scripts/bundle.mjs deleted file mode 100644 index a77f4ab022c0..000000000000 --- a/packages/vitest-pool-workers/scripts/bundle.mjs +++ /dev/null @@ -1,158 +0,0 @@ -import fs from "node:fs"; -import module from "node:module"; -import path from "node:path"; -import url from "node:url"; -import esbuild from "esbuild"; -import { builtinModules } from "./rtti/query.mjs"; - -const argv = process.argv.slice(2); -const watch = argv[0] === "watch"; - -const __filename = url.fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); -const pkgRoot = path.resolve(__dirname, ".."); - -/** - * @param {string} rootPath - * @returns {Generator} - */ -function* walk(rootPath) { - for (const entry of fs.readdirSync(rootPath, { withFileTypes: true })) { - const filePath = path.join(rootPath, entry.name); - if (entry.isDirectory()) yield* walk(filePath); - else yield filePath; - } -} - -// Build a stripped down version of `undici` with just the `MockAgent` and some -// useful helpers exposed. In particular, code for actually sending network -// requests is removed, and replaced with a hook for providing this -// functionality at runtime. -const require = module.createRequire(import.meta.url); -function map(specifier, target) { - const filePath = require.resolve(specifier); - const targetPath = path.join(pkgRoot, target); - return { [filePath]: targetPath }; -} -const fetchMockPathMap = { - ...map("undici/lib/dispatcher/client.js", "src/mock-agent/client.cjs"), - ...map("undici/lib/dispatcher/pool.js", "src/mock-agent/pool.cjs"), - ...map( - "undici/lib/mock/pending-interceptors-formatter.js", - "src/mock-agent/pending-interceptor-formatter.cjs" - ), -}; -await esbuild.build({ - platform: "node", - target: "esnext", - format: "cjs", - outExtension: { ".js": ".cjs" }, - bundle: true, - sourcemap: true, - sourcesContent: false, - logLevel: "warning", - outdir: path.join(pkgRoot, "dist/worker/lib/cloudflare"), - entryNames: "mock-agent", - entryPoints: [path.join(pkgRoot, "src/mock-agent/index.cjs")], - plugins: [ - { - name: "path-map", - setup(build) { - build.onResolve( - { filter: /^\..+$/, namespace: "file" }, - async (args) => { - const result = await build.resolve(args.path, { - namespace: "resolve", // `args.path` would lead to cycles - importer: args.importer, - resolveDir: args.resolveDir, - kind: args.kind, - }); - const maybePath = fetchMockPathMap[result.path]; - if (maybePath === undefined) return; - return { path: maybePath }; - } - ); - }, - }, - ], -}); - -// Build pool, worker and libs -const libPaths = [ - ...walk(path.join(pkgRoot, "src/worker/lib")), - ...walk(path.join(pkgRoot, "src/worker/node")), -]; - -/** @type {import("esbuild").BuildOptions} */ -const commonOptions = { - platform: "node", - target: "esnext", - bundle: true, - external: [ - // Node.js built-ins (handled automatically by esbuild but listed for completeness) - "node:*", - // Cloudflare/workerd built-ins - "cloudflare:*", - "workerd:*", - // Virtual/runtime modules - "__VITEST_POOL_WORKERS_DEFINES", - "__VITEST_POOL_WORKERS_USER_OBJECT", - // All npm packages (previously handled by packages: "external") - "birpc", - "cjs-module-lexer", - "devalue", - "esbuild", - "miniflare", - "semver", - "semver/*", - "wrangler", - "zod", - "undici", - "undici/*", - // Peer dependencies - "vitest", - "vitest/*", - "@vitest/runner", - "@vitest/snapshot", - "@vitest/snapshot/*", - ], - sourcemap: true, - sourcesContent: false, - logLevel: watch ? "info" : "warning", - outdir: path.join(pkgRoot, "dist"), - outbase: path.join(pkgRoot, "src"), - define: { - VITEST_POOL_WORKERS_DEFINE_BUILTIN_MODULES: JSON.stringify(builtinModules), - }, -}; - -const esmOptions = { - ...commonOptions, - format: "esm", - outExtension: { ".js": ".mjs" }, - entryPoints: [ - path.join(pkgRoot, "src", "pool", "index.ts"), - path.join(pkgRoot, "src", "worker", "index.ts"), - ...libPaths.filter((libPath) => /\.m?ts$/.test(libPath)), - ], -}; - -const cjsOptions = { - ...commonOptions, - format: "cjs", - outExtension: { ".js": ".cjs" }, - entryPoints: [ - path.join(pkgRoot, "src", "config", "index.ts"), - ...libPaths.filter((libPath) => /\.cts$/.test(libPath)), - ], -}; - -if (watch) { - const esmCtx = await esbuild.context(esmOptions); - const cjsCtx = await esbuild.context(cjsOptions); - await esmCtx.watch(); - await cjsCtx.watch(); -} else { - await esbuild.build(esmOptions); - await esbuild.build(cjsOptions); -} diff --git a/packages/vitest-pool-workers/scripts/rtti/query.mjs b/packages/vitest-pool-workers/scripts/rtti/query.mjs index 9dd2983c2100..b43134a50e42 100644 --- a/packages/vitest-pool-workers/scripts/rtti/query.mjs +++ b/packages/vitest-pool-workers/scripts/rtti/query.mjs @@ -2,12 +2,13 @@ import { Message } from "capnp-es"; import { Miniflare } from "miniflare"; import { StructureGroups } from "./rtti.js"; -// Extract RTTI from `workerd` -const mf = new Miniflare({ - compatibilityFlags: ["rtti_api"], - modules: true, - scriptPath: "query-worker.mjs", - script: ` +export async function getBuiltinModules() { + // Extract RTTI from `workerd` + const mf = new Miniflare({ + compatibilityFlags: ["rtti_api"], + modules: true, + scriptPath: "query-worker.mjs", + script: ` import rtti from "workerd:rtti"; export default { fetch() { @@ -15,30 +16,31 @@ const mf = new Miniflare({ } } `, -}); -const res = await mf.dispatchFetch("http://localhost"); -if (!res.ok) throw new Error(await res.text()); -const buffer = await res.arrayBuffer(); -await mf.dispose(); + }); + const res = await mf.dispatchFetch("http://localhost"); + if (!res.ok) throw new Error(await res.text()); + const buffer = await res.arrayBuffer(); + await mf.dispose(); -// Parse RTTI -const message = new Message(buffer, /* packed */ false); + // Parse RTTI + const message = new Message(buffer, /* packed */ false); -const root = message.getRoot(StructureGroups); -const structures = new Map(); -root.groups.forEach((group) => { - group.structures.forEach((structure) => { - structures.set(structure.fullyQualifiedName, structure); + const root = message.getRoot(StructureGroups); + const structures = new Map(); + root.groups.forEach((group) => { + group.structures.forEach((structure) => { + structures.set(structure.fullyQualifiedName, structure); + }); }); -}); -// Get built-in modules list -const builtinModuleNames = new Set(); -root.modules.forEach((module) => { - builtinModuleNames.add(module.specifier); -}); -// TODO(soon): remove this line once `exportTypes()` supports compatibility -// flags that require `--experimental` (e.g. "unsafe_module") -builtinModuleNames.add("workerd:unsafe"); -/** @type {string[]} */ -export const builtinModules = Array.from(builtinModuleNames); + // Get built-in modules list + const builtinModuleNames = new Set(); + root.modules.forEach((module) => { + builtinModuleNames.add(module.specifier); + }); + // TODO(soon): remove this line once `exportTypes()` supports compatibility + // flags that require `--experimental` (e.g. "unsafe_module") + builtinModuleNames.add("workerd:unsafe"); + /** @type {string[]} */ + return Array.from(builtinModuleNames); +} diff --git a/packages/vitest-pool-workers/src/config/index.ts b/packages/vitest-pool-workers/src/config/index.ts deleted file mode 100644 index 8a7267ff0fc0..000000000000 --- a/packages/vitest-pool-workers/src/config/index.ts +++ /dev/null @@ -1,240 +0,0 @@ -import assert from "node:assert"; -import crypto from "node:crypto"; -import fs from "node:fs/promises"; -import { builtinModules } from "node:module"; -import path from "node:path"; -import { MessageChannel, receiveMessageOnPort } from "node:worker_threads"; -import { workerdBuiltinModules } from "../shared/builtin-modules"; -import type { - WorkersConfigPluginAPI, - WorkersPoolOptions, -} from "../pool/config"; -import type { Plugin } from "vite"; -import type { Awaitable, inject } from "vitest"; -import type { ConfigEnv, UserConfig, UserWorkspaceConfig } from "vitest/config"; - -const cloudflareTestPath = path.resolve( - __dirname, - "../worker/lib/cloudflare/test.mjs" -); - -// Vitest will call `structuredClone()` to verify data is serialisable. -// `structuredClone()` was only added to the global scope in Node 17. -// TODO(now): make Node 18 the minimum supported version -let channel: MessageChannel; -globalThis.structuredClone ??= function (value, options) { - // https://github.com/nodejs/node/blob/71951a0e86da9253d7c422fa2520ee9143e557fa/lib/internal/structured_clone.js - channel ??= new MessageChannel(); - channel.port1.unref(); - channel.port2.unref(); - channel.port1.postMessage(value, options?.transfer); - const message = receiveMessageOnPort(channel.port2); - assert(message !== undefined); - return message.message; -}; - -type ConfigFn = (env: ConfigEnv) => T | Promise; - -export type AnyConfigExport = - | T - | Promise - | ConfigFn; - -function mapAnyConfigExport( - f: (t: T) => U, - config: T -): U; -function mapAnyConfigExport( - f: (t: T) => U, - config: Promise -): Promise; -function mapAnyConfigExport( - f: (t: T) => U, - config: ConfigFn -): ConfigFn; -function mapAnyConfigExport( - f: (t: T) => U, - config: AnyConfigExport -): AnyConfigExport { - if (typeof config === "function") { - return (env) => { - const t = config(env); - if (t instanceof Promise) { - return t.then(f); - } else { - return f(t); - } - }; - } else if (config instanceof Promise) { - return config.then(f); - } else { - return f(config); - } -} - -export interface WorkerPoolOptionsContext { - // For accessing values from `globalSetup()` (e.g. ports servers started on) - // in Miniflare options (e.g. bindings, upstream, hyperdrives, ...) - inject: typeof inject; -} -export type WorkersUserConfig = T & { - test?: { - pool?: "@cloudflare/vitest-pool-workers"; - poolMatchGlobs?: never; - poolOptions?: { - workers?: - | WorkersPoolOptions - | ((ctx: WorkerPoolOptionsContext) => Awaitable); - }; - }; -}; - -export type WorkersUserConfigExport = WorkersUserConfig; -export type WorkersProjectConfigExport = WorkersUserConfig; - -function ensureArrayIncludes(array: T[], items: T[]) { - for (const item of items) { - if (!array.includes(item)) { - array.push(item); - } - } -} - -function ensureArrayExcludes(array: T[], items: T[]) { - for (let i = 0; i < array.length; i++) { - if (items.includes(array[i])) { - array.splice(i, 1); - i--; - } - } -} - -const requiredConditions = ["workerd", "worker", "browser"]; -const requiredMainFields = ["browser", "module", "jsnext:main", "jsnext"]; - -function createConfigPlugin(): Plugin { - // Use a unique ID for each `cloudflare:test` module so updates in one `main` - // don't trigger re-runs in all other projects, just the one that changed. - const uuid = crypto.randomUUID(); - let main: string | undefined; - return { - name: "@cloudflare/vitest-pool-workers:config", - api: { - setMain(newMain) { - main = newMain; - }, - }, - // Run after `vitest:project` plugin: - // https://github.com/vitest-dev/vitest/blob/v3.0.5/packages/vitest/src/node/plugins/workspace.ts#L37 - config(config) { - config.resolve ??= {}; - config.resolve.conditions ??= []; - config.resolve.mainFields ??= []; - config.ssr ??= {}; - config.test ??= {}; - - // Remove "node" condition added by the `vitest:project` plugin. We're - // running tests inside `workerd`, not Node.js, so "node" isn't needed. - ensureArrayExcludes(config.resolve.conditions, ["node"]); - - // Use the same resolve conditions as `wrangler`, minus "import" as this - // breaks Vite's `require()` resolve - 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/v3.0.5/packages/vitest/src/node/plugins/utils.ts#L156 - ensureArrayIncludes(config.resolve.mainFields, requiredMainFields); - - // Apply `package.json` `browser` field remapping in SSR mode: - // https://github.com/vitejs/vite/blob/v5.1.4/packages/vite/src/node/plugins/resolve.ts#L175 - config.ssr.target = "webworker"; - - // Pre-bundling dependencies with vite - config.test.deps ??= {}; - config.test.deps.optimizer ??= {}; - config.test.deps.optimizer.ssr ??= {}; - config.test.deps.optimizer.ssr.enabled ??= true; - config.test.deps.optimizer.ssr.include ??= []; - ensureArrayIncludes(config.test.deps.optimizer.ssr.include, [ - "vitest > @vitest/snapshot > magic-string", - ]); - ensureArrayIncludes(config.test.deps.optimizer.ssr.include, [ - "vitest > @vitest/expect > chai", - ]); - config.test.deps.optimizer.ssr.exclude ??= []; - ensureArrayIncludes(config.test.deps.optimizer.ssr.exclude, [ - ...workerdBuiltinModules, - ...builtinModules.concat(builtinModules.map((m) => `node:${m}`)), - ]); - - // Ideally, we would force `pool` to be @cloudflare/vitest-pool-workers here, - // but the tests in `packages/vitest-pool-workers` define `pool` as "../..". - config.test.pool ??= "@cloudflare/vitest-pool-workers"; - }, - resolveId(id) { - if (id === "cloudflare:test") { - return `\0cloudflare:test-${uuid}`; - } - }, - async load(id) { - if (id === `\0cloudflare:test-${uuid}`) { - let contents = await fs.readFile(cloudflareTestPath, "utf8"); - if (main !== undefined) { - // Inject a side-effect only import of the main entry-point into the test so that Vitest - // knows to re-run tests when the Worker is modified. - contents += `import ${JSON.stringify(main)};`; - } - return contents; - } - }, - }; -} - -function ensureWorkersConfig(config: T): T { - config.plugins ??= []; - config.plugins.push(createConfigPlugin()); - return config; -} - -export function defineWorkersConfig( - config: WorkersUserConfigExport -): WorkersUserConfigExport; -export function defineWorkersConfig( - config: Promise -): Promise; -export function defineWorkersConfig( - config: ConfigFn -): ConfigFn; -export function defineWorkersConfig( - config: AnyConfigExport -): AnyConfigExport { - if (typeof config === "function") { - return mapAnyConfigExport(ensureWorkersConfig, config); - } else if (config instanceof Promise) { - return mapAnyConfigExport(ensureWorkersConfig, config); - } - return mapAnyConfigExport(ensureWorkersConfig, config); -} - -export function defineWorkersProject( - config: WorkersProjectConfigExport -): WorkersProjectConfigExport; -export function defineWorkersProject( - config: Promise -): Promise; -export function defineWorkersProject( - config: ConfigFn -): ConfigFn; -export function defineWorkersProject( - config: AnyConfigExport -): AnyConfigExport { - if (typeof config === "function") { - return mapAnyConfigExport(ensureWorkersConfig, config); - } else if (config instanceof Promise) { - return mapAnyConfigExport(ensureWorkersConfig, config); - } - return mapAnyConfigExport(ensureWorkersConfig, config); -} - -export * from "./d1"; -export * from "./pages"; diff --git a/packages/vitest-pool-workers/src/mock-agent/client.cjs b/packages/vitest-pool-workers/src/mock-agent/client.cjs deleted file mode 100644 index 6b8daba2a088..000000000000 --- a/packages/vitest-pool-workers/src/mock-agent/client.cjs +++ /dev/null @@ -1,18 +0,0 @@ -const assert = require("node:assert"); -const DispatcherBase = require("undici/lib/dispatcher/dispatcher-base"); -const { kDispatch, kClose, kDestroy } = require("undici/lib/core/symbols"); -const { getDispatcher } = require("./dispatcher.cjs"); - -module.exports = class Client extends DispatcherBase { - [kDispatch](opts, handler) { - const dispatcher = getDispatcher(); - if (dispatcher === undefined) { - assert.fail("setDispatcher() must be called before Client#[kDispatch]()"); - } - dispatcher(opts, handler); - return true; - } - - async [kClose]() {} - async [kDestroy](_err) {} -}; diff --git a/packages/vitest-pool-workers/src/mock-agent/dispatcher.cjs b/packages/vitest-pool-workers/src/mock-agent/dispatcher.cjs deleted file mode 100644 index 86384a8f0640..000000000000 --- a/packages/vitest-pool-workers/src/mock-agent/dispatcher.cjs +++ /dev/null @@ -1,9 +0,0 @@ -let dispatcher; -module.exports = { - getDispatcher() { - return dispatcher; - }, - setDispatcher(newDispatcher) { - dispatcher = newDispatcher; - }, -}; diff --git a/packages/vitest-pool-workers/src/mock-agent/index.cjs b/packages/vitest-pool-workers/src/mock-agent/index.cjs deleted file mode 100644 index 09a3076757d2..000000000000 --- a/packages/vitest-pool-workers/src/mock-agent/index.cjs +++ /dev/null @@ -1,29 +0,0 @@ -globalThis.global = globalThis; -process.versions = { node: "18.0.0" }; - -const MockAgent = require("undici/lib/mock/mock-agent"); -const { kClients } = require("undici/lib/core/symbols"); -const { kIsMockActive, kDispatches } = require("undici/lib/mock/mock-symbols"); -const { setDispatcher } = require("./dispatcher.cjs"); - -function isMockActive(agent) { - return agent[kIsMockActive]; -} - -function resetMockAgent(agent) { - agent.deactivate(); - agent.enableNetConnect(); - - // Remove all pending interceptors - for (const mockClient of agent[kClients].values()) { - mockClient.dispatcher?.[kDispatches].splice(0); - } - agent.assertNoPendingInterceptors(); -} - -module.exports = { - MockAgent, - setDispatcher, - isMockActive, - resetMockAgent, -}; diff --git a/packages/vitest-pool-workers/src/mock-agent/pending-interceptor-formatter.cjs b/packages/vitest-pool-workers/src/mock-agent/pending-interceptor-formatter.cjs deleted file mode 100644 index eea87b5fcbdd..000000000000 --- a/packages/vitest-pool-workers/src/mock-agent/pending-interceptor-formatter.cjs +++ /dev/null @@ -1,34 +0,0 @@ -const util = require("node:util"); - -// `PendingInterceptorsFormatter` without dependency on `Console#table()` -module.exports = class PendingInterceptorsFormatter { - constructor({ disableColors } = {}) { - this.inspectOptions = { - breakLength: Infinity, - colors: !disableColors && !process.env.CI, - }; - } - - format(pendingInterceptors) { - const formatted = pendingInterceptors.map( - ({ - method, - path, - data: { statusCode }, - persist, - times, - timesInvoked, - origin, - }) => { - const meta = { - persist: Boolean(persist), - invoked: timesInvoked, - remaining: persist ? Infinity : times - timesInvoked, - }; - const inspectedMeta = util.inspect(meta, this.inspectOptions); - return `- ${method} ${origin}${path} ${statusCode} ${inspectedMeta}`; - } - ); - return formatted.join("\n"); - } -}; diff --git a/packages/vitest-pool-workers/src/mock-agent/pool.cjs b/packages/vitest-pool-workers/src/mock-agent/pool.cjs deleted file mode 100644 index 9a6b4463e5f4..000000000000 --- a/packages/vitest-pool-workers/src/mock-agent/pool.cjs +++ /dev/null @@ -1,9 +0,0 @@ -const assert = require("node:assert"); - -module.exports = class Pool { - constructor() { - // We always construct the `MockAgent` with `{ connections: 1 }` which - // constructs `MockClient`s directly, rather than using `MockPool`s - assert.fail("Pool is not implemented in worker"); - } -}; diff --git a/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts b/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts new file mode 100644 index 000000000000..856e805ac973 --- /dev/null +++ b/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts @@ -0,0 +1,230 @@ +import assert from "node:assert"; +import { compileModuleRules, testRegExps } from "miniflare"; +import { type ProvidedContext } from "vitest"; +import { workerdBuiltinModules } from "../shared/builtin-modules"; +import { parseProjectOptions } from "./config"; +import { type WorkerPoolOptionsContext } from "./plugin"; +import { + assertCompatibleVitestVersion, + connectToMiniflareSocket, + getDurableObjectDesignators, + getProjectMiniflare, + getRunnerName, + maybeGetResolvedMainPath, + structuredSerializableParse, + structuredSerializableStringify, +} from "."; +import type { + WorkersConfigPluginAPI, + WorkersPoolOptions, + WorkersPoolOptionsWithDefines, +} from "./config"; +import type { Miniflare, WebSocket } from "miniflare"; +import type { + PoolOptions, + PoolWorker, + WorkerRequest, + WorkerResponse, +} from "vitest/node"; + +export class CloudflarePoolWorker implements PoolWorker { + name = "cloudflare-pool"; + private mf: Miniflare | undefined; + private socket: WebSocket | undefined; + private parsedPoolOptions: WorkersPoolOptionsWithDefines | undefined; + private main: string | undefined; + + constructor( + private options: PoolOptions, + private poolOptions: + | WorkersPoolOptions + | (( + ctx: WorkerPoolOptionsContext + ) => Promise | WorkersPoolOptions) + ) { + assertCompatibleVitestVersion(options.project.vitest); + } + + async start(): Promise { + let resolvedPoolOptions: WorkersPoolOptions; + if (typeof this.poolOptions === "function") { + // hhttps://github.com/vitest-dev/vitest/blob/v4.0.15/packages/vitest/src/integrations/inject.ts + const inject = ( + key: K + ): ProvidedContext[K] => { + return this.options.project.getProvidedContext()[key]; + }; + resolvedPoolOptions = await this.poolOptions({ inject }); + } else { + resolvedPoolOptions = this.poolOptions; + } + + this.parsedPoolOptions = await parseProjectOptions( + this.options.project, + resolvedPoolOptions + ); + this.main = maybeGetResolvedMainPath( + this.options.project, + this.parsedPoolOptions + ); + + // Find the vitest-pool-workers plugin and give it the path to the main file. + // This allows that plugin to inject a virtual dependency on main so that vitest + // will automatically re-run tests when that gets updated, avoiding the user having + // to manually add such an import in their tests. + const configPlugin = this.options.project.vite.config.plugins.find( + ({ name }) => name === "@cloudflare/vitest-pool-workers" + ); + if (configPlugin !== undefined) { + const api = configPlugin.api as WorkersConfigPluginAPI; + api.setMain(this.main); + } + + this.mf = await getProjectMiniflare( + this.options.project.vitest, + this.options.project, + this.parsedPoolOptions, + this.main + ); + + this.socket = await connectToMiniflareSocket( + this.mf, + getRunnerName(this.options.project) + ); + } + + async stop(): Promise { + await this.mf?.dispose(); + this.mf = undefined; + } + + send(message: WorkerRequest): void { + // Vitest will always call `start()` before calling `send()` + assert(this.socket, "Message sent to Worker before initialisation"); + assert( + this.parsedPoolOptions, + "Message sent to Worker before initialisation" + ); + + // This is an initialisation message containing the config. Some properties need modifying + if (message.type === "start") { + // Users can write `vitest --inspect` to start an inspector connection for their tests + // We intercept that option and use it to enable inspection of the Workers running in workerd + // We need to stop it passing through into Vitest's in-Worker code, or Vitest will try and import + // and run `inspector.open()` from `node:inspector` + message.context.config.inspector ??= {}; + message.context.config.inspector.enabled = false; + } else if (message.type === "run") { + // For some reason providing this using the Vitest `project.provide` API + // doesn't work in Vitest Projects, and so we just provide the context directly + message.context.providedContext.cloudflarePoolOptions = JSON.stringify({ + // Include resolved `main` if defined + main: this.main, + // Include designators of all Durable Object namespaces bound in the + // runner worker. We'll use this to list IDs in a namespace. We'll + // also use this to check Durable Object test runner helpers are + // only used with classes defined in the current worker, as these + // helpers rely on wrapping the object. + durableObjectBindingDesignators: [ + ...getDurableObjectDesignators(this.parsedPoolOptions).entries(), + ], + }); + } + this.socket.send(structuredSerializableStringify(message)); + } + + on( + event: string, + callback: + | ((maybeError: unknown) => void) + | (() => void) + | ((response: WorkerResponse) => void) + ): void { + // Vitest will always call `start()` before calling `on()` + assert(this.socket, "Message received from Worker before initialisation"); + assert( + this.parsedPoolOptions, + "Message received from Worker before initialisation" + ); + + const rules = this.parsedPoolOptions.miniflare?.modulesRules; + const compiledRules = compileModuleRules(rules ?? []); + + if (event === "message") { + this.socket.addEventListener("message", (m) => { + const d = structuredSerializableParse( + m.data as string + ) as WorkerResponse; + + // This is a birpc serialised message before it's been parsed, which is why the properties are so unintelligible + // We're looking for a `fetch()` RPC call: https://github.com/vitest-dev/vitest/blob/772923645f250674e937dd887572e76e971524b9/packages/vitest/src/types/rpc.ts#L8 + if ( + d && + typeof d === "object" && + "m" in d && + "a" in d && + "i" in d && + Array.isArray(d.a) && + d.m === "fetch" + ) { + assert( + this.socket, + "Message received from Worker before initialisation" + ); + const specifier = d.a[0]; + + if ( + // `cloudflare:test` imports are handled by the `@cloudflare/vitest-pool-workers` plugin, and so should be ignored here + specifier !== "cloudflare:test" && + (/^(cloudflare|workerd):/.test(specifier) || + workerdBuiltinModules.has(specifier)) + ) { + return this.socket.send( + // Tell Vitest to treat this module as "external" and load it using a workerd module import + structuredSerializableStringify({ + t: "s", + i: d.i, + r: { externalize: specifier }, + }) + ); + } + + const maybeRule = compiledRules.find((rule) => + testRegExps(rule.include, specifier) + ); + if (maybeRule !== undefined) { + const externalize = + this.options.project.config.root + + specifier + + `?mf_vitest_force=${maybeRule.type}`; + + return this.socket.send( + structuredSerializableStringify({ + t: "s", + i: d.i, + r: { externalize }, + }) + ); + } + } + (callback as (response: WorkerResponse) => void)(d); + }); + } else if (event === "error") { + this.socket.addEventListener("error", (e) => { + (callback as (maybeError: unknown) => void)(e.error); + }); + } else if (event === "exit") { + this.socket.addEventListener("close", callback as () => void); + } + } + + off(_event: string, callback: (_arg: unknown) => void): void { + this.socket?.removeEventListener("close", callback as () => void); + } + + // Vitest does not have a corresponding `serialize()` option, so we can't actually use this for serialisation + // Instead, we serialize/deserialize in the `send()` and `on()` methods. + deserialize(data: unknown) { + return data; + } +} diff --git a/packages/vitest-pool-workers/src/pool/config.ts b/packages/vitest-pool-workers/src/pool/config.ts index ca42a70ff8fb..992f26c86262 100644 --- a/packages/vitest-pool-workers/src/pool/config.ts +++ b/packages/vitest-pool-workers/src/pool/config.ts @@ -9,10 +9,13 @@ import { PLUGINS, } from "miniflare"; import { z } from "zod"; -import { getProjectPath, getRelativeProjectPath } from "./helpers"; +import { + getProjectPath, + getRelativeProjectConfigPath, + getRelativeProjectPath, +} from "./helpers"; import type { ModuleRule, WorkerOptions } from "miniflare"; -import type { ProvidedContext } from "vitest"; -import type { WorkspaceProject } from "vitest/node"; +import type { TestProject } from "vitest/node"; import type { Binding, RemoteProxySession } from "wrangler"; import type { ParseParams, ZodError } from "zod"; @@ -22,13 +25,10 @@ export interface WorkersConfigPluginAPI { const PLUGIN_VALUES = Object.values(PLUGINS); -const OPTIONS_PATH_ARRAY = ["test", "poolOptions", "workers"]; -export const OPTIONS_PATH = OPTIONS_PATH_ARRAY.join("."); - const WorkersPoolOptionsSchema = z.object({ /** * Entrypoint to Worker run in the same isolate/context as tests. This is - * required to use `import { SELF } from "cloudflare:test"`, or Durable + * required to use `import { exports } from "cloudflare:workers"`, or Durable * Objects without an explicit `scriptName`. Note this goes through Vite * transforms and can be a TypeScript file. Note also * `import module from ""` inside tests gives exactly the same @@ -36,14 +36,6 @@ const WorkersPoolOptionsSchema = z.object({ * bindings. */ main: z.ostring(), - /** - * Enables per-test isolated storage. If enabled, any writes to storage - * performed in a test will be undone at the end of the test. The test storage - * environment is copied from the containing suite, meaning `beforeAll()` - * hooks can be used to seed data. If this is disabled, all tests will share - * the same storage. - */ - isolatedStorage: z.boolean().default(true), /** * Enables remote bindings to access remote resources configured * with `remote: true` in the wrangler configuration file. @@ -67,15 +59,6 @@ const WorkersPoolOptionsSchema = z.object({ ]) ) .default({}), - /** - * If enabled, Workers will be run in a single shared worker instance. - */ - /** - * Runs all tests in this project serially in the same worker, using the same - * module cache. This can significantly speed up tests if you've got lots of - * small test files. - */ - singleWorker: z.boolean().default(false), miniflare: z .object({ workers: z.array(z.object({}).passthrough()).optional(), @@ -86,6 +69,7 @@ const WorkersPoolOptionsSchema = z.object({ .object({ configPath: z.ostring(), environment: z.ostring() }) .optional(), }); + export type SourcelessWorkerOptions = Omit< WorkerOptions, "script" | "scriptPath" | "modules" | "modulesRoot" @@ -94,6 +78,7 @@ export type SourcelessWorkerOptions = Omit< // from which `WorkerOptions` is derived. Therefore, we manually include it. modulesRules?: ModuleRule[]; }; + export type WorkersPoolOptions = z.input & { miniflare?: SourcelessWorkerOptions & { workers?: WorkerOptions[]; @@ -209,13 +194,11 @@ const remoteProxySessionsDataMap = new Map< async function parseCustomPoolOptions( rootPath: string, - value: unknown, - opts: PathParseParams + value: unknown ): Promise { // Try to parse pool specific options const options = WorkersPoolOptionsSchema.parse( - value, - opts + value ) as WorkersPoolOptionsWithDefines; options.miniflare ??= {}; @@ -229,7 +212,7 @@ async function parseCustomPoolOptions( rootPath, options.miniflare, /* withoutScript */ true, // (script provided by runner) - { path: [...opts.path, "miniflare"] } + { path: ["miniflare"] } ); } catch (e) { coalesceZodErrors(errorRef, e); @@ -247,7 +230,7 @@ async function parseCustomPoolOptions( worker, /* withoutScript */ false, { - path: [...opts.path, "miniflare", "workers", i], + path: ["miniflare", "workers", i], } ); } catch (e) { @@ -308,22 +291,6 @@ async function parseCustomPoolOptions( } ); - const wrappedBindings = Object.values(workerOptions.wrappedBindings ?? {}); - - const hasAIOrVectorizeBindings = wrappedBindings.some((binding) => { - return ( - typeof binding === "object" && - (binding.scriptName.includes("__WRANGLER_EXTERNAL_VECTORIZE_WORKER") || - binding.scriptName.includes("__WRANGLER_EXTERNAL_AI_WORKER")) - ); - }); - - if (hasAIOrVectorizeBindings) { - log.warn( - "Workers AI and Vectorize bindings will access your Cloudflare account and incur usage charges even in testing. We recommend mocking any usage of these bindings in your tests." - ); - } - // If `main` wasn't explicitly configured, fall back to Wrangler config's options.main ??= main; @@ -361,7 +328,8 @@ async function parseCustomPoolOptions( } export async function parseProjectOptions( - project: WorkspaceProject + project: TestProject, + poolOptions: unknown ): Promise { // Make sure the user hasn't specified a custom environment. This was how // users enabled Miniflare 2's Vitest environment, so it's likely users will @@ -381,44 +349,27 @@ export async function parseProjectOptions( `Unexpected custom \`environment\` ${quotedEnvironment} in project ${relativePath}.`, "The Workers pool always runs your tests inside of an environment providing Workers runtime APIs.", `Please remove the \`environment\` configuration${migrationGuide}`, - "Use `poolMatchGlobs`/`environmentMatchGlobs` to run a subset of your tests in a different pool/environment.", ].join("\n"); throw new TypeError(message); } const projectPath = getProjectPath(project); - const rootPath = - typeof projectPath === "string" ? path.dirname(projectPath) : ""; - const poolOptions = project.config.poolOptions; - let workersPoolOptions = poolOptions?.workers ?? {}; + try { - if (typeof workersPoolOptions === "function") { - // https://github.com/vitest-dev/vitest/blob/v2.1.1/packages/vitest/src/integrations/inject.ts - const inject = ( - key: K - ): ProvidedContext[K] => { - return project.getProvidedContext()[key]; - }; - workersPoolOptions = await workersPoolOptions({ inject }); - } - return await parseCustomPoolOptions(rootPath, workersPoolOptions, { - path: OPTIONS_PATH_ARRAY, - }); + return await parseCustomPoolOptions(projectPath, poolOptions); } catch (e) { if (!isZodErrorLike(e)) { throw e; } let formatted: string; try { - formatted = formatZodError(e, { - test: { poolOptions: { workers: workersPoolOptions } }, - }); + formatted = formatZodError(e, poolOptions); } catch { throw e; } - const relativePath = getRelativeProjectPath(project); + const relativePath = getRelativeProjectConfigPath(project); throw new TypeError( - `Unexpected pool options in project ${relativePath}:\n${formatted}` + `Unexpected options in project ${relativePath}:\n${formatted}` ); } } diff --git a/packages/vitest-pool-workers/src/config/d1.ts b/packages/vitest-pool-workers/src/pool/d1.ts similarity index 100% rename from packages/vitest-pool-workers/src/config/d1.ts rename to packages/vitest-pool-workers/src/pool/d1.ts diff --git a/packages/vitest-pool-workers/src/pool/helpers.ts b/packages/vitest-pool-workers/src/pool/helpers.ts index ed56afe43ef9..d6f67e03f66c 100644 --- a/packages/vitest-pool-workers/src/pool/helpers.ts +++ b/packages/vitest-pool-workers/src/pool/helpers.ts @@ -1,5 +1,5 @@ import path from "node:path"; -import type { WorkspaceProject } from "vitest/node"; +import type { TestProject } from "vitest/node"; // User worker names must not start with this export const WORKER_NAME_PREFIX = "vitest-pool-workers-"; @@ -10,17 +10,17 @@ export function isFileNotFoundError(e: unknown): boolean { ); } -export function getProjectPath(project: WorkspaceProject): string | number { - return project.config.config ?? project.path; +export function getProjectPath(project: TestProject): string { + return project.config.root; } -export function getRelativeProjectPath( - project: WorkspaceProject -): string | number { +export function getRelativeProjectPath(project: TestProject): string { const projectPath = getProjectPath(project); - if (typeof projectPath === "number") { - return projectPath; - } else { - return path.relative("", projectPath); - } + return path.relative("", projectPath); +} + +export function getRelativeProjectConfigPath(project: TestProject): string { + return project.config.config + ? path.relative("", project.config.config) + : getRelativeProjectPath(project); } diff --git a/packages/vitest-pool-workers/src/pool/index.ts b/packages/vitest-pool-workers/src/pool/index.ts index 338cb854e2a2..a4ea83aa5d73 100644 --- a/packages/vitest-pool-workers/src/pool/index.ts +++ b/packages/vitest-pool-workers/src/pool/index.ts @@ -1,17 +1,12 @@ import assert from "node:assert"; import crypto from "node:crypto"; -import events from "node:events"; import fs from "node:fs"; import path from "node:path"; -import { fileURLToPath, pathToFileURL } from "node:url"; -import util from "node:util"; -import { createBirpc } from "birpc"; +import { fileURLToPath } from "node:url"; import * as devalue from "devalue"; import { - compileModuleRules, getNodeCompat, kCurrentWorker, - kUnsafeEphemeralUniqueKey, Log, LogLevel, maybeApply, @@ -19,16 +14,10 @@ import { structuredSerializableReducers, structuredSerializableRevivers, supportedCompatibilityDate, - testRegExps, - WebSocket, } from "miniflare"; import semverSatisfies from "semver/functions/satisfies.js"; -import { createMethodsRPC } from "vitest/node"; import { experimental_readRawConfig } from "wrangler"; -import { workerdBuiltinModules } from "../shared/builtin-modules"; -import { createChunkingSocket } from "../shared/chunking-socket"; import { CompatibilityFlagAssertions } from "./compatibility-flag-assertions"; -import { OPTIONS_PATH, parseProjectOptions } from "./config"; import { guessWorkerExports } from "./guess-exports"; import { getProjectPath, @@ -36,57 +25,18 @@ import { isFileNotFoundError, WORKER_NAME_PREFIX, } from "./helpers"; -import { - ABORT_ALL_WORKER, - handleLoopbackRequest, - scheduleStorageReset, - waitForStorageReset, -} from "./loopback"; +import { handleLoopbackRequest } from "./loopback"; import { handleModuleFallbackRequest } from "./module-fallback"; import type { SourcelessWorkerOptions, - WorkersConfigPluginAPI, WorkersPoolOptions, WorkersPoolOptionsWithDefines, } from "./config"; -import type { - CloseEvent, - MiniflareOptions, - SharedOptions, - WorkerOptions, -} from "miniflare"; +import type { MiniflareOptions, SharedOptions, WorkerOptions } from "miniflare"; import type { Readable } from "node:stream"; -import type { MessagePort } from "node:worker_threads"; -import type { - RunnerRPC, - RuntimeRPC, - SerializedConfig, - WorkerContext, -} from "vitest"; -import type { - ProcessPool, - TestSpecification, - Vitest, - WorkspaceProject, -} from "vitest/node"; - -interface SerializedOptions { - main?: string; - durableObjectBindingDesignators?: Map< - string /* bound name */, - DurableObjectDesignator - >; - isolatedStorage?: boolean; -} - -// https://github.com/vitest-dev/vitest/blob/v2.1.1/packages/vite-node/src/client.ts#L468 -declare const __vite_ssr_import__: unknown; -assert( - typeof __vite_ssr_import__ === "undefined", - "Expected `@cloudflare/vitest-pool-workers` not to be transformed by Vite" -); +import type { TestProject, Vitest } from "vitest/node"; -function structuredSerializableStringify(value: unknown): string { +export 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 @@ -104,15 +54,11 @@ function structuredSerializableStringify(value: unknown): string { } return devalue.stringify(value, structuredSerializableReducers); } -function structuredSerializableParse(value: string): unknown { + +export function structuredSerializableParse(value: string): unknown { return devalue.parse(value, structuredSerializableRevivers); } -// Log for verbose debug messages (e.g. RPC messages) -let debuglog: util.DebugLoggerFunction = util.debuglog( - "vitest-pool-workers:index", - (fn) => (debuglog = fn) -); // Log for informational pool messages const log = new Log(LogLevel.VERBOSE, { prefix: "vpw" }); // Log for Miniflare instances, used for user code warnings/errors @@ -150,36 +96,8 @@ function handleRuntimeStdio(stdout: Readable, stderr: Readable): void { }); } -type SingleOrPerTestFileMiniflare = - | Miniflare // Single instance - | Map; // Instance per test file -function forEachMiniflare( - mfs: SingleOrPerTestFileMiniflare, - callback: (mf: Miniflare) => Promise -): Promise { - if (mfs instanceof Miniflare) { - return callback(mfs); - } - - const promises: Promise[] = []; - for (const mf of mfs.values()) { - promises.push(callback(mf)); - } - return Promise.all(promises); -} - -interface Project { - project: WorkspaceProject; - options: WorkersPoolOptionsWithDefines; - testFiles: Set; - relativePath: string | number; - mf?: SingleOrPerTestFileMiniflare; - previousMfOptions?: MiniflareOptions; -} -const allProjects = new Map(); - -function getRunnerName(project: WorkspaceProject, testFile?: string) { - const name = `${WORKER_NAME_PREFIX}runner-${project.getName().replace(/[^a-z0-9-]/gi, "_")}`; +export function getRunnerName(project: TestProject, testFile?: string) { + const name = `${WORKER_NAME_PREFIX}runner-${project.name.replace(/[^a-z0-9-]/gi, "_")}`; if (testFile === undefined) { return name; } @@ -231,7 +149,7 @@ interface DurableObjectDesignator { * Returns a map of Durable Objects bindings' bound names to the designators of * the objects they point to. */ -function getDurableObjectDesignators( +export function getDurableObjectDesignators( options: WorkersPoolOptions ): Map { const result = new Map(); @@ -261,17 +179,6 @@ function getDurableObjectDesignators( return result; } -const POOL_WORKER_DIR = path.dirname(POOL_WORKER_PATH); -const USER_OBJECT_MODULE_NAME = "__VITEST_POOL_WORKERS_USER_OBJECT"; -const USER_OBJECT_MODULE_PATH = path.join( - POOL_WORKER_DIR, - USER_OBJECT_MODULE_NAME -); -const DEFINES_MODULE_PATH = path.join( - POOL_WORKER_DIR, - "__VITEST_POOL_WORKERS_DEFINES" -); - /** * Gets a set of Durable Object class names for the SELF Worker. * @@ -313,21 +220,6 @@ function getWranglerWorkerName( return wranglerConfigObject.rawConfig.name; } -function updateWorkflowsScriptNames( - runnerWorker: WorkerOptions, - wranglerWorkerName: string | undefined -): void { - const workflows = runnerWorker.workflows; - if (!workflows || wranglerWorkerName === undefined) { - return; - } - for (const workflow of Object.values(workflows)) { - if (workflow.scriptName === wranglerWorkerName) { - delete workflow.scriptName; - } - } -} - /** * Gets a set of class names for Workflows defined in the SELF Worker. */ @@ -378,16 +270,18 @@ const LOOPBACK_SERVICE_BINDING = "__VITEST_POOL_WORKERS_LOOPBACK_SERVICE"; const RUNNER_OBJECT_BINDING = "__VITEST_POOL_WORKERS_RUNNER_OBJECT"; async function buildProjectWorkerOptions( - project: Omit + project: TestProject, + customOptions: WorkersPoolOptionsWithDefines, + main: string | undefined ): Promise { const relativeWranglerConfigPath = maybeApply( (v) => path.relative("", v), - project.options.wrangler?.configPath + customOptions.wrangler?.configPath ); - const runnerWorker = project.options.miniflare ?? {}; + const runnerWorker = customOptions.miniflare ?? {}; // Make sure the worker has a well-known name, and share it with the runner - runnerWorker.name = getRunnerName(project.project); + runnerWorker.name = getRunnerName(project); runnerWorker.bindings ??= {}; runnerWorker.bindings[SELF_NAME_BINDING] = runnerWorker.name; @@ -401,15 +295,15 @@ async function buildProjectWorkerOptions( // No compatibility date was provided, so infer the latest supported date runnerWorker.compatibilityDate ??= supportedCompatibilityDate; log.info( - `No compatibility date was provided for project ${project.relativePath}, defaulting to latest supported date ${runnerWorker.compatibilityDate}.` + `No compatibility date was provided for project ${getRelativeProjectPath(project)}, defaulting to latest supported date ${runnerWorker.compatibilityDate}.` ); } const flagAssertions = new CompatibilityFlagAssertions({ compatibilityDate: runnerWorker.compatibilityDate, compatibilityFlags: runnerWorker.compatibilityFlags, - optionsPath: `${OPTIONS_PATH}.miniflare`, - relativeProjectPath: project.relativePath.toString(), + optionsPath: `miniflare`, + relativeProjectPath: getRelativeProjectPath(project), relativeWranglerConfigPath, }); @@ -486,8 +380,8 @@ async function buildProjectWorkerOptions( ) { try { const guessedExports = await guessWorkerExports( - project.options.main, - project.options.additionalExports + main, + customOptions.additionalExports ); for (const [exportName, exportType] of guessedExports) { switch (exportType) { @@ -503,7 +397,7 @@ async function buildProjectWorkerOptions( } } } catch (e) { - const message = `Failed to statically analyze the exports of the main Worker entry-point "${project.options.main}"\nMore details: ${e}`; + const message = `Failed to statically analyze the exports of the main Worker entry-point "${customOptions.main}"\nMore details: ${e}`; for (const line of message.split("\n")) { log.warn(line); } @@ -545,9 +439,16 @@ async function buildProjectWorkerOptions( className: "__VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__", // Make the runner object ephemeral, so it doesn't write any `.sqlite` files // that would disrupt stacked storage because we prevent eviction - unsafeUniqueKey: kUnsafeEphemeralUniqueKey, + // unsafeUniqueKey: kUnsafeEphemeralUniqueKey, unsafePreventEviction: true, }; + // runnerWorker.durableObjects["MY"] = { + // className: "MyDO", + // // Make the runner object ephemeral, so it doesn't write any `.sqlite` files + // // that would disrupt stacked storage because we prevent eviction + // // unsafeUniqueKey: kUnsafeEphemeralUniqueKey, + // unsafePreventEviction: true, + // }; // Vite has its own define mechanism, but we can't control it from custom // pools. Our defines come from `wrangler.toml` files which are only parsed @@ -555,7 +456,7 @@ async function buildProjectWorkerOptions( // define script similar to Vite's. When defines change, Miniflare will be // restarted as the input options will be different. const defines = `export default { - ${Object.entries(project.options.defines ?? {}) + ${Object.entries(customOptions.defines ?? {}) .map(([key, value]) => `${JSON.stringify(key)}: ${value}`) .join(",\n")} }; @@ -579,20 +480,21 @@ async function buildProjectWorkerOptions( // TODO(now): need to add source URL comments here to ensure those are correct const modulesRoot = process.platform === "win32" ? "Z:\\" : "/"; runnerWorker.modulesRoot = modulesRoot; + runnerWorker.modules = [ { type: "ESModule", - path: path.join(modulesRoot, POOL_WORKER_PATH), + path: path.join(modulesRoot, "index.mjs"), contents: fs.readFileSync(POOL_WORKER_PATH), }, { type: "ESModule", - path: path.join(modulesRoot, USER_OBJECT_MODULE_PATH), + path: path.join(modulesRoot, "__VITEST_POOL_WORKERS_USER_OBJECT"), contents: wrappers.join("\n"), }, { type: "ESModule", - path: path.join(modulesRoot, DEFINES_MODULE_PATH), + path: path.join(modulesRoot, "__VITEST_POOL_WORKERS_DEFINES"), contents: defines, }, // The native workerd provided nodejs modules don't always support everything Vitest needs. @@ -626,13 +528,13 @@ async function buildProjectWorkerOptions( worker.name === "" ) { throw new Error( - `In project ${project.relativePath}, \`${OPTIONS_PATH}.miniflare.workers[${i}].name\` must be non-empty` + `In project ${getRelativeProjectPath(project)}, \`miniflare.workers[${i}].name\` must be non-empty` ); } // ...that doesn't start with our reserved prefix if (worker.name.startsWith(WORKER_NAME_PREFIX)) { throw new Error( - `In project ${project.relativePath}, \`${OPTIONS_PATH}.miniflare.workers[${i}].name\` must not start with "${WORKER_NAME_PREFIX}", got ${worker.name}` + `In project ${getRelativeProjectPath(project)}, \`miniflare.workers[${i}].name\` must not start with "${WORKER_NAME_PREFIX}", got ${worker.name}` ); } @@ -663,24 +565,27 @@ function getModuleFallbackService(ctx: Vitest): ModuleFallbackService { if (service !== undefined) { return service; } - // @ts-expect-error ctx.vitenode is marked as internal - service = handleModuleFallbackRequest.bind(undefined, ctx.vitenode.server); + service = handleModuleFallbackRequest.bind(undefined, ctx.vite); moduleFallbackServices.set(ctx, service); return service; } /** * Builds options for the Miniflare instance running tests for the given Vitest - * project. The first `runnerWorker` returned may be duplicated in the instance - * if `singleWorker` is disabled so tests can execute in-parallel and isolation. + * project. */ async function buildProjectMiniflareOptions( ctx: Vitest, - project: Project + project: TestProject, + customOptions: WorkersPoolOptions, + main: string | undefined ): Promise { const moduleFallbackService = getModuleFallbackService(ctx); - const [runnerWorker, ...auxiliaryWorkers] = - await buildProjectWorkerOptions(project); + const [runnerWorker, ...auxiliaryWorkers] = await buildProjectWorkerOptions( + project, + customOptions, + main + ); assert(runnerWorker.name !== undefined); assert(runnerWorker.name.startsWith(WORKER_NAME_PREFIX)); @@ -689,277 +594,77 @@ async function buildProjectMiniflareOptions( ? ctx.config.inspector.port ?? 9229 : undefined; - if (inspectorPort !== undefined && !project.options.singleWorker) { - log.warn(`Tests run in singleWorker mode when the inspector is open.`); - - project.options.singleWorker = true; - } - - if (project.options.singleWorker || project.options.isolatedStorage) { - // Single Worker, Isolated or Shared Storage - // --> single instance with single runner worker - // Multiple Workers, Isolated Storage: - // --> multiple instances each with single runner worker - - // Set Workflows scriptName to the runner worker name if it matches the Wrangler worker name - const wranglerWorkerName = getWranglerWorkerName( - project.options.wrangler?.configPath - ); - updateWorkflowsScriptNames(runnerWorker, wranglerWorkerName); - - return { - ...SHARED_MINIFLARE_OPTIONS, - inspectorPort, - unsafeModuleFallbackService: moduleFallbackService, - workers: [runnerWorker, ABORT_ALL_WORKER, ...auxiliaryWorkers], - }; - } else { - // Multiple Workers, Shared Storage: - // --> single instance with multiple runner workers - const testWorkers: WorkerOptions[] = []; - for (const testFile of project.testFiles) { - const testWorker = { ...runnerWorker }; - testWorker.name = getRunnerName(project.project, testFile); - - // Update binding to own name - assert(testWorker.bindings !== undefined); - testWorker.bindings = { ...testWorker.bindings }; - testWorker.bindings[SELF_NAME_BINDING] = testWorker.name; - - // Set Workflows scriptName to the test worker name if it matches the Wrangler worker name - const wranglerWorkerName = getWranglerWorkerName( - project.options.wrangler?.configPath - ); - updateWorkflowsScriptNames(testWorker, wranglerWorkerName); - - testWorkers.push(testWorker); - } - return { - ...SHARED_MINIFLARE_OPTIONS, - unsafeModuleFallbackService: moduleFallbackService, - workers: [...testWorkers, ABORT_ALL_WORKER, ...auxiliaryWorkers], - }; - } + return { + ...SHARED_MINIFLARE_OPTIONS, + inspectorPort, + unsafeModuleFallbackService: moduleFallbackService, + workers: [runnerWorker, ...auxiliaryWorkers], + }; } -async function getProjectMiniflare( +export async function getProjectMiniflare( ctx: Vitest, - project: Project -): Promise { - const mfOptions = await buildProjectMiniflareOptions(ctx, project); - const changed = !util.isDeepStrictEqual(project.previousMfOptions, mfOptions); - project.previousMfOptions = mfOptions; - - const previousSingleInstance = project.mf instanceof Miniflare; - const singleInstance = - project.options.singleWorker || !project.options.isolatedStorage; - - if (project.mf !== undefined && previousSingleInstance !== singleInstance) { - // If isolated storage configuration has changed, reset project instances - log.info(`Isolation changed for ${project.relativePath}, resetting...`); - await forEachMiniflare(project.mf, (mf) => mf.dispose()); - project.mf = undefined; - } - - if (project.mf === undefined) { - // If `mf` is now `undefined`, create new instances - if (singleInstance) { - log.info( - `Starting single runtime for ${project.relativePath}` + - `${mfOptions.inspectorPort !== undefined ? ` with inspector on port ${mfOptions.inspectorPort}` : ""}` + - `...` - ); - project.mf = new Miniflare(mfOptions); - } else { - log.info(`Starting isolated runtimes for ${project.relativePath}...`); - project.mf = new Map(); - for (const testFile of project.testFiles) { - project.mf.set(testFile, new Miniflare(mfOptions)); - } - } - await forEachMiniflare(project.mf, (mf) => mf.ready); - } else if (changed) { - // Otherwise, update the existing instances if options have changed - log.info(`Options changed for ${project.relativePath}, updating...`); - await forEachMiniflare(project.mf, (mf) => mf.setOptions(mfOptions)); - } else { - log.debug(`Reusing runtime for ${project.relativePath}...`); - } - - return project.mf; + project: TestProject, + poolOptions: WorkersPoolOptionsWithDefines, + main: string | undefined +): Promise { + const mfOptions = await buildProjectMiniflareOptions( + ctx, + project, + poolOptions, + main + ); + log.info( + `Starting runtime for ${getRelativeProjectPath(project)}` + + `${mfOptions.inspectorPort !== undefined ? ` with inspector on port ${mfOptions.inspectorPort}` : ""}` + + `...` + ); + const mf = new Miniflare(mfOptions); + await mf.ready; + return mf; } -function maybeGetResolvedMainPath(project: Project): string | undefined { - const projectPath = getProjectPath(project.project); - const main = project.options.main; +export function maybeGetResolvedMainPath( + project: TestProject, + options: WorkersPoolOptionsWithDefines +): string | undefined { + const projectPath = getProjectPath(project); + const main = options.main; if (main === undefined) { return; } if (typeof projectPath === "string") { - return path.resolve(path.dirname(projectPath), main); + return path.resolve(projectPath, main); } else { return path.resolve(main); } } -async function runTests( - ctx: Vitest, +export async function connectToMiniflareSocket( mf: Miniflare, - workerName: string, - project: Project, - config: SerializedConfig, - files: string[], - invalidates: string[] = [], - method: "run" | "collect" + workerName: string ) { - const workerPath = path.join(ctx.distPath, "worker.js"); - const threadsWorkerPath = path.join(ctx.distPath, "workers", "threads.js"); - - ctx.state.clearFiles(project.project, files); - const data: WorkerContext = { - pool: "threads", - worker: pathToFileURL(threadsWorkerPath).href, - port: undefined as unknown as MessagePort, - config, - files, - invalidates, - environment: { name: "node", options: null }, - workerId: 0, - projectName: project.project.getName(), - providedContext: project.project.getProvidedContext(), - }; - - // Find the vitest-pool-workers:config plugin and give it the path to the main file. - // This allows that plugin to inject a virtual dependency on main so that vitest - // will automatically re-run tests when that gets updated, avoiding the user having - // to manually add such an import in their tests. - const configPlugin = project.project.server.config.plugins.find( - ({ name }) => name === "@cloudflare/vitest-pool-workers:config" - ); - if (configPlugin !== undefined) { - const api = configPlugin.api as WorkersConfigPluginAPI; - api.setMain(project.options.main); - } - - // We reset storage at the end of tests when the user is presumably looking at - // results. We don't need to reset storage on the first run as instances were - // just created. - await waitForStorageReset(mf); const ns = await mf.getDurableObjectNamespace( RUNNER_OBJECT_BINDING, workerName ); - // @ts-expect-error `ColoLocalActorNamespace`s are not included in types - const stub = ns.get("singleton"); + + const stub = ns.getByName("singleton"); const res = await stub.fetch("http://placeholder", { headers: { Upgrade: "websocket", "MF-Vitest-Worker-Data": structuredSerializableStringify({ - filePath: pathToFileURL(workerPath).href, - name: method, - data, cwd: process.cwd(), }), }, }); + const webSocket = res.webSocket; assert(webSocket !== null); - const chunkingSocket = createChunkingSocket({ - post(message) { - webSocket.send(message); - }, - on(listener) { - webSocket.addEventListener("message", (event) => { - listener(event.data); - }); - }, - }); - - // Compile module rules for matching against - const rules = project.options.miniflare?.modulesRules; - const compiledRules = compileModuleRules(rules ?? []); - - const localRpcFunctions = createMethodsRPC(project.project, { - cacheFs: false, - }); - const patchedLocalRpcFunctions: RuntimeRPC = { - ...localRpcFunctions, - async fetch(...args) { - const specifier = args[0]; - - // Mark built-in modules (e.g. `cloudflare:test-runner`) as external. - // Note we explicitly don't mark `cloudflare:test` as external here, as - // this is handled by a Vite plugin injected by `defineWorkersConfig()`. - // The virtual `cloudflare:test` module will define a dependency on the - // specific `main` entrypoint, ensuring tests reload when it changes. - // Note Vite's module graph is constructed using static analysis, so the - // dynamic import of `main` won't add an imported-by edge to the graph. - if ( - specifier !== "cloudflare:test" && - (/^(cloudflare|workerd):/.test(specifier) || - workerdBuiltinModules.has(specifier)) - ) { - return { externalize: specifier }; - } - - // If the specifier matches any module rules, force it to be loaded as - // that type. This will be handled by the module fallback service. - const maybeRule = compiledRules.find((rule) => - testRegExps(rule.include, specifier) - ); - if (maybeRule !== undefined) { - const externalize = specifier + `?mf_vitest_force=${maybeRule.type}`; - return { externalize }; - } - - return localRpcFunctions.fetch(...args); - }, - }; - - let startupError: unknown; - const rpc = createBirpc(patchedLocalRpcFunctions, { - eventNames: ["onCancel"], - post(value) { - if (webSocket.readyState === WebSocket.READY_STATE_OPEN) { - debuglog("POOL-->WORKER", value); - chunkingSocket.post(structuredSerializableStringify(value)); - } else { - debuglog("POOL--* ", value); - } - }, - on(listener) { - chunkingSocket.on((message) => { - const value = structuredSerializableParse(message); - debuglog("POOL<--WORKER", value); - if ( - typeof value === "object" && - value !== null && - "vitestPoolWorkersError" in value - ) { - startupError = value.vitestPoolWorkersError; - } else { - listener(value); - } - }); - }, - }); - project.project.ctx.onCancel((reason) => rpc.onCancel(reason)); webSocket.accept(); - const [event] = (await events.once(webSocket, "close")) as [CloseEvent]; - if (webSocket.readyState === WebSocket.READY_STATE_CLOSING) { - if (event.code === 1005 /* No Status Received */) { - webSocket.close(); - } else { - webSocket.close(event.code, event.reason); - } - } - if (event.code !== 1000) { - throw startupError ?? new Error("Failed to run tests"); - } - - debuglog("DONE", files); + return webSocket; } interface PackageJson { @@ -986,7 +691,7 @@ function getPackageJson(dirPath: string): PackageJson | undefined { } } -function assertCompatibleVitestVersion(ctx: Vitest) { +export function assertCompatibleVitestVersion(ctx: Vitest) { // Some package managers don't enforce `peerDependencies` requirements, // so add a runtime sanity check to ensure things don't break in strange ways. const poolPkgJson = getPackageJson(__dirname); @@ -1011,6 +716,12 @@ function assertCompatibleVitestVersion(ctx: Vitest) { "Expected to find `vitest`'s version" ); + // Hard error on Vitest v3, which definitely won't work + if (actualVitestVersion.startsWith("3")) { + const message = `You're running \`vitest@${actualVitestVersion}\`, but this version of \`@cloudflare/vitest-pool-workers\` only supports \`vitest ${expectedVitestVersion}\`.`; + throw new Error(message); + } + if (!semverSatisfies(actualVitestVersion, expectedVitestVersion)) { const message = [ `You're running \`vitest@${actualVitestVersion}\`, but this version of \`@cloudflare/vitest-pool-workers\` only officially supports \`vitest ${expectedVitestVersion}\`.`, @@ -1021,244 +732,6 @@ function assertCompatibleVitestVersion(ctx: Vitest) { } } -let warnedUnsupportedInspectorOptions = false; - -function validateInspectorConfig(config: SerializedConfig) { - if (config.inspector.host) { - throw new TypeError( - "Customizing inspector host is not supported with vitest-pool-workers." - ); - } - - if (config.inspector.enabled && !warnedUnsupportedInspectorOptions) { - if (config.inspectBrk) { - log.warn( - `The "--inspect-brk" flag is not supported. Use "--inspect" instead.` - ); - } else if (config.inspector.waitForDebugger) { - log.warn( - `The "inspector.waitForDebugger" option is not supported. Insert a debugger statement if you need to pause execution.` - ); - } - - warnedUnsupportedInspectorOptions = true; - } -} - -async function executeMethod( - ctx: Vitest, - specs: TestSpecification[], - invalidates: string[] | undefined, - method: "run" | "collect" -) { - // Vitest waits for the previous `runTests()` to complete before calling - // `runTests()` again: - // https://github.com/vitest-dev/vitest/blob/v1.0.4/packages/vitest/src/node/core.ts#L458-L459 - // This behaviour is required for stacked storage to work correctly. - // If we had concurrent runs, stack pushes/pops would interfere. We should - // always have an empty, fully-popped stacked at the end of a run. - - // 1. Collect new specs - const parsedProjectOptions = new Set(); - for (const [project, testFile] of specs) { - // Vitest validates all project names are unique - const projectName = project.getName(); - let workersProject = allProjects.get(projectName); - // Parse project options once per project per re-run - if (workersProject === undefined) { - workersProject = { - project, - options: await parseProjectOptions(project), - testFiles: new Set(), - relativePath: getRelativeProjectPath(project), - }; - allProjects.set(projectName, workersProject); - } else if (!parsedProjectOptions.has(project)) { - workersProject.project = project; - workersProject.options = await parseProjectOptions(project); - workersProject.relativePath = getRelativeProjectPath(project); - } - workersProject.testFiles.add(testFile); - - parsedProjectOptions.add(project); - } - - // 2. Run just the required tests - const resultPromises: Promise[] = []; - const filesByProject = new Map(); - for (const [project, file] of specs) { - let group = filesByProject.get(project); - if (group === undefined) { - filesByProject.set(project, (group = [])); - } - group.push(file); - } - for (const [workspaceProject, files] of filesByProject) { - const project = allProjects.get(workspaceProject.getName()); - assert(project !== undefined); // Defined earlier in this function - const options = project.options; - - const config = workspaceProject.getSerializableConfig(); - - // Use our custom test runner. We don't currently support custom - // runners, since we need our own for isolated storage/fetch mock resets - // to work properly. There aren't many use cases where a user would need - // to control this. - config.runner = "cloudflare:test-runner"; - - // Make sure `setImmediate` and `clearImmediate` are never faked as they - // don't exist on the workers global scope - config.fakeTimers.toFake = config.fakeTimers.toFake?.filter( - (timerMethod) => - timerMethod !== "setImmediate" && timerMethod !== "clearImmediate" - ); - - validateInspectorConfig(config); - - // We don't want it to call `node:inspector` inside Workerd - config.inspector = { - enabled: false, - }; - - // We don't need all pool options from the config at runtime. - // Additionally, users may set symbols in the config which aren't - // 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, - }, - workers: { - // Include resolved `main` if defined, and the names of Durable Object - // bindings that point to classes in the current isolate in the - // serialized config - main: maybeGetResolvedMainPath(project), - // Include designators of all Durable Object namespaces bound in the - // runner worker. We'll use this to list IDs in a namespace. We'll - // also use this to check Durable Object test runner helpers are - // only used with classes defined in the current worker, as these - // helpers rely on wrapping the object. - durableObjectBindingDesignators: getDurableObjectDesignators( - project.options - ), - // Include whether isolated storage has been enabled for this - // 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); - if (options.singleWorker) { - // Single Worker, Isolated or Shared Storage - // --> single instance with single runner worker - assert(mf instanceof Miniflare, "Expected single instance"); - const name = getRunnerName(workspaceProject); - resultPromises.push( - runTests(ctx, mf, name, project, config, files, invalidates, method) - ); - } else if (options.isolatedStorage) { - // Multiple Workers, Isolated Storage: - // --> multiple instances each with single runner worker - assert(mf instanceof Map, "Expected multiple isolated instances"); - const name = getRunnerName(workspaceProject); - for (const file of files) { - const fileMf = mf.get(file); - assert(fileMf !== undefined); - resultPromises.push( - runTests( - ctx, - fileMf, - name, - project, - config, - [file], - invalidates, - method - ) - ); - } - } else { - // Multiple Workers, Shared Storage: - // --> single instance with multiple runner workers - assert(mf instanceof Miniflare, "Expected single instance"); - for (const file of files) { - const name = getRunnerName(workspaceProject, file); - resultPromises.push( - runTests(ctx, mf, name, project, config, [file], invalidates, method) - ); - } - } - } - - // 3. Wait for all tests to complete, and throw if any failed - const results = await Promise.allSettled(resultPromises); - const errors = results - .filter((r): r is PromiseRejectedResult => r.status === "rejected") - .map((r) => r.reason); - - // 4. Clean up persistence directories. Note we do this in the background - // at the end of tests as opposed to before tests start, so re-runs - // start quickly, and results are displayed as soon as they're ready. - for (const project of allProjects.values()) { - if (project.mf !== undefined) { - void forEachMiniflare(project.mf, async (mf) => scheduleStorageReset(mf)); - } - } - - if (errors.length > 0) { - throw new AggregateError( - errors, - "Errors occurred while running tests. For more information, see serialized error." - ); - } - - // TODO(soon): something like this is required for watching non-statically imported deps, - // `vitest/dist/vendor/node.c-kzGvOB.js:handleFileChanged` is interesting, - // could also use `forceRerunTriggers` - // (Vite statically analyses imports here: https://github.com/vitejs/vite/blob/2649f40733bad131bc94b06d370bedc8f57853e2/packages/vite/src/node/plugins/importAnalysis.ts#L770) - // const project = specs[0][0]; - // const moduleGraph = project.server.moduleGraph; - // const testModule = moduleGraph.getModuleById(".../packages/vitest-pool-workers/test/kv/store.test.ts"); - // const thingModule = moduleGraph.getModuleById(".../packages/vitest-pool-workers/test/kv/thing.ts"); - // assert(testModule && thingModule); - // thingModule.importers.add(testModule); -} -export default function (ctx: Vitest): ProcessPool { - // This function is called when config changes and may be called on re-runs - assertCompatibleVitestVersion(ctx); - - return { - name: "vitest-pool-workers", - async runTests(specs, invalidates) { - await executeMethod(ctx, specs, invalidates, "run"); - }, - async collectTests(specs, invalidates) { - await executeMethod(ctx, specs, invalidates, "collect"); - }, - async close() { - // `close()` will be called when shutting down Vitest or updating config - log.debug("Shutting down runtimes..."); - const promises: Promise[] = []; - for (const project of allProjects.values()) { - if (project.mf !== undefined) { - promises.push( - forEachMiniflare(project.mf, async (mf) => { - // Finish in-progress storage resets before disposing - await waitForStorageReset(mf); - await mf.dispose(); - }) - ); - } - } - allProjects.clear(); - await Promise.all(promises); - }, - }; -} - /** * Ensures that the specified compatibility feature is enabled for Vitest to work. * @param compatibilityFlags The list of current compatibility flags. @@ -1280,3 +753,8 @@ function ensureFeature(compatibilityFlags: string[], feature: string) { compatibilityFlags.splice(compatibilityFlags.indexOf(flagToDisable), 1); } } + +export { cloudflarePool } from "./pool"; +export { cloudflareTest } from "./plugin"; +export * from "./d1"; +export * from "./pages"; diff --git a/packages/vitest-pool-workers/src/pool/loopback.ts b/packages/vitest-pool-workers/src/pool/loopback.ts index 1b4ec7bed935..81369ef64bd9 100644 --- a/packages/vitest-pool-workers/src/pool/loopback.ts +++ b/packages/vitest-pool-workers/src/pool/loopback.ts @@ -1,20 +1,11 @@ import assert from "node:assert"; import fs from "node:fs/promises"; import path from "node:path"; -import { - CACHE_PLUGIN_NAME, - D1_PLUGIN_NAME, - DURABLE_OBJECTS_PLUGIN_NAME, - KV_PLUGIN_NAME, - Mutex, - R2_PLUGIN_NAME, - Response, - WORKFLOWS_PLUGIN_NAME, -} from "miniflare"; -import { isFileNotFoundError, WORKER_NAME_PREFIX } from "./helpers"; -import type { Awaitable, Miniflare, Request, WorkerOptions } from "miniflare"; +import { Response } from "miniflare"; +import { isFileNotFoundError } from "./helpers"; +import type { Awaitable, Miniflare, Request } from "miniflare"; -// Based on https://github.com/vitest-dev/vitest/blob/v1.0.0-beta.5/packages/snapshot/src/env/node.ts +// Based on https://github.com/vitest-dev/vitest/blob/v4.0.15/packages/snapshot/src/env/node.ts async function handleSnapshotRequest( request: Request, url: URL @@ -61,383 +52,7 @@ async function handleSnapshotRequest( return new Response(null, { status: 405 }); } -async function emptyDir(dirPath: string) { - let names: string[]; - try { - names = await fs.readdir(dirPath); - } catch (e) { - if (isFileNotFoundError(e)) { - return; - } - throw e; - } - for (const name of names) { - try { - await fs.rm(path.join(dirPath, name), { recursive: true, force: true }); - } catch (e) { - if (isEbusyError(e)) { - // Sometimes workerd holds on to file handles in Windows, preventing us from cleaning up these. - console.warn( - `vitest-pool-worker: Unable to remove temporary directory: ${e}` - ); - } - } - } -} - -function isEbusyError(e: unknown): boolean { - return e instanceof Error && "code" in e && e.code === "EBUSY"; -} - -/** - * ## Stacked/Isolated Storage System - * - * One of the features of `@cloudflare/vitest-pool-workers` is isolated per-test - * storage. If enabled, writes performed in a test are undone at the end of that - * test. Writes performed in `beforeAll()` hooks are not undone. As an example, - * this is the behaviour we're describing: - * - * ```js - * async function get() { return (await env.TEST_NAMESPACE.get("key")) ?? ""; } - * async function append(str) { await env.TEST_NAMESPACE.put("key", get() + str); } - * - * beforeAll(() => append("a")); - * beforeEach(() => append("b")); - * - * test("test 1", async () => { - * await append("c"); - * expect(await get()).toBe("abc"); - * }); - * test("test 2", async () => { - * await append("d"); - * expect(await get()).toBe("abd"); // append("c") undone - * }); - * - * describe("nested", () => { - * beforeAll(() => append("e")); - * beforeEach(() => append("f")); - * - * test("test 3", async () => { - * await append("g"); - * expect(await get()).toBe("aebfg"); // all `beforeAll()`s first - * }); - * test("test 4", async () => { - * await append("h"); - * expect(await get()).toBe("aebfh"); - * }); - * }); - * ``` - * - * Each `Miniflare` instance in the pool has its own directory for persistent - * state. If we wanted to update this mid-state, we'd need to restart the - * corresponding `workerd` instance, as the persistence path is encoded in a - * `diskDirectory` service. - * - * Instead, we implement this with an on-disk "stack" containing "backups" of - * the `.sqlite` files belonging to Miniflare's Durable Objects. Whenever Vitest - * starts a test attempt or enters a describe block, we "push" (copy) the - * current `.sqlite` files into the stack. Whenever Vitest finishes a test - * attempt or leaves a describe block, we "pop" (copy) the `.sqlite` files from - * the top of the stack to the persistence path. - * - * Notably, we don't copy the blobs referenced by the `.sqlite` databases. - * Instead, we enable Miniflare's "sticky" blobs feature which prevents blobs - * being garbage collected when they're no longer referenced. This means that if - * a user deletes or overwrites a value, the old value's blob will still be - * stored, meaning when we "pop" the stack, the blob references will be valid. - * At the end of a test run, we will empty the persistence directories, cleaning - * up all blobs. - */ -interface StackedStorageState { - // Only one stack operation per Miniflare instance may be in-progress at a - // given time - mutex: Mutex; - // Current size of the stack - depth: number; - // If we failed to push/pop stacks for any reason, mark the state as broken. - // In this case, any future operation will fail. - broken: boolean; - // All of our persistence paths will be using `Miniflare`'s temporary directory - // which is generated once when calling `new Miniflare()`. We never change any - // `*Persist` settings in `setOptions()` calls, so persistence paths for a given - // `Miniflare` instance will always be the same. - persistPaths: string[]; // (unique) - // We need this one specifically for listing Durable Object IDs. - durableObjectPersistPath: string; - // `Promise` that will resolve when the background persistence directory - // cleanup completes. We do this in the background at the end of tests as - // opposed to before tests start, so re-runs start quickly, and results are - // displayed as soon as they're ready. `waitForStorageReset(mf)` should be - // called before using `mf` for a new test run. - storageResetPromise?: Promise; -} -const stackStates = new WeakMap(); -function getState(mf: Miniflare) { - let state = stackStates.get(mf); - if (state === undefined) { - const persistPaths = mf.unsafeGetPersistPaths(); - const durableObjectPersistPath = persistPaths.get("do"); - assert( - durableObjectPersistPath !== undefined, - "Expected Durable Object persist path" - ); - state = { - mutex: new Mutex(), - depth: 0, - broken: false, - persistPaths: Array.from(new Set(persistPaths.values())), - durableObjectPersistPath, - }; - stackStates.set(mf, state); - } - return state; -} - -const ABORT_ALL_WORKER_NAME = `${WORKER_NAME_PREFIX}abort-all`; -// The `abortAllDurableObjects()` API is only accessible from a worker, so we -// add this extra worker to all `Miniflare` instances constructed by the pool, -// so we can this function from Node. -export const ABORT_ALL_WORKER: WorkerOptions = { - name: ABORT_ALL_WORKER_NAME, - compatibilityFlags: ["unsafe_module"], - modules: [ - { - type: "ESModule", - path: "index.mjs", - contents: ` - import workerdUnsafe from "workerd:unsafe"; - export default { - async fetch(request) { - if (request.method !== "DELETE") return new Response(null, { status: 405 }); - await workerdUnsafe.abortAllDurableObjects(); - return new Response(null, { status: 204 }); - } - }; - `, - }, - ], -}; -export function scheduleStorageReset(mf: Miniflare) { - const state = getState(mf); - assert(state.storageResetPromise === undefined); - state.storageResetPromise = state.mutex.runWith(async () => { - const abortAllWorker = await mf.getWorker(ABORT_ALL_WORKER_NAME); - await abortAllWorker.fetch("http://placeholder", { method: "DELETE" }); - for (const persistPath of state.persistPaths) { - // Clear directory rather than removing it so `workerd` can retain handle - await emptyDir(persistPath); - } - state.depth = 0; - // If any of the code in this callback throws, the `storageResetPromise` - // won't be reset, and `await`ing it will throw the error. This is what we - // want, as failing to clean up means the persistence directory is in an - // invalid state. - state.storageResetPromise = undefined; - }); -} -export async function waitForStorageReset(mf: Miniflare): Promise { - await getState(mf).storageResetPromise; -} - -const BLOBS_DIR_NAME = "blobs"; -const STACK_DIR_NAME = "__vitest_pool_workers_stack"; -async function pushStackedStorage(intoDepth: number, persistPath: string) { - // Create directory for new stack frame - const stackFramePath = path.join( - persistPath, - STACK_DIR_NAME, - intoDepth.toString() - ); - await fs.mkdir(stackFramePath, { recursive: true }); - - // For each Durable Object unique key in the persistence path... - for (const key of await fs.readdir(persistPath, { withFileTypes: true })) { - // (skipping stack directory) - if (key.name === STACK_DIR_NAME) { - continue; - } - const keyPath = path.join(persistPath, key.name); - const stackFrameKeyPath = path.join(stackFramePath, key.name); - assert(key.isDirectory(), `Expected ${keyPath} to be a directory`); - // ...copy all `.sqlite` files to the stack frame - let createdStackFrameKeyPath = false; - for (const name of await fs.readdir(keyPath)) { - // If this is a blobs directory, it shouldn't contain any `.sqlite` files - if (name === BLOBS_DIR_NAME) { - break; - } - if (!createdStackFrameKeyPath) { - createdStackFrameKeyPath = true; - await fs.mkdir(stackFrameKeyPath); - } - const namePath = path.join(keyPath, name); - const stackFrameNamePath = path.join(stackFrameKeyPath, name); - assert(name.endsWith(".sqlite"), `Expected .sqlite, got ${namePath}`); - await fs.copyFile(namePath, stackFrameNamePath); - } - } -} -async function popStackedStorage(fromDepth: number, persistPath: string) { - // Delete every Durable Object unique key directory in the persistence path - for (const key of await fs.readdir(persistPath, { withFileTypes: true })) { - // (skipping stack directory) - if (key.name === STACK_DIR_NAME) { - continue; - } - const keyPath = path.join(persistPath, key.name); - for (const name of await fs.readdir(keyPath)) { - // If this is a blobs directory, it shouldn't contain any `.sqlite` files - if (name === BLOBS_DIR_NAME) { - break; - } - const namePath = path.join(keyPath, name); - assert(name.endsWith(".sqlite"), `Expected .sqlite, got ${namePath}`); - - await fs.unlink(namePath); - } - } - - // Copy the stack frame into the persistent path - const stackFramePath = path.join( - persistPath, - STACK_DIR_NAME, - fromDepth.toString() - ); - await fs.cp(stackFramePath, persistPath, { recursive: true }); - - // Remove the stack frame - await fs.rm(stackFramePath, { recursive: true, force: true }); -} - -const PLUGIN_PRODUCT_NAMES: Record = { - [CACHE_PLUGIN_NAME]: "Cache", - [D1_PLUGIN_NAME]: "D1", - [DURABLE_OBJECTS_PLUGIN_NAME]: "Durable Objects", - [KV_PLUGIN_NAME]: "KV", - [R2_PLUGIN_NAME]: "R2", - [WORKFLOWS_PLUGIN_NAME]: "Workflows", -}; -const LIST_FORMAT = new Intl.ListFormat("en-US"); - -function checkAllStorageOperationsResolved( - action: "push" | "pop", - source: string, - persistPaths: string[], - results: PromiseSettledResult[] -): boolean { - const failedProducts: string[] = []; - const lines: string[] = []; - for (let i = 0; i < results.length; i++) { - const result = results[i]; - if (result.status === "rejected") { - const pluginName = path.basename(persistPaths[i]); - const productName = PLUGIN_PRODUCT_NAMES[pluginName] ?? pluginName; - failedProducts.push(productName); - lines.push(`- ${result.reason}`); - } - } - if (failedProducts.length > 0) { - const separator = "=".repeat(80); - lines.unshift( - "", - separator, - `Failed to ${action} isolated storage stack frame in ${source}.`, - `In particular, we were unable to ${action} ${LIST_FORMAT.format(failedProducts)} storage.`, - "This usually means your Worker tried to access storage outside of a test, or some resources have not been disposed of properly.", - `Ensure you "await" all Promises that read or write to these services, and make sure you use the "using" keyword when passing data across JSRPC.`, - `See https://developers.cloudflare.com/workers/testing/vitest-integration/known-issues/#isolated-storage for more details.`, - "\x1b[2m" - ); - lines.push("\x1b[22m" + separator, ""); - - if ( - failedProducts.includes( - PLUGIN_PRODUCT_NAMES[WORKFLOWS_PLUGIN_NAME] ?? WORKFLOWS_PLUGIN_NAME - ) - ) { - console.warn( - [ - "", - separator, - `Workflows are being created in ${source}.`, - "Even with isolated storage, Workflows are required to be manually disposed at the end of each test.", - "See https://developers.cloudflare.com/workers/testing/vitest-integration/test-apis/ for more details.", - "", - ].join("\n") - ); - } - console.error(lines.join("\n")); - return false; - } - return true; -} - -async function handleStorageRequest( - request: Request, - mf: Miniflare -): Promise { - const state = getState(mf); - if (state.broken) { - return new Response( - "Isolated storage failed. There should be additional logs above.", - { status: 500 } - ); - } - - // Assuming all Durable Objects have been aborted at this point, so we can - // copy/delete `.sqlite` files as required - - const source = - request.headers.get("MF-Vitest-Source") ?? "an unknown location"; - - let success: boolean; - if (request.method === "POST" /* push */) { - success = await state.mutex.runWith(async () => { - state.depth++; - const results = await Promise.allSettled( - state.persistPaths.map((persistPath) => - pushStackedStorage(state.depth, persistPath) - ) - ); - return checkAllStorageOperationsResolved( - "push", - source, - state.persistPaths, - results - ); - }); - } else if (request.method === "DELETE" /* pop */) { - success = await state.mutex.runWith(async () => { - assert(state.depth > 0, "Stack underflow"); - const results = await Promise.allSettled( - state.persistPaths.map((persistPath) => - popStackedStorage(state.depth, persistPath) - ) - ); - state.depth--; - return checkAllStorageOperationsResolved( - "pop", - source, - state.persistPaths, - results - ); - }); - } else { - return new Response(null, { status: 405 }); - } - - if (success) { - return new Response(null, { status: 204 }); - } else { - state.broken = true; - return new Response( - "Isolated storage failed. There should be additional logs above.", - { status: 500 } - ); - } -} - -export async function handleDurableObjectsRequest( +export async function listDurableObjectIds( request: Request, mf: Miniflare, url: URL @@ -445,7 +60,13 @@ export async function handleDurableObjectsRequest( if (request.method !== "GET") { return new Response(null, { status: 405 }); } - const { durableObjectPersistPath } = getState(mf); + const persistPaths = mf.unsafeGetPersistPaths(); + const durableObjectPersistPath = persistPaths.get("do"); + assert( + durableObjectPersistPath !== undefined, + "Expected Durable Object persist path" + ); + const uniqueKey = url.searchParams.get("unique_key"); if (uniqueKey === null) { return new Response(null, { status: 400 }); @@ -476,11 +97,8 @@ export function handleLoopbackRequest( if (url.pathname === "/snapshot") { return handleSnapshotRequest(request, url); } - if (url.pathname === "/storage") { - return handleStorageRequest(request, mf); - } if (url.pathname === "/durable-objects") { - return handleDurableObjectsRequest(request, mf, url); + return listDurableObjectIds(request, mf, url); } return new Response(null, { status: 404 }); } diff --git a/packages/vitest-pool-workers/src/pool/module-fallback.ts b/packages/vitest-pool-workers/src/pool/module-fallback.ts index e8422be8658f..485cf09d722e 100644 --- a/packages/vitest-pool-workers/src/pool/module-fallback.ts +++ b/packages/vitest-pool-workers/src/pool/module-fallback.ts @@ -10,7 +10,7 @@ import { ModuleRuleTypeSchema, Response } from "miniflare"; import { workerdBuiltinModules } from "../shared/builtin-modules"; import { isFileNotFoundError } from "./helpers"; import type { ModuleRuleType, Request, Worker_Module } from "miniflare"; -import type { ViteDevServer } from "vite"; +import type { Vite } from "vitest/node"; let debuglog: util.DebugLoggerFunction = util.debuglog( "vitest-pool-workers:module-fallback", @@ -143,7 +143,7 @@ await cjsModuleLexer.init(); * using the same package as Node. */ async function getCjsNamedExports( - vite: ViteDevServer, + vite: Vite.ViteDevServer, filePath: string, contents: string, seen = new Set() @@ -250,7 +250,7 @@ function getApproximateSpecifier(target: string, referrerDir: string): string { } async function viteResolve( - vite: ViteDevServer, + vite: Vite.ViteDevServer, specifier: string, referrer: string, isRequire: boolean @@ -308,7 +308,7 @@ async function viteResolve( type ResolveMethod = "import" | "require"; async function resolve( - vite: ViteDevServer, + vite: Vite.ViteDevServer, method: ResolveMethod, target: string, specifier: string, @@ -413,7 +413,7 @@ function buildModuleResponse(target: string, contents: ModuleContents) { } async function load( - vite: ViteDevServer, + vite: Vite.ViteDevServer, logBase: string, method: ResolveMethod, target: string, @@ -494,7 +494,7 @@ async function load( } export async function handleModuleFallbackRequest( - vite: ViteDevServer, + vite: Vite.ViteDevServer, request: Request ): Promise { const method = request.headers.get("X-Resolve-Method"); diff --git a/packages/vitest-pool-workers/src/config/pages.ts b/packages/vitest-pool-workers/src/pool/pages.ts similarity index 100% rename from packages/vitest-pool-workers/src/config/pages.ts rename to packages/vitest-pool-workers/src/pool/pages.ts diff --git a/packages/vitest-pool-workers/src/pool/plugin.ts b/packages/vitest-pool-workers/src/pool/plugin.ts new file mode 100644 index 000000000000..8e07c5b0757c --- /dev/null +++ b/packages/vitest-pool-workers/src/pool/plugin.ts @@ -0,0 +1,122 @@ +import crypto from "node:crypto"; +import fs from "node:fs/promises"; +import path from "node:path"; +import { cloudflarePool } from "./pool"; +import type { WorkersPoolOptions } from "./config"; +import type { inject } from "vitest"; +import type { Vite, VitestPluginContext } from "vitest/node"; + +const cloudflareTestPath = path.resolve( + import.meta.dirname, + "../worker/lib/cloudflare/test.mjs" +); + +export interface WorkerPoolOptionsContext { + // For accessing values from `globalSetup()` (e.g. ports servers started on) + // in Miniflare options (e.g. bindings, upstream, hyperdrives, ...) + inject: typeof inject; +} + +function ensureArrayIncludes(array: T[], items: T[]) { + for (const item of items) { + if (!array.includes(item)) { + array.push(item); + } + } +} + +function ensureArrayExcludes(array: T[], items: T[]) { + for (let i = 0; i < array.length; i++) { + if (items.includes(array[i])) { + array.splice(i, 1); + i--; + } + } +} + +const requiredConditions = ["workerd", "worker", "module", "browser"]; +const requiredMainFields = ["browser", "module", "jsnext:main", "jsnext"]; + +export function cloudflareTest( + options: + | WorkersPoolOptions + | (( + ctx: WorkerPoolOptionsContext + ) => Promise | WorkersPoolOptions) +): Vite.Plugin { + // Use a unique ID for each `cloudflare:test` module so updates in one `main` + // don't trigger re-runs in all other projects, just the one that changed. + const uuid = crypto.randomUUID(); + let main: string | undefined; + return { + name: "@cloudflare/vitest-pool-workers", + api: { + setMain(newMain: string) { + main = newMain; + }, + }, + configureVitest(context: VitestPluginContext) { + context.project.config.poolRunner = cloudflarePool(options); + context.project.config.pool = "cloudflare-pool"; + context.project.config.snapshotEnvironment = "cloudflare:snapshot"; + }, + // Run after `vitest:project` plugin: + // https://github.com/vitest-dev/vitest/blob/v3.0.5/packages/vitest/src/node/plugins/workspace.ts#L37 + config(config) { + config.resolve ??= {}; + config.resolve.conditions ??= []; + config.resolve.mainFields ??= []; + config.ssr ??= {}; + + config.test ??= {}; + config.test.server ??= {}; + config.test.server.deps ??= {}; + // See https://vitest.dev/config/server.html#inline + // Without this Vitest delegates to native import() for external deps in node_modules + config.test.server.deps.inline = true; + + // Remove "node" condition added by the `vitest:project` plugin. We're + // running tests inside `workerd`, not Node.js, so "node" isn't needed. + ensureArrayExcludes(config.resolve.conditions, ["node"]); + + // Use the same resolve conditions as `wrangler`, minus "import" as this + // breaks Vite's `require()` resolve + 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/v3.0.5/packages/vitest/src/node/plugins/utils.ts#L156 + ensureArrayIncludes(config.resolve.mainFields, requiredMainFields); + + // Apply `package.json` `browser` field remapping in SSR mode: + // https://github.com/vitejs/vite/blob/v5.1.4/packages/vite/src/node/plugins/resolve.ts#L175 + config.ssr.target = "webworker"; + }, + resolveId(id) { + if (id === "cloudflare:test") { + return `\0cloudflare:test-${uuid}`; + } + }, + async load(id) { + if (id === `\0cloudflare:test-${uuid}`) { + let contents = await fs.readFile(cloudflareTestPath, "utf8"); + + if (main !== undefined) { + // Inject a side-effect only import of the main entry-point into the test so that Vitest + // knows to re-run tests when the Worker is modified. + contents += `import ${JSON.stringify(main)};`; + } + return contents; + } + if (id.endsWith("msw/lib/node/index.mjs")) { + // HACK: This is a tempory solution while MSW works on some changes to better support the Workers + // environment. In the meantime, this replaces the `msw/node` entrypoint with the `msw/native` + // entrypoint (which is designed for React Native and does work in Workers). Users can't use + // `msw/native` themselves directly as the export conditions are not compatible with the Vitest Pool + // export conditions. + // + // This is tracked by https://github.com/mswjs/msw/issues/2637 + return `export * from "../native/index.mjs"`; + } + }, + }; +} diff --git a/packages/vitest-pool-workers/src/pool/pool.ts b/packages/vitest-pool-workers/src/pool/pool.ts new file mode 100644 index 000000000000..b9dbdc310c9e --- /dev/null +++ b/packages/vitest-pool-workers/src/pool/pool.ts @@ -0,0 +1,18 @@ +import { CloudflarePoolWorker } from "./cloudflare-pool-worker"; +import type { WorkersPoolOptions } from "./config"; +import type { WorkerPoolOptionsContext } from "./plugin"; +import type { PoolRunnerInitializer } from "vitest/node"; + +export function cloudflarePool( + poolOptions: + | WorkersPoolOptions + | (( + ctx: WorkerPoolOptionsContext + ) => Promise | WorkersPoolOptions) +): PoolRunnerInitializer { + return { + name: "cloudflare-pool", + createPoolWorker: (options) => + new CloudflarePoolWorker(options, poolOptions), + }; +} diff --git a/packages/vitest-pool-workers/src/shared/chunking-socket.ts b/packages/vitest-pool-workers/src/shared/chunking-socket.ts deleted file mode 100644 index a07dd528669f..000000000000 --- a/packages/vitest-pool-workers/src/shared/chunking-socket.ts +++ /dev/null @@ -1,60 +0,0 @@ -import assert from "node:assert"; -import { Buffer } from "node:buffer"; - -export interface SocketLike { - post(message: Message): void; - on(listener: (message: Message) => void): void; -} - -/** - * Wraps a binary/string socket to produce a chunked-string socket. If a string - * exceeds the maximum size for a message, it is split into binary chunks - * followed by an empty string. If not, it is sent directly as a string. - * This assumes in-order delivery of chunks. - */ -export function createChunkingSocket( - socket: SocketLike | string>, - maxChunkByteLength = 1_048_576 /* 1 MiB */ -): SocketLike { - const listeners: ((message: string) => void)[] = []; - - const decoder = new TextDecoder(); - let chunks: string | undefined; - socket.on((message) => { - if (typeof message === "string") { - if (chunks !== undefined) { - // If we've been collecting chunks, this must be the end-of-chunks - // marker, so use all chunks as the message instead - assert.strictEqual(message, "", "Expected end-of-chunks"); - message = chunks + decoder.decode(); - chunks = undefined; - } - for (const listener of listeners) { - listener(message); - } - } else { - // If this isn't a `string` message, it must be a chunk - chunks ??= ""; - chunks += decoder.decode(message, { stream: true }); - } - }); - - return { - post(value) { - if (Buffer.byteLength(value) > maxChunkByteLength) { - // If the message is greater than the size limit, chunk it - const encoded = Buffer.from(value); - for (let i = 0; i < encoded.byteLength; i += maxChunkByteLength) { - socket.post(encoded.subarray(i, i + maxChunkByteLength)); - } - socket.post(""); - } else { - // Otherwise, just send it as a string - socket.post(value); - } - }, - on(listener) { - listeners.push(listener); - }, - }; -} diff --git a/packages/vitest-pool-workers/src/worker/durable-objects.ts b/packages/vitest-pool-workers/src/worker/durable-objects.ts index 8868bbe5bbab..4bcda16c9050 100644 --- a/packages/vitest-pool-workers/src/worker/durable-objects.ts +++ b/packages/vitest-pool-workers/src/worker/durable-objects.ts @@ -103,10 +103,12 @@ async function runInStub( const response = await stub.fetch("http://x", { cf: { [CF_KEY_ACTION]: id }, }); + // `result` may be `undefined` assert(actionResults.has(id), `Expected action result for ${id}`); const result = actionResults.get(id); actionResults.delete(id); + if (result === kUseResponse) { return response as R; } else if (response.ok) { @@ -177,7 +179,7 @@ export function runInRunnerObject( instance: __VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__ ) => R | Promise ): Promise { - const stub = env.__VITEST_POOL_WORKERS_RUNNER_OBJECT.get("singleton"); + const stub = env.__VITEST_POOL_WORKERS_RUNNER_OBJECT.getByName("singleton"); return runInStub(stub, callback); } @@ -190,6 +192,7 @@ export async function maybeHandleRunRequest( if (actionId === undefined) { return; } + assert(typeof actionId === "number", `Expected numeric ${CF_KEY_ACTION}`); try { const callback = actionResults.get(actionId); diff --git a/packages/vitest-pool-workers/src/worker/entrypoints.ts b/packages/vitest-pool-workers/src/worker/entrypoints.ts index 72416445f42d..f33ad624a693 100644 --- a/packages/vitest-pool-workers/src/worker/entrypoints.ts +++ b/packages/vitest-pool-workers/src/worker/entrypoints.ts @@ -22,14 +22,16 @@ function importModule( specifier: string ): Promise> { return runInRunnerObject(env, (instance) => { - if (instance.executor === undefined) { + if (!instance.executor) { const message = "Expected Vitest to start running before importing modules.\n" + "This usually means you have multiple `vitest` versions installed.\n" + "Use your package manager's `why` command to list versions and why each is installed (e.g. `npm why vitest`)."; throw new Error(message); } - return instance.executor.executeId(specifier); + + // @ts-expect-error the type for the Module runner is not exposed + return instance.executor.import(specifier); }); } @@ -310,7 +312,9 @@ export function createWorkerEntrypointWrapper( this.env, entrypoint ); + const userEnv = stripInternalEnv(this.env); + return patchAndRunWithHandlerContext(this.ctx, () => { if (typeof entrypointValue === "object" && entrypointValue !== null) { // Assuming the user has defined an `ExportedHandler` @@ -345,7 +349,6 @@ export function createWorkerEntrypointWrapper( }); }; } - return Wrapper; } @@ -409,6 +412,8 @@ export function createDurableObjectWrapper( return getRPCPropertyCallableThenable(key, property); }); + // Wrapper[Symbol.hasInstance] = () => true + Wrapper.prototype[kEnsureInstance] = async function ( this: DurableObjectWrapper ) { diff --git a/packages/vitest-pool-workers/src/worker/env.ts b/packages/vitest-pool-workers/src/worker/env.ts index efddaa439f5b..fad9dbe797e5 100644 --- a/packages/vitest-pool-workers/src/worker/env.ts +++ b/packages/vitest-pool-workers/src/worker/env.ts @@ -28,10 +28,21 @@ export function setEnv(newEnv: Record & Env) { export function getSerializedOptions(): SerializedOptions { assert(typeof __vitest_worker__ === "object", "Expected global Vitest state"); - const options = __vitest_worker__.config?.poolOptions?.workers; + const options = __vitest_worker__.providedContext.cloudflarePoolOptions; // `options` should always be defined when running tests - assert(options !== undefined, "Expected serialised options"); - return options; + + assert( + options !== undefined, + "Expected serialised options" + + Object.keys(__vitest_worker__.providedContext) + ); + const parsedOptions = JSON.parse(options); + return { + ...parsedOptions, + durableObjectBindingDesignators: new Map( + parsedOptions.durableObjectBindingDesignators + ), + }; } export function getResolvedMainPath( @@ -40,7 +51,7 @@ export function getResolvedMainPath( const options = getSerializedOptions(); if (options.main === undefined) { throw new Error( - `Using ${forBindingType} bindings to the current worker requires \`poolOptions.workers.main\` to be set to your worker's entrypoint` + `Using ${forBindingType} bindings to the current worker requires \`poolOptions.workers.main\` to be set to your worker's entrypoint: ${JSON.stringify(options)}` ); } return options.main; diff --git a/packages/vitest-pool-workers/src/worker/fetch-mock.ts b/packages/vitest-pool-workers/src/worker/fetch-mock.ts index a08d466c6bca..65530a4019bf 100644 --- a/packages/vitest-pool-workers/src/worker/fetch-mock.ts +++ b/packages/vitest-pool-workers/src/worker/fetch-mock.ts @@ -1,200 +1,6 @@ -import assert from "node:assert"; -import { Buffer } from "node:buffer"; -import { isMockActive, MockAgent, setDispatcher } from "cloudflare:mock-agent"; -import type { Dispatcher } from "undici"; - -const DECODER = new TextDecoder(); - -/** - * Mutate an Error instance so it passes either of the checks in isAbortError - */ -export function castAsAbortError(err: Error): Error { - (err as Error & { code: string }).code = "ABORT_ERR"; - err.name = "AbortError"; - return err; -} - -// See public facing `cloudflare:test` types for docs -export const fetchMock = new MockAgent({ connections: 1 }); - -interface BufferedRequest { - request: Request; - body: Uint8Array | null; -} - -class SingleAccessMap extends Map { - override get(key: K): V | undefined { - const value = super.get(key); - super.delete(key); - return value; - } -} - -const requests = new SingleAccessMap(); -const responses = new SingleAccessMap(); - -// This is in a Workers context - const originalFetch = fetch; -setDispatcher((opts, handler) => { - const serialisedOptions = JSON.stringify(opts); - const request = requests.get(serialisedOptions); - assert(request !== undefined, "Expected dispatch to come from fetch()"); - originalFetch - .call(globalThis, request.request, { body: request.body }) - .then((response) => { - responses.set(serialisedOptions, response); - assert(handler.onComplete !== undefined, "Expected onComplete() handler"); - handler.onComplete?.([]); - }) - .catch((error) => { - assert(handler.onError !== undefined, "Expected onError() handler"); - handler.onError(error); - }); -}); -// Monkeypatch `fetch()` to intercept requests if the fetch mock is enabled. -//The way we've implemented this, `fetchMock` only mocks requests in the current -// worker. We kind of have to do it this way, as `fetchMock` supports functions -// as reply callbacks, and we can't serialise arbitrary functions across worker -// boundaries. For mocking requests in other workers, Miniflare's `fetchMock` -// option can be used in the `vitest.config.mts`. +// Monkeypatch `fetch()`. This looks like a no-op, but it's not. It allows MSW to intercept fetch calls using it's Fetch interceptor. globalThis.fetch = async (input, init) => { - const isActive = isMockActive(fetchMock); - if (!isActive) { - return originalFetch.call(globalThis, input, init); - } - - const request = new Request(input, init); - const url = new URL(request.url); - - // Use a signal and the aborted value if provided - const abortSignal = init?.signal; - let abortSignalAborted = abortSignal?.aborted ?? false; - abortSignal?.addEventListener("abort", () => { - abortSignalAborted = true; - }); - - // Don't allow mocked `Upgrade` requests - if (request.headers.get("Upgrade") !== null) { - return originalFetch.call(globalThis, request); - } - - // Convert headers into `undici` friendly format - const requestHeaders: { "set-cookie"?: string[] } & Record = - {}; - for (const entry of request.headers) { - const key = entry[0].toLowerCase(); - const value = entry[1]; - if (key === "set-cookie") { - (requestHeaders[key] ??= []).push(value); - } else { - requestHeaders[key] = value; - } - } - - // Buffer body in case it needs to be matched against. Note `undici` only - // supports matching against `string` bodies. To support binary bodies, we - // buffer the body to a `Uint8Array`, then try to decode it. We pass the - // decoded body via `DispatchOptions` for matching, then use the `Uint8Array` - // body if the request falls-through to an actual `fetch()` call. - const bodyArray = - request.body === null ? null : new Uint8Array(await request.arrayBuffer()); - // Note `DECODER` doesn't have the `fatal: true` option enabled, so will - // substitute invalid data with a replacement character - const bodyText = bodyArray === null ? "" : DECODER.decode(bodyArray); - const dispatchOptions: Dispatcher.DispatchOptions = { - origin: url.origin, - path: url.pathname + url.search, - method: request.method as Dispatcher.HttpMethod, - body: bodyText, - headers: requestHeaders, - }; - const serialisedOptions = JSON.stringify(dispatchOptions); - requests.set(serialisedOptions, { request, body: bodyArray }); - - // If the response was mocked, record data as we receive it - let responseStatusCode: number | undefined; - let responseStatusText: string | undefined; - let responseHeaders: string[][] | undefined; - const responseChunks: Buffer[] = []; - - // Create deferred promise for response - let responseResolve: (response: Response) => void; - let responseReject: (error: Error) => void; - const responsePromise = new Promise((resolve, reject) => { - responseResolve = resolve; - responseReject = reject; - }); - - // Dispatch the request through the mock agent - const dispatchHandlers: Dispatcher.DispatchHandler = { - onError(error) { - responseReject(error); - }, - onUpgrade(_statusCode, _headers, _socket) { - assert.fail("Unreachable: upgrade requests not supported"); - }, - // `onHeaders` and `onData` will only be called if the response was mocked - onHeaders(statusCode, headers, _resume, statusText) { - if (abortSignalAborted) { - return false; - } - - responseStatusCode = statusCode; - responseStatusText = statusText; - - if (headers === null) { - return true; - } - assert.strictEqual(headers.length % 2, 0, "Expected key/value array"); - responseHeaders = Array.from({ length: headers.length / 2 }).map( - (_, i) => [headers[i * 2].toString(), headers[i * 2 + 1].toString()] - ); - return true; - }, - onData(chunk) { - if (abortSignalAborted) { - return false; - } - - responseChunks.push(chunk); - return true; - }, - onComplete() { - if (abortSignalAborted) { - responseReject( - castAsAbortError(new Error("The operation was aborted")) - ); - return; - } - - // `maybeResponse` will be `undefined` if we mocked the request - const maybeResponse = responses.get(serialisedOptions); - if (maybeResponse === undefined) { - const responseBody = Buffer.concat(responseChunks); - const response = new Response(responseBody, { - status: responseStatusCode, - statusText: responseStatusText, - headers: responseHeaders, - }); - const throwImmutableHeadersError = () => { - throw new TypeError("Can't modify immutable headers"); - }; - Object.defineProperty(response, "url", { value: url.href }); - Object.defineProperties(response.headers, { - set: { value: throwImmutableHeadersError }, - append: { value: throwImmutableHeadersError }, - delete: { value: throwImmutableHeadersError }, - }); - responseResolve(response); - } else { - responseResolve(maybeResponse); - } - }, - onBodySent() {}, // (ignored) - }; - - fetchMock.dispatch(dispatchOptions, dispatchHandlers); - return responsePromise; + return originalFetch.call(globalThis, input, init); }; diff --git a/packages/vitest-pool-workers/src/worker/index.ts b/packages/vitest-pool-workers/src/worker/index.ts index 35b8c2e08b27..58ab3d355a4f 100644 --- a/packages/vitest-pool-workers/src/worker/index.ts +++ b/packages/vitest-pool-workers/src/worker/index.ts @@ -12,15 +12,13 @@ import { runInRunnerObject, setEnv, } from "cloudflare:test-internal"; +import { DurableObject } from "cloudflare:workers"; import * as devalue from "devalue"; // Using relative path here to ensure `esbuild` bundles it import { structuredSerializableReducers, structuredSerializableRevivers, } from "../../../miniflare/src/workers/core/devalue"; -import { createChunkingSocket } from "../shared/chunking-socket"; -import type { SocketLike } from "../shared/chunking-socket"; -import type { VitestExecutor as VitestExecutorType } from "vitest/execute"; function structuredSerializableStringify(value: unknown): string { return devalue.stringify(value, structuredSerializableReducers); @@ -31,6 +29,9 @@ function structuredSerializableParse(value: string): unknown { globalThis.Buffer = Buffer; // Required by `vite-node/source-map` +// Mock Service Worker needs this +globalThis.BroadcastChannel = class {}; + globalThis.process = process; // Required by `vite-node` process.argv = []; // Required by `@vitest/utils` let cwd: string | undefined; @@ -38,8 +39,15 @@ process.cwd = () => { assert(cwd !== undefined, "Expected cwd to be set"); return cwd; }; +// Required by vitest/worker +// @ts-expect-error We don't actually implement `process.memoryUsage()` +process.memoryUsage = () => ({}); Object.setPrototypeOf(process, events.EventEmitter.prototype); // Required by `vitest` +// Vitest needs this +// @ts-expect-error Apparently this is read-only +process.versions = { node: "20.0.0" }; + globalThis.__console = console; // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type @@ -71,9 +79,9 @@ const monkeypatchedSetTimeout = (...args: Parameters) => { const [callback, delay, ...restArgs] = args; const callbackName = args[0]?.name ?? ""; const callerFileName = getCallerFileName(monkeypatchedSetTimeout); - const fromVitest = /\/node_modules\/(\.store\/)?vitest/.test( - callerFileName ?? "" - ); + const fromVitest = + /\/node_modules\/(\.store\/)?vitest/.test(callerFileName ?? "") || + /\/packages\/vitest\/dist/.test(callerFileName ?? ""); // If this `setTimeout()` isn't from Vitest, or has a non-zero delay, // just call the original function @@ -133,76 +141,6 @@ function isDifferentIOContextError(e: unknown) { ); } -// Wraps a `WebSocket` with a Node `MessagePort` like interface -class WebSocketMessagePort extends events.EventEmitter { - #chunkingSocket: SocketLike; - - constructor(private readonly socket: WebSocket) { - super(); - this.#chunkingSocket = createChunkingSocket({ - post(message) { - socket.send(message); - }, - on(listener) { - socket.addEventListener("message", (event) => { - listener(event.data); - }); - }, - }); - this.#chunkingSocket.on((message) => { - const parsed = structuredSerializableParse(message); - this.emit("message", parsed); - }); - socket.accept(); - } - - postMessage(data: unknown) { - const stringified = structuredSerializableStringify(data); - try { - // Accessing `readyState` may also throw different I/O context error - if (this.socket.readyState === WebSocket.READY_STATE_OPEN) { - this.#chunkingSocket.post(stringified); - } - } catch (error) { - // If the user tried to perform a dynamic `import()` or `console.log()` - // from inside a `export default { fetch() { ... } }` handler using `SELF` - // or from inside their own Durable Object, Vitest will try to send an - // RPC message from the I/O context that is different to the Runner Durable Object. - // There's nothing we can really do to prevent this: we want to run these things - // in different I/O contexts with the behaviour this causes. We'd still like to send - // the RPC message though, so if we detect this, we try resend the message - // from the runner object. - if (isDifferentIOContextError(error)) { - const promise = runInRunnerObject(internalEnv, () => { - this.#chunkingSocket.post(stringified); - }).catch((e) => { - __console.error("Error sending to pool inside runner:", e, data); - }); - registerHandlerAndGlobalWaitUntil(promise); - } else { - __console.error("Error sending to pool:", error, data); - } - } - } -} - -interface JsonError { - message?: string; - name?: string; - stack?: string; - cause?: JsonError; -} - -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function reduceError(e: any): JsonError { - return { - name: e?.name, - message: e?.message ?? String(e), - stack: e?.stack, - cause: e?.cause === undefined ? undefined : reduceError(e.cause), - }; -} - let patchedFunction = false; function ensurePatchedFunction(unsafeEval: UnsafeEval) { if (patchedFunction) { @@ -238,12 +176,15 @@ function applyDefines() { // `__VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__` is a singleton and "colo local" ephemeral object. Refer to: // https://github.com/cloudflare/workerd/blob/v1.20231206.0/src/workerd/server/workerd.capnp#L529-L543 -export class __VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__ - implements DurableObject -{ - executor: VitestExecutorType | undefined; +export class __VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__ extends DurableObject { + #getExecutor: (() => unknown) | undefined; + + get executor() { + return this.#getExecutor?.(); + } constructor(_state: DurableObjectState, env: Record & Env) { + super(_state, env); vm._setUnsafeEval(env.__VITEST_POOL_WORKERS_UNSAFE_EVAL); ensurePatchedFunction(env.__VITEST_POOL_WORKERS_UNSAFE_EVAL); setEnv(env); @@ -255,57 +196,88 @@ export class __VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__ const { 0: poolSocket, 1: poolResponseSocket } = new WebSocketPair(); const workerDataHeader = request.headers.get("MF-Vitest-Worker-Data"); - assert(workerDataHeader !== null); + assert(workerDataHeader); + const wd = structuredSerializableParse(workerDataHeader); - assert(typeof wd === "object" && wd !== null); - assert("filePath" in wd && typeof wd.filePath === "string"); - assert("name" in wd && typeof wd.name === "string"); - assert("data" in wd && typeof wd.data === "object" && wd.data !== null); - assert("cwd" in wd && typeof wd.cwd === "string"); + assert( + wd && typeof wd === "object" && "cwd" in wd && typeof wd.cwd === "string" + ); + cwd = wd.cwd; - const port = new WebSocketMessagePort(poolSocket); - try { - const module = await import(wd.filePath); - - // HACK: Internally, Vitest's worker thread calls `startViteNode()`, which - // constructs a singleton `VitestExecutor`. `VitestExecutor` is a subclass - // of `ViteNodeRunner`, which is how the worker communicates with the - // Vite server. We'd like access to this singleton so we can transform and - // import code with Vite ourselves (e.g. for user worker's default exports - // and Durable Objects). Unfortunately, Vitest doesn't publicly export the - // `startViteNode()` function. Instead, we monkeypatch a `VitestExecutor` - // method we know is called to get the singleton. :see_no_evil: - // TODO(soon): see if we can get `startViteNode()` (https://github.com/vitest-dev/vitest/blob/8d183da4f7cc2986d11c802d16bacd221fb69b96/packages/vitest/src/runtime/execute.ts#L45) - // exported in `vitest/execute` (https://github.com/vitest-dev/vitest/blob/main/packages/vitest/src/public/execute.ts) - const { VitestExecutor } = await import("vitest/execute"); - const originalResolveUrl = VitestExecutor.prototype.resolveUrl; - // eslint-disable-next-line @typescript-eslint/no-this-alias - const that = this; - VitestExecutor.prototype.resolveUrl = function (...args) { - that.executor = this; - return originalResolveUrl.apply(this, args); - }; - - (wd.data as { port: WebSocketMessagePort }).port = port; - module[wd.name](wd.data) - .then(() => { - poolSocket.close(1000, "Done"); - }) - .catch((e: unknown) => { - port.postMessage({ vitestPoolWorkersError: e }); - const error = reduceError(e); - __console.error("Error running worker:", error.stack); - poolSocket.close(1011, "Internal Error"); + const { init, runBaseTests, setupEnvironment } = await import( + "vitest/worker" + ); + + poolSocket.accept(); + + // Internally, `runBaseTests()` calls `startModuleRunner()`, which + // constructs a singleton `VitestModuleRunner`. We'd like access to this singleton + // so we can transform and import code with Vite ourselves (e.g. for user worker's default exports + // and Durable Objects). Vitest exposes a `startVitestModuleRunner()` + // function that we can use to get a new instance of the module runner, + // but we need the _exact_ instance Vitest is using to run tests so + // that e.g. instanceof checks on DurableObjects during a test run works + // as expected. + // Now, we can't just call startModuleRunner _ourselves_ at this point. + // Since `runBaseTests()` hasn't run yet, we'd end up constructing the + // singleton rather than getting an existing instance (and well, we don't know which arguments to pass!) + // Instead, store the `startModuleRunner()` function and call it when it's + // actually needed (see `get executor()` above). At that point the singleton + // is guaranteed to exist, since we're within the context of a test. As such, at _that_ + // point calling `startModuleRunner()` will return the existing singleton. + // TODO: Replace with `this.#getExecutor = startModuleRunner;` once https://github.com/vitest-dev/vitest/pull/9234 lands + const { VitestModuleRunner } = await import( + // @ts-expect-error the types don't seem to be working for this module + "vitest/internal/module-runner" + ); + const originalResolveUrl = VitestModuleRunner.prototype.import; + // eslint-disable-next-line @typescript-eslint/no-this-alias + const that = this; + VitestModuleRunner.prototype.import = function (...args: unknown[]) { + that.#getExecutor = () => this; + return originalResolveUrl.apply(this, args); + }; + + init({ + post: (response) => { + try { + poolSocket.send(structuredSerializableStringify(response)); + } catch (error) { + __console.error("pool error"); + // If the user tried to perform a dynamic `import()` or `console.log()` + // from inside a `export default { fetch() { ... } }` handler using `SELF` + // or from inside their own Durable Object, Vitest will try to send an + // RPC message from a non-`RunnerObject` I/O context. There's nothing we + // can really do to prevent this: we want to run these things in different + // I/O contexts with the behaviour this causes. We'd still like to send + // the RPC message though, so if we detect this, we try resend the message + // from the runner object. + if (isDifferentIOContextError(error)) { + const promise = runInRunnerObject(internalEnv, () => { + poolSocket.send(structuredSerializableStringify(response)); + }).catch((e) => { + __console.error( + "Error sending to pool inside runner:", + e, + response + ); + }); + registerHandlerAndGlobalWaitUntil(promise); + } else { + __console.error("Error sending to pool:", error, response); + } + } + }, + on: (callback) => { + poolSocket.addEventListener("message", (m) => { + callback(structuredSerializableParse(m.data)); }); - } catch (e) { - const error = reduceError(e); - __console.error("Error initialising worker:", error.stack); - return Response.json(error, { - status: 500, - headers: { "MF-Experimental-Error-Stack": "true" }, - }); - } + }, + runTests: (state, traces) => runBaseTests("run", state, traces), + collectTests: (state, traces) => runBaseTests("collect", state, traces), + setup: setupEnvironment, + }); return new Response(null, { status: 101, webSocket: poolResponseSocket }); } diff --git a/packages/vitest-pool-workers/src/worker/lib/cloudflare/snapshot.ts b/packages/vitest-pool-workers/src/worker/lib/cloudflare/snapshot.ts new file mode 100644 index 000000000000..386e33e9a3fe --- /dev/null +++ b/packages/vitest-pool-workers/src/worker/lib/cloudflare/snapshot.ts @@ -0,0 +1,43 @@ +import assert from "node:assert"; +import { dirname } from "node:path"; +import { internalEnv } from "cloudflare:test-internal"; +import { VitestSnapshotEnvironment } from "vitest/snapshot"; + +// Define a custom `SnapshotEnvironment` that uses a service binding for file +// system operations, rather than `node:fs` +class WorkersSnapshotEnvironment extends VitestSnapshotEnvironment { + #fetch(method: string, path: string, body?: BodyInit): Promise { + const encodedPath = encodeURIComponent(path); + const url = `http://placeholder/snapshot?path=${encodedPath}`; + return internalEnv.__VITEST_POOL_WORKERS_LOOPBACK_SERVICE.fetch(url, { + method, + body, + }); + } + + async prepareDirectory(dirPath: string): Promise { + const res = await this.#fetch("POST", dirPath); + assert.strictEqual(res.status, 204); + } + + async saveSnapshotFile(filePath: string, snapshot: string): Promise { + await this.prepareDirectory(dirname(filePath)); + const res = await this.#fetch("PUT", filePath, snapshot); + assert.strictEqual(res.status, 204); + } + + async readSnapshotFile(filePath: string): Promise { + const res = await this.#fetch("GET", filePath); + if (res.status === 404) { + return null; + } + assert.strictEqual(res.status, 200); + return await res.text(); + } + + async removeSnapshotFile(filePath: string): Promise { + const res = await this.#fetch("DELETE", filePath); + assert.strictEqual(res.status, 204); + } +} +export default new WorkersSnapshotEnvironment(); diff --git a/packages/vitest-pool-workers/src/worker/lib/cloudflare/test-internal.ts b/packages/vitest-pool-workers/src/worker/lib/cloudflare/test-internal.ts index afc69277687f..595f283a808a 100644 --- a/packages/vitest-pool-workers/src/worker/lib/cloudflare/test-internal.ts +++ b/packages/vitest-pool-workers/src/worker/lib/cloudflare/test-internal.ts @@ -1,3 +1,5 @@ +import "../../fetch-mock"; + // Hide internals in separate `cloudflare:test-internal` module, so they're not // exposed to users using e.g. `import * as test from "cloudflare:test"` export * from "../../d1"; @@ -5,6 +7,5 @@ export * from "../../durable-objects"; export * from "../../entrypoints"; export * from "../../env"; export * from "../../events"; -export * from "../../fetch-mock"; export * from "../../wait-until"; export * from "../../workflows"; 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 deleted file mode 100644 index 766c450084b6..000000000000 --- a/packages/vitest-pool-workers/src/worker/lib/cloudflare/test-runner.ts +++ /dev/null @@ -1,358 +0,0 @@ -import assert from "node:assert"; -import { NodeSnapshotEnvironment } from "@vitest/snapshot/environment"; -import { resetMockAgent } from "cloudflare:mock-agent"; -import { - fetchMock, - getSerializedOptions, - internalEnv, - registerHandlerAndGlobalWaitUntil, - waitForGlobalWaitUntil, -} from "cloudflare:test-internal"; -import { vi } from "vitest"; -import { VitestTestRunner } from "vitest/runners"; -import workerdUnsafe from "workerd:unsafe"; -import type { Suite, Test } from "@vitest/runner"; -import type { SerializedConfig, WorkerGlobalState, WorkerRPC } from "vitest"; - -// When `DEBUG` is `true`, runner operations will be logged and slowed down -// TODO(soon): remove this -const DEBUG = false; -const _ = (n: number) => " ".repeat(n); - -// Define a custom `SnapshotEnvironment` that uses a service binding for file -// system operations, rather than `node:fs` -// Based on https://github.com/vitest-dev/vitest/blob/v1.0.0-beta.5/packages/vitest/src/integrations/snapshot/environments/node.ts -class WorkersSnapshotEnvironment extends NodeSnapshotEnvironment { - constructor(private rpc: WorkerRPC) { - super(); - } - - #fetch(method: string, path: string, body?: BodyInit): Promise { - const encodedPath = encodeURIComponent(path); - const url = `http://placeholder/snapshot?path=${encodedPath}`; - return internalEnv.__VITEST_POOL_WORKERS_LOOPBACK_SERVICE.fetch(url, { - method, - body, - }); - } - - getHeader(): string { - return `// Vitest Snapshot v${this.getVersion()}, https://vitest.dev/guide/snapshot.html`; - } - - resolvePath(filePath: string): Promise { - return this.rpc.resolveSnapshotPath(filePath); - } - - async prepareDirectory(dirPath: string): Promise { - const res = await this.#fetch("POST", dirPath); - assert.strictEqual(res.status, 204); - } - - async saveSnapshotFile(filePath: string, snapshot: string): Promise { - const res = await this.#fetch("PUT", filePath, snapshot); - assert.strictEqual(res.status, 204); - } - - async readSnapshotFile(filePath: string): Promise { - const res = await this.#fetch("GET", filePath); - if (res.status === 404) { - return null; - } - assert.strictEqual(res.status, 200); - return await res.text(); - } - - async removeSnapshotFile(filePath: string): Promise { - const res = await this.#fetch("DELETE", filePath); - assert.strictEqual(res.status, 204); - } -} - -let initialState: WorkerGlobalState | undefined; -let patchedPrepareStackTrace = false; -const getConsoleGetFileName = () => () => "node:internal/console/constructor"; - -interface TryOptions { - repeats: number; - retry: number; -} - -type TryKey = `${number}:${number}`; -function getTryKey({ repeats, retry }: TryOptions): TryKey { - return `${repeats}:${retry}`; -} - -interface TryState { - active?: TryKey; - popped: Set; -} -const tryStates = new WeakMap(); - -// Wrap RPC calls to register all RPC promises with handler `waitUntil()`s. -// This ensures all messages created in an `export default` request context are -// sent, rather than being silently discarded. -const waitUntilPatchedRpc = new WeakSet(); -export function createWaitUntilRpc(rpc: WorkerRPC): WorkerRPC { - return new Proxy(rpc, { - get(target, key, handler) { - if (key === "then") { - return; - } - const sendCall = Reflect.get(target, key, handler); - const waitUntilSendCall = async (...args: unknown[]) => { - const promise = sendCall(...args); - registerHandlerAndGlobalWaitUntil(promise); - return promise; - }; - waitUntilSendCall.asEvent = sendCall.asEvent; - return waitUntilSendCall; - }, - }); -} - -export default class WorkersTestRunner extends VitestTestRunner { - readonly state: WorkerGlobalState; - readonly isolatedStorage: boolean; - - constructor(config: SerializedConfig) { - super(config); - - // @ts-expect-error `this.workerState` has "private" access, how quaint :D - const state: WorkerGlobalState = this.workerState; - this.state = state; - - const { isolatedStorage } = getSerializedOptions(); - this.isolatedStorage = isolatedStorage ?? false; - - // Make sure we're using a `WorkersSnapshotEnvironment` - const opts = state.config.snapshotOptions; - if (!(opts.snapshotEnvironment instanceof WorkersSnapshotEnvironment)) { - opts.snapshotEnvironment = new WorkersSnapshotEnvironment(state.rpc); - } - - if (!waitUntilPatchedRpc.has(state.rpc)) { - waitUntilPatchedRpc.add(state.rpc); - state.rpc = createWaitUntilRpc(state.rpc); - } - - // If this is the first run in this isolate, store a reference to the state. - // Vitest only sets up its `console.log()` interceptor on the first run - // (https://github.com/vitest-dev/vitest/blob/v1.0.0-beta.5/packages/vitest/src/runtime/setup-node.ts#L58), - // and will use the `state` of the first run. Unfortunately, `state` is - // recreated on each run. In particular, `state.rpc` will be hooked up with - // a different `WebSocket` that gets closed at the end of each run. To - // prevent `Can't call WebSocket send() after close()` errors, update the - // initial state's `rpc` with the current `rpc`. Similarly, make sure - // `initialState.current` is updated with the current task later on so - // `console.log()`s report their current test correctly. - initialState ??= state; - initialState.rpc = state.rpc; - - // Vitests expects `node:console`s filename to start with `node:internal/console/`: - // https://github.com/vitest-dev/vitest/blob/v1.0.0-beta.5/packages/vitest/src/runtime/console.ts#L16 - if (!patchedPrepareStackTrace) { - patchedPrepareStackTrace = true; - // Need to patch this after Vitest's own source mapping handler installed - const originalPrepareStackTrace = Error.prepareStackTrace; - assert(originalPrepareStackTrace !== undefined); - Error.prepareStackTrace = (err, callSites) => { - for (const callSite of callSites) { - const fileName = callSite.getFileName(); - if (fileName?.endsWith("/dist/worker/lib/node/console.mjs")) { - Object.defineProperty(callSite, "getFileName", { - get: getConsoleGetFileName, - }); - } - } - return originalPrepareStackTrace(err, callSites); - }; - } - } - - async updateStackedStorage( - action: "push" | "pop", - source: Test | Suite - ): Promise { - if (!this.isolatedStorage) { - return; - } - - // Ensure all `ctx.waitUntil()` calls complete before aborting all objects. - // `ctx.waitUntil()`s may contain storage calls (e.g. caching responses) - // that could re-create Durable Objects and interrupt stack operations. - await waitForGlobalWaitUntil(); - - // Abort all Durable Objects apart from those marked with `preventEviction` - // (i.e. the runner object and the proxy server). - // On push, ensures objects are started with newly copied `.sqlite` files. - // On pop, ensures SQLite WAL checkpoint, allowing us to just copy `.sqlite` files. - await workerdUnsafe.abortAllDurableObjects(); - - // Send request to pool loopback service to update `.sqlite` files - const url = "http://placeholder/storage"; - const sourceString = `${source.file?.name ?? "an unknown file"}'s ${ - source.type - } ${JSON.stringify(source.name)}`; - - const res = await internalEnv.__VITEST_POOL_WORKERS_LOOPBACK_SERVICE.fetch( - url, - { - method: action === "pop" ? "DELETE" : "POST", - headers: { "MF-Vitest-Source": sourceString }, - } - ); - assert.strictEqual(res.status, 204, await res.text()); - } - - syncCurrentTaskWithInitialState() { - assert(initialState !== undefined); // Assigned in constructor - initialState.current = this.state.current; - } - - async onBeforeRunFiles() { - if (DEBUG) { - __console.log("onBeforeRunFiles"); - await scheduler.wait(100); - } - - resetMockAgent(fetchMock); - // @ts-expect-error Support Vitest v2 - if (super.onBeforeRunFiles) { - // @ts-expect-error Support Vitest v2 - return super.onBeforeRunFiles(); - } - } - - async onAfterRunFiles() { - if (DEBUG) { - __console.log("onAfterRunFiles"); - await scheduler.wait(100); - } - - // Unlike the official threads and forks pool, we do not recycle the miniflare instances to maintain the module cache. - // However, this creates a side effect where the module mock will not be re-evaluated on watch mode. - // This fixes https://github.com/cloudflare/workers-sdk/issues/6844 by resetting the module graph. - vi.resetModules(); - - // Ensure all `ctx.waitUntil()` calls complete before disposing the runtime - // (if using `vitest run`) and aborting all objects. `ctx.waitUntil()`s may - // contain storage calls (e.g. caching responses) that could try to access - // aborted Durable Objects. - await waitForGlobalWaitUntil(); - return super.onAfterRunFiles?.(); - } - - async onBeforeRunSuite(suite: Suite) { - if (DEBUG) { - __console.log(`${_(2)}onBeforeRunSuite: ${suite.name}`); - await scheduler.wait(100); - } - await this.updateStackedStorage("push", suite); - - return super.onBeforeRunSuite(suite); - } - async onAfterRunSuite(suite: Suite) { - if (DEBUG) { - __console.log(`${_(2)}onAfterRunSuite: ${suite.name}`); - await scheduler.wait(100); - } - await this.updateStackedStorage("pop", suite); - - return super.onAfterRunSuite(suite); - } - - async ensurePoppedActiveTryStorage( - test: Test, - newActive?: TryKey - ): Promise { - const tries = tryStates.get(test); - assert(tries !== undefined); - const active = tries.active; - if (newActive !== undefined) { - tries.active = newActive; - } - if (active !== undefined && !tries.popped.has(active)) { - tries.popped.add(active); - await this.updateStackedStorage("pop", test); - return true; - } - return false; - } - - async onBeforeRunTask(test: Test) { - if (DEBUG) { - __console.log(`${_(4)}onBeforeRunTask: ${test.name}`); - await scheduler.wait(100); - } - - tryStates.set(test, { popped: new Set() }); - if (this.isolatedStorage && test.concurrent) { - const quotedName = JSON.stringify(test.name); - const msg = [ - "Concurrent tests are unsupported with isolated storage. Please either:", - `- Remove \`.concurrent\` from the ${quotedName} test`, - `- Remove \`.concurrent\` from all \`describe()\` blocks containing the ${quotedName} test`, - "- Remove `isolatedStorage: true` from your project's Vitest config", - ]; - throw new Error(msg.join("\n")); - } - - const result = await super.onBeforeRunTask(test); - // Current task may be updated in `super.onBeforeRunTask()`: - // https://github.com/vitest-dev/vitest/blob/v1.0.0-beta.5/packages/vitest/src/runtime/runners/test.ts#L68 - this.syncCurrentTaskWithInitialState(); - return result; - } - async onAfterRunTask(test: Test) { - if (DEBUG) { - __console.log(`${_(4)}onAfterRunTask: ${test.name}`); - await scheduler.wait(100); - } - - // If we haven't popped storage for the test yet (i.e. the try threw, - // `onAfterTryTask()` wasn't called, and we didn't enable retries so - // `onBeforeTryTask()` wasn't called again), pop it - await this.ensurePoppedActiveTryStorage(test); - tryStates.delete(test); - - const result = await super.onAfterRunTask(test); - // Current task updated in `super.onAfterRunTask()`: - // https://github.com/vitest-dev/vitest/blob/v1.0.0-beta.5/packages/vitest/src/runtime/runners/test.ts#L47 - this.syncCurrentTaskWithInitialState(); - return result; - } - - // @ts-expect-error `VitestRunner` defines an additional `options` parameter - // that `VitestTestRunner` doesn't use - async onBeforeTryTask(test: Test, options: TryOptions) { - if (DEBUG) { - __console.log(`${_(6)}onBeforeTryTask: ${test.name}`, options); - await scheduler.wait(100); - } - - // If we haven't popped storage for the previous try yet (i.e. the try - // threw and `onAfterTryTask()` wasn't called), pop it first... - const newActive = getTryKey(options); - await this.ensurePoppedActiveTryStorage(test, newActive); - - await this.updateStackedStorage("push", test); - return super.onBeforeTryTask(test); - } - // @ts-expect-error `VitestRunner` defines an additional `options` parameter - // that `VitestTestRunner` doesn't use - async onAfterTryTask(test: Test, options: TryOptions) { - if (DEBUG) { - __console.log(`${_(6)}onAfterTryTask: ${test.name}`, options); - await scheduler.wait(100); - } - - // Pop storage for this try, asserting that we haven't done so already. - // `onAfterTryTask()` is never called multiple times for the same try, - // `onBeforeTryTask()` will only be called with a new try after this, - // and `onAfterRunTask()` will only be called after all tries. - assert(await this.ensurePoppedActiveTryStorage(test)); - - return super.onAfterTryTask(test); - } -} diff --git a/packages/vitest-pool-workers/src/worker/lib/cloudflare/test.ts b/packages/vitest-pool-workers/src/worker/lib/cloudflare/test.ts index 26246a242e26..a89acf2a8e39 100644 --- a/packages/vitest-pool-workers/src/worker/lib/cloudflare/test.ts +++ b/packages/vitest-pool-workers/src/worker/lib/cloudflare/test.ts @@ -7,7 +7,6 @@ export { env, SELF, - fetchMock, runInDurableObject, runDurableObjectAlarm, listDurableObjectIds, diff --git a/packages/vitest-pool-workers/src/worker/lib/debug.ts b/packages/vitest-pool-workers/src/worker/lib/debug.ts deleted file mode 100644 index c36fe4f16a61..000000000000 --- a/packages/vitest-pool-workers/src/worker/lib/debug.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default function (_name: string) { - return (..._args: unknown[]) => {}; -} diff --git a/packages/vitest-pool-workers/src/worker/lib/mlly.ts b/packages/vitest-pool-workers/src/worker/lib/mlly.ts deleted file mode 100644 index 8247f6b51880..000000000000 --- a/packages/vitest-pool-workers/src/worker/lib/mlly.ts +++ /dev/null @@ -1,48 +0,0 @@ -function isObject(value: unknown): value is Record { - return value !== null && typeof value === "object"; -} - -export function resolvePathSync() { - throw new Error("resolvePathSync() not yet implemented in worker"); -} - -// https://github.com/unjs/mlly/blob/71563c22ec7dbf25672d46bc679619dbd65e79d2/src/cjs.ts#L34 -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export function interopDefault(sourceModule: any): any { - if ( - !isObject(sourceModule) || - !("default" in sourceModule) || - !isObject(sourceModule.default) - ) { - return sourceModule; - } - const newModule = sourceModule.default; - for (const key in sourceModule) { - if (key === "default") { - try { - if (!(key in newModule)) { - Object.defineProperty(newModule, key, { - enumerable: false, - configurable: false, - get() { - return newModule; - }, - }); - } - } catch {} - } else { - try { - if (!(key in newModule)) { - Object.defineProperty(newModule, key, { - enumerable: true, - configurable: true, - get() { - return sourceModule[key]; - }, - }); - } - } catch {} - } - } - return newModule; -} diff --git a/packages/vitest-pool-workers/src/worker/lib/tinypool.ts b/packages/vitest-pool-workers/src/worker/lib/tinypool.ts deleted file mode 100644 index 554c24b89081..000000000000 --- a/packages/vitest-pool-workers/src/worker/lib/tinypool.ts +++ /dev/null @@ -1 +0,0 @@ -export const workerId = 0; diff --git a/packages/vitest-pool-workers/src/worker/types-ambient.d.ts b/packages/vitest-pool-workers/src/worker/types-ambient.d.ts index e03ebd1d7374..aa66924213be 100644 --- a/packages/vitest-pool-workers/src/worker/types-ambient.d.ts +++ b/packages/vitest-pool-workers/src/worker/types-ambient.d.ts @@ -6,16 +6,11 @@ interface UnsafeEval { newAsyncFunction(script: string, name?: string, ...args: string[]): Function; } -// https://github.com/cloudflare/workerd/blob/v1.20240223.0/src/workerd/api/actor.h#L26 -interface EphemeralObjectNamespace { - get(id: Id): Fetcher; -} - interface Env { __VITEST_POOL_WORKERS_SELF_NAME: string; __VITEST_POOL_WORKERS_SELF_SERVICE: Fetcher; __VITEST_POOL_WORKERS_LOOPBACK_SERVICE: Fetcher; - __VITEST_POOL_WORKERS_RUNNER_OBJECT: EphemeralObjectNamespace<"singleton">; + __VITEST_POOL_WORKERS_RUNNER_OBJECT: DurableObjectNamespace; __VITEST_POOL_WORKERS_UNSAFE_EVAL: UnsafeEval; } type InternalUserEnv = Env & Record; @@ -33,7 +28,6 @@ interface SerializedOptions { string /* bound name */, DurableObjectDesignator >; - isolatedStorage?: boolean; } declare module "__VITEST_POOL_WORKERS_USER_OBJECT" {} diff --git a/packages/vitest-pool-workers/test/bindings.test.ts b/packages/vitest-pool-workers/test/bindings.test.ts index 8714352288f0..d9f25ecba49b 100644 --- a/packages/vitest-pool-workers/test/bindings.test.ts +++ b/packages/vitest-pool-workers/test/bindings.test.ts @@ -1,25 +1,16 @@ import dedent from "ts-dedent"; -import { test } from "./helpers"; +import { test, vitestConfig } from "./helpers"; test("hello_world support", async ({ expect, seed, vitestRun }) => { await seed({ - "vitest.config.mts": dedent` - import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; - export default defineWorkersConfig({ - test: { - poolOptions: { - workers: { - singleWorker: true, - wrangler: { configPath: "./wrangler.jsonc" }, - }, - }, - } - }); - `, + "vitest.config.mts": vitestConfig({ + wrangler: { configPath: "./wrangler.jsonc" }, + }), "wrangler.jsonc": dedent` { "name": "test-worker", - "compatibility_date": "2025-01-01", + "compatibility_date": "2025-12-02", + "compatibility_flags": ["nodejs_compat"], "unsafe_hello_world": [ { "binding": "HELLO_WORLD", diff --git a/packages/vitest-pool-workers/test/chunking.test.ts b/packages/vitest-pool-workers/test/chunking.test.ts index 1ca2855a0aee..d5d9c24a128b 100644 --- a/packages/vitest-pool-workers/test/chunking.test.ts +++ b/packages/vitest-pool-workers/test/chunking.test.ts @@ -1,5 +1,5 @@ import dedent from "ts-dedent"; -import { test } from "./helpers"; +import { test, vitestConfig } from "./helpers"; test("chunks large WebSocket messages bi-directionally", async ({ expect, @@ -7,28 +7,16 @@ test("chunks large WebSocket messages bi-directionally", async ({ vitestRun, }) => { // Check loads module greater than 1 MiB `workerd` limit... - const bigText = "xyz".repeat(400_000); + const bigText = "xyz".repeat(4); await seed({ "big.txt": bigText, - "vitest.config.mts": dedent` - import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; - export default defineWorkersConfig({ - test: { - poolOptions: { - workers: { - singleWorker: true, - miniflare: { - compatibilityDate: "2024-01-01", - compatibilityFlags: ["nodejs_compat"], - modulesRules: [ - { type: "Text", include: ["**/*.txt"] } - ] - }, - }, - }, - } - }); - `, + "vitest.config.mts": vitestConfig({ + miniflare: { + compatibilityDate: "2025-12-02", + compatibilityFlags: ["nodejs_compat"], + modulesRules: [{ type: "Text", include: ["**/*.txt"] }], + }, + }), "index.test.ts": dedent` import text from "./big.txt"; import { it } from "vitest"; diff --git a/packages/vitest-pool-workers/test/console.test.ts b/packages/vitest-pool-workers/test/console.test.ts index 14094adb5dcb..9db9018cdaf6 100644 --- a/packages/vitest-pool-workers/test/console.test.ts +++ b/packages/vitest-pool-workers/test/console.test.ts @@ -1,11 +1,11 @@ import dedent from "ts-dedent"; -import { minimalVitestConfig, test, waitFor } from "./helpers"; +import { test, vitestConfig, waitFor } from "./helpers"; test.skipIf(process.platform === "win32")( "console.log()s include correct source-mapped locations", async ({ expect, seed, vitestDev }) => { await seed({ - "vitest.config.mts": minimalVitestConfig, + "vitest.config.mts": vitestConfig(), "index.test.ts": dedent` import { describe, it } from "vitest"; console.log("global"); @@ -58,7 +58,7 @@ test("handles detatched console methods", async ({ vitestDev, }) => { await seed({ - "vitest.config.mts": minimalVitestConfig, + "vitest.config.mts": vitestConfig(), "index.test.ts": dedent` import { SELF } from "cloudflare:test"; import { expect, it } from "vitest"; @@ -79,23 +79,14 @@ test("console.logs() inside `export default`ed handlers with SELF", async ({ vitestRun, }) => { await seed({ - "vitest.config.mts": dedent` - import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; - export default defineWorkersConfig({ - test: { - poolOptions: { - workers: { - main: "./index.ts", - singleWorker: true, - miniflare: { - compatibilityDate: "2024-01-01", - compatibilityFlags: ["nodejs_compat"], - }, - }, - }, - } - }); - `, + "vitest.config.mts": vitestConfig({ + main: "./index.ts", + singleWorker: true, + miniflare: { + compatibilityDate: "2025-12-02", + compatibilityFlags: ["nodejs_compat"], + }, + }), "index.ts": dedent` export default { fetch() { @@ -115,6 +106,7 @@ test("console.logs() inside `export default`ed handlers with SELF", async ({ `, }); const result = await vitestRun(); + console.log(result.stderr); expect(result.stdout).toMatch( "stdout | index.test.ts > sends request\none\ntwo" ); diff --git a/packages/vitest-pool-workers/test/filtering.test.ts b/packages/vitest-pool-workers/test/filtering.test.ts index d999688eaedb..75d691bbb3af 100644 --- a/packages/vitest-pool-workers/test/filtering.test.ts +++ b/packages/vitest-pool-workers/test/filtering.test.ts @@ -1,5 +1,5 @@ import dedent from "ts-dedent"; -import { minimalVitestConfig, test } from "./helpers"; +import { test, vitestConfig } from "./helpers"; test("filter test suite by pattern includes non-ascii string", async ({ expect, @@ -7,7 +7,7 @@ test("filter test suite by pattern includes non-ascii string", async ({ vitestRun, }) => { await seed({ - "vitest.config.mts": minimalVitestConfig, + "vitest.config.mts": vitestConfig(), "index.test.ts": dedent` import { it, expect } from "vitest"; diff --git a/packages/vitest-pool-workers/test/global-setup.ts b/packages/vitest-pool-workers/test/global-setup.ts index ad3de8e50252..2cd9539ee6c3 100644 --- a/packages/vitest-pool-workers/test/global-setup.ts +++ b/packages/vitest-pool-workers/test/global-setup.ts @@ -4,14 +4,14 @@ import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; import { startMockNpmRegistry } from "@cloudflare/mock-npm-registry"; -import type { GlobalSetupContext } from "vitest/node"; +import type { TestProject } from "vitest/node"; const repoRoot = path.resolve(__dirname, "../../.."); const packagesRoot = path.resolve(repoRoot, "packages"); // Using a global setup means we can modify tests without having to re-install // packages into our temporary directory -export default async function ({ provide }: GlobalSetupContext) { +export default async function ({ provide }: TestProject) { const stop = await startMockNpmRegistry("@cloudflare/vitest-pool-workers"); // Create temporary directory diff --git a/packages/vitest-pool-workers/test/helpers.ts b/packages/vitest-pool-workers/test/helpers.ts index 9c30a9ee8dbb..88ee609ca577 100644 --- a/packages/vitest-pool-workers/test/helpers.ts +++ b/packages/vitest-pool-workers/test/helpers.ts @@ -5,26 +5,41 @@ import fs from "node:fs/promises"; import path from "node:path"; import util from "node:util"; import { stripAnsi } from "miniflare"; +import dedent from "ts-dedent"; import { test as baseTest, inject, vi } from "vitest"; const debuglog = util.debuglog("vitest-pool-workers:test"); -export const minimalVitestConfig = ` -import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; -export default defineWorkersConfig({ - test: { - testTimeout: 90_000, - poolOptions: { - workers: { - singleWorker: true, +export const vitestConfig = ( + cfOptions: Record = {}, + testOptions: Record = {} +) => dedent/* javascript */ ` + import { cloudflareTest } from "@cloudflare/vitest-pool-workers" + + import { BaseSequencer } from "vitest/node"; + + class DeterministicSequencer extends BaseSequencer { + sort(files) { + return [...files].sort((a, b) => a.moduleId.localeCompare(b.moduleId)); + } + } + + export default { + plugins: [ + cloudflareTest({ miniflare: { - compatibilityDate: "2024-01-01", + compatibilityDate: "2025-12-02", compatibilityFlags: ["nodejs_compat"], }, - }, - }, - } -}); + ...${JSON.stringify(cfOptions)} + }) + ], + test: { + sequence: { sequencer: DeterministicSequencer }, + testTimeout: 90_000, + ...${JSON.stringify(testOptions)} + } + }; `; export function waitFor(callback: Parameters>[0]) { @@ -95,7 +110,7 @@ export const test = baseTest.extend<{ const tmpPathBase = path.join(tmpPoolInstallationPath, "test-"); const tmpPath = await fs.mkdtemp(tmpPathBase); await use(tmpPath); - await fs.rm(tmpPath, { recursive: true, maxRetries: 10 }); + // await fs.rm(tmpPath, { recursive: true, maxRetries: 10 }); }, // Fixture for seeding data in the temporary directory async seed({ tmpPath }, use) { diff --git a/packages/vitest-pool-workers/test/inspector.test.ts b/packages/vitest-pool-workers/test/inspector.test.ts index d4cf7b92c0f7..8952a0d235e0 100644 --- a/packages/vitest-pool-workers/test/inspector.test.ts +++ b/packages/vitest-pool-workers/test/inspector.test.ts @@ -1,5 +1,5 @@ import dedent from "ts-dedent"; -import { test, waitFor } from "./helpers"; +import { test, vitestConfig, waitFor } from "./helpers"; test("opens an inspector with the `--inspect` argument", async ({ expect, @@ -7,23 +7,13 @@ test("opens an inspector with the `--inspect` argument", async ({ vitestDev, }) => { await seed({ - "vitest.config.mts": dedent` - import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; - export default defineWorkersConfig({ - test: { - poolOptions: { - workers: { - main: "./index.ts", - singleWorker: true, - miniflare: { - compatibilityDate: "2024-01-01", - compatibilityFlags: ["nodejs_compat"], - }, - }, - }, - } - }); - `, + "vitest.config.mts": vitestConfig({ + main: "./index.ts", + miniflare: { + compatibilityDate: "2025-12-02", + compatibilityFlags: ["nodejs_compat"], + }, + }), "index.ts": dedent` export default { async fetch(request, env, ctx) { @@ -55,28 +45,16 @@ test("opens an inspector with the `--inspect` argument", async ({ test("customize inspector config", async ({ expect, seed, vitestDev }) => { await seed({ - "vitest.config.mts": dedent` - import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; - export default defineWorkersConfig({ - test: { - inspector: { - // Test if this overrides the inspector port - port: 3456, - }, - poolOptions: { - workers: { - main: "./index.ts", - // Test if we warn and override the singleWorker option when the inspector is open - singleWorker: false, - miniflare: { - compatibilityDate: "2024-01-01", - compatibilityFlags: ["nodejs_compat"], - }, - }, - }, - } - }); - `, + "vitest.config.mts": vitestConfig( + { + main: "./index.ts", + miniflare: { + compatibilityDate: "2025-12-02", + compatibilityFlags: ["nodejs_compat"], + }, + }, + { inspector: { port: 3456 } } + ), "index.ts": dedent` export default { async fetch(request, env, ctx) { @@ -98,16 +76,10 @@ test("customize inspector config", async ({ expect, seed, vitestDev }) => { `, }); const result = vitestDev({ - // Test if we warn and ignore the `waitForDebugger` option - flags: ["--inspect-brk", "--no-file-parallelism"], + flags: ["--inspect", "--no-file-parallelism"], }); await waitFor(() => { - expect(result.stdout).toMatch( - "Tests run in singleWorker mode when the inspector is open." - ); - expect(result.stdout).toMatch(`The "--inspect-brk" flag is not supported.`); - expect(result.stdout).toMatch("Starting single runtime"); expect(result.stdout).toMatch("inspector on port 3456"); }); }); diff --git a/packages/vitest-pool-workers/test/isolation.test.ts b/packages/vitest-pool-workers/test/isolation.test.ts index f0edd2a6083e..d9439ebae00f 100644 --- a/packages/vitest-pool-workers/test/isolation.test.ts +++ b/packages/vitest-pool-workers/test/isolation.test.ts @@ -1,16 +1,5 @@ import dedent from "ts-dedent"; -import { test } from "./helpers"; - -// Sequencer that always runs tests alphabetically by name -const deterministicSequencer = ` -import { BaseSequencer } from "vitest/node"; - -export class DeterministicSequencer extends BaseSequencer { - sort(files) { - return [...files].sort((a, b) => a[1].localeCompare(b[1])); - } -} -`; +import { test, vitestConfig } from "./helpers"; test( "isolated storage with multiple workers", @@ -19,93 +8,60 @@ test( // Check unique global scopes, storage isolated, and unique auxiliaries: // https://developers.cloudflare.com/workers/testing/vitest-integration/isolation-and-concurrency/#isolatedstorage-true-singleworker-false-default await seed({ - "sequencer.ts": deterministicSequencer, - "auxiliary.mjs": dedent` - let count = 0; - export default { - fetch() { - return new Response(++count); + "auxiliary.mjs": dedent/* javascript */ ` + let count = 0; + export default { + fetch() { + return new Response(++count); + } } - } - `, - "vitest.config.mts": dedent` - import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; - import { DeterministicSequencer } from "./sequencer.ts"; - - export default defineWorkersConfig({ - test: { - sequence: { sequencer: DeterministicSequencer }, - poolOptions: { - workers: { - isolatedStorage: true, - singleWorker: false, - miniflare: { - compatibilityDate: "2024-01-01", - compatibilityFlags: ["nodejs_compat"], - kvNamespaces: ["NAMESPACE"], - serviceBindings: { AUXILIARY: "auxiliary" }, - workers: [ - { - name: "auxiliary", - modules: true, - scriptPath: "auxiliary.mjs" - } - ] - }, + `, + "vitest.config.mts": vitestConfig({ + miniflare: { + compatibilityDate: "2025-12-02", + compatibilityFlags: ["nodejs_compat"], + kvNamespaces: ["NAMESPACE"], + serviceBindings: { AUXILIARY: "auxiliary" }, + workers: [ + { + name: "auxiliary", + modules: true, + scriptPath: "auxiliary.mjs", }, - }, - } - }); - `, - "a.test.ts": dedent` - import { env } from "cloudflare:test"; - import { it, expect } from "vitest"; - it("does something", async () => { - expect(globalThis.THING).toBe(undefined); - globalThis.THING = true; - - expect(await env.NAMESPACE.get("key")).toBe(null); - await env.NAMESPACE.put("key", "value"); - - const response = await env.AUXILIARY.fetch("https://example.com"); - expect(await response.text()).toBe("1"); - }); - `, - "b.test.ts": dedent` - import { env } from "cloudflare:test"; - import { it, expect } from "vitest"; - it("does something else", async () => { - expect(globalThis.THING).toBe(undefined); - globalThis.THING = true; - - expect(await env.NAMESPACE.get("key")).toBe(null); - await env.NAMESPACE.put("key", "value"); - - const response = await env.AUXILIARY.fetch("https://example.com"); - expect(await response.text()).toBe("1"); - }); - `, + ], + }, + }), + "a.test.ts": dedent/* javascript */ ` + import { env } from "cloudflare:test"; + import { it, expect } from "vitest"; + it("does something", async () => { + expect(globalThis.THING).toBe(undefined); + globalThis.THING = true; + + expect(await env.NAMESPACE.get("key")).toBe(null); + await env.NAMESPACE.put("key", "value"); + + const response = await env.AUXILIARY.fetch("https://example.com"); + expect(await response.text()).toBe("1"); + }); + `, + "b.test.ts": dedent/* javascript */ ` + import { env } from "cloudflare:test"; + import { it, expect } from "vitest"; + it("does something else", async () => { + expect(globalThis.THING).toBe(undefined); + globalThis.THING = true; + + expect(await env.NAMESPACE.get("key")).toBe(null); + await env.NAMESPACE.put("key", "value"); + + const response = await env.AUXILIARY.fetch("https://example.com"); + expect(await response.text()).toBe("1"); + }); + `, }); - let result = await vitestRun(); + const result = await vitestRun(); expect(await result.exitCode).toBe(0); - - // Check prohibits concurrent tests - await seed({ - "b.test.ts": dedent` - import { env } from "cloudflare:test"; - import { it, expect } from "vitest"; - it.concurrent("does something else", () => {}); - `, - }); - result = await vitestRun(); - expect(await result.exitCode).toBe(1); - const expected = dedent` - Error: Concurrent tests are unsupported with isolated storage. Please either: - - Remove \`.concurrent\` from the "does something else" test - - Remove \`.concurrent\` from all \`describe()\` blocks containing the "does something else" test - - Remove \`isolatedStorage: true\` from your project's Vitest config - `; - expect(result.stderr).toMatch(expected); } ); @@ -116,7 +72,6 @@ test( // Check shared global scope, storage isolated, and shared auxiliaries: // https://developers.cloudflare.com/workers/testing/vitest-integration/isolation-and-concurrency/#isolatedstorage-true-singleworker-true await seed({ - "sequencer.ts": deterministicSequencer, "auxiliary.mjs": dedent` let count = 0; export default { @@ -125,189 +80,87 @@ test( } } `, - "vitest.config.mts": dedent` - import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; - import { DeterministicSequencer } from "./sequencer.ts"; - - export default defineWorkersConfig({ - test: { - sequence: { sequencer: DeterministicSequencer }, - poolOptions: { - workers: { - isolatedStorage: true, - singleWorker: true, - miniflare: { - compatibilityDate: "2024-01-01", - compatibilityFlags: ["nodejs_compat"], - kvNamespaces: ["NAMESPACE"], - serviceBindings: { AUXILIARY: "auxiliary" }, - workers: [ - { - name: "auxiliary", - modules: true, - scriptPath: "auxiliary.mjs" - } - ] - }, + "vitest.config.mts": vitestConfig({ + miniflare: { + compatibilityDate: "2025-12-02", + compatibilityFlags: ["nodejs_compat"], + kvNamespaces: ["NAMESPACE"], + serviceBindings: { AUXILIARY: "auxiliary" }, + workers: [ + { + name: "auxiliary", + modules: true, + scriptPath: "auxiliary.mjs", }, - }, - } - }); - `, - "a.test.ts": dedent` - import { env } from "cloudflare:test"; - import { it, expect } from "vitest"; - it("does something", async () => { - expect(globalThis.THING).toBe(undefined); - globalThis.THING = true; - - expect(await env.NAMESPACE.get("key")).toBe(null); - await env.NAMESPACE.put("key", "value"); - - const response = await env.AUXILIARY.fetch("https://example.com"); - expect(await response.text()).toBe("1"); - }); - `, - "b.test.ts": dedent` - import { env } from "cloudflare:test"; - import { it, expect } from "vitest"; - it("does something else", async () => { - expect(globalThis.THING).toBe(true); - - expect(await env.NAMESPACE.get("key")).toBe(null); - - const response = await env.AUXILIARY.fetch("https://example.com"); - expect(await response.text()).toBe("2"); - }); - `, + ], + }, + }), + "a.test.ts": dedent/* javascript */ ` + import { env } from "cloudflare:test"; + import { it, expect } from "vitest"; + it("does something", async () => { + expect(await env.NAMESPACE.get("key")).toBe(null); + await env.NAMESPACE.put("key", "value"); + + const response = await env.AUXILIARY.fetch("https://example.com"); + expect(await response.text()).toBe("1"); + }); + `, + "b.test.ts": dedent/* javascript */ ` + import { env } from "cloudflare:test"; + import { it, expect } from "vitest"; + it("does something else", async () => { + expect(await env.NAMESPACE.get("key")).toBe(null); + + const response = await env.AUXILIARY.fetch("https://example.com"); + expect(await response.text()).toBe("1"); + }); + `, }); - let result = await vitestRun(); - expect(await result.exitCode).toBe(0); - - // Check prohibits concurrent tests - await seed({ - "b.test.ts": dedent` - import { env } from "cloudflare:test"; - import { it, expect } from "vitest"; - it.concurrent("does something else", () => {}); - `, + const result = await vitestRun({ + flags: ["--max-workers=1"], }); - result = await vitestRun(); - expect(await result.exitCode).toBe(1); - const expected = dedent` - Error: Concurrent tests are unsupported with isolated storage. Please either: - - Remove \`.concurrent\` from the "does something else" test - - Remove \`.concurrent\` from all \`describe()\` blocks containing the "does something else" test - - Remove \`isolatedStorage: true\` from your project's Vitest config - `; - expect(result.stderr).toMatch(expected); + expect(await result.exitCode).toBe(0); } ); test( "shared storage with multiple workers", - { timeout: 30_000 }, + { timeout: 60_000 }, async ({ expect, seed, vitestRun }) => { - // Check unique global scopes, storage shared, and shared auxiliaries: - // https://developers.cloudflare.com/workers/testing/vitest-integration/isolation-and-concurrency/#isolatedstorage-false-singleworker-false await seed({ - "sequencer.ts": deterministicSequencer, - "auxiliary.mjs": dedent` - export class SyncObject { - #resolves = []; - fetch(request) { - const deferred = Promise.withResolvers(); - this.#resolves.push(deferred.resolve); - if (this.#resolves.length === 2) { - for (const resolve of this.#resolves) resolve(new Response()); - } - return deferred.promise; - } - } - - let id; - export default { - fetch(request, env, ctx) { - id ??= env.SYNC.newUniqueId(); - const stub = env.SYNC.get(id); - return stub.fetch(request); - } - } - `, - "vitest.config.mts": dedent` - import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; - import { DeterministicSequencer } from "./sequencer.ts"; - - export default defineWorkersConfig({ - test: { - sequence: { sequencer: DeterministicSequencer }, - poolOptions: { - workers: { - isolatedStorage: false, - singleWorker: false, - miniflare: { - compatibilityDate: "2024-01-01", - compatibilityFlags: ["nodejs_compat"], - kvNamespaces: ["NAMESPACE"], - serviceBindings: { AUXILIARY: "auxiliary" }, - workers: [ - { - name: "auxiliary", - modules: true, - scriptPath: "auxiliary.mjs", - durableObjects: { SYNC: "SyncObject" } - } - ] - }, - }, - }, - } - }); - `, - "a.test.ts": dedent` - import { env } from "cloudflare:test"; - import { it, expect } from "vitest"; - it("does something", async () => { - globalThis.A_THING = true; - await env.NAMESPACE.put("a", "1"); - - await env.AUXILIARY.fetch("https://example.com"); - - expect(globalThis.B_THING).toBe(undefined); - expect(await env.NAMESPACE.get("b")).toBe("2"); - }); - `, - "b.test.ts": dedent` - import { env } from "cloudflare:test"; - import { it, expect } from "vitest"; - it("does something else", async () => { - globalThis.B_THING = true; - await env.NAMESPACE.put("b", "2"); - - await env.AUXILIARY.fetch("https://example.com"); - - expect(globalThis.A_THING).toBe(undefined); - expect(await env.NAMESPACE.get("a")).toBe("1"); - }); - `, + "vitest.config.mts": vitestConfig({ + miniflare: { + compatibilityDate: "2025-12-02", + compatibilityFlags: ["nodejs_compat"], + kvNamespaces: ["NAMESPACE"], + }, + }), + "a.test.ts": dedent/* javascript */ ` + import { env } from "cloudflare:test"; + import { it, expect } from "vitest"; + it("does something", async () => { + globalThis.A_THING = true; + await env.NAMESPACE.put("a", "1"); + + expect(globalThis.B_THING).toBe(undefined); + }); + `, + "b.test.ts": dedent/* javascript */ ` + import { env } from "cloudflare:test"; + import { it, expect } from "vitest"; + it("does something else", async () => { + globalThis.B_THING = true; + await env.NAMESPACE.put("b", "2"); + + expect(globalThis.A_THING).toBe(true); + expect(await env.NAMESPACE.get("a")).toBe("1"); + }); + `, }); - let result = await vitestRun(); - expect(await result.exitCode).toBe(0); - - // Check allows concurrent tests - await seed({ - "a.test.ts": dedent` - import { env } from "cloudflare:test"; - import { it, expect } from "vitest"; - it.concurrent("does something", () => {}); - `, - "b.test.ts": dedent` - import { env } from "cloudflare:test"; - import { it, expect } from "vitest"; - it.concurrent("does something else", () => {}); - `, + const result = await vitestRun({ + flags: ["--no-isolate", "--max-workers=1"], }); - result = await vitestRun(); expect(await result.exitCode).toBe(0); } ); @@ -319,88 +172,61 @@ test( // Check shared global scopes, storage shared, and shared auxiliaries: // https://developers.cloudflare.com/workers/testing/vitest-integration/isolation-and-concurrency/#isolatedstorage-false-singleworker-true await seed({ - "sequencer.ts": deterministicSequencer, - "auxiliary.mjs": dedent` - let count = 0; - export default { - fetch() { - return new Response(++count); + "auxiliary.mjs": dedent/* javascript */ ` + let count = 0; + export default { + fetch() { + return new Response(++count); + } } - } - `, - "vitest.config.mts": dedent` - import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; - import { DeterministicSequencer } from "./sequencer.ts"; - - export default defineWorkersConfig({ - test: { - sequence: { sequencer: DeterministicSequencer }, - poolOptions: { - workers: { - isolatedStorage: false, - singleWorker: true, - miniflare: { - compatibilityDate: "2024-01-01", - compatibilityFlags: ["nodejs_compat"], - kvNamespaces: ["NAMESPACE"], - serviceBindings: { AUXILIARY: "auxiliary" }, - workers: [ - { - name: "auxiliary", - modules: true, - scriptPath: "auxiliary.mjs" - } - ] - }, + `, + "vitest.config.mts": vitestConfig({ + isolatedStorage: false, + singleWorker: true, + miniflare: { + compatibilityDate: "2024-01-01", + compatibilityFlags: ["nodejs_compat"], + kvNamespaces: ["NAMESPACE"], + serviceBindings: { AUXILIARY: "auxiliary" }, + workers: [ + { + name: "auxiliary", + modules: true, + scriptPath: "auxiliary.mjs", }, - }, - } - }); - `, - "a.test.ts": dedent` - import { env } from "cloudflare:test"; - import { it, expect } from "vitest"; - it("does something", async () => { - expect(globalThis.THING).toBe(undefined); - globalThis.THING = true; - - expect(await env.NAMESPACE.get("key")).toBe(null); - await env.NAMESPACE.put("key", "value"); - - const response = await env.AUXILIARY.fetch("https://example.com"); - expect(await response.text()).toBe("1"); - }); - `, - "b.test.ts": dedent` - import { env } from "cloudflare:test"; - import { it, expect } from "vitest"; - it("does something else", async () => { - expect(globalThis.THING).toBe(true); - - expect(await env.NAMESPACE.get("key")).toBe("value"); - - const response = await env.AUXILIARY.fetch("https://example.com"); - expect(await response.text()).toBe("2"); - }); - `, + ], + }, + }), + "a.test.ts": dedent/* javascript */ ` + import { env } from "cloudflare:test"; + import { it, expect } from "vitest"; + it("does something", async () => { + expect(globalThis.THING).toBe(undefined); + globalThis.THING = true; + + expect(await env.NAMESPACE.get("key")).toBe(null); + await env.NAMESPACE.put("key", "value"); + + const response = await env.AUXILIARY.fetch("https://example.com"); + expect(await response.text()).toBe("1"); + }); + `, + "b.test.ts": dedent/* javascript */ ` + import { env } from "cloudflare:test"; + import { it, expect } from "vitest"; + it("does something else", async () => { + expect(globalThis.THING).toBe(true); + + expect(await env.NAMESPACE.get("key")).toBe("value"); + + const response = await env.AUXILIARY.fetch("https://example.com"); + expect(await response.text()).toBe("2"); + }); + `, }); - let result = await vitestRun(); - expect(await result.exitCode).toBe(0); - - // Check allows concurrent tests - await seed({ - "a.test.ts": dedent` - import { env } from "cloudflare:test"; - import { it, expect } from "vitest"; - it.concurrent("does something", () => {}); - `, - "b.test.ts": dedent` - import { env } from "cloudflare:test"; - import { it, expect } from "vitest"; - it.concurrent("does something else", () => {}); - `, + const result = await vitestRun({ + flags: ["--no-isolate", "--max-workers=1"], }); - result = await vitestRun(); expect(await result.exitCode).toBe(0); } ); diff --git a/packages/vitest-pool-workers/test/snapshots.test.ts b/packages/vitest-pool-workers/test/snapshots.test.ts index 5286b8bc312b..5588ff0d9dc6 100644 --- a/packages/vitest-pool-workers/test/snapshots.test.ts +++ b/packages/vitest-pool-workers/test/snapshots.test.ts @@ -2,7 +2,7 @@ import { existsSync } from "node:fs"; import fs from "node:fs/promises"; import path from "node:path"; import dedent from "ts-dedent"; -import { minimalVitestConfig, test } from "./helpers"; +import { test, vitestConfig } from "./helpers"; test( "disk snapshots", @@ -10,7 +10,7 @@ test( async ({ expect, seed, vitestRun, tmpPath }) => { // Check writes new snapshots await seed({ - "vitest.config.mts": minimalVitestConfig, + "vitest.config.mts": vitestConfig(), "index.test.ts": dedent` import { it, expect } from "vitest"; it("matches snapshot", () => { @@ -118,7 +118,7 @@ test.skipIf(process.platform === "win32")( async ({ expect, seed, vitestRun, tmpPath }) => { // Check writes new snapshots await seed({ - "vitest.config.mts": minimalVitestConfig, + "vitest.config.mts": vitestConfig(), "index.test.ts": dedent` import { it, expect } from "vitest"; it("matches snapshot", () => { @@ -148,7 +148,7 @@ test.skipIf(process.platform === "win32")( // Check fails if snapshots differ await seed({ - "vitest.config.mts": minimalVitestConfig, + "vitest.config.mts": vitestConfig(), "index.test.ts": dedent` import { it, expect } from "vitest"; it("matches snapshot", () => { diff --git a/packages/vitest-pool-workers/test/validation.test.ts b/packages/vitest-pool-workers/test/validation.test.ts index 745f9b7f7c54..51122c1a15e3 100644 --- a/packages/vitest-pool-workers/test/validation.test.ts +++ b/packages/vitest-pool-workers/test/validation.test.ts @@ -1,6 +1,6 @@ import path from "node:path"; import dedent from "ts-dedent"; -import { test } from "./helpers"; +import { test, vitestConfig } from "./helpers"; test( "formats config validation errors", @@ -10,81 +10,45 @@ test( // Check top-level options validated await seed({ - "vitest.config.mts": dedent` - import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; - export default defineWorkersConfig({ - test: { - poolOptions: { - workers: { - singleWorker: 42, - isolatedStorage: "yes please", - miniflare: [], - wrangler: "./wrangler.toml" - }, - }, - } - }); - `, + "vitest.config.mts": vitestConfig({ + miniflare: [], + wrangler: "./wrangler.toml", + }), "index.test.ts": "", }); let result = await vitestRun(); expect(await result.exitCode).toBe(1); let expected = dedent` - TypeError: Unexpected pool options in project ${path.join(tmpPathName, "vitest.config.mts")}: - { - test: { - poolOptions: { - workers: { - singleWorker: 42, - ^ Expected boolean, received number - isolatedStorage: 'yes please', - ^ Expected boolean, received string - miniflare: [], - ^ Expected object, received array - wrangler: './wrangler.toml', - ^ Expected object, received string - }, - }, - }, - } - `.replaceAll("\t", " "); + TypeError: Unexpected options in project ${path.join(tmpPathName, "vitest.config.mts")}: + { + miniflare: [], + ^ Expected object, received array + wrangler: './wrangler.toml', + ^ Expected object, received string + } + `; expect(result.stderr).toMatch(expected); // Check `miniflare` options validated with correct error paths await seed({ - "vitest.config.mts": dedent` - import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; - export default defineWorkersConfig({ - test: { - poolOptions: { - workers: { - miniflare: { - compatibilityDate: { year: 2024, month: 1, day: 1 } - }, - }, - }, - } - }); - `, + "vitest.config.mts": vitestConfig({ + miniflare: { + compatibilityDate: { year: 2024, month: 1, day: 1 }, + }, + }), "index.test.ts": "", }); result = await vitestRun(); expect(await result.exitCode).toBe(1); expected = dedent` - TypeError: Unexpected pool options in project ${path.join(tmpPathName, "vitest.config.mts")}: - { - test: { - poolOptions: { - workers: { - miniflare: { - compatibilityDate: { year: 2024, month: 1, day: 1 }, - ^ Expected string, received object - }, - }, - }, - }, - } - `.replaceAll("\t", " "); + TypeError: Unexpected options in project ${path.join(tmpPathName, "vitest.config.mts")}: + { + miniflare: { + compatibilityDate: { year: 2024, month: 1, day: 1 }, + ^ Expected string, received object + }, + } + `; expect(result.stderr).toMatch(expected); } ); @@ -97,69 +61,49 @@ test( // Check with no entrypoint await seed({ - "vitest.config.mts": dedent` - import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; - export default defineWorkersConfig({ - test: { - poolOptions: { - workers: { - singleWorker: true, - miniflare: { - compatibilityDate: "2024-01-01", - compatibilityFlags: ["nodejs_compat"], - }, - }, - }, - } - }); - `, - "index.test.ts": dedent` - import { SELF } from "cloudflare:test"; - import { it, expect } from "vitest"; - it("sends request", async () => { - const response = await SELF.fetch("https://example.com/"); - expect(response.ok).toBe(true); - }); - `, + "vitest.config.mts": vitestConfig({ + miniflare: { + compatibilityDate: "2025-12-02", + compatibilityFlags: ["nodejs_compat"], + }, + }), + "index.test.ts": dedent/* javascript */ ` + import { SELF } from "cloudflare:test"; + import { it, expect } from "vitest"; + it("sends request", async () => { + const response = await SELF.fetch("https://example.com/"); + expect(response.ok).toBe(true); + }); + `, }); let result = await vitestRun(); expect(await result.exitCode).toBe(1); let expected = dedent` - Error: Using service bindings to the current worker requires \`poolOptions.workers.main\` to be set to your worker's entrypoint - `; + Error: Using service bindings to the current worker requires \`poolOptions.workers.main\` to be set to your worker's entrypoint + `; expect(result.stderr).toMatch(expected); // Check with service worker await seed({ - "vitest.config.mts": dedent` - import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; - export default defineWorkersConfig({ - test: { - poolOptions: { - workers: { - main: "./index.ts", - singleWorker: true, - miniflare: { - compatibilityDate: "2024-01-01", - compatibilityFlags: ["nodejs_compat"], - }, - }, - }, - } - }); - `, - "index.ts": dedent` - addEventListener("fetch", (event) => { - event.respondWith(new Response("body")); - }); - `, + "vitest.config.mts": vitestConfig({ + main: "./index.ts", + miniflare: { + compatibilityDate: "2025-12-02", + compatibilityFlags: ["nodejs_compat"], + }, + }), + "index.ts": dedent/* javascript */ ` + addEventListener("fetch", (event) => { + event.respondWith(new Response("body")); + }); + `, }); result = await vitestRun(); expect(await result.exitCode).toBe(1); expected = dedent` - ${path.join(tmpPathName, "index.ts")} does not export a default entrypoint. \`@cloudflare/vitest-pool-workers\` does not support service workers or named entrypoints for \`SELF\`. - If you're using service workers, please migrate to the modules format: https://developers.cloudflare.com/workers/reference/migrate-to-module-workers. - `; + ${path.join(tmpPathName, "index.ts")} does not export a default entrypoint. \`@cloudflare/vitest-pool-workers\` does not support service workers or named entrypoints for \`SELF\`. + If you're using service workers, please migrate to the modules format: https://developers.cloudflare.com/workers/reference/migrate-to-module-workers. + `; expect(result.stderr).toMatch(expected); } ); diff --git a/packages/vitest-pool-workers/test/watch.test.ts b/packages/vitest-pool-workers/test/watch.test.ts index 646743974d29..3203c2940322 100644 --- a/packages/vitest-pool-workers/test/watch.test.ts +++ b/packages/vitest-pool-workers/test/watch.test.ts @@ -1,5 +1,5 @@ import dedent from "ts-dedent"; -import { minimalVitestConfig, test, waitFor } from "./helpers"; +import { test, vitestConfig, waitFor } from "./helpers"; test("automatically re-runs unit tests", async ({ expect, @@ -7,15 +7,15 @@ test("automatically re-runs unit tests", async ({ vitestDev, }) => { await seed({ - "vitest.config.mts": minimalVitestConfig, - "index.ts": dedent` + "vitest.config.mts": vitestConfig(), + "index.ts": dedent/* javascript */ ` export default { async fetch(request, env, ctx) { return new Response("wrong"); } } `, - "index.test.ts": dedent` + "index.test.ts": dedent/* javascript */ ` import { env, createExecutionContext, waitOnExecutionContext } from "cloudflare:test"; import { it, expect } from "vitest"; import worker from "./index"; @@ -30,12 +30,12 @@ test("automatically re-runs unit tests", async ({ }); const result = vitestDev(); await waitFor(() => { - expect(result.stdout).toMatch("expected 'wrong' to be 'correct'"); - expect(result.stdout).toMatch("Tests 1 failed"); + expect(result.stderr).toMatch("expected 'wrong' to be 'correct'"); + expect(result.stderr).toMatch("Failed Tests 1"); }); await seed({ - "index.ts": dedent` + "index.ts": dedent/* javascript */ ` export default { async fetch(request, env, ctx) { return new Response("correct"); @@ -54,31 +54,21 @@ test("automatically re-runs integration tests", async ({ vitestDev, }) => { await seed({ - "vitest.config.mts": dedent` - import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; - export default defineWorkersConfig({ - test: { - poolOptions: { - workers: { - main: "./index.ts", - singleWorker: true, - miniflare: { - compatibilityDate: "2024-01-01", - compatibilityFlags: ["nodejs_compat"], - }, - }, - }, - } - }); - `, - "index.ts": dedent` + "vitest.config.mts": vitestConfig({ + main: "./index.ts", + miniflare: { + compatibilityDate: "2025-12-02", + compatibilityFlags: ["nodejs_compat"], + }, + }), + "index.ts": dedent/* javascript */ ` export default { async fetch(request, env, ctx) { return new Response("wrong"); } } `, - "index.test.ts": dedent` + "index.test.ts": dedent/* javascript */ ` import { SELF } from "cloudflare:test"; import { it, expect } from "vitest"; it("sends request", async () => { @@ -89,12 +79,12 @@ test("automatically re-runs integration tests", async ({ }); const result = vitestDev(); await waitFor(() => { - expect(result.stdout).toMatch("expected 'wrong' to be 'correct'"); - expect(result.stdout).toMatch("Tests 1 failed"); + expect(result.stderr).toMatch("expected 'wrong' to be 'correct'"); + expect(result.stderr).toMatch("Failed Tests 1"); }); await seed({ - "index.ts": dedent` + "index.ts": dedent/* javascript */ ` export default { async fetch(request, env, ctx) { return new Response("correct"); @@ -113,29 +103,19 @@ test("automatically reset module graph", async ({ vitestDev, }) => { await seed({ - "vitest.config.mts": dedent` - import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; - export default defineWorkersConfig({ - test: { - poolOptions: { - workers: { - main: "./index.ts", - singleWorker: true, - miniflare: { - compatibilityDate: "2024-01-01", - compatibilityFlags: ["nodejs_compat"], - }, - }, - }, - } - }); - `, - "answer.ts": dedent` + "vitest.config.mts": vitestConfig({ + main: "./index.ts", + miniflare: { + compatibilityDate: "2025-12-02", + compatibilityFlags: ["nodejs_compat"], + }, + }), + "answer.ts": dedent/* javascript */ ` export function getAnswer() { return "wrong"; } `, - "index.ts": dedent` + "index.ts": dedent/* javascript */ ` import { getAnswer } from "./answer"; export default { @@ -145,7 +125,7 @@ test("automatically reset module graph", async ({ } } `, - "index.test.ts": dedent` + "index.test.ts": dedent/* javascript */ ` import { env, createExecutionContext, waitOnExecutionContext } from "cloudflare:test"; import { it, expect, vi } from "vitest"; import worker from "./index"; @@ -172,7 +152,7 @@ test("automatically reset module graph", async ({ // Trigger a re-run by updating the test file with an extra test. await seed({ - "index.test.ts": dedent` + "index.test.ts": dedent/* javascript */ ` import { env, createExecutionContext, waitOnExecutionContext } from "cloudflare:test"; import { it, expect, vi } from "vitest"; import worker from "./index"; diff --git a/packages/vitest-pool-workers/tsconfig.emit.json b/packages/vitest-pool-workers/tsconfig.emit.json deleted file mode 100644 index a029494da0fb..000000000000 --- a/packages/vitest-pool-workers/tsconfig.emit.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "dist", - "noEmit": false, - "declaration": true, - "emitDeclarationOnly": true, - "incremental": false - }, - // Only want to emit `.d.ts` for `/config` sub-export - "include": ["./src/shared/types-global.d.ts", "./src/config/**/*.ts"] -} diff --git a/packages/vitest-pool-workers/tsconfig.json b/packages/vitest-pool-workers/tsconfig.json index 3c1af3f46121..5d92346e0d54 100644 --- a/packages/vitest-pool-workers/tsconfig.json +++ b/packages/vitest-pool-workers/tsconfig.json @@ -4,19 +4,16 @@ "alwaysStrict": true, "forceConsistentCasingInFileNames": true, "module": "esnext", - "lib": ["esnext"], - "paths": { - "@cloudflare/vitest-pool-workers/config": ["./src/config"] - } + "lib": ["esnext"] }, "exclude": ["./scripts/**/rtti.ts"], "include": [ "./scripts/**/*", - "./src/config/**/*.ts", "./src/pool/**/*.ts", "./src/shared/**/*.ts", "./test/**/*.ts", "./vitest.config.*ts", - "./vitest.workspace.ts" + "./vitest.workspace.ts", + "./tsdown.config.ts" ] } diff --git a/packages/vitest-pool-workers/tsdown.config.ts b/packages/vitest-pool-workers/tsdown.config.ts new file mode 100644 index 000000000000..47798405a84a --- /dev/null +++ b/packages/vitest-pool-workers/tsdown.config.ts @@ -0,0 +1,85 @@ +import { readdirSync } from "node:fs"; +import path from "node:path"; +import { defineConfig } from "tsdown"; +import { getBuiltinModules } from "./scripts/rtti/query.mjs"; +import type { UserConfig } from "tsdown"; + +const pkgRoot = path.resolve(import.meta.dirname); + +function* walk(rootPath: string): Generator { + for (const entry of readdirSync(rootPath, { withFileTypes: true })) { + const filePath = path.join(rootPath, entry.name); + if (entry.isDirectory()) { + yield* walk(filePath); + } else { + yield filePath; + } + } +} + +// Build pool, worker and libs +const libPaths = [ + ...walk(path.join(pkgRoot, "src/worker/lib")), + ...walk(path.join(pkgRoot, "src/worker/node")), +]; + +const commonOptions: UserConfig = { + platform: "node", + target: "esnext", + format: "esm", + bundle: true, + external: [ + // Cloudflare/workerd built-ins + /cloudflare:.*/, + /workerd:.*/, + // Virtual/runtime modules + "__VITEST_POOL_WORKERS_DEFINES", + "__VITEST_POOL_WORKERS_USER_OBJECT", + // All npm packages (previously handled by packages: "external") + "cjs-module-lexer", + "esbuild", + "miniflare", + "semver", + "semver/*", + "wrangler", + "zod", + "undici", + "undici/*", + // Peer dependencies + "vitest", + "vitest/*", + "@vitest/runner", + "@vitest/snapshot", + "@vitest/snapshot/*", + ], + sourcemap: true, + outDir: path.join(pkgRoot, "dist"), +}; +export default defineConfig(async () => { + const builtinModules = await getBuiltinModules(); + return [ + { + ...commonOptions, + entry: path.join(pkgRoot, "src", "pool", "index.ts"), + outDir: path.join(pkgRoot, "dist", "pool"), + dts: true, + define: { + VITEST_POOL_WORKERS_DEFINE_BUILTIN_MODULES: + JSON.stringify(builtinModules), + }, + }, + { + ...commonOptions, + entry: [ + path.join(pkgRoot, "src", "worker", "index.ts"), + ...libPaths.filter((libPath) => /\.m?ts$/.test(libPath)), + ], + outDir: path.join(pkgRoot, "dist", "worker"), + dts: false, + define: { + VITEST_POOL_WORKERS_DEFINE_BUILTIN_MODULES: + JSON.stringify(builtinModules), + }, + }, + ]; +}); diff --git a/packages/vitest-pool-workers/types/cloudflare-test.d.ts b/packages/vitest-pool-workers/types/cloudflare-test.d.ts index b74be8f5ae2b..f748079473ee 100644 --- a/packages/vitest-pool-workers/types/cloudflare-test.d.ts +++ b/packages/vitest-pool-workers/types/cloudflare-test.d.ts @@ -63,8 +63,6 @@ declare module "cloudflare:test" { ): Promise; /** * Gets the IDs of all objects that have been created in the `namespace`. - * Respects `isolatedStorage` if enabled, i.e. objects created in a different - * test won't be returned. */ export function listDurableObjectIds( namespace: DurableObjectNamespace diff --git a/packages/workers-shared/package.json b/packages/workers-shared/package.json index ab3e61a482eb..cf1450a172eb 100644 --- a/packages/workers-shared/package.json +++ b/packages/workers-shared/package.json @@ -43,7 +43,7 @@ }, "devDependencies": { "@cloudflare/eslint-config-shared": "workspace:*", - "@cloudflare/vitest-pool-workers": "^0.7.0", + "@cloudflare/vitest-pool-workers": "catalog:vitest-3", "@cloudflare/workers-tsconfig": "workspace:*", "@cloudflare/workers-types": "catalog:default", "@sentry/cli": "^2.37.0", @@ -55,7 +55,7 @@ "rimraf": "catalog:default", "toucan-js": "4.0.0", "typescript": "catalog:default", - "vitest": "~2.1.0", + "vitest": "catalog:vitest-3", "zod": "^3.22.3" }, "engines": { diff --git a/packages/workflows-shared/package.json b/packages/workflows-shared/package.json index 9695cc88a9e9..e40e329a2011 100644 --- a/packages/workflows-shared/package.json +++ b/packages/workflows-shared/package.json @@ -41,7 +41,7 @@ }, "devDependencies": { "@cloudflare/eslint-config-shared": "workspace:*", - "@cloudflare/vitest-pool-workers": "^0.8.19", + "@cloudflare/vitest-pool-workers": "catalog:vitest-3", "@cloudflare/workers-tsconfig": "workspace:*", "@cloudflare/workers-types": "catalog:default", "@types/mime": "^3.0.4", @@ -49,7 +49,7 @@ "eslint": "catalog:default", "rimraf": "catalog:default", "typescript": "catalog:default", - "vitest": "catalog:default" + "vitest": "catalog:vitest-3" }, "engines": { "node": ">=18.0.0" diff --git a/packages/workflows-shared/tests/engine.test.ts b/packages/workflows-shared/tests/engine.test.ts index 09c9e5e5b807..bb4641674a24 100644 --- a/packages/workflows-shared/tests/engine.test.ts +++ b/packages/workflows-shared/tests/engine.test.ts @@ -188,14 +188,17 @@ describe("Engine", () => { // supposed to error out } - await engineStub.receiveEvent({ + // Get a new stub since we've just aborted the durable object + const newStub = env.ENGINE.get(env.ENGINE.idFromName("MOCK-INSTANCE-ID")); + + await newStub.receiveEvent({ type: "event-type-1", timestamp: new Date(), payload: {}, }); await vi.waitUntil(async () => { - const logs = (await engineStub.readLogs()) as EngineLogs; + const logs = (await newStub.readLogs()) as EngineLogs; return logs.logs.filter( (val) => val.event == InstanceEvent.WORKFLOW_SUCCESS ); diff --git a/packages/workflows-shared/vitest.config.ts b/packages/workflows-shared/vitest.config.ts index d102e7743280..c124f987a1ba 100644 --- a/packages/workflows-shared/vitest.config.ts +++ b/packages/workflows-shared/vitest.config.ts @@ -4,8 +4,6 @@ export default defineWorkersProject({ test: { poolOptions: { workers: { - singleWorker: true, - isolatedStorage: true, main: "src/index.ts", miniflare: { compatibilityDate: "2025-02-04", diff --git a/packages/wrangler/e2e/vitest.config.mts b/packages/wrangler/e2e/vitest.config.mts index 74fcd53e018e..78558e4ddc7e 100644 --- a/packages/wrangler/e2e/vitest.config.mts +++ b/packages/wrangler/e2e/vitest.config.mts @@ -4,11 +4,9 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { testTimeout: 90_000, - poolOptions: { - threads: { - singleThread: true, - }, - }, + pool: "threads", + maxWorkers: 1, + isolate: false, include: [process.env.WRANGLER_E2E_TEST_FILE || "e2e/**/*.test.ts"], outputFile: process.env.TEST_REPORT_PATH ?? ".e2e-test-report/index.html", globalSetup: path.resolve(__dirname, "./validate-environment.ts"), diff --git a/packages/wrangler/package.json b/packages/wrangler/package.json index f4473c591fec..8ca85fa87522 100644 --- a/packages/wrangler/package.json +++ b/packages/wrangler/package.json @@ -110,7 +110,7 @@ "@types/supports-color": "^8.1.1", "@types/ws": "^8.5.7", "@types/yargs": "^17.0.22", - "@vitest/ui": "catalog:default", + "@vitest/ui": "catalog:vitest-3", "@webcontainer/env": "^1.1.0", "capnweb": "^0.1.0", "chalk": "^5.2.0", @@ -141,7 +141,7 @@ "mime": "^3.0.0", "minimatch": "^5.1.0", "mock-socket": "^9.3.1", - "msw": "2.12.0", + "msw": "catalog:default", "node-forge": "^1.3.1", "open": "^8.4.0", "p-queue": "^9.0.0", @@ -165,7 +165,7 @@ "typescript": "catalog:default", "undici": "catalog:default", "update-check": "^1.5.4", - "vitest": "catalog:default", + "vitest": "catalog:vitest-3", "vitest-websocket-mock": "^0.4.0", "ws": "catalog:default", "xxhash-wasm": "^1.0.1", diff --git a/packages/wrangler/src/__tests__/index.test.ts b/packages/wrangler/src/__tests__/index.test.ts index b503ecffe19f..72e1640c84f0 100644 --- a/packages/wrangler/src/__tests__/index.test.ts +++ b/packages/wrangler/src/__tests__/index.test.ts @@ -40,6 +40,7 @@ describe("wrangler", () => { wrangler init [name] 📥 Initialize a basic Worker wrangler dev [script] 👂 Start a local server for developing your Worker + wrangler codemod [name] 🔨 Apply a code modification to your project [experimental] wrangler deploy [script] 🆙 Deploy a Worker to Cloudflare wrangler setup 🪄 Setup a project to work on Cloudflare [experimental] wrangler deployments 🚢 List and view the current and past deployments for your Worker @@ -105,6 +106,7 @@ describe("wrangler", () => { wrangler init [name] 📥 Initialize a basic Worker wrangler dev [script] 👂 Start a local server for developing your Worker + wrangler codemod [name] 🔨 Apply a code modification to your project [experimental] wrangler deploy [script] 🆙 Deploy a Worker to Cloudflare wrangler setup 🪄 Setup a project to work on Cloudflare [experimental] wrangler deployments 🚢 List and view the current and past deployments for your Worker diff --git a/packages/wrangler/src/codemod.ts b/packages/wrangler/src/codemod.ts new file mode 100644 index 000000000000..8318d7291bfc --- /dev/null +++ b/packages/wrangler/src/codemod.ts @@ -0,0 +1,225 @@ +import assert from "node:assert"; +import { existsSync } from "node:fs"; +import path from "node:path"; +import { UserError } from "@cloudflare/workers-utils"; +import * as recast from "recast"; +import { transformFile } from "./autoconfig/c3-vendor/codemod"; +import { createCommand } from "./core/create-command"; +import { logger } from "./logger"; + +const b = recast.types.builders; +const t = recast.types.namedTypes; + +function isNamedProp( + prop: unknown, + name: string +): prop is + | recast.types.namedTypes.ObjectProperty + | recast.types.namedTypes.Property { + return ( + (t.Property.check(prop) || t.ObjectProperty.check(prop)) && + t.Identifier.check(prop.key) && + prop.key.name === name + ); +} + +function vitestPoolV3ToV4(args: string | undefined) { + const filePathTS = path.join(process.cwd(), `vitest.config.ts`); + const filePathJS = path.join(process.cwd(), `vitest.config.js`); + + let filePath: string; + + if (args) { + if (!existsSync(args)) { + throw new UserError( + `Selected Vitest config file does not exist: '${args}'` + ); + } + filePath = path.join(process.cwd(), args); + } else if (existsSync(filePathTS)) { + filePath = filePathTS; + } else if (existsSync(filePathJS)) { + filePath = filePathJS; + } else { + throw new UserError("Could not find Vitest config file to modify"); + } + + logger.log(filePath); + + transformFile(filePath, { + visitProgram(n) { + // Find the existing import of @cloudflare/vitest-pool-workers/config + // ``` + // import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; + // ``` + const importAst = n.node.body.find( + (s) => + s.type === "ImportDeclaration" && + s.source.value === "@cloudflare/vitest-pool-workers/config" && + s.specifiers?.some( + (specifier) => + specifier.type === "ImportSpecifier" && + specifier.imported?.name === "defineWorkersProject" + ) + ); + if (!importAst) { + throw new UserError( + "Could not find import of `@cloudflare/vitest-pool-workers/config`" + ); + } + + const lastImportIndex = n.node.body.findLastIndex( + (statement) => statement.type === "ImportDeclaration" + ); + const lastImport = n.get("body", lastImportIndex); + const vitestConfigAst = b.importDeclaration( + [b.importSpecifier(b.identifier("defineConfig"))], + b.stringLiteral("vitest/config") + ); + + lastImport.insertAfter(vitestConfigAst); + + assert(importAst.type === "ImportDeclaration"); + + importAst.source.value = "@cloudflare/vitest-pool-workers"; + importAst.specifiers = [ + b.importSpecifier(b.identifier("cloudflareTest")), + ...(importAst.specifiers?.filter( + (specifier) => + !( + specifier.type === "ImportSpecifier" && + specifier.imported?.name === "defineWorkersProject" + ) + ) ?? []), + ]; + + return this.traverse(n); + }, + visitCallExpression: function (n) { + // Add the imported plugin to the config + // ``` + // defineConfig({ + // plugins: [cloudflare({ viteEnvironment: { name: 'ssr' } })], + // }); + const callee = n.node.callee as recast.types.namedTypes.Identifier; + if (callee.name !== "defineWorkersProject") { + return this.traverse(n); + } + callee.name = "defineConfig"; + + const config = n.node.arguments[0]; + assert( + t.ObjectExpression.check(config), + "defineWorkersProject() is called with a function and not an object, and so is too complex to apply a codemod to. Please refer to the migration docs to perform the migration manually." + ); + + const testProp = config.properties.find((prop) => + isNamedProp(prop, "test") + ); + + assert( + testProp && t.ObjectExpression.check(testProp.value), + "Could not find `test` property in config" + ); + + const poolOptionsProp = testProp.value.properties.find((prop) => + isNamedProp(prop, "poolOptions") + ); + + assert( + poolOptionsProp && t.ObjectExpression.check(poolOptionsProp.value), + "Could not find `test.poolOptions` property in config" + ); + + const poolOptionsWorkersProp = poolOptionsProp.value.properties.find( + (prop) => isNamedProp(prop, "workers") + ); + + assert( + poolOptionsWorkersProp && + (t.ObjectExpression.check(poolOptionsWorkersProp.value) || + t.FunctionExpression.check(poolOptionsWorkersProp.value) || + t.ArrowFunctionExpression.check(poolOptionsWorkersProp.value)), + "Could not find `test.poolOptions.workers` property in config" + ); + + const pluginsProp = config.properties.find((prop) => + isNamedProp(prop, "plugins") + ); + + if (pluginsProp) { + assert(t.ArrayExpression.check(pluginsProp.value)); + pluginsProp.value.elements.unshift( + b.callExpression(b.identifier("cloudflareTest"), [ + poolOptionsWorkersProp.value, + ]) + ); + } else { + config.properties.unshift( + b.objectProperty( + b.identifier("plugins"), + b.arrayExpression([ + b.callExpression(b.identifier("cloudflareTest"), [ + poolOptionsWorkersProp.value, + ]), + ]) + ) + ); + } + testProp.value.properties = testProp.value.properties.filter( + (prop) => !isNamedProp(prop, "poolOptions") + ); + return false; + }, + }); +} + +const validCodemods = new Map void>([ + ["vitest-pool-v3-to-v4", vitestPoolV3ToV4], +]); + +export const codemodCommand = createCommand({ + behaviour: { + provideConfig: false, + overrideExperimentalFlags: (args) => ({ + MULTIWORKER: Array.isArray(args.config), + RESOURCES_PROVISION: args.experimentalProvision ?? false, + AUTOCREATE_RESOURCES: args.experimentalAutoCreate, + }), + }, + metadata: { + description: "🔨 Apply a code modification to your project", + owner: "Workers: Authoring and Testing", + status: "experimental", + }, + positionalArgs: ["name"], + args: { + name: { + describe: "The name of the codemod you want to apply", + type: "string", + }, + args: { + describe: "Extra arguments to pass to the selected codemod", + type: "string", + }, + }, + async validateArgs(args) { + if (args.name !== undefined && !validCodemods.has(args.name)) { + throw new UserError( + `${args.name} is not a valid codemod name. Valid names are ${[...validCodemods.keys()].join(", ")}` + ); + } + }, + async handler(args) { + if (args.name === undefined || args.name === "") { + logger.log("Apply one of the following codemods:"); + for (const name of validCodemods.keys()) { + logger.log(`- ${name}`); + } + } else { + const codemod = validCodemods.get(args.name); + assert(codemod); + await codemod(args.args); + } + }, +}); diff --git a/packages/wrangler/src/index.ts b/packages/wrangler/src/index.ts index 3fcb21eba4a3..18caa659bd5f 100644 --- a/packages/wrangler/src/index.ts +++ b/packages/wrangler/src/index.ts @@ -26,6 +26,7 @@ import { } from "./cert/cert"; import { checkNamespace, checkStartupCommand } from "./check/commands"; import { cloudchamber } from "./cloudchamber"; +import { codemodCommand } from "./codemod"; import { getDefaultEnvFiles, loadDotEnv } from "./config/dot-env"; import { containers } from "./containers"; import { demandSingleValue } from "./core"; @@ -563,6 +564,14 @@ export function createCLIParser(argv: string[]) { ]); registry.registerNamespace("dev"); + registry.define([ + { + command: "wrangler codemod", + definition: codemodCommand, + }, + ]); + registry.registerNamespace("codemod"); + registry.define([ { command: "wrangler deploy", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 336232dbf24c..f51417c5ba65 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,20 +16,23 @@ catalogs: specifier: ^8.35.1 version: 8.46.3 '@vitest/runner': - specifier: ~3.2.0 - version: 3.2.3 + specifier: 4.0.16 + version: 4.0.16 '@vitest/snapshot': - specifier: ~3.2.0 - version: 3.2.3 + specifier: 4.0.16 + version: 4.0.16 '@vitest/ui': - specifier: ~3.2.0 - version: 3.2.3 + specifier: 4.0.16 + version: 4.0.16 esbuild: specifier: 0.27.0 version: 0.27.0 eslint: specifier: ^9.39.1 version: 9.39.1 + msw: + specifier: 2.12.4 + version: 2.12.4 playwright-chromium: specifier: ^1.56.1 version: 1.56.1 @@ -49,8 +52,8 @@ catalogs: specifier: ^5.4.14 version: 5.4.14 vitest: - specifier: ~3.2.0 - version: 3.2.3 + specifier: 4.0.16 + version: 4.0.16 ws: specifier: 8.18.0 version: 8.18.0 @@ -58,6 +61,16 @@ catalogs: vite: specifier: 7.1.12 version: 7.1.12 + vitest-3: + '@cloudflare/vitest-pool-workers': + specifier: ^0.10.0 + version: 0.10.15 + '@vitest/ui': + specifier: 3.2.4 + version: 3.2.4 + vitest: + specifier: 3.2.4 + version: 3.2.4 overrides: '@types/react-dom@18>@types/react': ^18 @@ -65,8 +78,9 @@ overrides: '@types/react-transition-group>@types/react': ^18 '@cloudflare/elements>@types/react': ^18 '@types/node': ^20.19.9 - vitest>vite: ^5.0.0 '@types/node>undici-types': 7.14.0 + vitest@4>vite: 7.1.12 + vitest@3>vite: ^5.0.0 patchedDependencies: '@cloudflare/component-listbox@1.10.6': @@ -145,7 +159,7 @@ importers: version: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) fixtures/additional-modules: devDependencies: @@ -163,7 +177,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -187,7 +201,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -226,7 +240,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -247,7 +261,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -271,7 +285,7 @@ importers: version: 7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -286,7 +300,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -304,7 +318,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -340,7 +354,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -367,7 +381,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -388,7 +402,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -412,7 +426,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -436,7 +450,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) fixtures/isomorphic-random-example: {} @@ -461,7 +475,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -494,7 +508,7 @@ importers: version: 7.0.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -519,7 +533,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -556,7 +570,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -574,7 +588,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -607,7 +621,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -628,7 +642,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -649,7 +663,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -677,7 +691,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -698,7 +712,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -716,7 +730,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -737,7 +751,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -758,7 +772,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -779,7 +793,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -819,7 +833,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -840,7 +854,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -855,7 +869,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -876,7 +890,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -897,7 +911,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -915,7 +929,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -933,7 +947,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -951,7 +965,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -969,7 +983,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -987,7 +1001,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1005,7 +1019,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1026,7 +1040,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1041,7 +1055,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1056,7 +1070,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1128,7 +1142,7 @@ importers: version: 4.20251217.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1162,6 +1176,9 @@ importers: fixtures/vitest-pool-workers-examples: devDependencies: + '@better-auth/stripe': + specifier: ^1.4.6 + version: 1.4.7(@better-auth/core@1.4.7(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.5(zod@4.2.1))(jose@5.9.3)(kysely@0.28.9)(nanostores@1.1.0))(better-auth@1.4.7(mysql2@3.15.3)(pg@8.16.3)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.0.16))(stripe@20.1.0(@types/node@20.19.9)) '@cloudflare/containers': specifier: ^0.0.25 version: 0.0.25 @@ -1177,6 +1194,9 @@ importers: '@types/node': specifier: ^20.19.9 version: 20.19.9 + better-auth: + specifier: ^1.4.6 + version: 1.4.7(mysql2@3.15.3)(pg@8.16.3)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.0.16) discord-api-types: specifier: 0.37.98 version: 0.37.98 @@ -1184,14 +1204,20 @@ importers: specifier: file:./module-resolution/vendor/ext-dep version: file:fixtures/vitest-pool-workers-examples/module-resolution/vendor/ext-dep jose: - specifier: ^5.2.2 + specifier: ^5.9.3 version: 5.9.3 miniflare: specifier: workspace:* version: link:../../packages/miniflare + msw: + specifier: catalog:default + version: 2.12.4(@types/node@20.19.9)(typescript@5.8.3) run-script-os: specifier: ^1.1.6 version: 1.1.6 + stripe: + specifier: ^20.0.0 + version: 20.1.0(@types/node@20.19.9) toucan-js: specifier: 4.0.0 version: 4.0.0(patch_hash=qxsfpdzvzbhq2ecirbu5xq4vlq) @@ -1203,7 +1229,7 @@ importers: version: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1217,8 +1243,8 @@ importers: specifier: ^5.5.2 version: 5.8.2 vitest: - specifier: ~3.0.7 - version: 3.0.9(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.2))(yaml@2.8.1) + specifier: catalog:default + version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.2))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1260,7 +1286,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1278,7 +1304,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1308,7 +1334,7 @@ importers: version: 2.2.3 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1338,7 +1364,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1359,7 +1385,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1380,7 +1406,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1401,7 +1427,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1422,7 +1448,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1455,7 +1481,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1468,6 +1494,9 @@ importers: '@cloudflare/workers-types': specifier: catalog:default version: 4.20251217.0 + '@types/node': + specifier: ^20.19.9 + version: 20.19.9 playwright-chromium: specifier: catalog:default version: 1.56.1 @@ -1479,7 +1508,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1500,7 +1529,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1518,7 +1547,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1584,7 +1613,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) packages/create-cloudflare: devDependencies: @@ -1724,14 +1753,14 @@ importers: specifier: catalog:default version: 7.14.0 vite: - specifier: catalog:default - version: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) + specifier: catalog:vite-plugin + version: 7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) vite-tsconfig-paths: specifier: ^4.0.8 - version: 4.2.0(typescript@5.8.3)(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) + version: 4.2.0(typescript@5.8.3)(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1)) vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) which-pm-runs: specifier: ^1.1.0 version: 1.1.0 @@ -1878,8 +1907,8 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': - specifier: ^0.7.0 - version: 0.7.8(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9) + specifier: catalog:vitest-3 + version: 0.10.15(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) '@cloudflare/workers-types': specifier: catalog:default version: 4.20251217.0 @@ -1896,8 +1925,8 @@ importers: specifier: 8.3.0 version: 8.3.0(@microsoft/api-extractor@7.52.8(@types/node@20.19.9))(jiti@2.6.0)(postcss@8.5.6)(typescript@5.9.3)(yaml@2.8.1) vitest: - specifier: ~2.1.0 - version: 2.1.9(@types/node@20.19.9)(@vitest/ui@2.1.9)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3)) + specifier: catalog:vitest-3 + version: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) packages/miniflare: dependencies: @@ -2117,8 +2146,8 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': - specifier: ^0.8.19 - version: 0.8.19(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3) + specifier: catalog:vitest-3 + version: 0.10.15(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) '@cloudflare/workers-shared': specifier: workspace:* version: link:../workers-shared @@ -2150,8 +2179,8 @@ importers: specifier: catalog:default version: 5.8.3 vitest: - specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + specifier: catalog:vitest-3 + version: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) packages/playground-preview-worker: dependencies: @@ -2374,7 +2403,7 @@ importers: version: 7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) packages/vite-plugin-cloudflare/playground: devDependencies: @@ -3414,9 +3443,6 @@ importers: packages/vitest-pool-workers: dependencies: - birpc: - specifier: 0.2.14 - version: 0.2.14 cjs-module-lexer: specifier: ^1.2.3 version: 1.2.3 @@ -3462,10 +3488,10 @@ importers: version: 7.5.1 '@vitest/runner': specifier: catalog:default - version: 3.2.3 + version: 4.0.16 '@vitest/snapshot': specifier: catalog:default - version: 3.2.3 + version: 4.0.16 capnp-es: specifier: ^0.0.11 version: 0.0.11(typescript@5.8.3) @@ -3475,6 +3501,9 @@ importers: ts-dedent: specifier: ^2.2.0 version: 2.2.0 + tsdown: + specifier: 0.16.3 + version: 0.16.3(ms@2.1.3)(typescript@5.8.3) typescript: specifier: catalog:default version: 5.8.3 @@ -3483,7 +3512,7 @@ importers: version: 7.14.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) packages/workers-editor-shared: dependencies: @@ -3667,8 +3696,8 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': - specifier: ^0.7.0 - version: 0.7.8(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9) + specifier: catalog:vitest-3 + version: 0.10.15(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) '@cloudflare/workers-tsconfig': specifier: workspace:* version: link:../workers-tsconfig @@ -3703,8 +3732,8 @@ importers: specifier: catalog:default version: 5.8.3 vitest: - specifier: ~2.1.0 - version: 2.1.9(@types/node@20.19.9)(@vitest/ui@2.1.9)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3)) + specifier: catalog:vitest-3 + version: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) zod: specifier: ^3.22.3 version: 3.22.3 @@ -3733,7 +3762,7 @@ importers: version: 20.19.9 '@vitest/ui': specifier: catalog:default - version: 3.2.3(vitest@3.2.3) + version: 4.0.16(vitest@4.0.16) cloudflare: specifier: ^5.2.0 version: 5.2.0(encoding@0.1.13) @@ -3766,7 +3795,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) xdg-app-paths: specifier: ^8.3.0 version: 8.3.0 @@ -3790,8 +3819,8 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': - specifier: ^0.8.19 - version: 0.8.19(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3) + specifier: catalog:vitest-3 + version: 0.10.15(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) '@cloudflare/workers-tsconfig': specifier: workspace:* version: link:../workers-tsconfig @@ -3814,8 +3843,8 @@ importers: specifier: catalog:default version: 5.8.3 vitest: - specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + specifier: catalog:vitest-3 + version: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) packages/wrangler: dependencies: @@ -3951,8 +3980,8 @@ importers: specifier: ^17.0.22 version: 17.0.24 '@vitest/ui': - specifier: catalog:default - version: 3.2.3(vitest@3.2.3) + specifier: catalog:vitest-3 + version: 3.2.4(vitest@3.2.4) '@webcontainer/env': specifier: ^1.1.0 version: 1.1.0 @@ -4044,8 +4073,8 @@ importers: specifier: ^9.3.1 version: 9.3.1 msw: - specifier: 2.12.0 - version: 2.12.0(@types/node@20.19.9)(typescript@5.8.3) + specifier: catalog:default + version: 2.12.4(@types/node@20.19.9)(typescript@5.8.3) node-forge: specifier: ^1.3.1 version: 1.3.1 @@ -4116,11 +4145,11 @@ importers: specifier: ^1.5.4 version: 1.5.4 vitest: - specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + specifier: catalog:vitest-3 + version: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) vitest-websocket-mock: specifier: ^0.4.0 - version: 0.4.0(vitest@3.2.3) + version: 0.4.0(vitest@3.2.4) ws: specifier: catalog:default version: 8.18.0 @@ -4503,6 +4532,34 @@ packages: resolution: {integrity: sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==} engines: {node: '>=6.9.0'} + '@better-auth/core@1.4.7': + resolution: {integrity: sha512-rNfj8aNFwPwAMYo+ahoWDsqKrV7svD3jhHSC6+A77xxKodbgV0UgH+RO21GMaZ0PPAibEl851nw5e3bsNslW/w==} + peerDependencies: + '@better-auth/utils': 0.3.0 + '@better-fetch/fetch': 1.1.21 + better-call: 1.1.5 + jose: ^6.1.0 + kysely: ^0.28.5 + nanostores: ^1.0.1 + + '@better-auth/stripe@1.4.7': + resolution: {integrity: sha512-Ekvxj0HxOJ93Cma9JTos5vdJipJ20lE6sx9McYEvggvamJWR8RkbaRWN88M+HZ9074o67W9YcQMa1m15QAUezw==} + peerDependencies: + '@better-auth/core': 1.4.7 + better-auth: 1.4.7 + stripe: ^18 || ^19 || ^20 + + '@better-auth/telemetry@1.4.7': + resolution: {integrity: sha512-k07C/FWnX6m+IxLruNkCweIxuaIwVTB2X40EqwamRVhYNBAhOYZFGLHH+PtQyM+Yf1Z4+8H6MugLOXSreXNAjQ==} + peerDependencies: + '@better-auth/core': 1.4.7 + + '@better-auth/utils@0.3.0': + resolution: {integrity: sha512-W+Adw6ZA6mgvnSnhOki270rwJ42t4XzSK6YWGF//BbVXL6SwCLWfyzBc1lN2m/4RM28KubdBKQ4X5VMoLRNPQw==} + + '@better-fetch/fetch@1.1.21': + resolution: {integrity: sha512-/ImESw0sskqlVR94jB+5+Pxjf+xBwDZF/N5+y2/q4EqD7IARUTSpPfIo8uf39SYpCxyOCtbyYpUrZ3F/k0zT4A==} + '@bugsnag/browser@8.6.0': resolution: {integrity: sha512-7UGqTGnQqXUQ09gOlWbDTFUSbeLIIrP+hML3kTOq8Zdc8nP/iuOEflXGLV2TxWBWW8xIUPc928caFPr9EcaDuw==} @@ -4734,12 +4791,8 @@ packages: '@cloudflare/kv-asset-handler@0.1.3': resolution: {integrity: sha512-FNcunDuTmEfQTLRLtA6zz+buIXUHj1soPvSWzzQFBC+n2lsy+CGf/NIrR3SEPCmsVNQj70/Jx2lViCpq+09YpQ==} - '@cloudflare/kv-asset-handler@0.3.4': - resolution: {integrity: sha512-YLPHc8yASwjNkmcDMQMY35yiWjoKAKnhUbPRszBRS0YgH+IXtsMp61j+yTcnCE3oO2DgP0U3iejLC8FTtKDC8Q==} - engines: {node: '>=16.13'} - - '@cloudflare/kv-asset-handler@0.4.0': - resolution: {integrity: sha512-+tv3z+SPp+gqTIcImN9o0hqE9xyfQjI1XD9pL6NuKjua9B1y7mNYv0S9cP+QEbA4ppVgGZEmKOvHX5G5Ei1CVA==} + '@cloudflare/kv-asset-handler@0.4.1': + resolution: {integrity: sha512-Nu8ahitGFFJztxUml9oD/DLb7Z28C8cd8F46IVQ7y5Btz575pvMY8AqZsXkX7Gds29eCKdMgIHjIvzskHgPSFg==} engines: {node: '>=18.0.0'} '@cloudflare/playwright@0.0.10': @@ -4777,20 +4830,11 @@ packages: peerDependencies: react: ^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0 - '@cloudflare/unenv-preset@2.0.2': - resolution: {integrity: sha512-nyzYnlZjjV5xT3LizahG1Iu6mnrCaxglJ04rZLpDwlDVDZ7v46lNsfxhV3A/xtfgQuSHmLnc6SVI+KwBpc3Lwg==} - peerDependencies: - unenv: 2.0.0-rc.14 - workerd: ^1.20250124.0 - peerDependenciesMeta: - workerd: - optional: true - - '@cloudflare/unenv-preset@2.3.1': - resolution: {integrity: sha512-Xq57Qd+ADpt6hibcVBO0uLG9zzRgyRhfCUgBT9s+g3+3Ivg5zDyVgLFy40ES1VdNcu8rPNSivm9A+kGP5IVaPg==} + '@cloudflare/unenv-preset@2.7.13': + resolution: {integrity: sha512-NulO1H8R/DzsJguLC0ndMuk4Ufv0KSlN+E54ay9rn9ZCQo0kpAPwwh3LhgpZ96a3Dr6L9LqW57M4CqC34iLOvw==} peerDependencies: - unenv: 2.0.0-rc.15 - workerd: ^1.20250320.0 + unenv: 2.0.0-rc.24 + workerd: ^1.20251202.0 peerDependenciesMeta: workerd: optional: true @@ -4806,34 +4850,21 @@ packages: '@cloudflare/util-markdown@1.2.15': resolution: {integrity: sha512-H8q/Msk+9Fga6iqqmff7i4mi+kraBCQWFbMEaKIRq3+HBNN5gkpizk05DSG6iIHVxCG1M3WR1FkN9CQ0ZtK4Cw==} - '@cloudflare/vitest-pool-workers@0.7.8': - resolution: {integrity: sha512-y5N2PXsuT1sjzSV03COtedET/nh3k6k8vmXfX01r8uXcw9hUZvafG5HoAiRfdrLmRpk/I7FS7D/qglPO13l/bg==} - peerDependencies: - '@vitest/runner': 2.0.x - 3.0.x - '@vitest/snapshot': 2.0.x - 3.0.x - vitest: 2.0.x - 3.0.x - - '@cloudflare/vitest-pool-workers@0.8.19': - resolution: {integrity: sha512-V2E5IEevit8xSvDM0XZTC4JWfDa22YOWRwr7FdoCHMb1hh5rFc6MVYL1wDC3V+aUwJ5toqI69L4h7xxgR+7Wjg==} + '@cloudflare/vitest-pool-workers@0.10.15': + resolution: {integrity: sha512-eISef+JvqC5xr6WBv2+kc6WEjxuKSrZ1MdMuIwdb4vsh8olqw7WHW5pLBL/UzAhbLVlXaAL1uH9UyxIlFkJe7w==} peerDependencies: - '@vitest/runner': 2.0.x - 3.1.x - '@vitest/snapshot': 2.0.x - 3.1.x - vitest: 2.0.x - 3.1.x - - '@cloudflare/workerd-darwin-64@1.20250310.0': - resolution: {integrity: sha512-LkLJO6F8lRNaCbK5sQCITi66SyCirDpffRuI5/5iILDJWQU4KVvAOKPvHrd4E5h/WDm9FGd22zMJwky7SxaNjg==} - engines: {node: '>=16'} - cpu: [x64] - os: [darwin] + '@vitest/runner': 2.0.x - 3.2.x + '@vitest/snapshot': 2.0.x - 3.2.x + vitest: 2.0.x - 3.2.x - '@cloudflare/workerd-darwin-64@1.20250417.0': - resolution: {integrity: sha512-4Adfl92aKepjxb8e6af2d+xpD2sBOADgHqvkyXsFmoLb80weMEDDRGJi1p1m5q1M78/oVnGcpdmuRCAathanRg==} + '@cloudflare/workerd-darwin-64@1.20251202.0': + resolution: {integrity: sha512-/uvEAWEukTWb1geHhbjGUeZqcSSSyYzp0mvoPUBl+l0ont4NVGao3fgwM0q8wtKvgoKCHSG6zcG23wj9Opj3Nw==} engines: {node: '>=16'} cpu: [x64] os: [darwin] - '@cloudflare/workerd-darwin-64@1.20251202.0': - resolution: {integrity: sha512-/uvEAWEukTWb1geHhbjGUeZqcSSSyYzp0mvoPUBl+l0ont4NVGao3fgwM0q8wtKvgoKCHSG6zcG23wj9Opj3Nw==} + '@cloudflare/workerd-darwin-64@1.20251210.0': + resolution: {integrity: sha512-Nn9X1moUDERA9xtFdCQ2XpQXgAS9pOjiCxvOT8sVx9UJLAiBLkfSCGbpsYdarODGybXCpjRlc77Yppuolvt7oQ==} engines: {node: '>=16'} cpu: [x64] os: [darwin] @@ -4844,20 +4875,14 @@ packages: cpu: [x64] os: [darwin] - '@cloudflare/workerd-darwin-arm64@1.20250310.0': - resolution: {integrity: sha512-WythDJQbsU3Ii1hhA7pJZLBQlHezeYWAnaMnv3gS2Exj45oF8G4chFvrO7zCzjlcJXwSeBTtQRJqxw9AiUDhyA==} - engines: {node: '>=16'} - cpu: [arm64] - os: [darwin] - - '@cloudflare/workerd-darwin-arm64@1.20250417.0': - resolution: {integrity: sha512-dSlk18F4i3T1OTzFBxx3pKpXRMP6w2xZ26+oIV32BFWrCi/HxGzUd6gVA0q37oLGqITRt8xU693J4Gl1CwC/Ag==} + '@cloudflare/workerd-darwin-arm64@1.20251202.0': + resolution: {integrity: sha512-f52xRvcI9cWRd6400EZStRtXiRC5XKEud7K5aFIbbUv0VeINltujFQQ9nHWtsF6g1quIXWkjhh5u01gPAYNNXA==} engines: {node: '>=16'} cpu: [arm64] os: [darwin] - '@cloudflare/workerd-darwin-arm64@1.20251202.0': - resolution: {integrity: sha512-f52xRvcI9cWRd6400EZStRtXiRC5XKEud7K5aFIbbUv0VeINltujFQQ9nHWtsF6g1quIXWkjhh5u01gPAYNNXA==} + '@cloudflare/workerd-darwin-arm64@1.20251210.0': + resolution: {integrity: sha512-Mg8iYIZQFnbevq/ls9eW/eneWTk/EE13Pej1MwfkY5et0jVpdHnvOLywy/o+QtMJFef1AjsqXGULwAneYyBfHw==} engines: {node: '>=16'} cpu: [arm64] os: [darwin] @@ -4868,20 +4893,14 @@ packages: cpu: [arm64] os: [darwin] - '@cloudflare/workerd-linux-64@1.20250310.0': - resolution: {integrity: sha512-LbP769tT4/5QBHSj4lCt99QIKTi6cU+wYhLfF7rEtYHBnZS2+nIw9xttAzxeERx/aFrU+mxLcYPFV8fUeVxGng==} - engines: {node: '>=16'} - cpu: [x64] - os: [linux] - - '@cloudflare/workerd-linux-64@1.20250417.0': - resolution: {integrity: sha512-27MVzOa/lENcqewC2L9EcqstXW843UhjBMcwV1umDfsjwLyZOEv6Gtm/6j5r0L0gASvkRTam3fAmtPk/gt48TA==} + '@cloudflare/workerd-linux-64@1.20251202.0': + resolution: {integrity: sha512-HYXinF5RBH7oXbsFUMmwKCj+WltpYbf5mRKUBG5v3EuPhUjSIFB84U+58pDyfBJjcynHdy3EtvTWcvh/+lcgow==} engines: {node: '>=16'} cpu: [x64] os: [linux] - '@cloudflare/workerd-linux-64@1.20251202.0': - resolution: {integrity: sha512-HYXinF5RBH7oXbsFUMmwKCj+WltpYbf5mRKUBG5v3EuPhUjSIFB84U+58pDyfBJjcynHdy3EtvTWcvh/+lcgow==} + '@cloudflare/workerd-linux-64@1.20251210.0': + resolution: {integrity: sha512-kjC2fCZhZ2Gkm1biwk2qByAYpGguK5Gf5ic8owzSCUw0FOUfQxTZUT9Lp3gApxsfTLbbnLBrX/xzWjywH9QR4g==} engines: {node: '>=16'} cpu: [x64] os: [linux] @@ -4892,20 +4911,14 @@ packages: cpu: [x64] os: [linux] - '@cloudflare/workerd-linux-arm64@1.20250310.0': - resolution: {integrity: sha512-FzWeKM6id20EMZACaDg0Kkvg1C4lvXZgLBXVI6h6xaXTNFReoyEp4v4eMrRTuja5ec5k+m5iGKjP4/bMWJp9ew==} - engines: {node: '>=16'} - cpu: [arm64] - os: [linux] - - '@cloudflare/workerd-linux-arm64@1.20250417.0': - resolution: {integrity: sha512-34qBk0htAXmUneOTQxW6/g6pjNVR91r0vJzz2FID84cAIOYVl4hZLijkjmVl+MMDU6boXUs+yDwhItdg06YvAg==} + '@cloudflare/workerd-linux-arm64@1.20251202.0': + resolution: {integrity: sha512-++L02Jdoxz7hEA9qDaQjbVU1RzQS+S+eqIi22DkPe2Tgiq2M3UfNpeu+75k5L9DGRIkZPYvwMBMbcmKvQqdIIg==} engines: {node: '>=16'} cpu: [arm64] os: [linux] - '@cloudflare/workerd-linux-arm64@1.20251202.0': - resolution: {integrity: sha512-++L02Jdoxz7hEA9qDaQjbVU1RzQS+S+eqIi22DkPe2Tgiq2M3UfNpeu+75k5L9DGRIkZPYvwMBMbcmKvQqdIIg==} + '@cloudflare/workerd-linux-arm64@1.20251210.0': + resolution: {integrity: sha512-2IB37nXi7PZVQLa1OCuO7/6pNxqisRSO8DmCQ5x/3sezI5op1vwOxAcb1osAnuVsVN9bbvpw70HJvhKruFJTuA==} engines: {node: '>=16'} cpu: [arm64] os: [linux] @@ -4916,20 +4929,14 @@ packages: cpu: [arm64] os: [linux] - '@cloudflare/workerd-windows-64@1.20250310.0': - resolution: {integrity: sha512-04OgaDzm8/8nkjF3tovB+WywZLjSdAHCQT2omXKCwH3EDd1kpd8vvzE1pErtdIyKCOf9/sArY4BhPdxRj7ijlg==} - engines: {node: '>=16'} - cpu: [x64] - os: [win32] - - '@cloudflare/workerd-windows-64@1.20250417.0': - resolution: {integrity: sha512-PDwATFioff+geVHfgTzSWsxgwjgotrdXStb0EL0lMyMT5zNmHArAnOx83CbDtud63Uv9rVX1BAfPP4tyD1O+5A==} + '@cloudflare/workerd-windows-64@1.20251202.0': + resolution: {integrity: sha512-gzeU6eDydTi7ib+Q9DD/c0hpXtqPucnHk2tfGU03mljPObYxzMkkPGgB5qxpksFvub3y4K0ChjqYxGJB4F+j3g==} engines: {node: '>=16'} cpu: [x64] os: [win32] - '@cloudflare/workerd-windows-64@1.20251202.0': - resolution: {integrity: sha512-gzeU6eDydTi7ib+Q9DD/c0hpXtqPucnHk2tfGU03mljPObYxzMkkPGgB5qxpksFvub3y4K0ChjqYxGJB4F+j3g==} + '@cloudflare/workerd-windows-64@1.20251210.0': + resolution: {integrity: sha512-Uaz6/9XE+D6E7pCY4OvkCuJHu7HcSDzeGcCGY1HLhojXhHd7yL52c3yfiyJdS8hPatiAa0nn5qSI/42+aTdDSw==} engines: {node: '>=16'} cpu: [x64] os: [win32] @@ -4993,16 +5000,6 @@ packages: resolution: {integrity: sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA==} deprecated: 'Merged into tsx: https://tsx.is' - '@esbuild-plugins/node-globals-polyfill@0.2.3': - resolution: {integrity: sha512-r3MIryXDeXDOZh7ih1l/yE9ZLORCd5e8vWg02azWRGj5SPTuoh69A2AIyn0Z31V/kHBfZ4HgWJ+OK3GTTwLmnw==} - peerDependencies: - esbuild: '*' - - '@esbuild-plugins/node-modules-polyfill@0.2.2': - resolution: {integrity: sha512-LXV7QsWJxRuMYvKbiznh+U1ilIop3g2TeKRzUxOG5X3YITc8JyyTa90BmLwqqv0YnX4v32CSlG+vsziZp9dMvA==} - peerDependencies: - esbuild: '*' - '@esbuild/aix-ppc64@0.21.5': resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} engines: {node: '>=12'} @@ -5021,12 +5018,6 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.25.2': - resolution: {integrity: sha512-wCIboOL2yXZym2cgm6mlA742s9QeJ8DjGVaL39dLN4rRwrOgOyYSnOaFPhKZGLb2ngj4EyfAFjsNJwPXZvseag==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [aix] - '@esbuild/aix-ppc64@0.25.4': resolution: {integrity: sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q==} engines: {node: '>=18'} @@ -5039,12 +5030,6 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.17.19': - resolution: {integrity: sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - '@esbuild/android-arm64@0.18.20': resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} engines: {node: '>=12'} @@ -5069,12 +5054,6 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.25.2': - resolution: {integrity: sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w==} - engines: {node: '>=18'} - cpu: [arm64] - os: [android] - '@esbuild/android-arm64@0.25.4': resolution: {integrity: sha512-bBy69pgfhMGtCnwpC/x5QhfxAz/cBgQ9enbtwjf6V9lnPI/hMyT9iWpR1arm0l3kttTr4L0KSLpKmLp/ilKS9A==} engines: {node: '>=18'} @@ -5087,12 +5066,6 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm@0.17.19': - resolution: {integrity: sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==} - engines: {node: '>=12'} - cpu: [arm] - os: [android] - '@esbuild/android-arm@0.18.20': resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} engines: {node: '>=12'} @@ -5117,12 +5090,6 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-arm@0.25.2': - resolution: {integrity: sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA==} - engines: {node: '>=18'} - cpu: [arm] - os: [android] - '@esbuild/android-arm@0.25.4': resolution: {integrity: sha512-QNdQEps7DfFwE3hXiU4BZeOV68HHzYwGd0Nthhd3uCkkEKK7/R6MTgM0P7H7FAs5pU/DIWsviMmEGxEoxIZ+ZQ==} engines: {node: '>=18'} @@ -5135,12 +5102,6 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-x64@0.17.19': - resolution: {integrity: sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - '@esbuild/android-x64@0.18.20': resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} engines: {node: '>=12'} @@ -5165,12 +5126,6 @@ packages: cpu: [x64] os: [android] - '@esbuild/android-x64@0.25.2': - resolution: {integrity: sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg==} - engines: {node: '>=18'} - cpu: [x64] - os: [android] - '@esbuild/android-x64@0.25.4': resolution: {integrity: sha512-TVhdVtQIFuVpIIR282btcGC2oGQoSfZfmBdTip2anCaVYcqWlZXGcdcKIUklfX2wj0JklNYgz39OBqh2cqXvcQ==} engines: {node: '>=18'} @@ -5183,12 +5138,6 @@ packages: cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.17.19': - resolution: {integrity: sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - '@esbuild/darwin-arm64@0.18.20': resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} engines: {node: '>=12'} @@ -5213,12 +5162,6 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.25.2': - resolution: {integrity: sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==} - engines: {node: '>=18'} - cpu: [arm64] - os: [darwin] - '@esbuild/darwin-arm64@0.25.4': resolution: {integrity: sha512-Y1giCfM4nlHDWEfSckMzeWNdQS31BQGs9/rouw6Ub91tkK79aIMTH3q9xHvzH8d0wDru5Ci0kWB8b3up/nl16g==} engines: {node: '>=18'} @@ -5231,12 +5174,6 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.17.19': - resolution: {integrity: sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - '@esbuild/darwin-x64@0.18.20': resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} engines: {node: '>=12'} @@ -5261,12 +5198,6 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.25.2': - resolution: {integrity: sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA==} - engines: {node: '>=18'} - cpu: [x64] - os: [darwin] - '@esbuild/darwin-x64@0.25.4': resolution: {integrity: sha512-CJsry8ZGM5VFVeyUYB3cdKpd/H69PYez4eJh1W/t38vzutdjEjtP7hB6eLKBoOdxcAlCtEYHzQ/PJ/oU9I4u0A==} engines: {node: '>=18'} @@ -5279,12 +5210,6 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.17.19': - resolution: {integrity: sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - '@esbuild/freebsd-arm64@0.18.20': resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} engines: {node: '>=12'} @@ -5309,12 +5234,6 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.25.2': - resolution: {integrity: sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w==} - engines: {node: '>=18'} - cpu: [arm64] - os: [freebsd] - '@esbuild/freebsd-arm64@0.25.4': resolution: {integrity: sha512-yYq+39NlTRzU2XmoPW4l5Ifpl9fqSk0nAJYM/V/WUGPEFfek1epLHJIkTQM6bBs1swApjO5nWgvr843g6TjxuQ==} engines: {node: '>=18'} @@ -5327,12 +5246,6 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.17.19': - resolution: {integrity: sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - '@esbuild/freebsd-x64@0.18.20': resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} engines: {node: '>=12'} @@ -5357,12 +5270,6 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.25.2': - resolution: {integrity: sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [freebsd] - '@esbuild/freebsd-x64@0.25.4': resolution: {integrity: sha512-0FgvOJ6UUMflsHSPLzdfDnnBBVoCDtBTVyn/MrWloUNvq/5SFmh13l3dvgRPkDihRxb77Y17MbqbCAa2strMQQ==} engines: {node: '>=18'} @@ -5375,12 +5282,6 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.17.19': - resolution: {integrity: sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - '@esbuild/linux-arm64@0.18.20': resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} engines: {node: '>=12'} @@ -5405,12 +5306,6 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.25.2': - resolution: {integrity: sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g==} - engines: {node: '>=18'} - cpu: [arm64] - os: [linux] - '@esbuild/linux-arm64@0.25.4': resolution: {integrity: sha512-+89UsQTfXdmjIvZS6nUnOOLoXnkUTB9hR5QAeLrQdzOSWZvNSAXAtcRDHWtqAUtAmv7ZM1WPOOeSxDzzzMogiQ==} engines: {node: '>=18'} @@ -5423,12 +5318,6 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.17.19': - resolution: {integrity: sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - '@esbuild/linux-arm@0.18.20': resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} engines: {node: '>=12'} @@ -5453,12 +5342,6 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.25.2': - resolution: {integrity: sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g==} - engines: {node: '>=18'} - cpu: [arm] - os: [linux] - '@esbuild/linux-arm@0.25.4': resolution: {integrity: sha512-kro4c0P85GMfFYqW4TWOpvmF8rFShbWGnrLqlzp4X1TNWjRY3JMYUfDCtOxPKOIY8B0WC8HN51hGP4I4hz4AaQ==} engines: {node: '>=18'} @@ -5471,12 +5354,6 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.17.19': - resolution: {integrity: sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - '@esbuild/linux-ia32@0.18.20': resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} engines: {node: '>=12'} @@ -5501,12 +5378,6 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.25.2': - resolution: {integrity: sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ==} - engines: {node: '>=18'} - cpu: [ia32] - os: [linux] - '@esbuild/linux-ia32@0.25.4': resolution: {integrity: sha512-yTEjoapy8UP3rv8dB0ip3AfMpRbyhSN3+hY8mo/i4QXFeDxmiYbEKp3ZRjBKcOP862Ua4b1PDfwlvbuwY7hIGQ==} engines: {node: '>=18'} @@ -5519,12 +5390,6 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.17.19': - resolution: {integrity: sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - '@esbuild/linux-loong64@0.18.20': resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} engines: {node: '>=12'} @@ -5549,12 +5414,6 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.25.2': - resolution: {integrity: sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w==} - engines: {node: '>=18'} - cpu: [loong64] - os: [linux] - '@esbuild/linux-loong64@0.25.4': resolution: {integrity: sha512-NeqqYkrcGzFwi6CGRGNMOjWGGSYOpqwCjS9fvaUlX5s3zwOtn1qwg1s2iE2svBe4Q/YOG1q6875lcAoQK/F4VA==} engines: {node: '>=18'} @@ -5567,12 +5426,6 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.17.19': - resolution: {integrity: sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - '@esbuild/linux-mips64el@0.18.20': resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} engines: {node: '>=12'} @@ -5597,12 +5450,6 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.25.2': - resolution: {integrity: sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q==} - engines: {node: '>=18'} - cpu: [mips64el] - os: [linux] - '@esbuild/linux-mips64el@0.25.4': resolution: {integrity: sha512-IcvTlF9dtLrfL/M8WgNI/qJYBENP3ekgsHbYUIzEzq5XJzzVEV/fXY9WFPfEEXmu3ck2qJP8LG/p3Q8f7Zc2Xg==} engines: {node: '>=18'} @@ -5615,12 +5462,6 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.17.19': - resolution: {integrity: sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - '@esbuild/linux-ppc64@0.18.20': resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} engines: {node: '>=12'} @@ -5645,12 +5486,6 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.25.2': - resolution: {integrity: sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [linux] - '@esbuild/linux-ppc64@0.25.4': resolution: {integrity: sha512-HOy0aLTJTVtoTeGZh4HSXaO6M95qu4k5lJcH4gxv56iaycfz1S8GO/5Jh6X4Y1YiI0h7cRyLi+HixMR+88swag==} engines: {node: '>=18'} @@ -5663,12 +5498,6 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.17.19': - resolution: {integrity: sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - '@esbuild/linux-riscv64@0.18.20': resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} engines: {node: '>=12'} @@ -5693,12 +5522,6 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.25.2': - resolution: {integrity: sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw==} - engines: {node: '>=18'} - cpu: [riscv64] - os: [linux] - '@esbuild/linux-riscv64@0.25.4': resolution: {integrity: sha512-i8JUDAufpz9jOzo4yIShCTcXzS07vEgWzyX3NH2G7LEFVgrLEhjwL3ajFE4fZI3I4ZgiM7JH3GQ7ReObROvSUA==} engines: {node: '>=18'} @@ -5711,12 +5534,6 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.17.19': - resolution: {integrity: sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - '@esbuild/linux-s390x@0.18.20': resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} engines: {node: '>=12'} @@ -5741,12 +5558,6 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.25.2': - resolution: {integrity: sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q==} - engines: {node: '>=18'} - cpu: [s390x] - os: [linux] - '@esbuild/linux-s390x@0.25.4': resolution: {integrity: sha512-jFnu+6UbLlzIjPQpWCNh5QtrcNfMLjgIavnwPQAfoGx4q17ocOU9MsQ2QVvFxwQoWpZT8DvTLooTvmOQXkO51g==} engines: {node: '>=18'} @@ -5759,12 +5570,6 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.17.19': - resolution: {integrity: sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - '@esbuild/linux-x64@0.18.20': resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} engines: {node: '>=12'} @@ -5789,12 +5594,6 @@ packages: cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.25.2': - resolution: {integrity: sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg==} - engines: {node: '>=18'} - cpu: [x64] - os: [linux] - '@esbuild/linux-x64@0.25.4': resolution: {integrity: sha512-6e0cvXwzOnVWJHq+mskP8DNSrKBr1bULBvnFLpc1KY+d+irZSgZ02TGse5FsafKS5jg2e4pbvK6TPXaF/A6+CA==} engines: {node: '>=18'} @@ -5813,12 +5612,6 @@ packages: cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-arm64@0.25.2': - resolution: {integrity: sha512-talAIBoY5M8vHc6EeI2WW9d/CkiO9MQJ0IOWX8hrLhxGbro/vBXJvaQXefW2cP0z0nQVTdQ/eNyGFV1GSKrxfw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [netbsd] - '@esbuild/netbsd-arm64@0.25.4': resolution: {integrity: sha512-vUnkBYxZW4hL/ie91hSqaSNjulOnYXE1VSLusnvHg2u3jewJBz3YzB9+oCw8DABeVqZGg94t9tyZFoHma8gWZQ==} engines: {node: '>=18'} @@ -5831,12 +5624,6 @@ packages: cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-x64@0.17.19': - resolution: {integrity: sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - '@esbuild/netbsd-x64@0.18.20': resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} engines: {node: '>=12'} @@ -5861,12 +5648,6 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.25.2': - resolution: {integrity: sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg==} - engines: {node: '>=18'} - cpu: [x64] - os: [netbsd] - '@esbuild/netbsd-x64@0.25.4': resolution: {integrity: sha512-XAg8pIQn5CzhOB8odIcAm42QsOfa98SBeKUdo4xa8OvX8LbMZqEtgeWE9P/Wxt7MlG2QqvjGths+nq48TrUiKw==} engines: {node: '>=18'} @@ -5891,12 +5672,6 @@ packages: cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-arm64@0.25.2': - resolution: {integrity: sha512-dcXYOC6NXOqcykeDlwId9kB6OkPUxOEqU+rkrYVqJbK2hagWOMrsTGsMr8+rW02M+d5Op5NNlgMmjzecaRf7Tg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openbsd] - '@esbuild/openbsd-arm64@0.25.4': resolution: {integrity: sha512-Ct2WcFEANlFDtp1nVAXSNBPDxyU+j7+tId//iHXU2f/lN5AmO4zLyhDcpR5Cz1r08mVxzt3Jpyt4PmXQ1O6+7A==} engines: {node: '>=18'} @@ -5909,12 +5684,6 @@ packages: cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.17.19': - resolution: {integrity: sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - '@esbuild/openbsd-x64@0.18.20': resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} engines: {node: '>=12'} @@ -5939,12 +5708,6 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.25.2': - resolution: {integrity: sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw==} - engines: {node: '>=18'} - cpu: [x64] - os: [openbsd] - '@esbuild/openbsd-x64@0.25.4': resolution: {integrity: sha512-xAGGhyOQ9Otm1Xu8NT1ifGLnA6M3sJxZ6ixylb+vIUVzvvd6GOALpwQrYrtlPouMqd/vSbgehz6HaVk4+7Afhw==} engines: {node: '>=18'} @@ -5963,12 +5726,6 @@ packages: cpu: [arm64] os: [openharmony] - '@esbuild/sunos-x64@0.17.19': - resolution: {integrity: sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - '@esbuild/sunos-x64@0.18.20': resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} engines: {node: '>=12'} @@ -5993,12 +5750,6 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.25.2': - resolution: {integrity: sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA==} - engines: {node: '>=18'} - cpu: [x64] - os: [sunos] - '@esbuild/sunos-x64@0.25.4': resolution: {integrity: sha512-Mw+tzy4pp6wZEK0+Lwr76pWLjrtjmJyUB23tHKqEDP74R3q95luY/bXqXZeYl4NYlvwOqoRKlInQialgCKy67Q==} engines: {node: '>=18'} @@ -6011,12 +5762,6 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.17.19': - resolution: {integrity: sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - '@esbuild/win32-arm64@0.18.20': resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} engines: {node: '>=12'} @@ -6041,12 +5786,6 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.25.2': - resolution: {integrity: sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q==} - engines: {node: '>=18'} - cpu: [arm64] - os: [win32] - '@esbuild/win32-arm64@0.25.4': resolution: {integrity: sha512-AVUP428VQTSddguz9dO9ngb+E5aScyg7nOeJDrF1HPYu555gmza3bDGMPhmVXL8svDSoqPCsCPjb265yG/kLKQ==} engines: {node: '>=18'} @@ -6059,14 +5798,8 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.17.19': - resolution: {integrity: sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - - '@esbuild/win32-ia32@0.18.20': - resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + '@esbuild/win32-ia32@0.18.20': + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -6089,12 +5822,6 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.25.2': - resolution: {integrity: sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg==} - engines: {node: '>=18'} - cpu: [ia32] - os: [win32] - '@esbuild/win32-ia32@0.25.4': resolution: {integrity: sha512-i1sW+1i+oWvQzSgfRcxxG2k4I9n3O9NRqy8U+uugaT2Dy7kLO9Y7wI72haOahxceMX8hZAzgGou1FhndRldxRg==} engines: {node: '>=18'} @@ -6107,12 +5834,6 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.17.19': - resolution: {integrity: sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - '@esbuild/win32-x64@0.18.20': resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} engines: {node: '>=12'} @@ -6137,12 +5858,6 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.25.2': - resolution: {integrity: sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA==} - engines: {node: '>=18'} - cpu: [x64] - os: [win32] - '@esbuild/win32-x64@0.25.4': resolution: {integrity: sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ==} engines: {node: '>=18'} @@ -6517,6 +6232,14 @@ packages: engines: {node: '>=18.14.0'} hasBin: true + '@noble/ciphers@2.1.1': + resolution: {integrity: sha512-bysYuiVfhxNJuldNXlFEitTVdNnYUc+XNJZd7Qm2a5j1vZHgY+fazadNFWFaMK/2vye0JVlxV3gHmC0WDfAOQw==} + engines: {node: '>= 20.19.0'} + + '@noble/hashes@2.0.1': + resolution: {integrity: sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw==} + engines: {node: '>= 20.19.0'} + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -8089,8 +7812,8 @@ packages: '@types/stack-utils@2.0.3': resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} - '@types/statuses@2.0.5': - resolution: {integrity: sha512-jmIUGWrAiwu3dZpxntxieC+1n/5c3mjrImkmOSQ2NC5uP6cYO4aAZDdSmRcI5C1oiTmqlZGHC+/NmJrKogbP5A==} + '@types/statuses@2.0.6': + resolution: {integrity: sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA==} '@types/stoppable@1.1.3': resolution: {integrity: sha512-7wGKIBJGE4ZxFjk9NkjAxZMLlIXroETqP1FJCdoSvKmEznwmBxQFmTB1dsCkAvVcNemuSZM5qkkd9HE/NL2JTw==} @@ -8296,42 +8019,28 @@ packages: peerDependencies: vite: ^4.2.0 || ^5.0.0 || ^6.0.0 - '@vitest/expect@2.1.9': - resolution: {integrity: sha512-UJCIkTBenHeKT1TTlKMJWy1laZewsRIzYighyYiJKZreqtdxSos/S1t+ktRMQWu2CKqaarrkeszJx1cgC5tGZw==} - - '@vitest/expect@3.0.9': - resolution: {integrity: sha512-5eCqRItYgIML7NNVgJj6TVCmdzE7ZVgJhruW0ziSQV4V7PvLkDL1bBkBdcTs/VuIz0IxPb5da1IDSqc1TR9eig==} + '@vitest/expect@3.2.4': + resolution: {integrity: sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==} - '@vitest/expect@3.2.3': - resolution: {integrity: sha512-W2RH2TPWVHA1o7UmaFKISPvdicFJH+mjykctJFoAkUw+SPTJTGjUNdKscFBrqM7IPnCVu6zihtKYa7TkZS1dkQ==} + '@vitest/expect@4.0.16': + resolution: {integrity: sha512-eshqULT2It7McaJkQGLkPjPjNph+uevROGuIMJdG3V+0BSR2w9u6J9Lwu+E8cK5TETlfou8GRijhafIMhXsimA==} - '@vitest/mocker@2.1.9': - resolution: {integrity: sha512-tVL6uJgoUdi6icpxmdrn5YNo3g3Dxv+IHJBr0GXHaEdTcw3F+cPKnsXFhli6nO+f/6SDKPHEK1UN+k+TQv0Ehg==} + '@vitest/mocker@3.2.4': + resolution: {integrity: sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==} peerDependencies: msw: ^2.4.9 - vite: ^5.0.0 - peerDependenciesMeta: - msw: - optional: true - vite: - optional: true - - '@vitest/mocker@3.0.9': - resolution: {integrity: sha512-ryERPIBOnvevAkTq+L1lD+DTFBRcjueL9lOUfXsLfwP92h4e+Heb+PjiqS3/OURWPtywfafK0kj++yDFjWUmrA==} - peerDependencies: - msw: ^2.4.9 - vite: ^5.0.0 || ^6.0.0 + vite: ^5.0.0 || ^6.0.0 || ^7.0.0-0 peerDependenciesMeta: msw: optional: true vite: optional: true - '@vitest/mocker@3.2.3': - resolution: {integrity: sha512-cP6fIun+Zx8he4rbWvi+Oya6goKQDZK+Yq4hhlggwQBbrlOQ4qtZ+G4nxB6ZnzI9lyIb+JnvyiJnPC2AGbKSPA==} + '@vitest/mocker@4.0.16': + resolution: {integrity: sha512-yb6k4AZxJTB+q9ycAvsoxGn+j/po0UaPgajllBgt1PzoMAAmJGYFdDk0uCcRcxb3BrME34I6u8gHZTQlkqSZpg==} peerDependencies: msw: ^2.4.9 - vite: ^5.0.0 || ^6.0.0 || ^7.0.0-0 + vite: ^6.0.0 || ^7.0.0-0 peerDependenciesMeta: msw: optional: true @@ -8341,63 +8050,48 @@ packages: '@vitest/pretty-format@2.1.8': resolution: {integrity: sha512-9HiSZ9zpqNLKlbIDRWOnAWqgcA7xu+8YxXSekhr0Ykab7PAYFkhkwoqVArPOtJhPmYeE2YHgKZlj3CP36z2AJQ==} - '@vitest/pretty-format@2.1.9': - resolution: {integrity: sha512-KhRIdGV2U9HOUzxfiHmY8IFHTdqtOhIzCpd8WRdJiE7D/HUcZVD0EgQCVjm+Q9gkUXWgBvMmTtZgIG48wq7sOQ==} - - '@vitest/pretty-format@3.0.9': - resolution: {integrity: sha512-OW9F8t2J3AwFEwENg3yMyKWweF7oRJlMyHOMIhO5F3n0+cgQAJZBjNgrF8dLwFTEXl5jUqBLXd9QyyKv8zEcmA==} - - '@vitest/pretty-format@3.2.3': - resolution: {integrity: sha512-yFglXGkr9hW/yEXngO+IKMhP0jxyFw2/qys/CK4fFUZnSltD+MU7dVYGrH8rvPcK/O6feXQA+EU33gjaBBbAng==} - - '@vitest/runner@2.1.9': - resolution: {integrity: sha512-ZXSSqTFIrzduD63btIfEyOmNcBmQvgOVsPNPe0jYtESiXkhd8u2erDLnMxmGrDCwHCCHE7hxwRDCT3pt0esT4g==} + '@vitest/pretty-format@3.2.4': + resolution: {integrity: sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==} - '@vitest/runner@3.0.9': - resolution: {integrity: sha512-NX9oUXgF9HPfJSwl8tUZCMP1oGx2+Sf+ru6d05QjzQz4OwWg0psEzwY6VexP2tTHWdOkhKHUIZH+fS6nA7jfOw==} + '@vitest/pretty-format@4.0.16': + resolution: {integrity: sha512-eNCYNsSty9xJKi/UdVD8Ou16alu7AYiS2fCPRs0b1OdhJiV89buAXQLpTbe+X8V9L6qrs9CqyvU7OaAopJYPsA==} - '@vitest/runner@3.2.3': - resolution: {integrity: sha512-83HWYisT3IpMaU9LN+VN+/nLHVBCSIUKJzGxC5RWUOsK1h3USg7ojL+UXQR3b4o4UBIWCYdD2fxuzM7PQQ1u8w==} + '@vitest/runner@3.2.4': + resolution: {integrity: sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==} - '@vitest/snapshot@2.1.9': - resolution: {integrity: sha512-oBO82rEjsxLNJincVhLhaxxZdEtV0EFHMK5Kmx5sJ6H9L183dHECjiefOAdnqpIgT5eZwT04PoggUnW88vOBNQ==} + '@vitest/runner@4.0.16': + resolution: {integrity: sha512-VWEDm5Wv9xEo80ctjORcTQRJ539EGPB3Pb9ApvVRAY1U/WkHXmmYISqU5E79uCwcW7xYUV38gwZD+RV755fu3Q==} - '@vitest/snapshot@3.0.9': - resolution: {integrity: sha512-AiLUiuZ0FuA+/8i19mTYd+re5jqjEc2jZbgJ2up0VY0Ddyyxg/uUtBDpIFAy4uzKaQxOW8gMgBdAJJ2ydhu39A==} + '@vitest/snapshot@3.2.4': + resolution: {integrity: sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==} - '@vitest/snapshot@3.2.3': - resolution: {integrity: sha512-9gIVWx2+tysDqUmmM1L0hwadyumqssOL1r8KJipwLx5JVYyxvVRfxvMq7DaWbZZsCqZnu/dZedaZQh4iYTtneA==} + '@vitest/snapshot@4.0.16': + resolution: {integrity: sha512-sf6NcrYhYBsSYefxnry+DR8n3UV4xWZwWxYbCJUt2YdvtqzSPR7VfGrY0zsv090DAbjFZsi7ZaMi1KnSRyK1XA==} - '@vitest/spy@2.1.9': - resolution: {integrity: sha512-E1B35FwzXXTs9FHNK6bDszs7mtydNi5MIfUWpceJ8Xbfb1gBMscAnwLbEu+B44ed6W3XjL9/ehLPHR1fkf1KLQ==} + '@vitest/spy@3.2.4': + resolution: {integrity: sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==} - '@vitest/spy@3.0.9': - resolution: {integrity: sha512-/CcK2UDl0aQ2wtkp3YVWldrpLRNCfVcIOFGlVGKO4R5eajsH393Z1yiXLVQ7vWsj26JOEjeZI0x5sm5P4OGUNQ==} + '@vitest/spy@4.0.16': + resolution: {integrity: sha512-4jIOWjKP0ZUaEmJm00E0cOBLU+5WE0BpeNr3XN6TEF05ltro6NJqHWxXD0kA8/Zc8Nh23AT8WQxwNG+WeROupw==} - '@vitest/spy@3.2.3': - resolution: {integrity: sha512-JHu9Wl+7bf6FEejTCREy+DmgWe+rQKbK+y32C/k5f4TBIAlijhJbRBIRIOCEpVevgRsCQR2iHRUH2/qKVM/plw==} - - '@vitest/ui@2.1.9': - resolution: {integrity: sha512-izzd2zmnk8Nl5ECYkW27328RbQ1nKvkm6Bb5DAaz1Gk59EbLkiCMa6OLT0NoaAYTjOFS6N+SMYW1nh4/9ljPiw==} + '@vitest/ui@3.2.4': + resolution: {integrity: sha512-hGISOaP18plkzbWEcP/QvtRW1xDXF2+96HbEX6byqQhAUbiS5oH6/9JwW+QsQCIYON2bI6QZBF+2PvOmrRZ9wA==} peerDependencies: - vitest: 2.1.9 + vitest: 3.2.4 - '@vitest/ui@3.2.3': - resolution: {integrity: sha512-9aR2tY/WT7GRHGEH/9sSIipJqeA21Eh3C6xmiOVmfyBCFmezUSUFLalpaSmRHlRzWCKQU10yz3AHhKuYcdnZGQ==} + '@vitest/ui@4.0.16': + resolution: {integrity: sha512-rkoPH+RqWopVxDnCBE/ysIdfQ2A7j1eDmW8tCxxrR9nnFBa9jKf86VgsSAzxBd1x+ny0GC4JgiD3SNfRHv3pOg==} peerDependencies: - vitest: 3.2.3 + vitest: 4.0.16 '@vitest/utils@2.1.8': resolution: {integrity: sha512-dwSoui6djdwbfFmIgbIjX2ZhIoG7Ex/+xpxyiEgIGzjliY8xGkcpITKTlp6B4MgtGkF2ilvm97cPM96XZaAgcA==} - '@vitest/utils@2.1.9': - resolution: {integrity: sha512-v0psaMSkNJ3A2NMrUEHFRzJtDPFn+/VWZ5WxImB21T9fjucJRmS7xCS3ppEnARb9y11OAzaD+P2Ps+b+BGX5iQ==} - - '@vitest/utils@3.0.9': - resolution: {integrity: sha512-ilHM5fHhZ89MCp5aAaM9uhfl1c2JdxVxl3McqsdVyVNN6JffnEen8UMCdRTzOhGXNQGo5GNL9QugHrz727Wnng==} + '@vitest/utils@3.2.4': + resolution: {integrity: sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==} - '@vitest/utils@3.2.3': - resolution: {integrity: sha512-4zFBCU5Pf+4Z6v+rwnZ1HU1yzOKKvDkMXZrymE2PBlbjKJRlrOxbvpfPSvJTGRIwGoahaOGvp+kbCoxifhzJ1Q==} + '@vitest/utils@4.0.16': + resolution: {integrity: sha512-h8z9yYhV3e1LEfaQ3zdypIrnAg/9hguReGZoS7Gl0aBG5xgA410zBqECqmaF/+RkTggRsfnzc1XaAHA6bmUufA==} '@volar/language-core@2.3.4': resolution: {integrity: sha512-wXBhY11qG6pCDAqDnbBRFIDSIwbqkWI7no+lj5+L7IlA7HRIjRP7YQLGzT0LF4lS6eHkMSsclXqy9DwYJasZTQ==} @@ -8664,9 +8358,6 @@ packages: resolution: {integrity: sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==} engines: {node: '>=12'} - as-table@1.0.55: - resolution: {integrity: sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ==} - asn1@0.2.6: resolution: {integrity: sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==} @@ -8809,6 +8500,73 @@ packages: before-after-hook@2.2.3: resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==} + better-auth@1.4.7: + resolution: {integrity: sha512-kVmDQxzqGwP4FFMOYpS5I7oAaoFW3hwooUAAtcbb2DrOYv5EUvRUDJbTMaPoMTj7URjNDQ6vG9gcCS1Q+0aVBw==} + peerDependencies: + '@lynx-js/react': '*' + '@prisma/client': ^5.22.0 + '@sveltejs/kit': ^2.0.0 + '@tanstack/react-start': ^1.0.0 + better-sqlite3: ^12.4.1 + drizzle-kit: ^0.31.4 + drizzle-orm: ^0.41.0 + mongodb: ^6.18.0 + mysql2: ^3.14.4 + next: ^14.0.0 || ^15.0.0 || ^16.0.0 + pg: ^8.16.3 + prisma: ^5.22.0 + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + solid-js: ^1.0.0 + svelte: ^4.0.0 || ^5.0.0 + vitest: ^4.0.15 + vue: ^3.0.0 + peerDependenciesMeta: + '@lynx-js/react': + optional: true + '@prisma/client': + optional: true + '@sveltejs/kit': + optional: true + '@tanstack/react-start': + optional: true + better-sqlite3: + optional: true + drizzle-kit: + optional: true + drizzle-orm: + optional: true + mongodb: + optional: true + mysql2: + optional: true + next: + optional: true + pg: + optional: true + prisma: + optional: true + react: + optional: true + react-dom: + optional: true + solid-js: + optional: true + svelte: + optional: true + vitest: + optional: true + vue: + optional: true + + better-call@1.1.5: + resolution: {integrity: sha512-nQJ3S87v6wApbDwbZ++FrQiSiVxWvZdjaO+2v6lZJAG2WWggkB2CziUDjPciz3eAt9TqfRursIQMZIcpkBnvlw==} + peerDependencies: + zod: ^4.0.0 + peerDependenciesMeta: + zod: + optional: true + better-path-resolve@1.0.0: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} @@ -8972,14 +8730,14 @@ packages: resolution: {integrity: sha512-vIwORDd/WyB8Nc23o2zNN5RrtFGlR6Fca61TtjkUXueI3Jf2DOZDl1zsshvBntZ3wZHBM9ztjnkXSmzQDaq3WA==} engines: {node: '>=20'} - chai@5.1.2: - resolution: {integrity: sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==} - engines: {node: '>=12'} - chai@5.2.0: resolution: {integrity: sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==} engines: {node: '>=12'} + chai@6.2.1: + resolution: {integrity: sha512-p4Z49OGG5W/WBCPSS/dH3jQ73kD6tiMmUM+bckNK6Jr5JHMG3k9bg/BvKR8lKmtVBKmOiuVaV2ws8s9oSbwysg==} + engines: {node: '>=18'} + chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} @@ -9217,10 +8975,6 @@ packages: resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==} engines: {node: '>=6.6.0'} - cookie@0.5.0: - resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} - engines: {node: '>= 0.6'} - cookie@0.6.0: resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} engines: {node: '>= 0.6'} @@ -9339,9 +9093,6 @@ packages: resolution: {integrity: sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==} engines: {node: '>=0.10'} - data-uri-to-buffer@2.0.2: - resolution: {integrity: sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA==} - data-uri-to-buffer@6.0.2: resolution: {integrity: sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==} engines: {node: '>= 14'} @@ -9548,9 +9299,6 @@ packages: resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} engines: {node: '>=8'} - devalue@4.3.3: - resolution: {integrity: sha512-UH8EL6H2ifcY8TbD2QsxwCC/pr5xSwPvv85LrLXVihmHVC3T3YqTCIwnR5ak0yO1KYqlxrPVOA/JVZJYPy2ATg==} - devalue@5.3.2: resolution: {integrity: sha512-UDsjUbpQn9kvm68slnrs+mfxwFkIflOhkanmyabZ8zOYk8SMEIbJ3TK+88g70hSIeytu4y18f0z/hYHMTrXIWw==} @@ -9799,11 +9547,6 @@ packages: peerDependencies: esbuild: '>=0.12 <1' - esbuild@0.17.19: - resolution: {integrity: sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==} - engines: {node: '>=12'} - hasBin: true - esbuild@0.18.20: resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} engines: {node: '>=12'} @@ -9824,11 +9567,6 @@ packages: engines: {node: '>=18'} hasBin: true - esbuild@0.25.2: - resolution: {integrity: sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==} - engines: {node: '>=18'} - hasBin: true - esbuild@0.25.4: resolution: {integrity: sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q==} engines: {node: '>=18'} @@ -10011,9 +9749,6 @@ packages: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} - estree-walker@0.6.1: - resolution: {integrity: sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==} - estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} @@ -10066,14 +9801,14 @@ packages: expect-type@0.15.0: resolution: {integrity: sha512-yWnriYB4e8G54M5/fAFj7rCIBiKs1HAACaY13kCz6Ku0dezjS9aMcfcdVK2X8Tv2tEV1BPz/wKfQ7WA4S/d8aA==} - expect-type@1.1.0: - resolution: {integrity: sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==} - engines: {node: '>=12.0.0'} - expect-type@1.2.1: resolution: {integrity: sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==} engines: {node: '>=12.0.0'} + expect-type@1.3.0: + resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==} + engines: {node: '>=12.0.0'} + expect@29.7.0: resolution: {integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -10382,9 +10117,6 @@ packages: resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} engines: {node: '>= 0.4'} - get-source@2.0.12: - resolution: {integrity: sha512-X5+4+iD+HoSeEED+uwrQ07BOQr0kEDFMVqqpBuI+RaZBpBpHCuXxo70bjar6f0b0u/DQJsJ7ssurpP0V60Az+w==} - get-stdin@5.0.1: resolution: {integrity: sha512-jZV7n6jGE3Gt7fgSTJoz91Ak5MuTLwMwkoYdjxuJ/AmjIsE1UC03y/IWkZCQGEvVNS9qoRNwy5BCqxImv0FVeA==} engines: {node: '>=0.12.0'} @@ -10507,8 +10239,8 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - graphql@16.8.1: - resolution: {integrity: sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==} + graphql@16.12.0: + resolution: {integrity: sha512-DKKrynuQRne0PNpEbzuEdHlYOMksHSUI8Zc9Unei5gTsMNA2/vMpoMz/yKba50pejK56qj98qM0SjYxAKi13gQ==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} gunzip-maybe@1.4.2: @@ -11093,6 +10825,9 @@ packages: jose@5.9.3: resolution: {integrity: sha512-egLIoYSpcd+QUF+UHgobt5YzI2Pkw/H39ou9suW687MY6PmCwPmkNV/4TNjn1p2tX5xO3j0d0sq5hiYE24bSlg==} + jose@6.1.3: + resolution: {integrity: sha512-0TpaTfihd4QMNwrz/ob2Bp7X04yuxJkjRGi4aKmOqwhov54i6u79oCv7T+C7lo70MKH6BesI3vscD1yb/yzKXQ==} + joycon@3.1.1: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} engines: {node: '>=10'} @@ -11216,6 +10951,10 @@ packages: resolution: {integrity: sha512-HzhziW6sc5m0pwi5M196+7cEBtbt0lCYi67wNsiwMUmz833wloE0gbzJPWKs1gliFKQb34huItDQX97LyOdPdA==} engines: {node: '>=18'} + kysely@0.28.9: + resolution: {integrity: sha512-3BeXMoiOhpOwu62CiVpO6lxfq4eS6KMYfQdMsN/2kUCRNuF2YiEr7u0HLHaQU+O4Xu8YXE3bHVkwaQ85i72EuA==} + engines: {node: '>=20.0.0'} + levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -11462,6 +11201,9 @@ packages: loupe@3.1.3: resolution: {integrity: sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==} + loupe@3.2.1: + resolution: {integrity: sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==} + lowdb@1.0.0: resolution: {integrity: sha512-2+x8esE/Wb9SQ1F9IHaYWfsC9FIecLOPrK4g17FGEayjUWH172H6nwicRovGvSE2CPZouc2MCIqCI7h9d+GftQ==} engines: {node: '>=4'} @@ -11492,9 +11234,6 @@ packages: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true - magic-string@0.25.9: - resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==} - magic-string@0.30.14: resolution: {integrity: sha512-5c99P1WKTed11ZC0HMJOj6CDIue6F8ySu+bJL+85q1zBEIY8IklrJ1eiKC2NDRh3Ct3FcvmJPyQHb9erXMTJNw==} @@ -11624,13 +11363,8 @@ packages: resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} engines: {node: '>=10'} - miniflare@3.20250310.0: - resolution: {integrity: sha512-TQAxoo2ZiQYjiOJoK3bbcyjKD/u1E3akYOeSHc2Zcp1sLVydrgzSjmxtrn65/3BfDIrUgfYHyy9wspT6wzBy/A==} - engines: {node: '>=16.13'} - hasBin: true - - miniflare@4.20250417.0: - resolution: {integrity: sha512-bROKLQKr4CoS93tnGuw5e08VaNwM3VowTL3Z2Cps1HzY6a4Bq8uNtggQ7WogriMq77jcHn6kbz64bvWyF//Jkw==} + miniflare@4.20251210.0: + resolution: {integrity: sha512-k6kIoXwGVqlPZb0hcn+X7BmnK+8BjIIkusQPY22kCo2RaQJ/LzAjtxHQdGXerlHSnJyQivDQsL6BJHMpQfUFyw==} engines: {node: '>=18.0.0'} hasBin: true @@ -11721,8 +11455,8 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - msw@2.12.0: - resolution: {integrity: sha512-jzf2eVnd8+iWXN74dccLrHUw3i3hFVvNVQRWS4vBl2KxaUt7Tdur0Eyda/DODGFkZDu2P5MXaeLe/9Qx8PZkrg==} + msw@2.12.4: + resolution: {integrity: sha512-rHNiVfTyKhzc0EjoXUBVGteNKBevdjOlVC6GlIRXpy+/3LHEIGRovnB5WPjcvmNODVQ1TNFnoa7wsGbd0V3epg==} engines: {node: '>=18'} hasBin: true peerDependencies: @@ -11771,6 +11505,10 @@ packages: engines: {node: ^18 || >=20} hasBin: true + nanostores@1.1.0: + resolution: {integrity: sha512-yJBmDJr18xy47dbNVlHcgdPrulSn1nhSE6Ns9vTG+Nx9VPT6iV1MD6aQFp/t52zpf82FhLLTXAXr30NuCnxvwA==} + engines: {node: ^20.0.0 || >=22.0.0} + napi-build-utils@2.0.0: resolution: {integrity: sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==} @@ -11932,6 +11670,9 @@ packages: ms: optional: true + obug@2.1.1: + resolution: {integrity: sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==} + ohash@2.0.11: resolution: {integrity: sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==} @@ -12600,9 +12341,6 @@ packages: resolution: {integrity: sha512-gjVS5hOP+M3wMm5nmNOucbIrqudzs9v/57bWRHQWLYklXqoXKrVfYW2W9+glfGsqtPgpiz5WwyEEB+ksXIx3gQ==} engines: {node: '>=18'} - printable-characters@1.0.42: - resolution: {integrity: sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==} - prism-react-renderer@1.3.5: resolution: {integrity: sha512-IJ+MSwBWKG+SM3b2SUfdrhC+gu01QkV2KmRQgREThBfSQRoufqRfxfHUxpG1WcaFjP+kojcFyO9Qqtpgt3qLCg==} peerDependencies: @@ -13029,16 +12767,6 @@ packages: rollup: ^3.29.4 || ^4 typescript: ^4.5 || ^5.0 - rollup-plugin-inject@3.0.2: - resolution: {integrity: sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w==} - deprecated: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject. - - rollup-plugin-node-polyfills@0.2.1: - resolution: {integrity: sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA==} - - rollup-pluginutils@2.8.2: - resolution: {integrity: sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==} - rollup@4.30.1: resolution: {integrity: sha512-mlJ4glW020fPuLi7DkM/lN97mYEZGWeqBnrljzN0gs7GLctqX3lNWxKQ7Gl712UAX+6fog/L3jh4gb7R6aVi3w==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -13049,6 +12777,9 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + rou3@0.7.12: + resolution: {integrity: sha512-iFE4hLDuloSWcD7mjdCDhx2bKcIsYbtOTpfH5MHHLSKMOUyjqQXTeZVa289uuwEGEKFoE/BAPbhaU4B774nceg==} + router@2.2.0: resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==} engines: {node: '>= 18'} @@ -13174,6 +12905,9 @@ packages: set-cookie-parser@2.6.0: resolution: {integrity: sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==} + set-cookie-parser@2.7.2: + resolution: {integrity: sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==} + set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} @@ -13329,10 +13063,6 @@ packages: engines: {node: '>= 8'} deprecated: The work that was done in this beta branch won't be included in future versions - sourcemap-codec@1.4.8: - resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} - deprecated: Please use @jridgewell/sourcemap-codec instead - spawn-command@0.0.2: resolution: {integrity: sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==} @@ -13386,9 +13116,6 @@ packages: stackframe@1.3.4: resolution: {integrity: sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==} - stacktracey@2.1.8: - resolution: {integrity: sha512-Kpij9riA+UNg7TnphqjH7/CzctQ/owJGNbFkfEeve4Z4uxT5+JapVLFXcsurIfN34gnTWZNJ/f7NMG0E8JDzTw==} - statuses@2.0.1: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} engines: {node: '>= 0.8'} @@ -13397,8 +13124,8 @@ packages: resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} engines: {node: '>= 0.8'} - std-env@3.8.0: - resolution: {integrity: sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==} + std-env@3.10.0: + resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==} std-env@3.9.0: resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==} @@ -13499,6 +13226,15 @@ packages: strip-literal@3.0.0: resolution: {integrity: sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==} + stripe@20.1.0: + resolution: {integrity: sha512-o1VNRuMkY76ZCq92U3EH3/XHm/WHp7AerpzDs4Zyo8uE5mFL4QUcv/2SudWsSnhBSp4moO2+ZoGCZ7mT8crPmQ==} + engines: {node: '>=16'} + peerDependencies: + '@types/node': ^20.19.9 + peerDependenciesMeta: + '@types/node': + optional: true + stripe@9.16.0: resolution: {integrity: sha512-Dn8K+jSoQcXjxCobRI4HXUdHjOXsiF/KszK49fJnkbeCFjZ3EZxLG2JiM/CX+Hcq27NBDtv/Sxhvy+HhTmvyaQ==} engines: {node: ^8.1 || >=10.*} @@ -13561,6 +13297,10 @@ packages: resolution: {integrity: sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==} engines: {node: ^14.18.0 || >=16.0.0} + tagged-tag@1.0.0: + resolution: {integrity: sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==} + engines: {node: '>=20'} + tailwindcss@4.0.15: resolution: {integrity: sha512-6ZMg+hHdMJpjpeCCFasX7K+U615U9D+7k5/cDK/iRwl6GptF24+I/AbKgOnXhVKePzrEyIXutLv36n4cRsq3Sg==} @@ -13628,9 +13368,6 @@ packages: tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} - tinyexec@0.3.1: - resolution: {integrity: sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==} - tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} @@ -13649,12 +13386,8 @@ packages: resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} engines: {node: '>=12.0.0'} - tinypool@1.0.1: - resolution: {integrity: sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==} - engines: {node: ^18.0.0 || >=20.0.0} - - tinypool@1.1.0: - resolution: {integrity: sha512-7CotroY9a8DKsKprEy/a14aCCm8jYVmR7aFy4fpkZM8sdpNJbKkixuNjgM50yCmip2ezc8z4N7k3oe2+rfRJCQ==} + tinypool@1.1.1: + resolution: {integrity: sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==} engines: {node: ^18.0.0 || >=20.0.0} tinyrainbow@1.2.0: @@ -13665,8 +13398,8 @@ packages: resolution: {integrity: sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==} engines: {node: '>=14.0.0'} - tinyspy@3.0.2: - resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} + tinyrainbow@3.0.3: + resolution: {integrity: sha512-PSkbLUoxOFRzJYjjxHJt9xro7D+iilgMX/C9lawzVuYiIdcihh9DXmVibBe8lmcFrRi/VzlPjBxbN7rH24q8/Q==} engines: {node: '>=14.0.0'} tinyspy@4.0.3: @@ -13904,6 +13637,10 @@ packages: resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} engines: {node: '>=16'} + type-fest@5.3.1: + resolution: {integrity: sha512-VCn+LMHbd4t6sF3wfU/+HKT63C9OoyrSIf4b+vtWHpt2U7/4InZG467YDNMFMR70DdHjAdpPWmw2lzRdg0Xqqg==} + engines: {node: '>=20'} + type-is@1.6.18: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} @@ -13975,9 +13712,6 @@ packages: ufo@1.5.4: resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} - ufo@1.6.1: - resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==} - uglify-js@3.17.4: resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} engines: {node: '>=0.8.0'} @@ -14019,12 +13753,6 @@ packages: resolution: {integrity: sha512-Vqs8HTzjpQXZeXdpsfChQTlafcMQaaIwnGwLam1wudSSjlJeQ3bw1j+TLPePgrCnCpUXx7Ba5Pdpf5OBih62NQ==} engines: {node: '>=20.18.1'} - unenv@2.0.0-rc.14: - resolution: {integrity: sha512-od496pShMen7nOy5VmVJCnq8rptd45vh6Nx/r2iPbrba6pa6p+tS2ywuIHRZ/OBvSbQZB0kWvpO9XBNVFXHD3Q==} - - unenv@2.0.0-rc.15: - resolution: {integrity: sha512-J/rEIZU8w6FOfLNz/hNKsnY+fFHWnu9MH4yRbSZF3xbbGHovcetXPs7sD+9p8L6CeNC//I9bhRYAOsBt2u7/OA==} - unenv@2.0.0-rc.24: resolution: {integrity: sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw==} @@ -14150,18 +13878,8 @@ packages: resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==} engines: {'0': node >=0.6.0} - vite-node@2.1.9: - resolution: {integrity: sha512-AM9aQ/IPrW/6ENLQg3AGY4K1N2TGZdR5e4gu/MmmR2xR3Ll1+dib+nook92g4TV3PXVyeyxdWwtaCAiUL0hMxA==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - - vite-node@3.0.9: - resolution: {integrity: sha512-w3Gdx7jDcuT9cNn9jExXgOyKmf5UOTb6WMHz8LGAm54eS1Elf5OuBhCxl6zJxGhEeIkgsE1WbHuoL0mj/UXqXg==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} - hasBin: true - - vite-node@3.2.3: - resolution: {integrity: sha512-gc8aAifGuDIpZHrPjuHyP4dpQmYXqWw7D1GmDnWeNWP654UEXzVfQ5IHPSK5HaHkwB/+p1atpYpSdw/2kOv8iQ==} + vite-node@3.2.4: + resolution: {integrity: sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true @@ -14214,46 +13932,6 @@ packages: terser: optional: true - vite@6.4.1: - resolution: {integrity: sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} - hasBin: true - peerDependencies: - '@types/node': ^20.19.9 - jiti: '>=1.21.0' - less: '*' - lightningcss: ^1.21.0 - sass: '*' - sass-embedded: '*' - stylus: '*' - sugarss: '*' - terser: ^5.16.0 - tsx: ^4.8.1 - yaml: ^2.4.2 - peerDependenciesMeta: - '@types/node': - optional: true - jiti: - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - sass-embedded: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - tsx: - optional: true - yaml: - optional: true - vite@7.1.12: resolution: {integrity: sha512-ZWyE8YXEXqJrrSLvYgrRP7p62OziLW7xI5HYGWFzOvupfAlrLvURSzv/FyGyy0eidogEM3ujU+kUG1zuHgb6Ug==} engines: {node: ^20.19.0 || >=22.12.0} @@ -14339,41 +14017,16 @@ packages: peerDependencies: vitest: '>=2' - vitest@2.1.9: - resolution: {integrity: sha512-MSmPM9REYqDGBI8439mA4mWhV5sKmDlBKWIYbA3lRb2PTHACE0mgKwA8yQ2xq9vxDTuk4iPrECBAEW2aoFXY0Q==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - peerDependencies: - '@edge-runtime/vm': '*' - '@types/node': ^20.19.9 - '@vitest/browser': 2.1.9 - '@vitest/ui': 2.1.9 - 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@3.0.9: - resolution: {integrity: sha512-BbcFDqNyBlfSpATmTtXOAOj71RNKDDvjBM/uPfnxxVGrG+FSH2RQIwgeEngTaTkuU/h0ScFvf+tRcKfYXzBybQ==} + vitest@3.2.4: + resolution: {integrity: sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/debug': ^4.1.12 '@types/node': ^20.19.9 - '@vitest/browser': 3.0.9 - '@vitest/ui': 3.0.9 + '@vitest/browser': 3.2.4 + '@vitest/ui': 3.2.4 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -14392,26 +14045,32 @@ packages: jsdom: optional: true - vitest@3.2.3: - resolution: {integrity: sha512-E6U2ZFXe3N/t4f5BwUaVCKRLHqUpk1CBWeMh78UT4VaTPH/2dyvH6ALl29JTovEPu9dVKr/K/J4PkXgrMbw4Ww==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + vitest@4.0.16: + resolution: {integrity: sha512-E4t7DJ9pESL6E3I8nFjPa4xGUd3PmiWDLsDztS2qXSJWfHtbQnwAWylaBvSNY48I3vr8PTqIZlyK8TE3V3CA4Q==} + engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' - '@types/debug': ^4.1.12 + '@opentelemetry/api': ^1.9.0 '@types/node': ^20.19.9 - '@vitest/browser': 3.2.3 - '@vitest/ui': 3.2.3 + '@vitest/browser-playwright': 4.0.16 + '@vitest/browser-preview': 4.0.16 + '@vitest/browser-webdriverio': 4.0.16 + '@vitest/ui': 4.0.16 happy-dom: '*' jsdom: '*' peerDependenciesMeta: '@edge-runtime/vm': optional: true - '@types/debug': + '@opentelemetry/api': optional: true '@types/node': optional: true - '@vitest/browser': + '@vitest/browser-playwright': + optional: true + '@vitest/browser-preview': + optional: true + '@vitest/browser-webdriverio': optional: true '@vitest/ui': optional: true @@ -14496,18 +14155,13 @@ packages: wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} - workerd@1.20250310.0: - resolution: {integrity: sha512-bAaZ9Bmts3mArbIrXYAtr+ZRsAJAAUEsCtvwfBavIYXaZ5sgdEOJBEiBbvsHp6CsVObegOM85tIWpYLpbTxQrQ==} - engines: {node: '>=16'} - hasBin: true - - workerd@1.20250417.0: - resolution: {integrity: sha512-naz6oJiVODd3/Lkp9l3vtc56HKOOvx+AWDvEsTa5eSfi5SI9V0HYpLYSPblAwrfazbQ4ff1Vl3jkTl/5JxqCAA==} + workerd@1.20251202.0: + resolution: {integrity: sha512-p08YfrUMHkjCECNdT36r+6DpJIZX4kixbZ4n6GMUcLR5Gh18fakSCsiQrh72iOm4M9QHv/rM7P8YvCrUPWT5sg==} engines: {node: '>=16'} hasBin: true - workerd@1.20251202.0: - resolution: {integrity: sha512-p08YfrUMHkjCECNdT36r+6DpJIZX4kixbZ4n6GMUcLR5Gh18fakSCsiQrh72iOm4M9QHv/rM7P8YvCrUPWT5sg==} + workerd@1.20251210.0: + resolution: {integrity: sha512-9MUUneP1BnRE9XAYi94FXxHmiLGbO75EHQZsgWqSiOXjoXSqJCw8aQbIEPxCy19TclEl/kHUFYce8ST2W+Qpjw==} engines: {node: '>=16'} hasBin: true @@ -14516,22 +14170,12 @@ packages: engines: {node: '>=16'} hasBin: true - wrangler@3.114.1: - resolution: {integrity: sha512-GuS6SrnAZZDiNb20Vf2Ww0KCfnctHUEzi5GyML1i2brfQPI6BikgI/W/u6XDtYtah0OkbIWIiNJ+SdhWT7KEcw==} - engines: {node: '>=16.17.0'} + wrangler@4.54.0: + resolution: {integrity: sha512-bANFsjDwJLbprYoBK+hUDZsVbUv2SqJd8QvArLIcZk+fPq4h/Ohtj5vkKXD3k0s2bD1DXLk08D+hYmeNH+xC6A==} + engines: {node: '>=20.0.0'} hasBin: true peerDependencies: - '@cloudflare/workers-types': ^4.20250310.0 - peerDependenciesMeta: - '@cloudflare/workers-types': - optional: true - - wrangler@4.12.1: - resolution: {integrity: sha512-jYrz8y2ffhsRqvQLO2dXFi9HLvPUJk3jn7U71GWfBBCHm0I6r2ik7Vs9ajpRcTGlbNw1RY0uIHVJBVR/7bEN5A==} - engines: {node: '>=18.0.0'} - hasBin: true - peerDependencies: - '@cloudflare/workers-types': ^4.20250417.0 + '@cloudflare/workers-types': ^4.20251210.0 peerDependenciesMeta: '@cloudflare/workers-types': optional: true @@ -14648,12 +14292,6 @@ packages: youch-core@0.3.3: resolution: {integrity: sha512-ho7XuGjLaJ2hWHoK8yFnsUGy2Y5uDpqSTq1FkHLK4/oqKtyUU1AFbOOxY4IpC9f0fTLjwYbslUz0Po5BpD1wrA==} - youch@3.2.3: - resolution: {integrity: sha512-ZBcWz/uzZaQVdCvfV4uk616Bbpf2ee+F/AvuKDR5EwX/Y4v06xWdtMluqTD7+KlZdM93lLm9gMZYo0sKBS0pgw==} - - youch@3.3.4: - resolution: {integrity: sha512-UeVBXie8cA35DS6+nBkls68xaBBXCye0CNznrhszZjTbRVnJKQuNsyLKBTTL4ln1o1rh2PKtv35twV7irj5SEg==} - youch@4.1.0-beta.10: resolution: {integrity: sha512-rLfVLB4FgQneDr0dv1oddCVZmKjcJ6yX6mS4pU82Mq/Dt9a3cLZQ62pDBL4AUO+uVrCvtWz3ZFUL2HFAFJ/BXQ==} @@ -14672,6 +14310,9 @@ packages: zod@3.25.76: resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==} + zod@4.2.1: + resolution: {integrity: sha512-0wZ1IRqGGhMP76gLqz8EyfBXKk0J2qo2+H3fi4mcUP/KtTocoX08nmIAHl1Z2kJIZbZee8KOpBCSNPRgauucjw==} + snapshots: '@actions/core@1.11.1': @@ -15382,6 +15023,35 @@ snapshots: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.28.5 + '@better-auth/core@1.4.7(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.5(zod@4.2.1))(jose@5.9.3)(kysely@0.28.9)(nanostores@1.1.0)': + dependencies: + '@better-auth/utils': 0.3.0 + '@better-fetch/fetch': 1.1.21 + '@standard-schema/spec': 1.0.0 + better-call: 1.1.5(zod@4.2.1) + jose: 5.9.3 + kysely: 0.28.9 + nanostores: 1.1.0 + zod: 4.2.1 + + '@better-auth/stripe@1.4.7(@better-auth/core@1.4.7(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.5(zod@4.2.1))(jose@5.9.3)(kysely@0.28.9)(nanostores@1.1.0))(better-auth@1.4.7(mysql2@3.15.3)(pg@8.16.3)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.0.16))(stripe@20.1.0(@types/node@20.19.9))': + dependencies: + '@better-auth/core': 1.4.7(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.5(zod@4.2.1))(jose@5.9.3)(kysely@0.28.9)(nanostores@1.1.0) + better-auth: 1.4.7(mysql2@3.15.3)(pg@8.16.3)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.0.16) + defu: 6.1.4 + stripe: 20.1.0(@types/node@20.19.9) + zod: 4.2.1 + + '@better-auth/telemetry@1.4.7(@better-auth/core@1.4.7(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.5(zod@4.2.1))(jose@6.1.3)(kysely@0.28.9)(nanostores@1.1.0))': + dependencies: + '@better-auth/core': 1.4.7(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.5(zod@4.2.1))(jose@5.9.3)(kysely@0.28.9)(nanostores@1.1.0) + '@better-auth/utils': 0.3.0 + '@better-fetch/fetch': 1.1.21 + + '@better-auth/utils@0.3.0': {} + + '@better-fetch/fetch@1.1.21': {} + '@bugsnag/browser@8.6.0': dependencies: '@bugsnag/core': 8.6.0 @@ -15788,11 +15458,7 @@ snapshots: dependencies: mime: 2.6.0 - '@cloudflare/kv-asset-handler@0.3.4': - dependencies: - mime: 3.0.0 - - '@cloudflare/kv-asset-handler@0.4.0': + '@cloudflare/kv-asset-handler@0.4.1': dependencies: mime: 3.0.0 @@ -15859,17 +15525,11 @@ snapshots: '@cloudflare/util-en-garde': 8.0.10 react: 18.3.1 - '@cloudflare/unenv-preset@2.0.2(unenv@2.0.0-rc.14)(workerd@1.20250310.0)': + '@cloudflare/unenv-preset@2.7.13(unenv@2.0.0-rc.24)(workerd@1.20251210.0)': dependencies: - unenv: 2.0.0-rc.14 + unenv: 2.0.0-rc.24 optionalDependencies: - workerd: 1.20250310.0 - - '@cloudflare/unenv-preset@2.3.1(unenv@2.0.0-rc.15)(workerd@1.20250417.0)': - dependencies: - unenv: 2.0.0-rc.15 - optionalDependencies: - workerd: 1.20250417.0 + workerd: 1.20251210.0 '@cloudflare/util-en-garde@8.0.10': dependencies: @@ -15886,96 +15546,63 @@ snapshots: lodash.memoize: 4.1.2 marked: 0.3.19 - '@cloudflare/vitest-pool-workers@0.7.8(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9)': + '@cloudflare/vitest-pool-workers@0.10.15(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4)': dependencies: - '@vitest/runner': 3.2.3 - '@vitest/snapshot': 3.2.3 + '@vitest/runner': 4.0.16 + '@vitest/snapshot': 4.0.16 birpc: 0.2.14 cjs-module-lexer: 1.2.3 - devalue: 4.3.3 - esbuild: 0.17.19 - miniflare: 3.20250310.0 + devalue: 5.3.2 + miniflare: 4.20251210.0 semver: 7.7.3 - vitest: 2.1.9(@types/node@20.19.9)(@vitest/ui@2.1.9)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3)) - wrangler: 3.114.1(@cloudflare/workers-types@4.20251217.0) + vitest: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + wrangler: 4.54.0(@cloudflare/workers-types@4.20251217.0) zod: 3.22.3 transitivePeerDependencies: - '@cloudflare/workers-types' - bufferutil - utf-8-validate - '@cloudflare/vitest-pool-workers@0.8.19(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3)': - dependencies: - '@vitest/runner': 3.2.3 - '@vitest/snapshot': 3.2.3 - birpc: 0.2.14 - cjs-module-lexer: 1.2.3 - devalue: 4.3.3 - miniflare: 4.20250417.0 - semver: 7.7.3 - vitest: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) - wrangler: 4.12.1(@cloudflare/workers-types@4.20251217.0) - zod: 3.22.3 - transitivePeerDependencies: - - '@cloudflare/workers-types' - - bufferutil - - utf-8-validate - - '@cloudflare/workerd-darwin-64@1.20250310.0': - optional: true - - '@cloudflare/workerd-darwin-64@1.20250417.0': - optional: true - '@cloudflare/workerd-darwin-64@1.20251202.0': optional: true - '@cloudflare/workerd-darwin-64@1.20251217.0': - optional: true - - '@cloudflare/workerd-darwin-arm64@1.20250310.0': + '@cloudflare/workerd-darwin-64@1.20251210.0': optional: true - '@cloudflare/workerd-darwin-arm64@1.20250417.0': + '@cloudflare/workerd-darwin-64@1.20251217.0': optional: true '@cloudflare/workerd-darwin-arm64@1.20251202.0': optional: true - '@cloudflare/workerd-darwin-arm64@1.20251217.0': - optional: true - - '@cloudflare/workerd-linux-64@1.20250310.0': + '@cloudflare/workerd-darwin-arm64@1.20251210.0': optional: true - '@cloudflare/workerd-linux-64@1.20250417.0': + '@cloudflare/workerd-darwin-arm64@1.20251217.0': optional: true '@cloudflare/workerd-linux-64@1.20251202.0': optional: true - '@cloudflare/workerd-linux-64@1.20251217.0': + '@cloudflare/workerd-linux-64@1.20251210.0': optional: true - '@cloudflare/workerd-linux-arm64@1.20250310.0': - optional: true - - '@cloudflare/workerd-linux-arm64@1.20250417.0': + '@cloudflare/workerd-linux-64@1.20251217.0': optional: true '@cloudflare/workerd-linux-arm64@1.20251202.0': optional: true - '@cloudflare/workerd-linux-arm64@1.20251217.0': + '@cloudflare/workerd-linux-arm64@1.20251210.0': optional: true - '@cloudflare/workerd-windows-64@1.20250310.0': + '@cloudflare/workerd-linux-arm64@1.20251217.0': optional: true - '@cloudflare/workerd-windows-64@1.20250417.0': + '@cloudflare/workerd-windows-64@1.20251202.0': optional: true - '@cloudflare/workerd-windows-64@1.20251202.0': + '@cloudflare/workerd-windows-64@1.20251210.0': optional: true '@cloudflare/workerd-windows-64@1.20251217.0': @@ -16057,16 +15684,6 @@ snapshots: '@esbuild-kit/core-utils': 3.3.2 get-tsconfig: 4.7.0 - '@esbuild-plugins/node-globals-polyfill@0.2.3(esbuild@0.17.19)': - dependencies: - esbuild: 0.17.19 - - '@esbuild-plugins/node-modules-polyfill@0.2.2(esbuild@0.17.19)': - dependencies: - esbuild: 0.17.19 - escape-string-regexp: 4.0.0 - rollup-plugin-node-polyfills: 0.2.1 - '@esbuild/aix-ppc64@0.21.5': optional: true @@ -16076,18 +15693,12 @@ snapshots: '@esbuild/aix-ppc64@0.24.2': optional: true - '@esbuild/aix-ppc64@0.25.2': - optional: true - '@esbuild/aix-ppc64@0.25.4': optional: true '@esbuild/aix-ppc64@0.27.0': optional: true - '@esbuild/android-arm64@0.17.19': - optional: true - '@esbuild/android-arm64@0.18.20': optional: true @@ -16100,18 +15711,12 @@ snapshots: '@esbuild/android-arm64@0.24.2': optional: true - '@esbuild/android-arm64@0.25.2': - optional: true - '@esbuild/android-arm64@0.25.4': optional: true '@esbuild/android-arm64@0.27.0': optional: true - '@esbuild/android-arm@0.17.19': - optional: true - '@esbuild/android-arm@0.18.20': optional: true @@ -16124,18 +15729,12 @@ snapshots: '@esbuild/android-arm@0.24.2': optional: true - '@esbuild/android-arm@0.25.2': - optional: true - '@esbuild/android-arm@0.25.4': optional: true '@esbuild/android-arm@0.27.0': optional: true - '@esbuild/android-x64@0.17.19': - optional: true - '@esbuild/android-x64@0.18.20': optional: true @@ -16148,18 +15747,12 @@ snapshots: '@esbuild/android-x64@0.24.2': optional: true - '@esbuild/android-x64@0.25.2': - optional: true - '@esbuild/android-x64@0.25.4': optional: true '@esbuild/android-x64@0.27.0': optional: true - '@esbuild/darwin-arm64@0.17.19': - optional: true - '@esbuild/darwin-arm64@0.18.20': optional: true @@ -16172,18 +15765,12 @@ snapshots: '@esbuild/darwin-arm64@0.24.2': optional: true - '@esbuild/darwin-arm64@0.25.2': - optional: true - '@esbuild/darwin-arm64@0.25.4': optional: true '@esbuild/darwin-arm64@0.27.0': optional: true - '@esbuild/darwin-x64@0.17.19': - optional: true - '@esbuild/darwin-x64@0.18.20': optional: true @@ -16196,18 +15783,12 @@ snapshots: '@esbuild/darwin-x64@0.24.2': optional: true - '@esbuild/darwin-x64@0.25.2': - optional: true - '@esbuild/darwin-x64@0.25.4': optional: true '@esbuild/darwin-x64@0.27.0': optional: true - '@esbuild/freebsd-arm64@0.17.19': - optional: true - '@esbuild/freebsd-arm64@0.18.20': optional: true @@ -16220,18 +15801,12 @@ snapshots: '@esbuild/freebsd-arm64@0.24.2': optional: true - '@esbuild/freebsd-arm64@0.25.2': - optional: true - '@esbuild/freebsd-arm64@0.25.4': optional: true '@esbuild/freebsd-arm64@0.27.0': optional: true - '@esbuild/freebsd-x64@0.17.19': - optional: true - '@esbuild/freebsd-x64@0.18.20': optional: true @@ -16244,18 +15819,12 @@ snapshots: '@esbuild/freebsd-x64@0.24.2': optional: true - '@esbuild/freebsd-x64@0.25.2': - optional: true - '@esbuild/freebsd-x64@0.25.4': optional: true '@esbuild/freebsd-x64@0.27.0': optional: true - '@esbuild/linux-arm64@0.17.19': - optional: true - '@esbuild/linux-arm64@0.18.20': optional: true @@ -16268,18 +15837,12 @@ snapshots: '@esbuild/linux-arm64@0.24.2': optional: true - '@esbuild/linux-arm64@0.25.2': - optional: true - '@esbuild/linux-arm64@0.25.4': optional: true '@esbuild/linux-arm64@0.27.0': optional: true - '@esbuild/linux-arm@0.17.19': - optional: true - '@esbuild/linux-arm@0.18.20': optional: true @@ -16292,18 +15855,12 @@ snapshots: '@esbuild/linux-arm@0.24.2': optional: true - '@esbuild/linux-arm@0.25.2': - optional: true - '@esbuild/linux-arm@0.25.4': optional: true '@esbuild/linux-arm@0.27.0': optional: true - '@esbuild/linux-ia32@0.17.19': - optional: true - '@esbuild/linux-ia32@0.18.20': optional: true @@ -16316,18 +15873,12 @@ snapshots: '@esbuild/linux-ia32@0.24.2': optional: true - '@esbuild/linux-ia32@0.25.2': - optional: true - '@esbuild/linux-ia32@0.25.4': optional: true '@esbuild/linux-ia32@0.27.0': optional: true - '@esbuild/linux-loong64@0.17.19': - optional: true - '@esbuild/linux-loong64@0.18.20': optional: true @@ -16340,18 +15891,12 @@ snapshots: '@esbuild/linux-loong64@0.24.2': optional: true - '@esbuild/linux-loong64@0.25.2': - optional: true - '@esbuild/linux-loong64@0.25.4': optional: true '@esbuild/linux-loong64@0.27.0': optional: true - '@esbuild/linux-mips64el@0.17.19': - optional: true - '@esbuild/linux-mips64el@0.18.20': optional: true @@ -16364,18 +15909,12 @@ snapshots: '@esbuild/linux-mips64el@0.24.2': optional: true - '@esbuild/linux-mips64el@0.25.2': - optional: true - '@esbuild/linux-mips64el@0.25.4': optional: true '@esbuild/linux-mips64el@0.27.0': optional: true - '@esbuild/linux-ppc64@0.17.19': - optional: true - '@esbuild/linux-ppc64@0.18.20': optional: true @@ -16388,18 +15927,12 @@ snapshots: '@esbuild/linux-ppc64@0.24.2': optional: true - '@esbuild/linux-ppc64@0.25.2': - optional: true - '@esbuild/linux-ppc64@0.25.4': optional: true '@esbuild/linux-ppc64@0.27.0': optional: true - '@esbuild/linux-riscv64@0.17.19': - optional: true - '@esbuild/linux-riscv64@0.18.20': optional: true @@ -16412,18 +15945,12 @@ snapshots: '@esbuild/linux-riscv64@0.24.2': optional: true - '@esbuild/linux-riscv64@0.25.2': - optional: true - '@esbuild/linux-riscv64@0.25.4': optional: true '@esbuild/linux-riscv64@0.27.0': optional: true - '@esbuild/linux-s390x@0.17.19': - optional: true - '@esbuild/linux-s390x@0.18.20': optional: true @@ -16436,18 +15963,12 @@ snapshots: '@esbuild/linux-s390x@0.24.2': optional: true - '@esbuild/linux-s390x@0.25.2': - optional: true - '@esbuild/linux-s390x@0.25.4': optional: true '@esbuild/linux-s390x@0.27.0': optional: true - '@esbuild/linux-x64@0.17.19': - optional: true - '@esbuild/linux-x64@0.18.20': optional: true @@ -16460,9 +15981,6 @@ snapshots: '@esbuild/linux-x64@0.24.2': optional: true - '@esbuild/linux-x64@0.25.2': - optional: true - '@esbuild/linux-x64@0.25.4': optional: true @@ -16472,18 +15990,12 @@ snapshots: '@esbuild/netbsd-arm64@0.24.2': optional: true - '@esbuild/netbsd-arm64@0.25.2': - optional: true - '@esbuild/netbsd-arm64@0.25.4': optional: true '@esbuild/netbsd-arm64@0.27.0': optional: true - '@esbuild/netbsd-x64@0.17.19': - optional: true - '@esbuild/netbsd-x64@0.18.20': optional: true @@ -16496,9 +16008,6 @@ snapshots: '@esbuild/netbsd-x64@0.24.2': optional: true - '@esbuild/netbsd-x64@0.25.2': - optional: true - '@esbuild/netbsd-x64@0.25.4': optional: true @@ -16511,18 +16020,12 @@ snapshots: '@esbuild/openbsd-arm64@0.24.2': optional: true - '@esbuild/openbsd-arm64@0.25.2': - optional: true - '@esbuild/openbsd-arm64@0.25.4': optional: true '@esbuild/openbsd-arm64@0.27.0': optional: true - '@esbuild/openbsd-x64@0.17.19': - optional: true - '@esbuild/openbsd-x64@0.18.20': optional: true @@ -16535,9 +16038,6 @@ snapshots: '@esbuild/openbsd-x64@0.24.2': optional: true - '@esbuild/openbsd-x64@0.25.2': - optional: true - '@esbuild/openbsd-x64@0.25.4': optional: true @@ -16547,9 +16047,6 @@ snapshots: '@esbuild/openharmony-arm64@0.27.0': optional: true - '@esbuild/sunos-x64@0.17.19': - optional: true - '@esbuild/sunos-x64@0.18.20': optional: true @@ -16562,18 +16059,12 @@ snapshots: '@esbuild/sunos-x64@0.24.2': optional: true - '@esbuild/sunos-x64@0.25.2': - optional: true - '@esbuild/sunos-x64@0.25.4': optional: true '@esbuild/sunos-x64@0.27.0': optional: true - '@esbuild/win32-arm64@0.17.19': - optional: true - '@esbuild/win32-arm64@0.18.20': optional: true @@ -16586,18 +16077,12 @@ snapshots: '@esbuild/win32-arm64@0.24.2': optional: true - '@esbuild/win32-arm64@0.25.2': - optional: true - '@esbuild/win32-arm64@0.25.4': optional: true '@esbuild/win32-arm64@0.27.0': optional: true - '@esbuild/win32-ia32@0.17.19': - optional: true - '@esbuild/win32-ia32@0.18.20': optional: true @@ -16610,18 +16095,12 @@ snapshots: '@esbuild/win32-ia32@0.24.2': optional: true - '@esbuild/win32-ia32@0.25.2': - optional: true - '@esbuild/win32-ia32@0.25.4': optional: true '@esbuild/win32-ia32@0.27.0': optional: true - '@esbuild/win32-x64@0.17.19': - optional: true - '@esbuild/win32-x64@0.18.20': optional: true @@ -16634,9 +16113,6 @@ snapshots: '@esbuild/win32-x64@0.24.2': optional: true - '@esbuild/win32-x64@0.25.2': - optional: true - '@esbuild/win32-x64@0.25.4': optional: true @@ -17082,6 +16558,10 @@ snapshots: yaml: 2.8.1 yargs: 17.7.2 + '@noble/ciphers@2.1.1': {} + + '@noble/hashes@2.0.1': {} + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -18682,7 +18162,7 @@ snapshots: '@types/stack-utils@2.0.3': {} - '@types/statuses@2.0.5': {} + '@types/statuses@2.0.6': {} '@types/stoppable@1.1.3': dependencies: @@ -19102,181 +18582,147 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitest/expect@2.1.9': + '@vitest/expect@3.2.4': dependencies: - '@vitest/spy': 2.1.9 - '@vitest/utils': 2.1.9 - chai: 5.2.0 - tinyrainbow: 1.2.0 - - '@vitest/expect@3.0.9': - dependencies: - '@vitest/spy': 3.0.9 - '@vitest/utils': 3.0.9 + '@types/chai': 5.2.2 + '@vitest/spy': 3.2.4 + '@vitest/utils': 3.2.4 chai: 5.2.0 tinyrainbow: 2.0.0 - '@vitest/expect@3.2.3': + '@vitest/expect@4.0.16': dependencies: + '@standard-schema/spec': 1.0.0 '@types/chai': 5.2.2 - '@vitest/spy': 3.2.3 - '@vitest/utils': 3.2.3 - chai: 5.2.0 - tinyrainbow: 2.0.0 + '@vitest/spy': 4.0.16 + '@vitest/utils': 4.0.16 + chai: 6.2.1 + tinyrainbow: 3.0.3 - '@vitest/mocker@2.1.9(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2))': + '@vitest/mocker@3.2.4(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2))': dependencies: - '@vitest/spy': 2.1.9 + '@vitest/spy': 3.2.4 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - msw: 2.12.0(@types/node@20.19.9)(typescript@5.8.3) + msw: 2.12.4(@types/node@20.19.9)(typescript@5.8.3) vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - '@vitest/mocker@2.1.9(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2))': + '@vitest/mocker@3.2.4(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2))': dependencies: - '@vitest/spy': 2.1.9 + '@vitest/spy': 3.2.4 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - msw: 2.12.0(@types/node@20.19.9)(typescript@5.9.3) + msw: 2.12.4(@types/node@20.19.9)(typescript@5.9.3) vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - '@vitest/mocker@3.0.9(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.2))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2))': + '@vitest/mocker@4.0.16(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.2))(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1))': dependencies: - '@vitest/spy': 3.0.9 + '@vitest/spy': 4.0.16 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - msw: 2.12.0(@types/node@20.19.9)(typescript@5.8.2) - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) + msw: 2.12.4(@types/node@20.19.9)(typescript@5.8.2) + vite: 7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) - '@vitest/mocker@3.2.3(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2))': + '@vitest/mocker@4.0.16(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1))': dependencies: - '@vitest/spy': 3.2.3 + '@vitest/spy': 4.0.16 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - msw: 2.12.0(@types/node@20.19.9)(typescript@5.8.3) - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) + msw: 2.12.4(@types/node@20.19.9)(typescript@5.8.3) + vite: 7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) - '@vitest/mocker@3.2.3(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2))': + '@vitest/mocker@4.0.16(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1))': dependencies: - '@vitest/spy': 3.2.3 + '@vitest/spy': 4.0.16 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - msw: 2.12.0(@types/node@20.19.9)(typescript@5.9.3) - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) + msw: 2.12.4(@types/node@20.19.9)(typescript@5.9.3) + vite: 7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) '@vitest/pretty-format@2.1.8': dependencies: tinyrainbow: 1.2.0 - '@vitest/pretty-format@2.1.9': - dependencies: - tinyrainbow: 1.2.0 - - '@vitest/pretty-format@3.0.9': - dependencies: - tinyrainbow: 2.0.0 - - '@vitest/pretty-format@3.2.3': + '@vitest/pretty-format@3.2.4': dependencies: tinyrainbow: 2.0.0 - '@vitest/runner@2.1.9': + '@vitest/pretty-format@4.0.16': dependencies: - '@vitest/utils': 2.1.9 - pathe: 1.1.2 + tinyrainbow: 3.0.3 - '@vitest/runner@3.0.9': + '@vitest/runner@3.2.4': dependencies: - '@vitest/utils': 3.0.9 - pathe: 2.0.3 - - '@vitest/runner@3.2.3': - dependencies: - '@vitest/utils': 3.2.3 + '@vitest/utils': 3.2.4 pathe: 2.0.3 strip-literal: 3.0.0 - '@vitest/snapshot@2.1.9': + '@vitest/runner@4.0.16': dependencies: - '@vitest/pretty-format': 2.1.9 - magic-string: 0.30.21 - pathe: 1.1.2 + '@vitest/utils': 4.0.16 + pathe: 2.0.3 - '@vitest/snapshot@3.0.9': + '@vitest/snapshot@3.2.4': dependencies: - '@vitest/pretty-format': 3.0.9 + '@vitest/pretty-format': 3.2.4 magic-string: 0.30.21 pathe: 2.0.3 - '@vitest/snapshot@3.2.3': + '@vitest/snapshot@4.0.16': dependencies: - '@vitest/pretty-format': 3.2.3 + '@vitest/pretty-format': 4.0.16 magic-string: 0.30.21 pathe: 2.0.3 - '@vitest/spy@2.1.9': - dependencies: - tinyspy: 3.0.2 - - '@vitest/spy@3.0.9': - dependencies: - tinyspy: 3.0.2 - - '@vitest/spy@3.2.3': + '@vitest/spy@3.2.4': dependencies: tinyspy: 4.0.3 - '@vitest/ui@2.1.9(vitest@2.1.9)': + '@vitest/spy@4.0.16': {} + + '@vitest/ui@3.2.4(vitest@3.2.4)': dependencies: - '@vitest/utils': 2.1.9 + '@vitest/utils': 3.2.4 fflate: 0.8.2 flatted: 3.3.3 - pathe: 1.1.2 + pathe: 2.0.3 sirv: 3.0.2 tinyglobby: 0.2.15 - tinyrainbow: 1.2.0 - vitest: 2.1.9(@types/node@20.19.9)(@vitest/ui@2.1.9)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3)) - optional: true + tinyrainbow: 2.0.0 + vitest: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) - '@vitest/ui@3.2.3(vitest@3.2.3)': + '@vitest/ui@4.0.16(vitest@4.0.16)': dependencies: - '@vitest/utils': 3.2.3 + '@vitest/utils': 4.0.16 fflate: 0.8.2 flatted: 3.3.3 pathe: 2.0.3 sirv: 3.0.2 tinyglobby: 0.2.15 - tinyrainbow: 2.0.0 - vitest: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) - - '@vitest/utils@2.1.8': - dependencies: - '@vitest/pretty-format': 2.1.8 - loupe: 3.1.3 - tinyrainbow: 1.2.0 + tinyrainbow: 3.0.3 + vitest: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) - '@vitest/utils@2.1.9': + '@vitest/utils@2.1.8': dependencies: - '@vitest/pretty-format': 2.1.9 + '@vitest/pretty-format': 2.1.8 loupe: 3.1.3 tinyrainbow: 1.2.0 - '@vitest/utils@3.0.9': + '@vitest/utils@3.2.4': dependencies: - '@vitest/pretty-format': 3.0.9 - loupe: 3.1.3 + '@vitest/pretty-format': 3.2.4 + loupe: 3.2.1 tinyrainbow: 2.0.0 - '@vitest/utils@3.2.3': + '@vitest/utils@4.0.16': dependencies: - '@vitest/pretty-format': 3.2.3 - loupe: 3.1.3 - tinyrainbow: 2.0.0 + '@vitest/pretty-format': 4.0.16 + tinyrainbow: 3.0.3 '@volar/language-core@2.3.4': dependencies: @@ -19605,10 +19051,6 @@ snapshots: arrify@3.0.0: {} - as-table@1.0.55: - dependencies: - printable-characters: 1.0.42 - asn1@0.2.6: dependencies: safer-buffer: 2.1.2 @@ -19784,6 +19226,36 @@ snapshots: before-after-hook@2.2.3: {} + better-auth@1.4.7(mysql2@3.15.3)(pg@8.16.3)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.0.16): + dependencies: + '@better-auth/core': 1.4.7(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.5(zod@4.2.1))(jose@5.9.3)(kysely@0.28.9)(nanostores@1.1.0) + '@better-auth/telemetry': 1.4.7(@better-auth/core@1.4.7(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.5(zod@4.2.1))(jose@6.1.3)(kysely@0.28.9)(nanostores@1.1.0)) + '@better-auth/utils': 0.3.0 + '@better-fetch/fetch': 1.1.21 + '@noble/ciphers': 2.1.1 + '@noble/hashes': 2.0.1 + better-call: 1.1.5(zod@4.2.1) + defu: 6.1.4 + jose: 6.1.3 + kysely: 0.28.9 + nanostores: 1.1.0 + zod: 4.2.1 + optionalDependencies: + mysql2: 3.15.3 + pg: 8.16.3 + react: 19.2.1 + react-dom: 19.2.1(react@19.2.1) + vitest: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + + better-call@1.1.5(zod@4.2.1): + dependencies: + '@better-auth/utils': 0.3.0 + '@better-fetch/fetch': 1.1.21 + rou3: 0.7.12 + set-cookie-parser: 2.7.2 + optionalDependencies: + zod: 4.2.1 + better-path-resolve@1.0.0: dependencies: is-windows: 1.0.2 @@ -19969,14 +19441,6 @@ snapshots: dependencies: nofilter: 3.1.0 - chai@5.1.2: - dependencies: - assertion-error: 2.0.1 - check-error: 2.1.1 - deep-eql: 5.0.2 - loupe: 3.1.3 - pathval: 2.0.0 - chai@5.2.0: dependencies: assertion-error: 2.0.1 @@ -19985,6 +19449,8 @@ snapshots: loupe: 3.1.3 pathval: 2.0.0 + chai@6.2.1: {} + chalk@4.1.2: dependencies: ansi-styles: 4.3.0 @@ -20223,8 +19689,6 @@ snapshots: cookie-signature@1.2.2: {} - cookie@0.5.0: {} - cookie@0.6.0: {} cookie@0.7.1: {} @@ -20362,8 +19826,6 @@ snapshots: dependencies: assert-plus: 1.0.0 - data-uri-to-buffer@2.0.2: {} - data-uri-to-buffer@6.0.2: {} data-view-buffer@1.0.1: @@ -20521,8 +19983,6 @@ snapshots: detect-newline@3.1.0: {} - devalue@4.3.3: {} - devalue@5.3.2: {} devtools-protocol@0.0.1182435: {} @@ -20862,31 +20322,6 @@ snapshots: transitivePeerDependencies: - supports-color - esbuild@0.17.19: - optionalDependencies: - '@esbuild/android-arm': 0.17.19 - '@esbuild/android-arm64': 0.17.19 - '@esbuild/android-x64': 0.17.19 - '@esbuild/darwin-arm64': 0.17.19 - '@esbuild/darwin-x64': 0.17.19 - '@esbuild/freebsd-arm64': 0.17.19 - '@esbuild/freebsd-x64': 0.17.19 - '@esbuild/linux-arm': 0.17.19 - '@esbuild/linux-arm64': 0.17.19 - '@esbuild/linux-ia32': 0.17.19 - '@esbuild/linux-loong64': 0.17.19 - '@esbuild/linux-mips64el': 0.17.19 - '@esbuild/linux-ppc64': 0.17.19 - '@esbuild/linux-riscv64': 0.17.19 - '@esbuild/linux-s390x': 0.17.19 - '@esbuild/linux-x64': 0.17.19 - '@esbuild/netbsd-x64': 0.17.19 - '@esbuild/openbsd-x64': 0.17.19 - '@esbuild/sunos-x64': 0.17.19 - '@esbuild/win32-arm64': 0.17.19 - '@esbuild/win32-ia32': 0.17.19 - '@esbuild/win32-x64': 0.17.19 - esbuild@0.18.20: optionalDependencies: '@esbuild/android-arm': 0.18.20 @@ -20993,34 +20428,6 @@ snapshots: '@esbuild/win32-ia32': 0.24.2 '@esbuild/win32-x64': 0.24.2 - esbuild@0.25.2: - optionalDependencies: - '@esbuild/aix-ppc64': 0.25.2 - '@esbuild/android-arm': 0.25.2 - '@esbuild/android-arm64': 0.25.2 - '@esbuild/android-x64': 0.25.2 - '@esbuild/darwin-arm64': 0.25.2 - '@esbuild/darwin-x64': 0.25.2 - '@esbuild/freebsd-arm64': 0.25.2 - '@esbuild/freebsd-x64': 0.25.2 - '@esbuild/linux-arm': 0.25.2 - '@esbuild/linux-arm64': 0.25.2 - '@esbuild/linux-ia32': 0.25.2 - '@esbuild/linux-loong64': 0.25.2 - '@esbuild/linux-mips64el': 0.25.2 - '@esbuild/linux-ppc64': 0.25.2 - '@esbuild/linux-riscv64': 0.25.2 - '@esbuild/linux-s390x': 0.25.2 - '@esbuild/linux-x64': 0.25.2 - '@esbuild/netbsd-arm64': 0.25.2 - '@esbuild/netbsd-x64': 0.25.2 - '@esbuild/openbsd-arm64': 0.25.2 - '@esbuild/openbsd-x64': 0.25.2 - '@esbuild/sunos-x64': 0.25.2 - '@esbuild/win32-arm64': 0.25.2 - '@esbuild/win32-ia32': 0.25.2 - '@esbuild/win32-x64': 0.25.2 - esbuild@0.25.4: optionalDependencies: '@esbuild/aix-ppc64': 0.25.4 @@ -21330,8 +20737,6 @@ snapshots: estraverse@5.3.0: {} - estree-walker@0.6.1: {} - estree-walker@2.0.2: {} estree-walker@3.0.3: @@ -21393,10 +20798,10 @@ snapshots: expect-type@0.15.0: {} - expect-type@1.1.0: {} - expect-type@1.2.1: {} + expect-type@1.3.0: {} + expect@29.7.0: dependencies: '@jest/expect-utils': 29.7.0 @@ -21813,11 +21218,6 @@ snapshots: dunder-proto: 1.0.1 es-object-atoms: 1.1.1 - get-source@2.0.12: - dependencies: - data-uri-to-buffer: 2.0.2 - source-map: 0.6.1 - get-stdin@5.0.1: {} get-stream@5.2.0: @@ -21978,7 +21378,7 @@ snapshots: graphemer@1.4.0: {} - graphql@16.8.1: {} + graphql@16.12.0: {} gunzip-maybe@1.4.2: dependencies: @@ -22533,6 +21933,8 @@ snapshots: jose@5.9.3: {} + jose@6.1.3: {} + joycon@3.1.1: {} js-base64@3.7.7: {} @@ -22650,6 +22052,8 @@ snapshots: ky@1.7.5: {} + kysely@0.28.9: {} + levn@0.4.1: dependencies: prelude-ls: 1.2.1 @@ -22835,6 +22239,8 @@ snapshots: loupe@3.1.3: {} + loupe@3.2.1: {} + lowdb@1.0.0: dependencies: graceful-fs: 4.2.11 @@ -22861,10 +22267,6 @@ snapshots: lz-string@1.5.0: {} - magic-string@0.25.9: - dependencies: - sourcemap-codec: 1.4.8 - magic-string@0.30.14: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 @@ -22959,35 +22361,19 @@ snapshots: mimic-response@3.1.0: optional: true - miniflare@3.20250310.0: - dependencies: - '@cspotcode/source-map-support': 0.8.1 - acorn: 8.14.0 - acorn-walk: 8.3.2 - exit-hook: 2.2.1 - glob-to-regexp: 0.4.1 - stoppable: 1.1.0 - undici: 5.28.5 - workerd: 1.20250310.0 - ws: 8.18.0 - youch: 3.2.3 - zod: 3.22.3 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - miniflare@4.20250417.0: + miniflare@4.20251210.0: dependencies: '@cspotcode/source-map-support': 0.8.1 acorn: 8.14.0 acorn-walk: 8.3.2 exit-hook: 2.2.1 glob-to-regexp: 0.4.1 + sharp: 0.33.5 stoppable: 1.1.0 - undici: 5.28.5 - workerd: 1.20250417.0 + undici: 7.14.0 + workerd: 1.20251210.0 ws: 8.18.0 - youch: 3.3.4 + youch: 4.1.0-beta.10(patch_hash=flgmw54jmjdxqmelxigtxg6kum) zod: 3.22.3 transitivePeerDependencies: - bufferutil @@ -23074,14 +22460,14 @@ snapshots: ms@2.1.3: {} - msw@2.12.0(@types/node@20.19.9)(typescript@5.8.2): + msw@2.12.4(@types/node@20.19.9)(typescript@5.8.2): dependencies: '@inquirer/confirm': 5.1.21(@types/node@20.19.9) '@mswjs/interceptors': 0.40.0 '@open-draft/deferred-promise': 2.2.0 - '@types/statuses': 2.0.5 + '@types/statuses': 2.0.6 cookie: 1.0.2 - graphql: 16.8.1 + graphql: 16.12.0 headers-polyfill: 4.0.3 is-node-process: 1.2.0 outvariant: 1.4.3 @@ -23091,7 +22477,7 @@ snapshots: statuses: 2.0.2 strict-event-emitter: 0.5.1 tough-cookie: 6.0.0 - type-fest: 4.41.0 + type-fest: 5.3.1 until-async: 3.0.2 yargs: 17.7.2 optionalDependencies: @@ -23100,14 +22486,14 @@ snapshots: - '@types/node' optional: true - msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3): + msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3): dependencies: '@inquirer/confirm': 5.1.21(@types/node@20.19.9) '@mswjs/interceptors': 0.40.0 '@open-draft/deferred-promise': 2.2.0 - '@types/statuses': 2.0.5 + '@types/statuses': 2.0.6 cookie: 1.0.2 - graphql: 16.8.1 + graphql: 16.12.0 headers-polyfill: 4.0.3 is-node-process: 1.2.0 outvariant: 1.4.3 @@ -23117,7 +22503,7 @@ snapshots: statuses: 2.0.2 strict-event-emitter: 0.5.1 tough-cookie: 6.0.0 - type-fest: 4.41.0 + type-fest: 5.3.1 until-async: 3.0.2 yargs: 17.7.2 optionalDependencies: @@ -23125,14 +22511,14 @@ snapshots: transitivePeerDependencies: - '@types/node' - msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3): + msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3): dependencies: '@inquirer/confirm': 5.1.21(@types/node@20.19.9) '@mswjs/interceptors': 0.40.0 '@open-draft/deferred-promise': 2.2.0 - '@types/statuses': 2.0.5 + '@types/statuses': 2.0.6 cookie: 1.0.2 - graphql: 16.8.1 + graphql: 16.12.0 headers-polyfill: 4.0.3 is-node-process: 1.2.0 outvariant: 1.4.3 @@ -23142,7 +22528,7 @@ snapshots: statuses: 2.0.2 strict-event-emitter: 0.5.1 tough-cookie: 6.0.0 - type-fest: 4.41.0 + type-fest: 5.3.1 until-async: 3.0.2 yargs: 17.7.2 optionalDependencies: @@ -23188,6 +22574,8 @@ snapshots: nanoid@5.1.0: {} + nanostores@1.1.0: {} + napi-build-utils@2.0.0: optional: true @@ -23335,6 +22723,8 @@ snapshots: optionalDependencies: ms: 2.1.3 + obug@2.1.1: {} + ohash@2.0.11: {} on-exit-leak-free@2.1.2: {} @@ -23941,8 +23331,6 @@ snapshots: dependencies: parse-ms: 4.0.0 - printable-characters@1.0.42: {} - prism-react-renderer@1.3.5(react@18.3.1): dependencies: react: 18.3.1 @@ -24470,20 +23858,6 @@ snapshots: optionalDependencies: '@babel/code-frame': 7.26.2 - rollup-plugin-inject@3.0.2: - dependencies: - estree-walker: 0.6.1 - magic-string: 0.25.9 - rollup-pluginutils: 2.8.2 - - rollup-plugin-node-polyfills@0.2.1: - dependencies: - rollup-plugin-inject: 3.0.2 - - rollup-pluginutils@2.8.2: - dependencies: - estree-walker: 0.6.1 - rollup@4.30.1: dependencies: '@types/estree': 1.0.6 @@ -24535,6 +23909,8 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.44.1 fsevents: 2.3.3 + rou3@0.7.12: {} + router@2.2.0: dependencies: debug: 4.4.1(supports-color@9.2.2) @@ -24694,6 +24070,8 @@ snapshots: set-cookie-parser@2.6.0: {} + set-cookie-parser@2.7.2: {} + set-function-length@1.2.2: dependencies: define-data-property: 1.1.4 @@ -24887,8 +24265,6 @@ snapshots: dependencies: whatwg-url: 7.1.0 - sourcemap-codec@1.4.8: {} - spawn-command@0.0.2: {} spawndamnit@3.0.1: @@ -24944,16 +24320,11 @@ snapshots: stackframe@1.3.4: {} - stacktracey@2.1.8: - dependencies: - as-table: 1.0.55 - get-source: 2.0.12 - statuses@2.0.1: {} statuses@2.0.2: {} - std-env@3.8.0: {} + std-env@3.10.0: {} std-env@3.9.0: {} @@ -25081,6 +24452,12 @@ snapshots: dependencies: js-tokens: 9.0.1 + stripe@20.1.0(@types/node@20.19.9): + dependencies: + qs: 6.14.0 + optionalDependencies: + '@types/node': 20.19.9 + stripe@9.16.0: dependencies: '@types/node': 20.19.9 @@ -25164,6 +24541,8 @@ snapshots: '@pkgr/utils': 2.4.1 tslib: 2.8.1 + tagged-tag@1.0.0: {} + tailwindcss@4.0.15: {} tapable@2.2.1: {} @@ -25254,8 +24633,6 @@ snapshots: tinybench@2.9.0: {} - tinyexec@0.3.1: {} - tinyexec@0.3.2: {} tinyexec@1.0.1: {} @@ -25272,15 +24649,13 @@ snapshots: fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 - tinypool@1.0.1: {} - - tinypool@1.1.0: {} + tinypool@1.1.1: {} tinyrainbow@1.2.0: {} tinyrainbow@2.0.0: {} - tinyspy@3.0.2: {} + tinyrainbow@3.0.3: {} tinyspy@4.0.3: {} @@ -25539,6 +24914,10 @@ snapshots: type-fest@4.41.0: {} + type-fest@5.3.1: + dependencies: + tagged-tag: 1.0.0 + type-is@1.6.18: dependencies: media-typer: 0.3.0 @@ -25630,8 +25009,6 @@ snapshots: ufo@1.5.4: {} - ufo@1.6.1: {} - uglify-js@3.17.4: optional: true @@ -25707,22 +25084,6 @@ snapshots: undici@7.14.0: {} - unenv@2.0.0-rc.14: - dependencies: - defu: 6.1.4 - exsolve: 1.0.7 - ohash: 2.0.11 - pathe: 2.0.3 - ufo: 1.6.1 - - unenv@2.0.0-rc.15: - dependencies: - defu: 6.1.4 - exsolve: 1.0.7 - ohash: 2.0.11 - pathe: 2.0.3 - ufo: 1.6.1 - unenv@2.0.0-rc.24: dependencies: pathe: 2.0.3 @@ -25887,46 +25248,7 @@ snapshots: core-util-is: 1.0.2 extsprintf: 1.3.0 - vite-node@2.1.9(@types/node@20.19.9)(lightningcss@1.30.2): - dependencies: - cac: 6.7.14 - debug: 4.4.1(supports-color@9.2.2) - es-module-lexer: 1.7.0 - pathe: 1.1.2 - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - transitivePeerDependencies: - - '@types/node' - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - vite-node@3.0.9(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1): - dependencies: - cac: 6.7.14 - debug: 4.4.1(supports-color@9.2.2) - es-module-lexer: 1.7.0 - pathe: 2.0.3 - vite: 6.4.1(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) - transitivePeerDependencies: - - '@types/node' - - jiti - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - tsx - - yaml - - vite-node@3.2.3(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(supports-color@9.2.2)(yaml@2.8.1): + vite-node@3.2.4(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(supports-color@9.2.2)(yaml@2.8.1): dependencies: cac: 6.7.14 debug: 4.4.1(supports-color@9.2.2) @@ -25967,13 +25289,13 @@ snapshots: - rollup - supports-color - vite-tsconfig-paths@4.2.0(typescript@5.8.3)(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)): + vite-tsconfig-paths@4.2.0(typescript@5.8.3)(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1)): dependencies: debug: 4.4.1(supports-color@9.2.2) globrex: 0.1.2 tsconfck: 2.1.1(typescript@5.8.3) optionalDependencies: - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) + vite: 7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) transitivePeerDependencies: - supports-color - typescript @@ -25988,21 +25310,6 @@ snapshots: fsevents: 2.3.3 lightningcss: 1.30.2 - vite@6.4.1(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1): - dependencies: - esbuild: 0.25.4 - fdir: 6.5.0(picomatch@4.0.3) - picomatch: 4.0.3 - postcss: 8.5.6 - rollup: 4.44.1 - tinyglobby: 0.2.15 - optionalDependencies: - '@types/node': 20.19.9 - fsevents: 2.3.3 - jiti: 2.6.0 - lightningcss: 1.30.2 - yaml: 2.8.1 - vite@7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1): dependencies: esbuild: 0.25.4 @@ -26033,38 +25340,43 @@ snapshots: lightningcss: 1.30.2 yaml: 2.8.1 - vitest-websocket-mock@0.4.0(vitest@3.2.3): + vitest-websocket-mock@0.4.0(vitest@3.2.4): dependencies: '@vitest/utils': 2.1.8 mock-socket: 9.3.1 - vitest: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) - - vitest@2.1.9(@types/node@20.19.9)(@vitest/ui@2.1.9)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3)): - dependencies: - '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) - '@vitest/pretty-format': 2.1.9 - '@vitest/runner': 2.1.9 - '@vitest/snapshot': 2.1.9 - '@vitest/spy': 2.1.9 - '@vitest/utils': 2.1.9 - chai: 5.1.2 + vitest: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + + vitest@3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1): + dependencies: + '@types/chai': 5.2.2 + '@vitest/expect': 3.2.4 + '@vitest/mocker': 3.2.4(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) + '@vitest/pretty-format': 3.2.4 + '@vitest/runner': 3.2.4 + '@vitest/snapshot': 3.2.4 + '@vitest/spy': 3.2.4 + '@vitest/utils': 3.2.4 + chai: 5.2.0 debug: 4.4.1(supports-color@9.2.2) - expect-type: 1.1.0 - magic-string: 0.30.17 - pathe: 1.1.2 - std-env: 3.8.0 + expect-type: 1.2.1 + magic-string: 0.30.21 + pathe: 2.0.3 + picomatch: 4.0.3 + std-env: 3.9.0 tinybench: 2.9.0 - tinyexec: 0.3.1 - tinypool: 1.0.1 - tinyrainbow: 1.2.0 + tinyexec: 0.3.2 + tinyglobby: 0.2.15 + tinypool: 1.1.1 + tinyrainbow: 2.0.0 vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - vite-node: 2.1.9(@types/node@20.19.9)(lightningcss@1.30.2) + vite-node: 3.2.4(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(supports-color@9.2.2)(yaml@2.8.1) why-is-node-running: 2.3.0 optionalDependencies: + '@types/debug': 4.1.12 '@types/node': 20.19.9 - '@vitest/ui': 2.1.9(vitest@2.1.9) + '@vitest/ui': 3.2.4(vitest@3.2.4) transitivePeerDependencies: + - jiti - less - lightningcss - msw @@ -26074,33 +25386,40 @@ snapshots: - sugarss - supports-color - terser + - tsx + - yaml - vitest@2.1.9(@types/node@20.19.9)(@vitest/ui@2.1.9)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3)): + vitest@3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1): dependencies: - '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) - '@vitest/pretty-format': 2.1.9 - '@vitest/runner': 2.1.9 - '@vitest/snapshot': 2.1.9 - '@vitest/spy': 2.1.9 - '@vitest/utils': 2.1.9 - chai: 5.1.2 + '@types/chai': 5.2.2 + '@vitest/expect': 3.2.4 + '@vitest/mocker': 3.2.4(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) + '@vitest/pretty-format': 3.2.4 + '@vitest/runner': 3.2.4 + '@vitest/snapshot': 3.2.4 + '@vitest/spy': 3.2.4 + '@vitest/utils': 3.2.4 + chai: 5.2.0 debug: 4.4.1(supports-color@9.2.2) - expect-type: 1.1.0 - magic-string: 0.30.17 - pathe: 1.1.2 - std-env: 3.8.0 + expect-type: 1.2.1 + magic-string: 0.30.21 + pathe: 2.0.3 + picomatch: 4.0.3 + std-env: 3.9.0 tinybench: 2.9.0 - tinyexec: 0.3.1 - tinypool: 1.0.1 - tinyrainbow: 1.2.0 + tinyexec: 0.3.2 + tinyglobby: 0.2.15 + tinypool: 1.1.1 + tinyrainbow: 2.0.0 vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - vite-node: 2.1.9(@types/node@20.19.9)(lightningcss@1.30.2) + vite-node: 3.2.4(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(supports-color@9.2.2)(yaml@2.8.1) why-is-node-running: 2.3.0 optionalDependencies: + '@types/debug': 4.1.12 '@types/node': 20.19.9 - '@vitest/ui': 2.1.9(vitest@2.1.9) + '@vitest/ui': 3.2.4(vitest@3.2.4) transitivePeerDependencies: + - jiti - less - lightningcss - msw @@ -26110,33 +25429,35 @@ snapshots: - sugarss - supports-color - terser + - tsx + - yaml - vitest@3.0.9(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.2))(yaml@2.8.1): + vitest@4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1): dependencies: - '@vitest/expect': 3.0.9 - '@vitest/mocker': 3.0.9(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.2))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) - '@vitest/pretty-format': 3.2.3 - '@vitest/runner': 3.0.9 - '@vitest/snapshot': 3.0.9 - '@vitest/spy': 3.0.9 - '@vitest/utils': 3.0.9 - chai: 5.2.0 - debug: 4.4.1(supports-color@9.2.2) - expect-type: 1.2.1 - magic-string: 0.30.17 + '@vitest/expect': 4.0.16 + '@vitest/mocker': 4.0.16(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1)) + '@vitest/pretty-format': 4.0.16 + '@vitest/runner': 4.0.16 + '@vitest/snapshot': 4.0.16 + '@vitest/spy': 4.0.16 + '@vitest/utils': 4.0.16 + es-module-lexer: 1.7.0 + expect-type: 1.3.0 + magic-string: 0.30.21 + obug: 2.1.1 pathe: 2.0.3 - std-env: 3.9.0 + picomatch: 4.0.3 + std-env: 3.10.0 tinybench: 2.9.0 - tinyexec: 0.3.2 - tinypool: 1.1.0 - tinyrainbow: 2.0.0 - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - vite-node: 3.0.9(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) + tinyexec: 1.0.2 + tinyglobby: 0.2.15 + tinyrainbow: 3.0.3 + vite: 7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) why-is-node-running: 2.3.0 optionalDependencies: - '@types/debug': 4.1.12 + '@opentelemetry/api': 1.7.0 '@types/node': 20.19.9 - '@vitest/ui': 3.2.3(vitest@3.2.3) + '@vitest/ui': 4.0.16(vitest@4.0.16) transitivePeerDependencies: - jiti - less @@ -26146,40 +25467,35 @@ snapshots: - sass-embedded - stylus - sugarss - - supports-color - terser - tsx - yaml - vitest@3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1): + vitest@4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.2))(yaml@2.8.1): dependencies: - '@types/chai': 5.2.2 - '@vitest/expect': 3.2.3 - '@vitest/mocker': 3.2.3(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) - '@vitest/pretty-format': 3.2.3 - '@vitest/runner': 3.2.3 - '@vitest/snapshot': 3.2.3 - '@vitest/spy': 3.2.3 - '@vitest/utils': 3.2.3 - chai: 5.2.0 - debug: 4.4.1(supports-color@9.2.2) - expect-type: 1.2.1 + '@vitest/expect': 4.0.16 + '@vitest/mocker': 4.0.16(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.2))(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1)) + '@vitest/pretty-format': 4.0.16 + '@vitest/runner': 4.0.16 + '@vitest/snapshot': 4.0.16 + '@vitest/spy': 4.0.16 + '@vitest/utils': 4.0.16 + es-module-lexer: 1.7.0 + expect-type: 1.3.0 magic-string: 0.30.21 + obug: 2.1.1 pathe: 2.0.3 picomatch: 4.0.3 - std-env: 3.9.0 + std-env: 3.10.0 tinybench: 2.9.0 - tinyexec: 0.3.2 + tinyexec: 1.0.2 tinyglobby: 0.2.15 - tinypool: 1.1.0 - tinyrainbow: 2.0.0 - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - vite-node: 3.2.3(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(supports-color@9.2.2)(yaml@2.8.1) + tinyrainbow: 3.0.3 + vite: 7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) why-is-node-running: 2.3.0 optionalDependencies: - '@types/debug': 4.1.12 '@types/node': 20.19.9 - '@vitest/ui': 3.2.3(vitest@3.2.3) + '@vitest/ui': 4.0.16(vitest@4.0.16) transitivePeerDependencies: - jiti - less @@ -26189,40 +25505,35 @@ snapshots: - sass-embedded - stylus - sugarss - - supports-color - terser - tsx - yaml - vitest@3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1): + vitest@4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1): dependencies: - '@types/chai': 5.2.2 - '@vitest/expect': 3.2.3 - '@vitest/mocker': 3.2.3(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) - '@vitest/pretty-format': 3.2.3 - '@vitest/runner': 3.2.3 - '@vitest/snapshot': 3.2.3 - '@vitest/spy': 3.2.3 - '@vitest/utils': 3.2.3 - chai: 5.2.0 - debug: 4.4.1(supports-color@9.2.2) - expect-type: 1.2.1 + '@vitest/expect': 4.0.16 + '@vitest/mocker': 4.0.16(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1)) + '@vitest/pretty-format': 4.0.16 + '@vitest/runner': 4.0.16 + '@vitest/snapshot': 4.0.16 + '@vitest/spy': 4.0.16 + '@vitest/utils': 4.0.16 + es-module-lexer: 1.7.0 + expect-type: 1.3.0 magic-string: 0.30.21 + obug: 2.1.1 pathe: 2.0.3 picomatch: 4.0.3 - std-env: 3.9.0 + std-env: 3.10.0 tinybench: 2.9.0 - tinyexec: 0.3.2 + tinyexec: 1.0.2 tinyglobby: 0.2.15 - tinypool: 1.1.0 - tinyrainbow: 2.0.0 - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - vite-node: 3.2.3(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(supports-color@9.2.2)(yaml@2.8.1) + tinyrainbow: 3.0.3 + vite: 7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) why-is-node-running: 2.3.0 optionalDependencies: - '@types/debug': 4.1.12 '@types/node': 20.19.9 - '@vitest/ui': 3.2.3(vitest@3.2.3) + '@vitest/ui': 4.0.16(vitest@4.0.16) transitivePeerDependencies: - jiti - less @@ -26232,7 +25543,6 @@ snapshots: - sass-embedded - stylus - sugarss - - supports-color - terser - tsx - yaml @@ -26349,22 +25659,6 @@ snapshots: wordwrap@1.0.0: {} - workerd@1.20250310.0: - optionalDependencies: - '@cloudflare/workerd-darwin-64': 1.20250310.0 - '@cloudflare/workerd-darwin-arm64': 1.20250310.0 - '@cloudflare/workerd-linux-64': 1.20250310.0 - '@cloudflare/workerd-linux-arm64': 1.20250310.0 - '@cloudflare/workerd-windows-64': 1.20250310.0 - - workerd@1.20250417.0: - optionalDependencies: - '@cloudflare/workerd-darwin-64': 1.20250417.0 - '@cloudflare/workerd-darwin-arm64': 1.20250417.0 - '@cloudflare/workerd-linux-64': 1.20250417.0 - '@cloudflare/workerd-linux-arm64': 1.20250417.0 - '@cloudflare/workerd-windows-64': 1.20250417.0 - workerd@1.20251202.0: optionalDependencies: '@cloudflare/workerd-darwin-64': 1.20251202.0 @@ -26373,6 +25667,14 @@ snapshots: '@cloudflare/workerd-linux-arm64': 1.20251202.0 '@cloudflare/workerd-windows-64': 1.20251202.0 + workerd@1.20251210.0: + optionalDependencies: + '@cloudflare/workerd-darwin-64': 1.20251210.0 + '@cloudflare/workerd-darwin-arm64': 1.20251210.0 + '@cloudflare/workerd-linux-64': 1.20251210.0 + '@cloudflare/workerd-linux-arm64': 1.20251210.0 + '@cloudflare/workerd-windows-64': 1.20251210.0 + workerd@1.20251217.0: optionalDependencies: '@cloudflare/workerd-darwin-64': 1.20251217.0 @@ -26381,40 +25683,19 @@ snapshots: '@cloudflare/workerd-linux-arm64': 1.20251217.0 '@cloudflare/workerd-windows-64': 1.20251217.0 - wrangler@3.114.1(@cloudflare/workers-types@4.20251217.0): - dependencies: - '@cloudflare/kv-asset-handler': 0.3.4 - '@cloudflare/unenv-preset': 2.0.2(unenv@2.0.0-rc.14)(workerd@1.20250310.0) - '@esbuild-plugins/node-globals-polyfill': 0.2.3(esbuild@0.17.19) - '@esbuild-plugins/node-modules-polyfill': 0.2.2(esbuild@0.17.19) - blake3-wasm: 2.1.5 - esbuild: 0.17.19 - miniflare: 3.20250310.0 - path-to-regexp: 6.3.0 - unenv: 2.0.0-rc.14 - workerd: 1.20250310.0 - optionalDependencies: - '@cloudflare/workers-types': 4.20251217.0 - fsevents: 2.3.3 - sharp: 0.33.5 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - wrangler@4.12.1(@cloudflare/workers-types@4.20251217.0): + wrangler@4.54.0(@cloudflare/workers-types@4.20251217.0): dependencies: - '@cloudflare/kv-asset-handler': 0.4.0 - '@cloudflare/unenv-preset': 2.3.1(unenv@2.0.0-rc.15)(workerd@1.20250417.0) + '@cloudflare/kv-asset-handler': 0.4.1 + '@cloudflare/unenv-preset': 2.7.13(unenv@2.0.0-rc.24)(workerd@1.20251210.0) blake3-wasm: 2.1.5 - esbuild: 0.25.2 - miniflare: 4.20250417.0 + esbuild: 0.27.0 + miniflare: 4.20251210.0 path-to-regexp: 6.3.0 - unenv: 2.0.0-rc.15 - workerd: 1.20250417.0 + unenv: 2.0.0-rc.24 + workerd: 1.20251210.0 optionalDependencies: '@cloudflare/workers-types': 4.20251217.0 fsevents: 2.3.3 - sharp: 0.33.5 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -26510,18 +25791,6 @@ snapshots: '@poppinss/exception': 1.2.2 error-stack-parser-es: 1.0.5 - youch@3.2.3: - dependencies: - cookie: 0.5.0 - mustache: 4.2.0 - stacktracey: 2.1.8 - - youch@3.3.4: - dependencies: - cookie: 0.7.2 - mustache: 4.2.0 - stacktracey: 2.1.8 - youch@4.1.0-beta.10(patch_hash=flgmw54jmjdxqmelxigtxg6kum): dependencies: '@poppinss/colors': 4.1.5 @@ -26541,3 +25810,5 @@ snapshots: zod@3.22.3: {} zod@3.25.76: {} + + zod@4.2.1: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index dc6f3f3b5689..bb6e29a4f7ab 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -19,9 +19,9 @@ catalog: "@types/node": "^20.19.9" "@typescript-eslint/eslint-plugin": "^8.35.1" "@typescript-eslint/parser": "^8.35.1" - "@vitest/runner": ~3.2.0 - "@vitest/snapshot": ~3.2.0 - "@vitest/ui": ~3.2.0 + "@vitest/runner": 4.0.16 + "@vitest/snapshot": 4.0.16 + "@vitest/ui": 4.0.16 # rimraf@6 requires node 20 or >=22 rimraf: "^6.0.1" typescript: "~5.8.3" @@ -29,7 +29,7 @@ catalog: # Override undici-types from @types/node so that the Cloudflare SDK typings match our installed # version of Undici undici-types: "7.14.0" - vitest: "~3.2.0" + vitest: "4.0.16" vite: "^5.4.14" "ws": "8.18.0" esbuild: "0.27.0" @@ -38,6 +38,7 @@ catalog: workerd: "1.20251217.0" eslint: "^9.39.1" smol-toml: "^1.5.2" + msw: "2.12.4" catalogs: vite-plugin: @@ -45,3 +46,10 @@ catalogs: # This is because a breaking change to the module runner was introduced in https://github.com/vitejs/vite/pull/20924 and released in v7.2.0 "vite": "7.1.12" "@types/node": "^22.10.1" + vitest-3: + "vitest": 3.2.4 + "@vitest/ui": 3.2.4 + # CAUTION: Most usage of @cloudflare/vitest-pool-workers in this mono repo should use workspace:* instead of this catalog version + # However, some packages (pages-shared, workers-shared, etc...) need to be tested using vitest-pool-workers but are themselves + # ultimately included in vitest-pool-workers (through Wrangler), causing a circular dependency. + "@cloudflare/vitest-pool-workers": "^0.10.0" diff --git a/tools/dependabot/__tests__/generate-dependabot-pr-changesets.test.ts b/tools/dependabot/__tests__/generate-dependabot-pr-changesets.test.ts index 0f0316ec3ee4..5aa0c6e1f682 100644 --- a/tools/dependabot/__tests__/generate-dependabot-pr-changesets.test.ts +++ b/tools/dependabot/__tests__/generate-dependabot-pr-changesets.test.ts @@ -181,6 +181,7 @@ describe("writeChangeSet()", () => { describe("commitAndPush()", () => { it("should call spawnSync with appropriate git commands", ({ expect }) => { + (spawnSync as Mock).mockClear(); (spawnSync as Mock).mockReturnValue({ output: [] }); const commitMessage = dedent` chore: update dependencies of "@namespace/package" package diff --git a/vitest.shared.ts b/vitest.shared.ts index cb8c57b7a684..7ab474e6e7c9 100644 --- a/vitest.shared.ts +++ b/vitest.shared.ts @@ -13,9 +13,6 @@ export default defineConfig({ testTimeout: 50_000, hookTimeout: 50_000, teardownTimeout: 50_000, - poolOptions: { - useAtomics: true, - }, restoreMocks: true, // A lot of the fixture tests are extremely flaky because of the dev registry // Retry tests by default so that only real errors are reported From 3afc4f69baad1bcf514339a69fcfc6824beb978b Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 18 Dec 2025 19:00:04 +0000 Subject: [PATCH 02/45] fix build --- packages/vitest-pool-workers/package.json | 2 +- packages/vitest-pool-workers/tsdown.config.ts | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/vitest-pool-workers/package.json b/packages/vitest-pool-workers/package.json index 1a699d474c8a..c8ede2311ca7 100644 --- a/packages/vitest-pool-workers/package.json +++ b/packages/vitest-pool-workers/package.json @@ -46,7 +46,7 @@ "capnp:rtti": "capnp-es scripts/rtti/rtti.capnp -ojs", "check:lint": "eslint . --max-warnings=0", "check:type": "tsc && tsc -p src/worker/tsconfig.json && tsc -p types/tsconfig.json", - "dev": "node scripts/bundle.mjs watch", + "dev": "tsdown --watch", "test": "vitest run", "test:ci": "vitest run" }, diff --git a/packages/vitest-pool-workers/tsdown.config.ts b/packages/vitest-pool-workers/tsdown.config.ts index 47798405a84a..d2eb9edb3ca2 100644 --- a/packages/vitest-pool-workers/tsdown.config.ts +++ b/packages/vitest-pool-workers/tsdown.config.ts @@ -27,11 +27,12 @@ const commonOptions: UserConfig = { platform: "node", target: "esnext", format: "esm", - bundle: true, + unbundle: false, + noExternal: ["devalue"], external: [ // Cloudflare/workerd built-ins - /cloudflare:.*/, - /workerd:.*/, + /^cloudflare:.*$/, + /^workerd:.*$/, // Virtual/runtime modules "__VITEST_POOL_WORKERS_DEFINES", "__VITEST_POOL_WORKERS_USER_OBJECT", From 964012e4fced2b4a495aad780a377f2525952884 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 18 Dec 2025 19:24:02 +0000 Subject: [PATCH 03/45] fix build --- packages/create-cloudflare/package.json | 2 +- pnpm-lock.yaml | 22 ++++++++-------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/packages/create-cloudflare/package.json b/packages/create-cloudflare/package.json index c1bd50a837d8..1d1ef0451a18 100644 --- a/packages/create-cloudflare/package.json +++ b/packages/create-cloudflare/package.json @@ -85,7 +85,7 @@ "undici": "catalog:default", "vite": "catalog:vite-plugin", "vite-tsconfig-paths": "^4.0.8", - "vitest": "catalog:default", + "vitest": "catalog:vitest-3", "which-pm-runs": "^1.1.0", "wrangler": "workspace:*", "wrap-ansi": "^9.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f51417c5ba65..8d3f33180ec2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1759,8 +1759,8 @@ importers: specifier: ^4.0.8 version: 4.2.0(typescript@5.8.3)(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1)) vitest: - specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + specifier: catalog:vitest-3 + version: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) which-pm-runs: specifier: ^1.1.0 version: 1.1.0 @@ -9801,10 +9801,6 @@ packages: expect-type@0.15.0: resolution: {integrity: sha512-yWnriYB4e8G54M5/fAFj7rCIBiKs1HAACaY13kCz6Ku0dezjS9aMcfcdVK2X8Tv2tEV1BPz/wKfQ7WA4S/d8aA==} - expect-type@1.2.1: - resolution: {integrity: sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==} - engines: {node: '>=12.0.0'} - expect-type@1.3.0: resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==} engines: {node: '>=12.0.0'} @@ -18694,7 +18690,7 @@ snapshots: sirv: 3.0.2 tinyglobby: 0.2.15 tinyrainbow: 2.0.0 - vitest: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + vitest: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) '@vitest/ui@4.0.16(vitest@4.0.16)': dependencies: @@ -19446,7 +19442,7 @@ snapshots: assertion-error: 2.0.1 check-error: 2.1.1 deep-eql: 5.0.2 - loupe: 3.1.3 + loupe: 3.2.1 pathval: 2.0.0 chai@6.2.1: {} @@ -20798,8 +20794,6 @@ snapshots: expect-type@0.15.0: {} - expect-type@1.2.1: {} - expect-type@1.3.0: {} expect@29.7.0: @@ -25358,11 +25352,11 @@ snapshots: '@vitest/utils': 3.2.4 chai: 5.2.0 debug: 4.4.1(supports-color@9.2.2) - expect-type: 1.2.1 + expect-type: 1.3.0 magic-string: 0.30.21 pathe: 2.0.3 picomatch: 4.0.3 - std-env: 3.9.0 + std-env: 3.10.0 tinybench: 2.9.0 tinyexec: 0.3.2 tinyglobby: 0.2.15 @@ -25401,11 +25395,11 @@ snapshots: '@vitest/utils': 3.2.4 chai: 5.2.0 debug: 4.4.1(supports-color@9.2.2) - expect-type: 1.2.1 + expect-type: 1.3.0 magic-string: 0.30.21 pathe: 2.0.3 picomatch: 4.0.3 - std-env: 3.9.0 + std-env: 3.10.0 tinybench: 2.9.0 tinyexec: 0.3.2 tinyglobby: 0.2.15 From e1f2a8bf27c238e2d159d0fe24660fda82301503 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 18 Dec 2025 20:09:44 +0000 Subject: [PATCH 04/45] fix build --- .../tests/get-platform-proxy.env.test.ts | 2 +- packages/create-cloudflare/package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fixtures/get-platform-proxy/tests/get-platform-proxy.env.test.ts b/fixtures/get-platform-proxy/tests/get-platform-proxy.env.test.ts index 8e49a4308a95..47ebd3c892d5 100644 --- a/fixtures/get-platform-proxy/tests/get-platform-proxy.env.test.ts +++ b/fixtures/get-platform-proxy/tests/get-platform-proxy.env.test.ts @@ -47,6 +47,7 @@ describe("getPlatformProxy - env", () => { vi.spyOn(console, "log").mockImplementation(() => {}); vi.spyOn(console, "error").mockImplementation(() => {}); warn = vi.spyOn(console, "warn").mockImplementation(() => {}); + warn.mockReset(); }); describe("var bindings", () => { @@ -276,7 +277,6 @@ describe("getPlatformProxy - env", () => { "▲ [WARNING]  You have defined bindings to the following internal Durable Objects: - {"class_name":"MyDurableObject","name":"MY_DURABLE_OBJECT"} These will not work in local development, but they should work in production. - If you want to develop these locally, you can define your DO in a separate Worker, with a separate configuration file. For detailed instructions, refer to the Durable Objects section here: https://developers.cloudflare.com/workers/wrangler/api#supported-bindings " diff --git a/packages/create-cloudflare/package.json b/packages/create-cloudflare/package.json index 1d1ef0451a18..a2c79011e9f3 100644 --- a/packages/create-cloudflare/package.json +++ b/packages/create-cloudflare/package.json @@ -83,7 +83,7 @@ "smol-toml": "catalog:default", "typescript": "catalog:default", "undici": "catalog:default", - "vite": "catalog:vite-plugin", + "vite": "catalog:default", "vite-tsconfig-paths": "^4.0.8", "vitest": "catalog:vitest-3", "which-pm-runs": "^1.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8d3f33180ec2..896158d124ca 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1753,11 +1753,11 @@ importers: specifier: catalog:default version: 7.14.0 vite: - specifier: catalog:vite-plugin - version: 7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) + specifier: catalog:default + version: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) vite-tsconfig-paths: specifier: ^4.0.8 - version: 4.2.0(typescript@5.8.3)(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1)) + version: 4.2.0(typescript@5.8.3)(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) vitest: specifier: catalog:vitest-3 version: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) @@ -25283,13 +25283,13 @@ snapshots: - rollup - supports-color - vite-tsconfig-paths@4.2.0(typescript@5.8.3)(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1)): + vite-tsconfig-paths@4.2.0(typescript@5.8.3)(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)): dependencies: debug: 4.4.1(supports-color@9.2.2) globrex: 0.1.2 tsconfck: 2.1.1(typescript@5.8.3) optionalDependencies: - vite: 7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) + vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) transitivePeerDependencies: - supports-color - typescript From cfc5f708dcf809e0f8da158e4aa1fe6e75ef8d1e Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 18 Dec 2025 20:18:26 +0000 Subject: [PATCH 05/45] fix snapshot --- fixtures/get-platform-proxy/tests/get-platform-proxy.env.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/fixtures/get-platform-proxy/tests/get-platform-proxy.env.test.ts b/fixtures/get-platform-proxy/tests/get-platform-proxy.env.test.ts index 47ebd3c892d5..fff5f12253b1 100644 --- a/fixtures/get-platform-proxy/tests/get-platform-proxy.env.test.ts +++ b/fixtures/get-platform-proxy/tests/get-platform-proxy.env.test.ts @@ -277,6 +277,7 @@ describe("getPlatformProxy - env", () => { "▲ [WARNING]  You have defined bindings to the following internal Durable Objects: - {"class_name":"MyDurableObject","name":"MY_DURABLE_OBJECT"} These will not work in local development, but they should work in production. + If you want to develop these locally, you can define your DO in a separate Worker, with a separate configuration file. For detailed instructions, refer to the Durable Objects section here: https://developers.cloudflare.com/workers/wrangler/api#supported-bindings " From 704466b464059b943a8c0ead34745cab175e96b6 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 18 Dec 2025 21:06:55 +0000 Subject: [PATCH 06/45] fix fixture tests --- .../package.json | 1 + .../vitest.config.ts | 52 +++---------------- .../workers-shared-asset-config/package.json | 1 + 3 files changed, 10 insertions(+), 44 deletions(-) diff --git a/fixtures/worker-with-unsafe-external-plugin/package.json b/fixtures/worker-with-unsafe-external-plugin/package.json index 6cafbd570b5d..beb7887b055c 100644 --- a/fixtures/worker-with-unsafe-external-plugin/package.json +++ b/fixtures/worker-with-unsafe-external-plugin/package.json @@ -1,6 +1,7 @@ { "name": "@fixture/worker-with-unsafe-external-plugin", "private": true, + "type": "module", "scripts": { "dev": "wrangler dev", "test:ci": "vitest run", diff --git a/fixtures/worker-with-unsafe-external-plugin/vitest.config.ts b/fixtures/worker-with-unsafe-external-plugin/vitest.config.ts index 1a51585a9f94..9b79788eddd6 100644 --- a/fixtures/worker-with-unsafe-external-plugin/vitest.config.ts +++ b/fixtures/worker-with-unsafe-external-plugin/vitest.config.ts @@ -1,46 +1,10 @@ -import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; -class FilteredPushArray extends Array { - constructor(private readonly predicate: (item: T) => boolean) { - super(); - } - - push(...items: T[]) { - return super.push(...items.filter(this.predicate)); - } -} - -export default defineWorkersConfig({ - test: { - poolOptions: { - workers: { - wrangler: { configPath: "./wrangler.jsonc" }, - }, - }, - // Configure the `vite-node` server used by Vitest code to import configs, - // custom pools and tests. By default, Vitest effectively applies Vite - // transforms to all files outside `node_modules`. This means by default, - // our custom pool code is transformed by Vite during development, but not - // when published, leading to possible behaviour mismatches. To fix this, - // we ensure file paths containing `packages/vitest-pool-workers/dist` are - // 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/v2.1.1/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: any) => { - const str = item.toString(); - return str !== "/^(?!.*node_modules).*\\.mjs$/"; - }), - external: [ - /packages\/vitest-pool-workers\/dist/, - /packages\/wrangler\//, - ], - }, - }, - }, +export default defineConfig({ + plugins: [ + cloudflareTest({ + wrangler: { configPath: "./wrangler.jsonc" }, + }), + ], }); diff --git a/fixtures/workers-shared-asset-config/package.json b/fixtures/workers-shared-asset-config/package.json index b492dee78383..c1d8864f136e 100644 --- a/fixtures/workers-shared-asset-config/package.json +++ b/fixtures/workers-shared-asset-config/package.json @@ -1,6 +1,7 @@ { "name": "@fixture/workers-shared-assets-config", "private": true, + "type": "module", "scripts": { "dev": "wrangler dev", "test:ci": "run-script-os", From 99a88c9ddb95702261ec1d6b687dc343c0d28c94 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Fri, 19 Dec 2025 18:20:20 +0000 Subject: [PATCH 07/45] env & exports --- .../ai-vectorize/test/env.d.ts | 4 +- .../test/env.d.ts | 5 +- .../container-app/test/env.d.ts | 5 +- .../src/worker-configuration.d.ts | 1 + .../context-exports/test/auxiliary.test.ts | 7 -- .../test/integration-self.test.ts | 18 +++-- .../d1/test/env.d.ts | 8 +- .../durable-objects/test/env.d.ts | 8 +- .../hyperdrive/test/env.d.ts | 5 +- .../images/test/env.d.ts | 5 +- .../kv-r2-caches/test/env.d.ts | 8 +- .../misc/test/assets.test.ts | 8 -- .../misc/test/env.d.ts | 4 +- .../misc/test/pages-functions.test.ts | 13 ++-- .../multiple-workers/test/env.d.ts | 6 +- .../test/env.d.ts | 8 +- .../pipelines/test/env.d.ts | 5 +- .../queues/test/env.d.ts | 12 ++- .../rpc/src/env.d.ts | 4 +- .../rpc/test/env.d.ts | 16 ++-- .../rpc/test/integration-self.test.ts | 47 +++++------- .../rpc/test/unit.test.ts | 60 +++++---------- .../web-assembly/test/env.d.ts | 5 +- .../workers-assets-only/README.md | 5 -- .../workers-assets-only/public/index.html | 11 --- .../test/assets-only.test.ts | 13 ---- .../workers-assets-only/test/tsconfig.json | 4 - .../workers-assets-only/tsconfig.json | 4 - .../workers-assets-only/vitest.config.ts | 10 --- .../workers-assets-only/wrangler.jsonc | 8 -- .../test/env.d.ts | 4 +- .../workers-assets/test/assets.test.ts | 5 +- .../workers-assets/test/env.d.ts | 6 +- .../workflows/test/env.d.ts | 5 +- .../env.d.ts | 8 +- .../tests/env.d.ts | 4 +- fixtures/workers-shared-asset-config/env.d.ts | 5 +- .../src/pool/cloudflare-pool-worker.ts | 1 + .../vitest-pool-workers/src/pool/index.ts | 14 ---- .../src/worker/durable-objects.ts | 21 +++-- .../src/worker/entrypoints.ts | 76 +++++++++---------- .../vitest-pool-workers/src/worker/env.ts | 39 ++++------ .../vitest-pool-workers/src/worker/index.ts | 17 ++--- .../src/worker/lib/cloudflare/snapshot.ts | 4 +- .../src/worker/types-ambient.d.ts | 18 +++-- .../src/worker/workflows.ts | 16 ++-- .../types/cloudflare-test.d.ts | 25 ++---- packages/workflows-shared/src/engine.ts | 1 + .../workflows-shared/tests/binding.test.ts | 12 +-- .../workflows-shared/tests/engine.test.ts | 10 +-- packages/workflows-shared/tests/env.d.ts | 12 ++- 51 files changed, 239 insertions(+), 381 deletions(-) delete mode 100644 fixtures/vitest-pool-workers-examples/misc/test/assets.test.ts delete mode 100644 fixtures/vitest-pool-workers-examples/workers-assets-only/README.md delete mode 100644 fixtures/vitest-pool-workers-examples/workers-assets-only/public/index.html delete mode 100644 fixtures/vitest-pool-workers-examples/workers-assets-only/test/assets-only.test.ts delete mode 100644 fixtures/vitest-pool-workers-examples/workers-assets-only/test/tsconfig.json delete mode 100644 fixtures/vitest-pool-workers-examples/workers-assets-only/tsconfig.json delete mode 100644 fixtures/vitest-pool-workers-examples/workers-assets-only/vitest.config.ts delete mode 100644 fixtures/vitest-pool-workers-examples/workers-assets-only/wrangler.jsonc diff --git a/fixtures/vitest-pool-workers-examples/ai-vectorize/test/env.d.ts b/fixtures/vitest-pool-workers-examples/ai-vectorize/test/env.d.ts index 67b3610dbc7d..508751ce4ac9 100644 --- a/fixtures/vitest-pool-workers-examples/ai-vectorize/test/env.d.ts +++ b/fixtures/vitest-pool-workers-examples/ai-vectorize/test/env.d.ts @@ -1,3 +1,3 @@ -declare module "cloudflare:test" { - interface ProvidedEnv extends Env {} +declare namespace Cloudflare { + interface Env {} } diff --git a/fixtures/vitest-pool-workers-examples/basics-integration-auxiliary/test/env.d.ts b/fixtures/vitest-pool-workers-examples/basics-integration-auxiliary/test/env.d.ts index 076efb377d6f..8792875b089f 100644 --- a/fixtures/vitest-pool-workers-examples/basics-integration-auxiliary/test/env.d.ts +++ b/fixtures/vitest-pool-workers-examples/basics-integration-auxiliary/test/env.d.ts @@ -1,6 +1,5 @@ -declare module "cloudflare:test" { - // Controls the type of `import("cloudflare:test").env` - interface ProvidedEnv { +declare namespace Cloudflare { + interface Env { WORKER: Fetcher; } } diff --git a/fixtures/vitest-pool-workers-examples/container-app/test/env.d.ts b/fixtures/vitest-pool-workers-examples/container-app/test/env.d.ts index d2a42e257b6f..0ac83a71e24e 100644 --- a/fixtures/vitest-pool-workers-examples/container-app/test/env.d.ts +++ b/fixtures/vitest-pool-workers-examples/container-app/test/env.d.ts @@ -1,6 +1,5 @@ -declare module "cloudflare:test" { - // Controls the type of `import("cloudflare:test").env` - interface ProvidedEnv extends Env { +declare namespace Cloudflare { + interface Env { MY_CONTAINER: DurableObjectNamespace; } } diff --git a/fixtures/vitest-pool-workers-examples/context-exports/src/worker-configuration.d.ts b/fixtures/vitest-pool-workers-examples/context-exports/src/worker-configuration.d.ts index 67961094775b..25f6ac991314 100644 --- a/fixtures/vitest-pool-workers-examples/context-exports/src/worker-configuration.d.ts +++ b/fixtures/vitest-pool-workers-examples/context-exports/src/worker-configuration.d.ts @@ -5,6 +5,7 @@ declare namespace Cloudflare { } interface Env { NAME: string; + AUXILIARY_WORKER: Fetcher; } } interface Env extends Cloudflare.Env {} diff --git a/fixtures/vitest-pool-workers-examples/context-exports/test/auxiliary.test.ts b/fixtures/vitest-pool-workers-examples/context-exports/test/auxiliary.test.ts index de264998a178..68365b5e23d5 100644 --- a/fixtures/vitest-pool-workers-examples/context-exports/test/auxiliary.test.ts +++ b/fixtures/vitest-pool-workers-examples/context-exports/test/auxiliary.test.ts @@ -1,13 +1,6 @@ import { env } from "cloudflare:test"; import { expect, it } from "vitest"; -declare module "cloudflare:test" { - // Controls the type of `import("cloudflare:test").env` - interface ProvidedEnv { - AUXILIARY_WORKER: Fetcher; - } -} - it("uses the correct context exports on the auxiliary worker", async () => { const response = await env.AUXILIARY_WORKER.fetch("http://example.com"); expect(await response.text()).toMatchInlineSnapshot( diff --git a/fixtures/vitest-pool-workers-examples/context-exports/test/integration-self.test.ts b/fixtures/vitest-pool-workers-examples/context-exports/test/integration-self.test.ts index ec4a5e8d66b5..7140718de599 100644 --- a/fixtures/vitest-pool-workers-examples/context-exports/test/integration-self.test.ts +++ b/fixtures/vitest-pool-workers-examples/context-exports/test/integration-self.test.ts @@ -10,7 +10,7 @@ it("can use context exports on the SELF worker", async () => { }); it("can use context exports (parameterized with props) on the SELF worker", async () => { - const response = await SELF.fetch("http://example.com/props"); + const response = await exports.default.fetch("http://example.com/props"); expect(await response.text()).toBe( "👋 Hello MainWorker from Main NamedEntryPoint!\nAdditional props!!" ); @@ -18,7 +18,9 @@ it("can use context exports (parameterized with props) on the SELF worker", asyn it("will warn on missing context exports on the SELF worker", async () => { const warnSpy = vi.spyOn(console, "warn"); - const response = await SELF.fetch("http://example.com/invalid-export"); + const response = await exports.default.fetch( + "http://example.com/invalid-export" + ); expect(await response.text()).toMatchInlineSnapshot(`"👋 undefined"`); expect(warnSpy).toHaveBeenCalledWith( "Attempted to access 'ctx.exports.InvalidExport', which was not defined for the main 'SELF' Worker.\n" + @@ -31,7 +33,9 @@ it("will warn on implicit re-exports that will exist in production but cannot no // In this test, we are trying to access an entry-point that is wildcard (*) re-exported from a virtual module. // This virtual module is understood by Vitest and TypeScript but not the lightweight esbuild that we use to guess exports. const warnSpy = vi.spyOn(console, "warn"); - const response = await SELF.fetch("http://example.com/virtual-implicit"); + const response = await exports.default.fetch( + "http://example.com/virtual-implicit" + ); expect(await response.text()).toMatchInlineSnapshot(`"👋 undefined"`); expect(warnSpy).toHaveBeenCalledWith( "Attempted to access 'ctx.exports.ReexportedVirtualEntryPoint', which was not defined for the main 'SELF' Worker.\n" + @@ -44,7 +48,9 @@ it("will still guess re-exports on the SELF worker that cannot be fully analyzed // In this test, we are trying to access an entry-point that is explicitly re-exported from a virtual module. // Although esbuild cannot really analyze what is being re-exported, it can at least see that something is being re-exported with that name. const warnSpy = vi.spyOn(console, "warn"); - const response = await SELF.fetch("http://example.com/virtual-explicit"); + const response = await exports.default.fetch( + "http://example.com/virtual-explicit" + ); expect(await response.text()).toBe( "👋 Hello MainWorker from ExplicitVirtualEntryPoint!" ); @@ -54,7 +60,9 @@ it("can access configured virtual entry points on the SELF worker that cannot be // In this test, we are trying to access an entry-point that is explicitly re-exported from a virtual module. // Although esbuild cannot really analyze what is being re-exported, it can at least see that something is being re-exported with that name. const warnSpy = vi.spyOn(console, "warn"); - const response = await SELF.fetch("http://example.com/virtual-configured"); + const response = await exports.default.fetch( + "http://example.com/virtual-configured" + ); expect(await response.text()).toBe( "👋 Hello MainWorker from ConfiguredVirtualEntryPoint!" ); diff --git a/fixtures/vitest-pool-workers-examples/d1/test/env.d.ts b/fixtures/vitest-pool-workers-examples/d1/test/env.d.ts index d177afa47e0c..afabea1a21a5 100644 --- a/fixtures/vitest-pool-workers-examples/d1/test/env.d.ts +++ b/fixtures/vitest-pool-workers-examples/d1/test/env.d.ts @@ -1,6 +1,6 @@ -declare module "cloudflare:test" { - // Controls the type of `import("cloudflare:test").env` - interface ProvidedEnv extends Env { - TEST_MIGRATIONS: D1Migration[]; // Defined in `vitest.config.mts` +declare namespace Cloudflare { + interface Env { + DATABASE: D1Database; + TEST_MIGRATIONS: import("cloudflare:test").D1Migration[]; // Defined in `vitest.config.mts` } } diff --git a/fixtures/vitest-pool-workers-examples/durable-objects/test/env.d.ts b/fixtures/vitest-pool-workers-examples/durable-objects/test/env.d.ts index bd9eb32999df..e66694406360 100644 --- a/fixtures/vitest-pool-workers-examples/durable-objects/test/env.d.ts +++ b/fixtures/vitest-pool-workers-examples/durable-objects/test/env.d.ts @@ -1,4 +1,6 @@ -declare module "cloudflare:test" { - // Controls the type of `import("cloudflare:test").env` - interface ProvidedEnv extends Env {} +declare namespace Cloudflare { + interface Env { + COUNTER: DurableObjectNamespace; + SQL: DurableObjectNamespace; + } } diff --git a/fixtures/vitest-pool-workers-examples/hyperdrive/test/env.d.ts b/fixtures/vitest-pool-workers-examples/hyperdrive/test/env.d.ts index bd9eb32999df..508751ce4ac9 100644 --- a/fixtures/vitest-pool-workers-examples/hyperdrive/test/env.d.ts +++ b/fixtures/vitest-pool-workers-examples/hyperdrive/test/env.d.ts @@ -1,4 +1,3 @@ -declare module "cloudflare:test" { - // Controls the type of `import("cloudflare:test").env` - interface ProvidedEnv extends Env {} +declare namespace Cloudflare { + interface Env {} } diff --git a/fixtures/vitest-pool-workers-examples/images/test/env.d.ts b/fixtures/vitest-pool-workers-examples/images/test/env.d.ts index bd9eb32999df..508751ce4ac9 100644 --- a/fixtures/vitest-pool-workers-examples/images/test/env.d.ts +++ b/fixtures/vitest-pool-workers-examples/images/test/env.d.ts @@ -1,4 +1,3 @@ -declare module "cloudflare:test" { - // Controls the type of `import("cloudflare:test").env` - interface ProvidedEnv extends Env {} +declare namespace Cloudflare { + interface Env {} } diff --git a/fixtures/vitest-pool-workers-examples/kv-r2-caches/test/env.d.ts b/fixtures/vitest-pool-workers-examples/kv-r2-caches/test/env.d.ts index bd9eb32999df..440cf1afbb7f 100644 --- a/fixtures/vitest-pool-workers-examples/kv-r2-caches/test/env.d.ts +++ b/fixtures/vitest-pool-workers-examples/kv-r2-caches/test/env.d.ts @@ -1,4 +1,6 @@ -declare module "cloudflare:test" { - // Controls the type of `import("cloudflare:test").env` - interface ProvidedEnv extends Env {} +declare namespace Cloudflare { + interface Env { + KV_NAMESPACE: KVNamespace; + R2_BUCKET: R2Bucket; + } } diff --git a/fixtures/vitest-pool-workers-examples/misc/test/assets.test.ts b/fixtures/vitest-pool-workers-examples/misc/test/assets.test.ts deleted file mode 100644 index 7a83924a87a3..000000000000 --- a/fixtures/vitest-pool-workers-examples/misc/test/assets.test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { SELF } from "cloudflare:test"; -import { expect, it } from "vitest"; - -it("reads assets from the configured directory", async () => { - expect( - await (await SELF.fetch("http://example.com/test.txt")).text() - ).toMatchInlineSnapshot(`"Hello, World!"`); -}); diff --git a/fixtures/vitest-pool-workers-examples/misc/test/env.d.ts b/fixtures/vitest-pool-workers-examples/misc/test/env.d.ts index c5077a66cf49..9e4376dafd67 100644 --- a/fixtures/vitest-pool-workers-examples/misc/test/env.d.ts +++ b/fixtures/vitest-pool-workers-examples/misc/test/env.d.ts @@ -1,5 +1,5 @@ -declare module "cloudflare:test" { - interface ProvidedEnv { +declare namespace Cloudflare { + interface Env { ASSETS: Fetcher; KV_NAMESPACE: KVNamespace; OTHER_OBJECT: DurableObjectNamespace; diff --git a/fixtures/vitest-pool-workers-examples/misc/test/pages-functions.test.ts b/fixtures/vitest-pool-workers-examples/misc/test/pages-functions.test.ts index 4557d0a3c9ed..5e16a293bb11 100644 --- a/fixtures/vitest-pool-workers-examples/misc/test/pages-functions.test.ts +++ b/fixtures/vitest-pool-workers-examples/misc/test/pages-functions.test.ts @@ -1,7 +1,6 @@ import { createPagesEventContext, env, - ProvidedEnv, waitOnExecutionContext, } from "cloudflare:test"; import { expect, it, onTestFinished } from "vitest"; @@ -11,7 +10,7 @@ import { expect, it, onTestFinished } from "vitest"; // `Request` to pass to `createPagesEventContext()`. const IncomingRequest = Request; -type BareFunction = PagesFunction>; +type BareFunction = PagesFunction>; it("can consume body in middleware and in next request", async () => { const fn: BareFunction = async (ctx) => { @@ -94,7 +93,7 @@ it("requires ASSETS service binding", async () => { onTestFinished(() => { env.ASSETS = originalASSETS; }); - delete (env as Partial).ASSETS; + delete (env as Partial).ASSETS; const request = new IncomingRequest("https://example.com", { method: "POST", @@ -124,7 +123,7 @@ it("correctly types parameters", async () => { // Check no params and no data required { - type Fn = PagesFunction>; + type Fn = PagesFunction>; createPagesEventContext({ request }); createPagesEventContext({ request, params: {} }); // @ts-expect-error no params required @@ -136,7 +135,7 @@ it("correctly types parameters", async () => { // Check no params but data required { - type Fn = PagesFunction; + type Fn = PagesFunction; // @ts-expect-error data required createPagesEventContext({ request }); // @ts-expect-error data required @@ -150,7 +149,7 @@ it("correctly types parameters", async () => { // Check no data but params required { - type Fn = PagesFunction>; + type Fn = PagesFunction>; // @ts-expect-error params required createPagesEventContext({ request }); // @ts-expect-error params required @@ -164,7 +163,7 @@ it("correctly types parameters", async () => { // Check params and data required { - type Fn = PagesFunction; + type Fn = PagesFunction; // @ts-expect-error params required createPagesEventContext({ request }); // @ts-expect-error params required diff --git a/fixtures/vitest-pool-workers-examples/multiple-workers/test/env.d.ts b/fixtures/vitest-pool-workers-examples/multiple-workers/test/env.d.ts index 4b8e62a89196..b428c0569ead 100644 --- a/fixtures/vitest-pool-workers-examples/multiple-workers/test/env.d.ts +++ b/fixtures/vitest-pool-workers-examples/multiple-workers/test/env.d.ts @@ -1,6 +1,6 @@ -declare module "cloudflare:test" { - // Controls the type of `import("cloudflare:test").env` - interface ProvidedEnv extends Env { +declare namespace Cloudflare { + interface Env { + DATABASE_SERVICE: Fetcher; TEST_AUTH_PUBLIC_KEY: string; // Defined in `vitest.config.mts` } } diff --git a/fixtures/vitest-pool-workers-examples/pages-functions-unit-integration-self/test/env.d.ts b/fixtures/vitest-pool-workers-examples/pages-functions-unit-integration-self/test/env.d.ts index bd9eb32999df..bd6d1d9b67f2 100644 --- a/fixtures/vitest-pool-workers-examples/pages-functions-unit-integration-self/test/env.d.ts +++ b/fixtures/vitest-pool-workers-examples/pages-functions-unit-integration-self/test/env.d.ts @@ -1,4 +1,6 @@ -declare module "cloudflare:test" { - // Controls the type of `import("cloudflare:test").env` - interface ProvidedEnv extends Env {} +declare namespace Cloudflare { + interface Env { + KV_NAMESPACE: KVNamespace; + ASSETS: Fetcher; + } } diff --git a/fixtures/vitest-pool-workers-examples/pipelines/test/env.d.ts b/fixtures/vitest-pool-workers-examples/pipelines/test/env.d.ts index bd9eb32999df..508751ce4ac9 100644 --- a/fixtures/vitest-pool-workers-examples/pipelines/test/env.d.ts +++ b/fixtures/vitest-pool-workers-examples/pipelines/test/env.d.ts @@ -1,4 +1,3 @@ -declare module "cloudflare:test" { - // Controls the type of `import("cloudflare:test").env` - interface ProvidedEnv extends Env {} +declare namespace Cloudflare { + interface Env {} } diff --git a/fixtures/vitest-pool-workers-examples/queues/test/env.d.ts b/fixtures/vitest-pool-workers-examples/queues/test/env.d.ts index bd9eb32999df..8298f33604a6 100644 --- a/fixtures/vitest-pool-workers-examples/queues/test/env.d.ts +++ b/fixtures/vitest-pool-workers-examples/queues/test/env.d.ts @@ -1,4 +1,10 @@ -declare module "cloudflare:test" { - // Controls the type of `import("cloudflare:test").env` - interface ProvidedEnv extends Env {} +interface QueueJob { + key: string; + value: string; +} +declare namespace Cloudflare { + interface Env { + QUEUE_PRODUCER: Queue; + QUEUE_RESULTS: KVNamespace; + } } diff --git a/fixtures/vitest-pool-workers-examples/rpc/src/env.d.ts b/fixtures/vitest-pool-workers-examples/rpc/src/env.d.ts index a2478db08271..7824ee1f7696 100644 --- a/fixtures/vitest-pool-workers-examples/rpc/src/env.d.ts +++ b/fixtures/vitest-pool-workers-examples/rpc/src/env.d.ts @@ -1,6 +1,6 @@ interface Env { KV_NAMESPACE: KVNamespace; - TEST_OBJECT: DurableObjectNamespace; + TEST_OBJECT: DurableObjectNamespace; TEST_NAMED_HANDLER: Service; - TEST_NAMED_ENTRYPOINT: Service; + TEST_NAMED_ENTRYPOINT: Service; } diff --git a/fixtures/vitest-pool-workers-examples/rpc/test/env.d.ts b/fixtures/vitest-pool-workers-examples/rpc/test/env.d.ts index 09cb05965aa1..1c623224effd 100644 --- a/fixtures/vitest-pool-workers-examples/rpc/test/env.d.ts +++ b/fixtures/vitest-pool-workers-examples/rpc/test/env.d.ts @@ -1,7 +1,11 @@ -declare module "cloudflare:test" { - // Controls the type of `import("cloudflare:test").env` - interface ProvidedEnv extends Env {} - - // Ensure RPC properties and methods can be accessed with `SELF` - export const SELF: Service; +declare namespace Cloudflare { + interface Env { + KV_NAMESPACE: KVNamespace; + TEST_OBJECT: DurableObjectNamespace; + TEST_NAMED_HANDLER: Service; + TEST_NAMED_ENTRYPOINT: Service; + } + interface GlobalProps { + mainModule: typeof import("../src/index"); + } } diff --git a/fixtures/vitest-pool-workers-examples/rpc/test/integration-self.test.ts b/fixtures/vitest-pool-workers-examples/rpc/test/integration-self.test.ts index e4f7ac6e61a1..cf997a2fb99a 100644 --- a/fixtures/vitest-pool-workers-examples/rpc/test/integration-self.test.ts +++ b/fixtures/vitest-pool-workers-examples/rpc/test/integration-self.test.ts @@ -1,38 +1,31 @@ -import { env, SELF } from "cloudflare:test"; +import { env } from "cloudflare:test"; +import { exports } from "cloudflare:workers"; import { expect, it, vi } from "vitest"; it("dispatches fetch event", async () => { - const response = await SELF.fetch("https://example.com/"); - expect(await response.json()).toMatchInlineSnapshot(` - { - "ctxWaitUntil": "function", - "envKeys": [ - "KV_NAMESPACE", - "TEST_NAMED_ENTRYPOINT", - "TEST_NAMED_HANDLER", - "TEST_OBJECT", - ], - "method": "GET", - "source": "TestDefaultEntrypoint", - "url": "https://example.com/", - } - `); + const response = await exports.default.fetch("https://example.com/"); + expect(await response.json()).toMatchObject({ + ctxWaitUntil: "function", + method: "GET", + source: "TestDefaultEntrypoint", + url: "https://example.com/", + }); }); it("dispatches scheduled event and accesses property with rpc", async () => { - await SELF.scheduled({ cron: "* * * * 30" }); - const lastControllerCron = await SELF.lastControllerCron; + await exports.default.scheduled({ cron: "* * * * 30" }); + const lastControllerCron = await exports.default.lastControllerCron; expect(lastControllerCron).toBe("* * * * 30"); }); it("calls multi-argument methods with rpc", async () => { - const result = await SELF.sum(1, 2, 3); + const result = await exports.default.sum(1, 2, 3); expect(result).toBe(6); }); it("calls methods using ctx and env with rpc", async () => { expect(await env.KV_NAMESPACE.get("key")).toBe(null); - await SELF.backgroundWrite("key", "value"); + await exports.default.backgroundWrite("key", "value"); await vi.waitUntil( async () => (await env.KV_NAMESPACE.get("key")) === "value" ); @@ -40,27 +33,27 @@ it("calls methods using ctx and env with rpc", async () => { it("calls async methods with rpc", async () => { await env.KV_NAMESPACE.put("key", "value"); - expect(await SELF.read("key")).toBe("value"); + expect(await exports.default.read("key")).toBe("value"); }); it("calls methods with rpc and pipelining", async () => { - const result = await SELF.createCounter(5).clone().increment(3); + const result = await exports.default.createCounter(5).clone().increment(3); expect(result).toBe(8); }); it("can access methods from superclass", async () => { - const result = await SELF.superMethod(); + const result = await exports.default.superMethod(); expect(result).toBe("🦸"); }); it("cannot access instance properties or methods", async () => { - await expect(async () => await SELF.instanceProperty).rejects + await expect(async () => await exports.default.instanceProperty).rejects .toThrowErrorMatchingInlineSnapshot(` [TypeError: The RPC receiver's prototype does not implement "instanceProperty", but the receiver instance does. Only properties and methods defined on the prototype can be accessed over RPC. Ensure properties are declared like \`get instanceProperty() { ... }\` instead of \`instanceProperty = ...\`, and methods are declared like \`instanceProperty() { ... }\` instead of \`instanceProperty = () => { ... }\`.] `); - await expect(async () => await SELF.instanceMethod()).rejects + await expect(async () => await exports.default.instanceMethod()).rejects .toThrowErrorMatchingInlineSnapshot(` [TypeError: The RPC receiver's prototype does not implement "instanceMethod", but the receiver instance does. Only properties and methods defined on the prototype can be accessed over RPC. @@ -71,13 +64,13 @@ it("cannot access instance properties or methods", async () => { it("cannot access non-existent properties or methods", async () => { await expect( // @ts-expect-error intentionally testing incorrect types - async () => await SELF.nonExistentProperty + async () => await exports.default.nonExistentProperty ).rejects.toThrowErrorMatchingInlineSnapshot( `[TypeError: The RPC receiver does not implement "nonExistentProperty".]` ); await expect( // @ts-expect-error intentionally testing incorrect types - async () => await SELF.nonExistentMethod() + async () => await exports.default.nonExistentMethod() ).rejects.toThrowErrorMatchingInlineSnapshot( `[TypeError: The RPC receiver does not implement "nonExistentMethod".]` ); diff --git a/fixtures/vitest-pool-workers-examples/rpc/test/unit.test.ts b/fixtures/vitest-pool-workers-examples/rpc/test/unit.test.ts index 76cd7e338125..676ded1c584b 100644 --- a/fixtures/vitest-pool-workers-examples/rpc/test/unit.test.ts +++ b/fixtures/vitest-pool-workers-examples/rpc/test/unit.test.ts @@ -11,39 +11,23 @@ import { Counter, TestObject } from "../src"; describe("named entrypoints", () => { it("dispatches fetch request to named ExportedHandler", async () => { const response = await env.TEST_NAMED_HANDLER.fetch("https://example.com"); - expect(await response.json()).toMatchInlineSnapshot(` - { - "ctxWaitUntil": "function", - "envKeys": [ - "KV_NAMESPACE", - "TEST_NAMED_ENTRYPOINT", - "TEST_NAMED_HANDLER", - "TEST_OBJECT", - ], - "method": "GET", - "source": "testNamedHandler", - "url": "https://example.com/", - } - `); + expect(await response.json()).toMatchObject({ + ctxWaitUntil: "function", + method: "GET", + source: "testNamedHandler", + url: "https://example.com/", + }); }); it("dispatches fetch request to named WorkerEntrypoint", async () => { const response = await env.TEST_NAMED_ENTRYPOINT.fetch( "https://example.com" ); - expect(await response.json()).toMatchInlineSnapshot(` - { - "ctxWaitUntil": "function", - "envKeys": [ - "KV_NAMESPACE", - "TEST_NAMED_ENTRYPOINT", - "TEST_NAMED_HANDLER", - "TEST_OBJECT", - ], - "method": "GET", - "source": "TestNamedEntrypoint", - "url": "https://example.com/", - } - `); + expect(await response.json()).toMatchObject({ + ctxWaitUntil: "function", + method: "GET", + source: "TestNamedEntrypoint", + url: "https://example.com/", + }); }); it("calls method with rpc", async () => { const result = await env.TEST_NAMED_ENTRYPOINT.ping(); @@ -74,20 +58,12 @@ describe("Durable Object", () => { const id = env.TEST_OBJECT.newUniqueId(); const stub = env.TEST_OBJECT.get(id); const response = await stub.fetch("https://example.com"); - expect(await response.json()).toMatchInlineSnapshot(` - { - "ctxWaitUntil": "function", - "envKeys": [ - "KV_NAMESPACE", - "TEST_NAMED_ENTRYPOINT", - "TEST_NAMED_HANDLER", - "TEST_OBJECT", - ], - "method": "GET", - "source": "TestObject", - "url": "https://example.com/", - } - `); + expect(await response.json()).toMatchObject({ + ctxWaitUntil: "function", + method: "GET", + source: "TestObject", + url: "https://example.com/", + }); }); it("increments count and allows direct/rpc access to instance/storage", async () => { // Check sending request directly to instance diff --git a/fixtures/vitest-pool-workers-examples/web-assembly/test/env.d.ts b/fixtures/vitest-pool-workers-examples/web-assembly/test/env.d.ts index bd9eb32999df..508751ce4ac9 100644 --- a/fixtures/vitest-pool-workers-examples/web-assembly/test/env.d.ts +++ b/fixtures/vitest-pool-workers-examples/web-assembly/test/env.d.ts @@ -1,4 +1,3 @@ -declare module "cloudflare:test" { - // Controls the type of `import("cloudflare:test").env` - interface ProvidedEnv extends Env {} +declare namespace Cloudflare { + interface Env {} } diff --git a/fixtures/vitest-pool-workers-examples/workers-assets-only/README.md b/fixtures/vitest-pool-workers-examples/workers-assets-only/README.md deleted file mode 100644 index 979eb08bbefc..000000000000 --- a/fixtures/vitest-pool-workers-examples/workers-assets-only/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# ✅ workers-with-assets-only - -This example contains assets without a Worker script. - -An asset-only project can only be tested integration-style using the SELF binding, as there is no Worker to import and unit test. diff --git a/fixtures/vitest-pool-workers-examples/workers-assets-only/public/index.html b/fixtures/vitest-pool-workers-examples/workers-assets-only/public/index.html deleted file mode 100644 index 29df18baca97..000000000000 --- a/fixtures/vitest-pool-workers-examples/workers-assets-only/public/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - Hello, World! - - -

Asset index.html

- - diff --git a/fixtures/vitest-pool-workers-examples/workers-assets-only/test/assets-only.test.ts b/fixtures/vitest-pool-workers-examples/workers-assets-only/test/assets-only.test.ts deleted file mode 100644 index 24400367ec34..000000000000 --- a/fixtures/vitest-pool-workers-examples/workers-assets-only/test/assets-only.test.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { env, SELF } from "cloudflare:test"; -import { describe, expect, it } from "vitest"; - -// There is no Worker so we can't import one and unit test -it("can test asset serving (integration style)", async () => { - let response = await SELF.fetch("http://example.com/index.html"); - expect(await response.text()).toContain("Asset index.html"); - - // no such asset - response = await SELF.fetch("http://example.com/message"); - expect(await response.text()).toBeFalsy(); - expect(response.status).toBe(404); -}); diff --git a/fixtures/vitest-pool-workers-examples/workers-assets-only/test/tsconfig.json b/fixtures/vitest-pool-workers-examples/workers-assets-only/test/tsconfig.json deleted file mode 100644 index 40d245572f5f..000000000000 --- a/fixtures/vitest-pool-workers-examples/workers-assets-only/test/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "../../tsconfig.workerd-test.json", - "include": ["./**/*.ts"] -} diff --git a/fixtures/vitest-pool-workers-examples/workers-assets-only/tsconfig.json b/fixtures/vitest-pool-workers-examples/workers-assets-only/tsconfig.json deleted file mode 100644 index 90e58bf03ef0..000000000000 --- a/fixtures/vitest-pool-workers-examples/workers-assets-only/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "../tsconfig.node.json", - "include": ["./*.ts"] -} diff --git a/fixtures/vitest-pool-workers-examples/workers-assets-only/vitest.config.ts b/fixtures/vitest-pool-workers-examples/workers-assets-only/vitest.config.ts deleted file mode 100644 index 9b79788eddd6..000000000000 --- a/fixtures/vitest-pool-workers-examples/workers-assets-only/vitest.config.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; -import { defineConfig } from "vitest/config"; - -export default defineConfig({ - plugins: [ - cloudflareTest({ - wrangler: { configPath: "./wrangler.jsonc" }, - }), - ], -}); diff --git a/fixtures/vitest-pool-workers-examples/workers-assets-only/wrangler.jsonc b/fixtures/vitest-pool-workers-examples/workers-assets-only/wrangler.jsonc deleted file mode 100644 index 260ed66ee91d..000000000000 --- a/fixtures/vitest-pool-workers-examples/workers-assets-only/wrangler.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "workers-static-assets-only", - // don't provide compatibility_date so that vitest will infer the latest one - "assets": { - "directory": "./public", - "html_handling": "none", - }, -} diff --git a/fixtures/vitest-pool-workers-examples/workers-assets-run-worker-first/test/env.d.ts b/fixtures/vitest-pool-workers-examples/workers-assets-run-worker-first/test/env.d.ts index 67b3610dbc7d..508751ce4ac9 100644 --- a/fixtures/vitest-pool-workers-examples/workers-assets-run-worker-first/test/env.d.ts +++ b/fixtures/vitest-pool-workers-examples/workers-assets-run-worker-first/test/env.d.ts @@ -1,3 +1,3 @@ -declare module "cloudflare:test" { - interface ProvidedEnv extends Env {} +declare namespace Cloudflare { + interface Env {} } diff --git a/fixtures/vitest-pool-workers-examples/workers-assets/test/assets.test.ts b/fixtures/vitest-pool-workers-examples/workers-assets/test/assets.test.ts index 0a473c93c40f..8e5df266ad4a 100644 --- a/fixtures/vitest-pool-workers-examples/workers-assets/test/assets.test.ts +++ b/fixtures/vitest-pool-workers-examples/workers-assets/test/assets.test.ts @@ -45,10 +45,7 @@ describe("Hello World user worker", () => { const response = await SELF.fetch("http://example.com/message"); expect(await response.text()).toMatchInlineSnapshot(`"Hello, World!"`); }); - it("does get assets directly is using SELF", async () => { - const response = await SELF.fetch("http://example.com/"); - expect(await response.text()).toContain("Asset index.html"); - }); + it("can also get assets via binding", async () => { const response = await SELF.fetch("http://example.com/binding"); expect(await response.text()).toContain("binding.html"); diff --git a/fixtures/vitest-pool-workers-examples/workers-assets/test/env.d.ts b/fixtures/vitest-pool-workers-examples/workers-assets/test/env.d.ts index 67b3610dbc7d..c3290b581d48 100644 --- a/fixtures/vitest-pool-workers-examples/workers-assets/test/env.d.ts +++ b/fixtures/vitest-pool-workers-examples/workers-assets/test/env.d.ts @@ -1,3 +1,5 @@ -declare module "cloudflare:test" { - interface ProvidedEnv extends Env {} +declare namespace Cloudflare { + interface Env { + ASSETS: Fetcher; + } } diff --git a/fixtures/vitest-pool-workers-examples/workflows/test/env.d.ts b/fixtures/vitest-pool-workers-examples/workflows/test/env.d.ts index bd9eb32999df..508751ce4ac9 100644 --- a/fixtures/vitest-pool-workers-examples/workflows/test/env.d.ts +++ b/fixtures/vitest-pool-workers-examples/workflows/test/env.d.ts @@ -1,4 +1,3 @@ -declare module "cloudflare:test" { - // Controls the type of `import("cloudflare:test").env` - interface ProvidedEnv extends Env {} +declare namespace Cloudflare { + interface Env {} } diff --git a/fixtures/vitest-pool-workers-remote-bindings/env.d.ts b/fixtures/vitest-pool-workers-remote-bindings/env.d.ts index 5ca5d483e6ef..73f6dc57e487 100644 --- a/fixtures/vitest-pool-workers-remote-bindings/env.d.ts +++ b/fixtures/vitest-pool-workers-remote-bindings/env.d.ts @@ -1,7 +1,5 @@ -import { Fetcher } from "@cloudflare/workers-types/experimental"; - -declare module "cloudflare:test" { - interface ProvidedEnv { - MY_WORKER: Fetcher; +declare namespace Cloudflare { + interface Env { + MY_WORKER: import("@cloudflare/workers-types/experimental").Fetcher; } } diff --git a/fixtures/worker-with-unsafe-external-plugin/tests/env.d.ts b/fixtures/worker-with-unsafe-external-plugin/tests/env.d.ts index 67b3610dbc7d..508751ce4ac9 100644 --- a/fixtures/worker-with-unsafe-external-plugin/tests/env.d.ts +++ b/fixtures/worker-with-unsafe-external-plugin/tests/env.d.ts @@ -1,3 +1,3 @@ -declare module "cloudflare:test" { - interface ProvidedEnv extends Env {} +declare namespace Cloudflare { + interface Env {} } diff --git a/fixtures/workers-shared-asset-config/env.d.ts b/fixtures/workers-shared-asset-config/env.d.ts index ec168ef521c9..c54cdfe3fcf2 100644 --- a/fixtures/workers-shared-asset-config/env.d.ts +++ b/fixtures/workers-shared-asset-config/env.d.ts @@ -1,6 +1,5 @@ -declare module "cloudflare:test" { - // Controls the type of `import("cloudflare:test").env` - interface ProvidedEnv { +declare namespace Cloudflare { + interface Env { CONFIG: Record; ASSETS_MANIFEST: ArrayBuffer; ASSETS_KV_NAMESPACE: KVNamespace; diff --git a/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts b/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts index 856e805ac973..431659a2a5d8 100644 --- a/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts +++ b/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts @@ -128,6 +128,7 @@ export class CloudflarePoolWorker implements PoolWorker { durableObjectBindingDesignators: [ ...getDurableObjectDesignators(this.parsedPoolOptions).entries(), ], + selfName: getRunnerName(this.options.project), }); } this.socket.send(structuredSerializableStringify(message)); diff --git a/packages/vitest-pool-workers/src/pool/index.ts b/packages/vitest-pool-workers/src/pool/index.ts index a4ea83aa5d73..55ee2781c27c 100644 --- a/packages/vitest-pool-workers/src/pool/index.ts +++ b/packages/vitest-pool-workers/src/pool/index.ts @@ -264,7 +264,6 @@ type ProjectWorkers = [ ...auxiliaryWorkers: WorkerOptions[], ]; -const SELF_NAME_BINDING = "__VITEST_POOL_WORKERS_SELF_NAME"; const SELF_SERVICE_BINDING = "__VITEST_POOL_WORKERS_SELF_SERVICE"; const LOOPBACK_SERVICE_BINDING = "__VITEST_POOL_WORKERS_LOOPBACK_SERVICE"; const RUNNER_OBJECT_BINDING = "__VITEST_POOL_WORKERS_RUNNER_OBJECT"; @@ -280,10 +279,7 @@ async function buildProjectWorkerOptions( ); const runnerWorker = customOptions.miniflare ?? {}; - // Make sure the worker has a well-known name, and share it with the runner runnerWorker.name = getRunnerName(project); - runnerWorker.bindings ??= {}; - runnerWorker.bindings[SELF_NAME_BINDING] = runnerWorker.name; // Make sure the worker has the `nodejs_compat` and `export_commonjs_default` // compatibility flags enabled. Vitest makes heavy use of Node APIs, and many @@ -437,18 +433,8 @@ async function buildProjectWorkerOptions( // which is the singleton host for running tests. runnerWorker.durableObjects[RUNNER_OBJECT_BINDING] = { className: "__VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__", - // Make the runner object ephemeral, so it doesn't write any `.sqlite` files - // that would disrupt stacked storage because we prevent eviction - // unsafeUniqueKey: kUnsafeEphemeralUniqueKey, unsafePreventEviction: true, }; - // runnerWorker.durableObjects["MY"] = { - // className: "MyDO", - // // Make the runner object ephemeral, so it doesn't write any `.sqlite` files - // // that would disrupt stacked storage because we prevent eviction - // // unsafeUniqueKey: kUnsafeEphemeralUniqueKey, - // unsafePreventEviction: true, - // }; // Vite has its own define mechanism, but we can't control it from custom // pools. Our defines come from `wrangler.toml` files which are only parsed diff --git a/packages/vitest-pool-workers/src/worker/durable-objects.ts b/packages/vitest-pool-workers/src/worker/durable-objects.ts index 4bcda16c9050..bdc993a700e3 100644 --- a/packages/vitest-pool-workers/src/worker/durable-objects.ts +++ b/packages/vitest-pool-workers/src/worker/durable-objects.ts @@ -1,6 +1,6 @@ import assert from "node:assert"; -import { exports } from "cloudflare:workers"; -import { getSerializedOptions, internalEnv } from "./env"; +import { env, exports } from "cloudflare:workers"; +import { getSerializedOptions } from "./env"; import type { __VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__ } from "./index"; const CF_KEY_ACTION = "vitestPoolWorkersDurableObjectAction"; @@ -60,8 +60,7 @@ function getSameIsolateNamespaces(): DurableObjectNamespace[] { continue; } - const namespace = - internalEnv[key] ?? (exports as Record)?.[key]; + const namespace = env[key] ?? (exports as Record)?.[key]; assert( isDurableObjectNamespace(namespace), `Expected ${key} to be a DurableObjectNamespace binding` @@ -174,12 +173,14 @@ export async function runDurableObjectAlarm( * behalf of a different request` error. */ export function runInRunnerObject( - env: Env, callback: ( instance: __VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__ ) => R | Promise ): Promise { - const stub = env.__VITEST_POOL_WORKERS_RUNNER_OBJECT.getByName("singleton"); + const stub = + exports.__VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__.getByName( + "singleton" + ); return runInStub(stub, callback); } @@ -232,7 +233,7 @@ export async function listDurableObjectIds( // We can use this to find the bound name for this binding. We inject a // mapping between bound names and unique keys for namespaces. We then use // this to get a unique key and find all IDs on disk. - const boundName = Object.entries(internalEnv).find( + const boundName = Object.entries(env).find( (entry) => namespace === entry[1] )?.[0]; assert(boundName !== undefined, "Expected to find bound name for namespace"); @@ -243,8 +244,7 @@ export async function listDurableObjectIds( let uniqueKey = designator.unsafeUniqueKey; if (uniqueKey === undefined) { - const scriptName = - designator.scriptName ?? internalEnv.__VITEST_POOL_WORKERS_SELF_NAME; + const scriptName = designator.scriptName ?? options.selfName; const className = designator.className; uniqueKey = `${scriptName}-${className}`; } @@ -252,8 +252,7 @@ export async function listDurableObjectIds( const url = `http://placeholder/durable-objects?unique_key=${encodeURIComponent( uniqueKey )}`; - const res = - await internalEnv.__VITEST_POOL_WORKERS_LOOPBACK_SERVICE.fetch(url); + const res = await env.__VITEST_POOL_WORKERS_LOOPBACK_SERVICE.fetch(url); assert.strictEqual(res.status, 200); const ids = await res.json(); assert(Array.isArray(ids)); diff --git a/packages/vitest-pool-workers/src/worker/entrypoints.ts b/packages/vitest-pool-workers/src/worker/entrypoints.ts index f33ad624a693..43cc67341621 100644 --- a/packages/vitest-pool-workers/src/worker/entrypoints.ts +++ b/packages/vitest-pool-workers/src/worker/entrypoints.ts @@ -5,7 +5,7 @@ import { WorkflowEntrypoint, } from "cloudflare:workers"; import { maybeHandleRunRequest, runInRunnerObject } from "./durable-objects"; -import { getResolvedMainPath, stripInternalEnv } from "./env"; +import { getResolvedMainPath } from "./env"; import { patchAndRunWithHandlerContext } from "./patch-ctx"; // ============================================================================= @@ -17,11 +17,8 @@ import { patchAndRunWithHandlerContext } from "./patch-ctx"; * execution pipeline. Can be called from any I/O context, and will ensure the * request is run from within the `__VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__`. */ -function importModule( - env: Env, - specifier: string -): Promise> { - return runInRunnerObject(env, (instance) => { +function importModule(specifier: string): Promise> { + return runInRunnerObject((instance) => { if (!instance.executor) { const message = "Expected Vitest to start running before importing modules.\n" + @@ -90,7 +87,9 @@ function createProxyPrototypeClass< */ function getRPCProperty( ctor: WorkerEntrypointConstructor | DurableObjectConstructor, - instance: WorkerEntrypoint | DurableObjectClass, + instance: + | WorkerEntrypoint | Cloudflare.Env> + | DurableObjectClass | Cloudflare.Env>, key: string ): unknown { const prototypeHasKey = Reflect.has(ctor.prototype, key); @@ -158,22 +157,22 @@ function getRPCPropertyCallableThenable( * Instead, we define this function to extract these members, and provide type * safety for callers. */ -function getEntrypointState(instance: WorkerEntrypoint): { +function getEntrypointState(instance: WorkerEntrypoint): { ctx: ExecutionContext; - env: InternalUserEnv; + env: Cloudflare.Env; }; -function getEntrypointState(instance: DurableObjectClass): { +function getEntrypointState(instance: DurableObjectClass): { ctx: DurableObjectState; - env: InternalUserEnv; + env: Cloudflare.Env; }; function getEntrypointState( instance: - | WorkerEntrypoint - | DurableObjectClass + | WorkerEntrypoint + | DurableObjectClass ) { return instance as unknown as { ctx: ExecutionContext | DurableObjectState; - env: InternalUserEnv; + env: Cloudflare.Env; }; } @@ -202,10 +201,10 @@ type UnbrandedKeys = Exclude; // Check that we've included all possible keys // noinspection JSUnusedLocalSymbols const _workerEntrypointExhaustive: (typeof WORKER_ENTRYPOINT_KEYS)[number] = - undefined as unknown as UnbrandedKeys>; + undefined as unknown as UnbrandedKeys>; // noinspection JSUnusedLocalSymbols const _durableObjectExhaustive: (typeof DURABLE_OBJECT_KEYS)[number] = - undefined as unknown as UnbrandedKeys>; + undefined as unknown as UnbrandedKeys>; // ============================================================================= // `WorkerEntrypoint` wrappers @@ -224,11 +223,11 @@ type WorkerEntrypointConstructor = { * This requires importing the `main` module with Vite. */ async function getWorkerEntrypointExport( - env: Env, + env: Cloudflare.Env, entrypoint: string ): Promise<{ mainPath: string; entrypointValue: unknown }> { const mainPath = getResolvedMainPath("service"); - const mainModule = await importModule(env, mainPath); + const mainModule = await importModule(mainPath); const entrypointValue = typeof mainModule === "object" && mainModule !== null && @@ -250,7 +249,7 @@ async function getWorkerEntrypointExport( * with Vite, so will always return a `Promise.` */ async function getWorkerEntrypointRPCProperty( - wrapper: WorkerEntrypoint, + wrapper: WorkerEntrypoint, entrypoint: string, key: string ): Promise { @@ -259,7 +258,6 @@ async function getWorkerEntrypointRPCProperty( env, entrypoint ); - const userEnv = stripInternalEnv(env); // Ensure constructor and properties execute with ctx `AsyncLocalStorage` set return patchAndRunWithHandlerContext(ctx, () => { const expectedWorkerEntrypointMessage = `Expected ${entrypoint} export of ${mainPath} to be a subclass of \`WorkerEntrypoint\` for RPC`; @@ -267,7 +265,7 @@ async function getWorkerEntrypointRPCProperty( throw new TypeError(expectedWorkerEntrypointMessage); } const ctor = entrypointValue as WorkerEntrypointConstructor; - const instance = new ctor(ctx, userEnv); + const instance = new ctor(ctx, env); // noinspection SuspiciousTypeOfGuard if (!(instance instanceof WorkerEntrypoint)) { throw new TypeError(expectedWorkerEntrypointMessage); @@ -290,7 +288,7 @@ export function createWorkerEntrypointWrapper( ): typeof WorkerEntrypoint { const Wrapper = createProxyPrototypeClass( WorkerEntrypoint, - function (this: WorkerEntrypoint, key) { + function (this: WorkerEntrypoint, key) { // All `ExportedHandler` keys are reserved and cannot be called over RPC if ((DURABLE_OBJECT_KEYS as readonly string[]).includes(key)) { return; @@ -305,7 +303,7 @@ export function createWorkerEntrypointWrapper( // const prototype = Entrypoint.prototype as unknown as Record; for (const key of WORKER_ENTRYPOINT_KEYS) { Wrapper.prototype[key] = async function ( - this: WorkerEntrypoint, + this: WorkerEntrypoint, thing: unknown ) { const { mainPath, entrypointValue } = await getWorkerEntrypointExport( @@ -313,14 +311,12 @@ export function createWorkerEntrypointWrapper( entrypoint ); - const userEnv = stripInternalEnv(this.env); - return patchAndRunWithHandlerContext(this.ctx, () => { if (typeof entrypointValue === "object" && entrypointValue !== null) { // Assuming the user has defined an `ExportedHandler` const maybeFn = (entrypointValue as Record)[key]; if (typeof maybeFn === "function") { - return maybeFn.call(entrypointValue, thing, userEnv, this.ctx); + return maybeFn.call(entrypointValue, thing, this.env, this.ctx); } else { const message = `Expected ${entrypoint} export of ${mainPath} to define a \`${key}()\` function`; throw new TypeError(message); @@ -328,7 +324,7 @@ export function createWorkerEntrypointWrapper( } else if (typeof entrypointValue === "function") { // Assuming the user has defined a `WorkerEntrypoint` subclass const ctor = entrypointValue as WorkerEntrypointConstructor; - const instance = new ctor(this.ctx, userEnv); + const instance = new ctor(this.ctx, this.env); // noinspection SuspiciousTypeOfGuard if (!(instance instanceof WorkerEntrypoint)) { const message = `Expected ${entrypoint} export of ${mainPath} to be a subclass of \`WorkerEntrypoint\``; @@ -359,7 +355,7 @@ export function createWorkerEntrypointWrapper( type DurableObjectConstructor = { new ( ...args: ConstructorParameters - ): DurableObject | DurableObjectClass>; + ): DurableObject | DurableObjectClass; }; const kInstanceConstructor = Symbol("kInstanceConstructor"); @@ -367,14 +363,18 @@ const kInstance = Symbol("kInstance"); const kEnsureInstance = Symbol("kEnsureInstance"); type DurableObjectWrapperExtraPrototype = { [kInstanceConstructor]: DurableObjectConstructor; - [kInstance]: DurableObject | DurableObjectClass>; + [kInstance]: + | DurableObject + | DurableObjectClass | Cloudflare.Env>; [kEnsureInstance](): Promise<{ mainPath: string; instanceCtor: DurableObjectConstructor; - instance: DurableObject | DurableObjectClass>; + instance: + | DurableObject + | DurableObjectClass | Cloudflare.Env>; }>; }; -type DurableObjectWrapper = DurableObjectClass & +type DurableObjectWrapper = DurableObjectClass & DurableObjectWrapperExtraPrototype; async function getDurableObjectRPCProperty( @@ -421,7 +421,7 @@ export function createDurableObjectWrapper( const mainPath = getResolvedMainPath("Durable Object"); // `ensureInstance()` may be called multiple times concurrently. // We're assuming `importModule()` will only import the module once. - const mainModule = await importModule(env, mainPath); + const mainModule = await importModule(mainPath); const constructor = mainModule[className]; if (typeof constructor !== "function") { throw new TypeError( @@ -445,8 +445,7 @@ export function createDurableObjectWrapper( assert.fail("Unreachable"); } if (this[kInstance] === undefined) { - const userEnv = stripInternalEnv(env); - this[kInstance] = new this[kInstanceConstructor](ctx, userEnv); + this[kInstance] = new this[kInstanceConstructor](ctx, env); // Wait for any `blockConcurrencyWhile()`s in the constructor to complete await ctx.blockConcurrencyWhile(async () => {}); } @@ -517,14 +516,14 @@ type WorkflowEntrypointConstructor = { export function createWorkflowEntrypointWrapper(entrypoint: string) { const Wrapper = createProxyPrototypeClass( WorkflowEntrypoint, - function (this: WorkflowEntrypoint, key) { + function (this: WorkflowEntrypoint, key) { // only Workflow `run` should be exposed over RPC if (!["run"].includes(key)) { return; } const property = getWorkerEntrypointRPCProperty( - this as unknown as WorkerEntrypoint, + this as unknown as WorkerEntrypoint, entrypoint, key ); @@ -533,19 +532,18 @@ export function createWorkflowEntrypointWrapper(entrypoint: string) { ); Wrapper.prototype.run = async function ( - this: WorkflowEntrypoint, + this: WorkflowEntrypoint, ...args ) { const { mainPath, entrypointValue } = await getWorkerEntrypointExport( this.env, entrypoint ); - const userEnv = stripInternalEnv(this.env); // workflow entrypoint value should always be a constructor if (typeof entrypointValue === "function") { // Assuming the user has defined a `WorkflowEntrypoint` subclass const ctor = entrypointValue as WorkflowEntrypointConstructor; - const instance = new ctor(this.ctx, userEnv); + const instance = new ctor(this.ctx, this.env); // noinspection SuspiciousTypeOfGuard if (!(instance instanceof WorkflowEntrypoint)) { const message = `Expected ${entrypoint} export of ${mainPath} to be a subclass of \`WorkflowEntrypoint\``; diff --git a/packages/vitest-pool-workers/src/worker/env.ts b/packages/vitest-pool-workers/src/worker/env.ts index fad9dbe797e5..c396bbc01374 100644 --- a/packages/vitest-pool-workers/src/worker/env.ts +++ b/packages/vitest-pool-workers/src/worker/env.ts @@ -1,30 +1,21 @@ import assert from "node:assert"; +import { exports } from "cloudflare:workers"; -// See public facing `cloudflare:test` types for docs -export let env: Record; -export let SELF: Fetcher; +export { env } from "cloudflare:workers"; -export function stripInternalEnv( - internalEnv: Record & Env -): Record { - const result: Record & Partial = { ...internalEnv }; - delete result.__VITEST_POOL_WORKERS_SELF_NAME; - delete result.__VITEST_POOL_WORKERS_SELF_SERVICE; - delete result.__VITEST_POOL_WORKERS_LOOPBACK_SERVICE; - delete result.__VITEST_POOL_WORKERS_RUNNER_OBJECT; - delete result.__VITEST_POOL_WORKERS_UNSAFE_EVAL; - return result; -} - -export let internalEnv: Record & Env; -export function setEnv(newEnv: Record & Env) { - // Store full env for `WorkersSnapshotEnvironment` - internalEnv = newEnv; - SELF = newEnv.__VITEST_POOL_WORKERS_SELF_SERVICE; - - // Strip internal bindings from user facing `env` - env = stripInternalEnv(newEnv); -} +/** + * For reasons that aren't clear to me, just `SELF = exports.default` ends up with SELF being + * undefined in a test. This Proxy solution works. + */ +export const SELF = new Proxy( + {}, + { + get(_, p) { + // @ts-expect-error This works at runtime + return exports.default[p].bind(exports.default); + }, + } +); export function getSerializedOptions(): SerializedOptions { assert(typeof __vitest_worker__ === "object", "Expected global Vitest state"); diff --git a/packages/vitest-pool-workers/src/worker/index.ts b/packages/vitest-pool-workers/src/worker/index.ts index 58ab3d355a4f..3a7c28f0a182 100644 --- a/packages/vitest-pool-workers/src/worker/index.ts +++ b/packages/vitest-pool-workers/src/worker/index.ts @@ -6,11 +6,9 @@ import * as vm from "node:vm"; import defines from "__VITEST_POOL_WORKERS_DEFINES"; import { createWorkerEntrypointWrapper, - internalEnv, maybeHandleRunRequest, registerHandlerAndGlobalWaitUntil, runInRunnerObject, - setEnv, } from "cloudflare:test-internal"; import { DurableObject } from "cloudflare:workers"; import * as devalue from "devalue"; @@ -174,8 +172,7 @@ function applyDefines() { } } -// `__VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__` is a singleton and "colo local" ephemeral object. Refer to: -// https://github.com/cloudflare/workerd/blob/v1.20231206.0/src/workerd/server/workerd.capnp#L529-L543 +// `__VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__` is a singleton export class __VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__ extends DurableObject { #getExecutor: (() => unknown) | undefined; @@ -183,11 +180,10 @@ export class __VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__ extends DurableObject return this.#getExecutor?.(); } - constructor(_state: DurableObjectState, env: Record & Env) { - super(_state, env); - vm._setUnsafeEval(env.__VITEST_POOL_WORKERS_UNSAFE_EVAL); - ensurePatchedFunction(env.__VITEST_POOL_WORKERS_UNSAFE_EVAL); - setEnv(env); + constructor(_state: DurableObjectState, doEnv: Cloudflare.Env) { + super(_state, doEnv); + vm._setUnsafeEval(doEnv.__VITEST_POOL_WORKERS_UNSAFE_EVAL); + ensurePatchedFunction(doEnv.__VITEST_POOL_WORKERS_UNSAFE_EVAL); applyDefines(); } @@ -244,7 +240,6 @@ export class __VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__ extends DurableObject try { poolSocket.send(structuredSerializableStringify(response)); } catch (error) { - __console.error("pool error"); // If the user tried to perform a dynamic `import()` or `console.log()` // from inside a `export default { fetch() { ... } }` handler using `SELF` // or from inside their own Durable Object, Vitest will try to send an @@ -254,7 +249,7 @@ export class __VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__ extends DurableObject // the RPC message though, so if we detect this, we try resend the message // from the runner object. if (isDifferentIOContextError(error)) { - const promise = runInRunnerObject(internalEnv, () => { + const promise = runInRunnerObject(() => { poolSocket.send(structuredSerializableStringify(response)); }).catch((e) => { __console.error( diff --git a/packages/vitest-pool-workers/src/worker/lib/cloudflare/snapshot.ts b/packages/vitest-pool-workers/src/worker/lib/cloudflare/snapshot.ts index 386e33e9a3fe..1cceee806f57 100644 --- a/packages/vitest-pool-workers/src/worker/lib/cloudflare/snapshot.ts +++ b/packages/vitest-pool-workers/src/worker/lib/cloudflare/snapshot.ts @@ -1,6 +1,6 @@ import assert from "node:assert"; import { dirname } from "node:path"; -import { internalEnv } from "cloudflare:test-internal"; +import { env } from "cloudflare:workers"; import { VitestSnapshotEnvironment } from "vitest/snapshot"; // Define a custom `SnapshotEnvironment` that uses a service binding for file @@ -9,7 +9,7 @@ class WorkersSnapshotEnvironment extends VitestSnapshotEnvironment { #fetch(method: string, path: string, body?: BodyInit): Promise { const encodedPath = encodeURIComponent(path); const url = `http://placeholder/snapshot?path=${encodedPath}`; - return internalEnv.__VITEST_POOL_WORKERS_LOOPBACK_SERVICE.fetch(url, { + return env.__VITEST_POOL_WORKERS_LOOPBACK_SERVICE.fetch(url, { method, body, }); diff --git a/packages/vitest-pool-workers/src/worker/types-ambient.d.ts b/packages/vitest-pool-workers/src/worker/types-ambient.d.ts index aa66924213be..7d2266d64f37 100644 --- a/packages/vitest-pool-workers/src/worker/types-ambient.d.ts +++ b/packages/vitest-pool-workers/src/worker/types-ambient.d.ts @@ -6,14 +6,17 @@ interface UnsafeEval { newAsyncFunction(script: string, name?: string, ...args: string[]): Function; } -interface Env { - __VITEST_POOL_WORKERS_SELF_NAME: string; - __VITEST_POOL_WORKERS_SELF_SERVICE: Fetcher; - __VITEST_POOL_WORKERS_LOOPBACK_SERVICE: Fetcher; - __VITEST_POOL_WORKERS_RUNNER_OBJECT: DurableObjectNamespace; - __VITEST_POOL_WORKERS_UNSAFE_EVAL: UnsafeEval; +namespace Cloudflare { + interface Env extends Record { + __VITEST_POOL_WORKERS_LOOPBACK_SERVICE: Fetcher; + __VITEST_POOL_WORKERS_UNSAFE_EVAL: UnsafeEval; + } + interface GlobalProps { + // eslint-disable-next-line @typescript-eslint/consistent-type-imports + mainModule: typeof import("./index"); + durableNamespaces: "__VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__"; + } } -type InternalUserEnv = Env & Record; interface DurableObjectDesignator { className: string; @@ -28,6 +31,7 @@ interface SerializedOptions { string /* bound name */, DurableObjectDesignator >; + selfName?: string; } declare module "__VITEST_POOL_WORKERS_USER_OBJECT" {} diff --git a/packages/vitest-pool-workers/src/worker/workflows.ts b/packages/vitest-pool-workers/src/worker/workflows.ts index 81505eecd0f3..bcdcb7393ec4 100644 --- a/packages/vitest-pool-workers/src/worker/workflows.ts +++ b/packages/vitest-pool-workers/src/worker/workflows.ts @@ -2,8 +2,8 @@ import { instanceStatusName, InstanceStatus as InstanceStatusNumber, } from "@cloudflare/workflows-shared/src/instance"; +import { env } from "cloudflare:workers"; import { runInRunnerObject } from "./durable-objects"; -import { env, internalEnv } from "./env"; import type { WorkflowBinding } from "@cloudflare/workflows-shared/src/binding"; import type { StepSelector, @@ -137,12 +137,11 @@ export async function introspectWorkflow( const instanceIntrospectors: WorkflowInstanceIntrospector[] = []; const bindingName = await workflow.unsafeGetBindingName(); - const internalOriginalWorkflow = internalEnv[bindingName] as Workflow; - const externalOriginalWorkflow = env[bindingName] as Workflow; + const originalWorkflow = env[bindingName] as Workflow; const introspectAndModifyInstance = async (instanceId: string) => { try { - await runInRunnerObject(internalEnv, async () => { + await runInRunnerObject(async () => { const introspector = await introspectWorkflowInstance( workflow, instanceId @@ -213,18 +212,15 @@ export async function introspectWorkflow( }; const dispose = () => { - internalEnv[bindingName] = internalOriginalWorkflow; - env[bindingName] = externalOriginalWorkflow; + env[bindingName] = originalWorkflow; }; // Create a single handler instance to be reused const proxyGetHandler = createWorkflowProxyGetHandler(); // Apply the proxies using the shared handler logic - internalEnv[bindingName] = new Proxy(internalOriginalWorkflow, { - get: proxyGetHandler, - }); - env[bindingName] = new Proxy(externalOriginalWorkflow, { + + env[bindingName] = new Proxy(originalWorkflow, { get: proxyGetHandler, }); diff --git a/packages/vitest-pool-workers/types/cloudflare-test.d.ts b/packages/vitest-pool-workers/types/cloudflare-test.d.ts index f748079473ee..37ab75b2e18f 100644 --- a/packages/vitest-pool-workers/types/cloudflare-test.d.ts +++ b/packages/vitest-pool-workers/types/cloudflare-test.d.ts @@ -1,30 +1,15 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ declare module "cloudflare:test" { - // eslint-disable-next-line @typescript-eslint/no-empty-object-type - interface ProvidedEnv {} - /** - * 2nd argument passed to modules-format exported handlers. Contains bindings - * configured in top-level `miniflare` pool options. To configure the type - * of this value, use an ambient module type: - * - * ```ts - * declare module "cloudflare:test" { - * interface ProvidedEnv { - * NAMESPACE: KVNamespace; - * } - * - * // ...or if you have an existing `Env` type... - * interface ProvidedEnv extends Env {} - * } - * ``` + * @deprecated Instead, use `import { env } from "cloudflare:workers"` */ - export const env: ProvidedEnv; + export const env: Cloudflare.Env; /** * Service binding to the default export defined in the `main` worker. Note * this `main` worker runs in the same isolate/context as tests, so any global * mocks will apply to it too. + * @deprecated Instead, use `import { exports } from "cloudflare:workers"` and `exports.default.fetch()` */ export const SELF: Fetcher; @@ -79,7 +64,7 @@ declare module "cloudflare:test" { * `EventContext`s return by `createPagesEventContext()`. */ export function waitOnExecutionContext( - ctx: ExecutionContext | EventContext + ctx: ExecutionContext | EventContext ): Promise; /** * Creates an instance of `ScheduledController` for use as the 1st argument to @@ -515,7 +500,7 @@ declare module "cloudflare:test" { * Functions. */ export function createPagesEventContext< - F extends PagesFunction, + F extends PagesFunction, >(init: EventContextInit[0]>): Parameters[0]; // Taken from `undici` (https://github.com/nodejs/undici/tree/main/types) with diff --git a/packages/workflows-shared/src/engine.ts b/packages/workflows-shared/src/engine.ts index 66525e132bb2..297b0140f758 100644 --- a/packages/workflows-shared/src/engine.ts +++ b/packages/workflows-shared/src/engine.ts @@ -23,6 +23,7 @@ import type { WorkflowEntrypoint, WorkflowEvent } from "cloudflare:workers"; interface Env { USER_WORKFLOW: WorkflowEntrypoint; + ENGINE: DurableObjectNamespace; } export type DatabaseWorkflow = { diff --git a/packages/workflows-shared/tests/binding.test.ts b/packages/workflows-shared/tests/binding.test.ts index f7e278e0d417..84101aee1fff 100644 --- a/packages/workflows-shared/tests/binding.test.ts +++ b/packages/workflows-shared/tests/binding.test.ts @@ -1,12 +1,8 @@ -import { - createExecutionContext, - env, - runInDurableObject, -} from "cloudflare:test"; +import { createExecutionContext, runInDurableObject } from "cloudflare:test"; +import { env } from "cloudflare:workers"; import { describe, expect, it, vi } from "vitest"; import { WorkflowBinding } from "../src/binding"; import type { Engine } from "../src/engine"; -import type { ProvidedEnv } from "cloudflare:test"; import type { WorkflowEvent, WorkflowStep } from "cloudflare:workers"; async function setWorkflowEntrypoint( @@ -21,7 +17,7 @@ async function setWorkflowEntrypoint( // eslint-disable-next-line @typescript-eslint/no-shadow protected ctx: ExecutionContext, // eslint-disable-next-line @typescript-eslint/no-shadow - protected env: ProvidedEnv + protected env: Cloudflare.Env ) {} public async run( event: Readonly>, @@ -63,7 +59,7 @@ describe("WorkflowBinding", () => { const disposeSpy = vi.fn(); - await runInDurableObject(engineStub, (engine) => { + await runInDurableObject(engineStub, (engine) => { const originalReceiveEvent = engine.receiveEvent.bind(engine); engine.receiveEvent = (event) => { const result = originalReceiveEvent(event); diff --git a/packages/workflows-shared/tests/engine.test.ts b/packages/workflows-shared/tests/engine.test.ts index bb4641674a24..185d7cc191a6 100644 --- a/packages/workflows-shared/tests/engine.test.ts +++ b/packages/workflows-shared/tests/engine.test.ts @@ -1,8 +1,5 @@ -import { - createExecutionContext, - env, - runInDurableObject, -} from "cloudflare:test"; +import { createExecutionContext, runInDurableObject } from "cloudflare:test"; +import { env } from "cloudflare:workers"; import { NonRetryableError } from "cloudflare:workflows"; import { describe, expect, it, vi } from "vitest"; import { InstanceEvent, InstanceStatus } from "../src"; @@ -13,7 +10,6 @@ import type { Engine, EngineLogs, } from "../src/engine"; -import type { ProvidedEnv } from "cloudflare:test"; import type { WorkflowEvent, WorkflowStep } from "cloudflare:workers"; async function setWorkflowEntrypoint( @@ -28,7 +24,7 @@ async function setWorkflowEntrypoint( // eslint-disable-next-line @typescript-eslint/no-shadow protected ctx: ExecutionContext, // eslint-disable-next-line @typescript-eslint/no-shadow - protected env: ProvidedEnv + protected env: Cloudflare.Env ) {} public async run( event: Readonly>, diff --git a/packages/workflows-shared/tests/env.d.ts b/packages/workflows-shared/tests/env.d.ts index 28f77257f833..38fe220a9c40 100644 --- a/packages/workflows-shared/tests/env.d.ts +++ b/packages/workflows-shared/tests/env.d.ts @@ -1,10 +1,8 @@ -import { type WorkflowEntrypoint } from "cloudflare:workers"; -import { type Engine } from "../src/index"; +/* eslint-disable */ -declare module "cloudflare:test" { - // Controls the type of `import("cloudflare:test").env` - interface ProvidedEnv extends Env { - ENGINE: DurableObjectNamespace; - USER_WORKFLOW: WorkflowEntrypoint; +declare namespace Cloudflare { + interface Env { + ENGINE: DurableObjectNamespace; + USER_WORKFLOW: import("cloudflare:workers").WorkflowEntrypoint; } } From 3e60bebb9b9f126fb210b76fc3731fc1b1ae1706 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Fri, 19 Dec 2025 20:25:00 +0000 Subject: [PATCH 08/45] better module runner --- .../vitest-pool-workers/src/pool/index.ts | 4 +++ .../src/worker/entrypoints.ts | 22 ++++++------ .../vitest-pool-workers/src/worker/index.ts | 34 ------------------- .../src/worker/types-globals.d.ts | 12 ++++--- packages/vitest-pool-workers/tsdown.config.ts | 1 + 5 files changed, 23 insertions(+), 50 deletions(-) diff --git a/packages/vitest-pool-workers/src/pool/index.ts b/packages/vitest-pool-workers/src/pool/index.ts index 55ee2781c27c..1de4b242b965 100644 --- a/packages/vitest-pool-workers/src/pool/index.ts +++ b/packages/vitest-pool-workers/src/pool/index.ts @@ -287,6 +287,10 @@ async function buildProjectWorkerOptions( // `module.exports` directly, rather than `{ default: module.exports }`. runnerWorker.compatibilityFlags ??= []; + runnerWorker.compatibilityFlags.push( + "no_handle_cross_request_promise_resolution" + ); + if (runnerWorker.compatibilityDate === undefined) { // No compatibility date was provided, so infer the latest supported date runnerWorker.compatibilityDate ??= supportedCompatibilityDate; diff --git a/packages/vitest-pool-workers/src/worker/entrypoints.ts b/packages/vitest-pool-workers/src/worker/entrypoints.ts index 43cc67341621..6bd30b3034de 100644 --- a/packages/vitest-pool-workers/src/worker/entrypoints.ts +++ b/packages/vitest-pool-workers/src/worker/entrypoints.ts @@ -17,18 +17,16 @@ import { patchAndRunWithHandlerContext } from "./patch-ctx"; * execution pipeline. Can be called from any I/O context, and will ensure the * request is run from within the `__VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__`. */ -function importModule(specifier: string): Promise> { - return runInRunnerObject((instance) => { - if (!instance.executor) { - const message = - "Expected Vitest to start running before importing modules.\n" + - "This usually means you have multiple `vitest` versions installed.\n" + - "Use your package manager's `why` command to list versions and why each is installed (e.g. `npm why vitest`)."; - throw new Error(message); - } - - // @ts-expect-error the type for the Module runner is not exposed - return instance.executor.import(specifier); +async function importModule( + specifier: string +): Promise> { + /** + * We need to run this import inside the Runner Object, or we get errors like: + * - The Workers runtime canceled this request because it detected that your Worker's code had hung and would never generate a response. Refer to: https://developers.cloudflare.com/workers/observability/errors/ + * - Cannot perform I/O on behalf of a different Durable Object. I/O objects (such as streams, request/response bodies, and others) created in the context of one Durable Object cannot be accessed from a different Durable Object in the same isolate. This is a limitation of Cloudflare Workers which allows us to improve overall performance. + */ + return runInRunnerObject(() => { + return __vitest_mocker__.moduleRunner.import(specifier); }); } diff --git a/packages/vitest-pool-workers/src/worker/index.ts b/packages/vitest-pool-workers/src/worker/index.ts index 3a7c28f0a182..69d17585181c 100644 --- a/packages/vitest-pool-workers/src/worker/index.ts +++ b/packages/vitest-pool-workers/src/worker/index.ts @@ -174,12 +174,6 @@ function applyDefines() { // `__VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__` is a singleton export class __VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__ extends DurableObject { - #getExecutor: (() => unknown) | undefined; - - get executor() { - return this.#getExecutor?.(); - } - constructor(_state: DurableObjectState, doEnv: Cloudflare.Env) { super(_state, doEnv); vm._setUnsafeEval(doEnv.__VITEST_POOL_WORKERS_UNSAFE_EVAL); @@ -207,34 +201,6 @@ export class __VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__ extends DurableObject poolSocket.accept(); - // Internally, `runBaseTests()` calls `startModuleRunner()`, which - // constructs a singleton `VitestModuleRunner`. We'd like access to this singleton - // so we can transform and import code with Vite ourselves (e.g. for user worker's default exports - // and Durable Objects). Vitest exposes a `startVitestModuleRunner()` - // function that we can use to get a new instance of the module runner, - // but we need the _exact_ instance Vitest is using to run tests so - // that e.g. instanceof checks on DurableObjects during a test run works - // as expected. - // Now, we can't just call startModuleRunner _ourselves_ at this point. - // Since `runBaseTests()` hasn't run yet, we'd end up constructing the - // singleton rather than getting an existing instance (and well, we don't know which arguments to pass!) - // Instead, store the `startModuleRunner()` function and call it when it's - // actually needed (see `get executor()` above). At that point the singleton - // is guaranteed to exist, since we're within the context of a test. As such, at _that_ - // point calling `startModuleRunner()` will return the existing singleton. - // TODO: Replace with `this.#getExecutor = startModuleRunner;` once https://github.com/vitest-dev/vitest/pull/9234 lands - const { VitestModuleRunner } = await import( - // @ts-expect-error the types don't seem to be working for this module - "vitest/internal/module-runner" - ); - const originalResolveUrl = VitestModuleRunner.prototype.import; - // eslint-disable-next-line @typescript-eslint/no-this-alias - const that = this; - VitestModuleRunner.prototype.import = function (...args: unknown[]) { - that.#getExecutor = () => this; - return originalResolveUrl.apply(this, args); - }; - init({ post: (response) => { try { diff --git a/packages/vitest-pool-workers/src/worker/types-globals.d.ts b/packages/vitest-pool-workers/src/worker/types-globals.d.ts index c0cf35f7f48f..5385b54de990 100644 --- a/packages/vitest-pool-workers/src/worker/types-globals.d.ts +++ b/packages/vitest-pool-workers/src/worker/types-globals.d.ts @@ -1,11 +1,15 @@ // noinspection ES6ConvertVarToLetConst -import type { WorkerGlobalState } from "vitest"; +import type { VitestUtils, WorkerGlobalState } from "vitest"; declare global { - // https://github.com/vitest-dev/vitest/blob/v1.0.0-beta.5/packages/vitest/src/runtime/worker.ts#L49-L69 - const __vitest_worker__: WorkerGlobalState & { - config?: { poolOptions?: { workers?: SerializedOptions } }; + // https://github.com/vitest-dev/vitest/blob/1ec3a8b687c57153ed3d0d4777d7765c18f3cc82/packages/vitest/src/runtime/utils.ts#L24 + const __vitest_worker__: WorkerGlobalState; + // https://github.com/vitest-dev/vitest/blob/1ec3a8b687c57153ed3d0d4777d7765c18f3cc82/packages/vitest/src/runtime/moduleRunner/moduleRunner.ts#L86 + const __vitest_mocker__: VitestUtils & { + moduleRunner: { + import: (id: string) => Promise; + }; }; // Original, un-patched console that always logs directly to stdout/err, // without call site annotations diff --git a/packages/vitest-pool-workers/tsdown.config.ts b/packages/vitest-pool-workers/tsdown.config.ts index d2eb9edb3ca2..07c59f8ea196 100644 --- a/packages/vitest-pool-workers/tsdown.config.ts +++ b/packages/vitest-pool-workers/tsdown.config.ts @@ -55,6 +55,7 @@ const commonOptions: UserConfig = { ], sourcemap: true, outDir: path.join(pkgRoot, "dist"), + ignoreWatch: ["dist"], }; export default defineConfig(async () => { const builtinModules = await getBuiltinModules(); From 3037a204c6246805c92d9cf3dc6a00651b024394 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Fri, 19 Dec 2025 20:58:33 +0000 Subject: [PATCH 09/45] fix tests after merge --- .../test/inspector.test.ts | 37 +- pnpm-lock.yaml | 436 +----------------- 2 files changed, 35 insertions(+), 438 deletions(-) diff --git a/packages/vitest-pool-workers/test/inspector.test.ts b/packages/vitest-pool-workers/test/inspector.test.ts index f38d5ab8fb3a..bdb5dba5ba8e 100644 --- a/packages/vitest-pool-workers/test/inspector.test.ts +++ b/packages/vitest-pool-workers/test/inspector.test.ts @@ -137,7 +137,7 @@ test("uses next available port when default port 9229 is in use", async ({ "vitest.config.mts": vitestConfig({ main: "./index.ts", miniflare: { - compatibilityDate: "2024-01-01", + compatibilityDate: "2025-12-02", compatibilityFlags: ["nodejs_compat"], }, }), @@ -197,26 +197,21 @@ test("throws error when user-specified inspector port is not available", async ( await createEphemeralServer(); try { await seed({ - "vitest.config.mts": dedent` - import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; - export default defineWorkersConfig({ - test: { - inspector: { - port: ${blockedPort}, - }, - poolOptions: { - workers: { - main: "./index.ts", - singleWorker: true, - miniflare: { - compatibilityDate: "2024-01-01", - compatibilityFlags: ["nodejs_compat"], - }, - }, - }, - } - }); - `, + "vitest.config.mts": vitestConfig( + { + main: "./index.ts", + singleWorker: true, + miniflare: { + compatibilityDate: "2025-12-02", + compatibilityFlags: ["nodejs_compat"], + }, + }, + { + inspector: { + port: blockedPort, + }, + } + ), "index.ts": dedent` export default { async fetch(request, env, ctx) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fc5be8b207d6..3174cb46f120 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1243,16 +1243,8 @@ importers: specifier: ^5.5.2 version: 5.8.2 vitest: -<<<<<<< HEAD specifier: catalog:default version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.2))(yaml@2.8.1) -||||||| f5bda6608 - specifier: ~3.0.7 - version: 3.0.9(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.2))(yaml@2.8.1) -======= - specifier: ~3.0.7 - version: 3.0.9(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3(vitest@3.2.3))(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.2))(yaml@2.8.1) ->>>>>>> origin/main wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1501,16 +1493,10 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default -<<<<<<< HEAD - version: 4.20251217.0 + version: 4.20251219.0 '@types/node': specifier: ^20.19.9 version: 20.19.9 -||||||| f5bda6608 - version: 4.20251217.0 -======= - version: 4.20251219.0 ->>>>>>> origin/main playwright-chromium: specifier: catalog:default version: 1.56.1 @@ -1924,16 +1910,8 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': -<<<<<<< HEAD specifier: catalog:vitest-3 - version: 0.10.15(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) -||||||| f5bda6608 - specifier: ^0.7.0 - version: 0.7.8(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9) -======= - specifier: ^0.7.0 - version: 0.7.8(@cloudflare/workers-types@4.20251219.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9) ->>>>>>> origin/main + version: 0.10.15(@cloudflare/workers-types@4.20251219.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) '@cloudflare/workers-types': specifier: catalog:default version: 4.20251219.0 @@ -2171,16 +2149,8 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': -<<<<<<< HEAD specifier: catalog:vitest-3 - version: 0.10.15(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) -||||||| f5bda6608 - specifier: ^0.8.19 - version: 0.8.19(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3) -======= - specifier: ^0.8.19 - version: 0.8.19(@cloudflare/workers-types@4.20251219.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3) ->>>>>>> origin/main + version: 0.10.15(@cloudflare/workers-types@4.20251219.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) '@cloudflare/workers-shared': specifier: workspace:* version: link:../workers-shared @@ -3735,16 +3705,8 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': -<<<<<<< HEAD specifier: catalog:vitest-3 - version: 0.10.15(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) -||||||| f5bda6608 - specifier: ^0.7.0 - version: 0.7.8(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9) -======= - specifier: ^0.7.0 - version: 0.7.8(@cloudflare/workers-types@4.20251219.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9) ->>>>>>> origin/main + version: 0.10.15(@cloudflare/workers-types@4.20251219.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) '@cloudflare/workers-tsconfig': specifier: workspace:* version: link:../workers-tsconfig @@ -3866,16 +3828,8 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': -<<<<<<< HEAD specifier: catalog:vitest-3 - version: 0.10.15(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) -||||||| f5bda6608 - specifier: ^0.8.19 - version: 0.8.19(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3) -======= - specifier: ^0.8.19 - version: 0.8.19(@cloudflare/workers-types@4.20251219.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3) ->>>>>>> origin/main + version: 0.10.15(@cloudflare/workers-types@4.20251219.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) '@cloudflare/workers-tsconfig': specifier: workspace:* version: link:../workers-tsconfig @@ -4918,22 +4872,14 @@ packages: cpu: [x64] os: [darwin] -<<<<<<< HEAD '@cloudflare/workerd-darwin-64@1.20251210.0': resolution: {integrity: sha512-Nn9X1moUDERA9xtFdCQ2XpQXgAS9pOjiCxvOT8sVx9UJLAiBLkfSCGbpsYdarODGybXCpjRlc77Yppuolvt7oQ==} engines: {node: '>=16'} cpu: [x64] os: [darwin] - '@cloudflare/workerd-darwin-64@1.20251217.0': - resolution: {integrity: sha512-DN6vT+9ho61d/1/YuILW4VS+N1JBLaixWRL1vqNmhgbf8J8VHwWWotrRruEUYigJKx2yZyw6YsasE+yLXgx/Fw==} -||||||| f5bda6608 - '@cloudflare/workerd-darwin-64@1.20251217.0': - resolution: {integrity: sha512-DN6vT+9ho61d/1/YuILW4VS+N1JBLaixWRL1vqNmhgbf8J8VHwWWotrRruEUYigJKx2yZyw6YsasE+yLXgx/Fw==} -======= '@cloudflare/workerd-darwin-64@1.20251219.0': resolution: {integrity: sha512-7bAf9zrLw76jzS7c/yC4MTw9xqQyCy1FYAVyVmjJh14iYZQMFr0zKLD1x+TIEwkHn+1NPcRGwWTAjoiJtkLjkw==} ->>>>>>> origin/main engines: {node: '>=16'} cpu: [x64] os: [darwin] @@ -4944,22 +4890,14 @@ packages: cpu: [arm64] os: [darwin] -<<<<<<< HEAD '@cloudflare/workerd-darwin-arm64@1.20251210.0': resolution: {integrity: sha512-Mg8iYIZQFnbevq/ls9eW/eneWTk/EE13Pej1MwfkY5et0jVpdHnvOLywy/o+QtMJFef1AjsqXGULwAneYyBfHw==} engines: {node: '>=16'} cpu: [arm64] os: [darwin] - '@cloudflare/workerd-darwin-arm64@1.20251217.0': - resolution: {integrity: sha512-5nZOpRTkHmtcTc4Wbr1mj/O3dLb6aHZSiJuVBgtdbVcVmOXueSay3hnw1PXEyR+vpTKGUPkM+omUIslKHWnXDw==} -||||||| f5bda6608 - '@cloudflare/workerd-darwin-arm64@1.20251217.0': - resolution: {integrity: sha512-5nZOpRTkHmtcTc4Wbr1mj/O3dLb6aHZSiJuVBgtdbVcVmOXueSay3hnw1PXEyR+vpTKGUPkM+omUIslKHWnXDw==} -======= '@cloudflare/workerd-darwin-arm64@1.20251219.0': resolution: {integrity: sha512-58z2EiKrC28k96A2wjC+u9p1IgJrf/G2yNMYIvAvJpW3KDmMhZ1EnRXMD1tFhwa0Ur3LAJ2EiY/Fgs6FmdGrzQ==} ->>>>>>> origin/main engines: {node: '>=16'} cpu: [arm64] os: [darwin] @@ -4970,22 +4908,14 @@ packages: cpu: [x64] os: [linux] -<<<<<<< HEAD '@cloudflare/workerd-linux-64@1.20251210.0': resolution: {integrity: sha512-kjC2fCZhZ2Gkm1biwk2qByAYpGguK5Gf5ic8owzSCUw0FOUfQxTZUT9Lp3gApxsfTLbbnLBrX/xzWjywH9QR4g==} engines: {node: '>=16'} cpu: [x64] os: [linux] - '@cloudflare/workerd-linux-64@1.20251217.0': - resolution: {integrity: sha512-uoPGhMaZVXPpCsU0oG3HQzyVpXCGi5rU+jcHRjUI7DXM4EwctBGvZ380Knkja36qtl+ZvSKVR1pUFSGdK+45Pg==} -||||||| f5bda6608 - '@cloudflare/workerd-linux-64@1.20251217.0': - resolution: {integrity: sha512-uoPGhMaZVXPpCsU0oG3HQzyVpXCGi5rU+jcHRjUI7DXM4EwctBGvZ380Knkja36qtl+ZvSKVR1pUFSGdK+45Pg==} -======= '@cloudflare/workerd-linux-64@1.20251219.0': resolution: {integrity: sha512-V3gE8znX5UMv1KifoiM3KCG+ltQPHL1VHBGvM5e5diE3T1pdP/0SSjGbJ/Vv5mDqZnXTAhnENV8jNoT+S0Y4fA==} ->>>>>>> origin/main engines: {node: '>=16'} cpu: [x64] os: [linux] @@ -4996,22 +4926,14 @@ packages: cpu: [arm64] os: [linux] -<<<<<<< HEAD '@cloudflare/workerd-linux-arm64@1.20251210.0': resolution: {integrity: sha512-2IB37nXi7PZVQLa1OCuO7/6pNxqisRSO8DmCQ5x/3sezI5op1vwOxAcb1osAnuVsVN9bbvpw70HJvhKruFJTuA==} engines: {node: '>=16'} cpu: [arm64] os: [linux] - '@cloudflare/workerd-linux-arm64@1.20251217.0': - resolution: {integrity: sha512-ixHnHKsiz1Xko+eDgCJOZ7EEUZKtmnYq3AjW3nkVcLFypSLks4C29E45zVewdaN4wq8sCLeyQCl6r1kS17+DQQ==} -||||||| f5bda6608 - '@cloudflare/workerd-linux-arm64@1.20251217.0': - resolution: {integrity: sha512-ixHnHKsiz1Xko+eDgCJOZ7EEUZKtmnYq3AjW3nkVcLFypSLks4C29E45zVewdaN4wq8sCLeyQCl6r1kS17+DQQ==} -======= '@cloudflare/workerd-linux-arm64@1.20251219.0': resolution: {integrity: sha512-a36OVY/yYXeZ2biveJ4laRXVT25yv+mpnUw6YV2qTu8uZ9jhlqc1Kp59g61XsKKQMKO+3QPnt3m0XpZtQLYu1g==} ->>>>>>> origin/main engines: {node: '>=16'} cpu: [arm64] os: [linux] @@ -5022,22 +4944,14 @@ packages: cpu: [x64] os: [win32] -<<<<<<< HEAD '@cloudflare/workerd-windows-64@1.20251210.0': resolution: {integrity: sha512-Uaz6/9XE+D6E7pCY4OvkCuJHu7HcSDzeGcCGY1HLhojXhHd7yL52c3yfiyJdS8hPatiAa0nn5qSI/42+aTdDSw==} engines: {node: '>=16'} cpu: [x64] os: [win32] - '@cloudflare/workerd-windows-64@1.20251217.0': - resolution: {integrity: sha512-rP6USX+7ctynz3AtmKi+EvlLP3Xdr1ETrSdcnv693/I5QdUwBxq4yE1Lj6CV7GJizX6opXKYg8QMq0Q4eB9zRQ==} -||||||| f5bda6608 - '@cloudflare/workerd-windows-64@1.20251217.0': - resolution: {integrity: sha512-rP6USX+7ctynz3AtmKi+EvlLP3Xdr1ETrSdcnv693/I5QdUwBxq4yE1Lj6CV7GJizX6opXKYg8QMq0Q4eB9zRQ==} -======= '@cloudflare/workerd-windows-64@1.20251219.0': resolution: {integrity: sha512-i3qFsaYpOM9YkCIT/MN47XNYwRiHgJZDuU9ZlyfqrFUSlzFZ/RGMaHGEVGnBa/vuaFP6QXmKsD8w7ADtQ983sw==} ->>>>>>> origin/main engines: {node: '>=16'} cpu: [x64] os: [win32] @@ -9896,6 +9810,10 @@ packages: expect-type@0.15.0: resolution: {integrity: sha512-yWnriYB4e8G54M5/fAFj7rCIBiKs1HAACaY13kCz6Ku0dezjS9aMcfcdVK2X8Tv2tEV1BPz/wKfQ7WA4S/d8aA==} + expect-type@1.2.1: + resolution: {integrity: sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==} + engines: {node: '>=12.0.0'} + expect-type@1.3.0: resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==} engines: {node: '>=12.0.0'} @@ -14246,21 +14164,13 @@ packages: engines: {node: '>=16'} hasBin: true -<<<<<<< HEAD workerd@1.20251210.0: resolution: {integrity: sha512-9MUUneP1BnRE9XAYi94FXxHmiLGbO75EHQZsgWqSiOXjoXSqJCw8aQbIEPxCy19TclEl/kHUFYce8ST2W+Qpjw==} engines: {node: '>=16'} hasBin: true - workerd@1.20251217.0: - resolution: {integrity: sha512-s3mHDSWwHTduyY8kpHOsl27ZJ4ziDBJlc18PfBvNMqNnhO7yBeemlxH7bo7yQyU1foJrIZ6IENHDDg0Z9N8zQA==} -||||||| f5bda6608 - workerd@1.20251217.0: - resolution: {integrity: sha512-s3mHDSWwHTduyY8kpHOsl27ZJ4ziDBJlc18PfBvNMqNnhO7yBeemlxH7bo7yQyU1foJrIZ6IENHDDg0Z9N8zQA==} -======= workerd@1.20251219.0: resolution: {integrity: sha512-MV+mEFEa5fcIOB/+gAj6viZqlqKg1STvhp2Exer9Qy3L71zXnw0Pk46H/LVgBAxqHQ+qmEXR5xvL4HBzBERFpA==} ->>>>>>> origin/main engines: {node: '>=16'} hasBin: true @@ -15640,13 +15550,7 @@ snapshots: lodash.memoize: 4.1.2 marked: 0.3.19 -<<<<<<< HEAD - '@cloudflare/vitest-pool-workers@0.10.15(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4)': -||||||| f5bda6608 - '@cloudflare/vitest-pool-workers@0.7.8(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9)': -======= - '@cloudflare/vitest-pool-workers@0.7.8(@cloudflare/workers-types@4.20251219.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9)': ->>>>>>> origin/main + '@cloudflare/vitest-pool-workers@0.10.15(@cloudflare/workers-types@4.20251219.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4)': dependencies: '@vitest/runner': 4.0.16 '@vitest/snapshot': 4.0.16 @@ -15655,145 +15559,57 @@ snapshots: devalue: 5.3.2 miniflare: 4.20251210.0 semver: 7.7.3 -<<<<<<< HEAD vitest: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) - wrangler: 4.54.0(@cloudflare/workers-types@4.20251217.0) -||||||| f5bda6608 - vitest: 2.1.9(@types/node@20.19.9)(@vitest/ui@2.1.9)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3)) - wrangler: 3.114.1(@cloudflare/workers-types@4.20251217.0) -======= - vitest: 2.1.9(@types/node@20.19.9)(@vitest/ui@2.1.9)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3)) - wrangler: 3.114.1(@cloudflare/workers-types@4.20251219.0) ->>>>>>> origin/main + wrangler: 4.54.0(@cloudflare/workers-types@4.20251219.0) zod: 3.22.3 transitivePeerDependencies: - '@cloudflare/workers-types' - bufferutil - utf-8-validate -<<<<<<< HEAD -||||||| f5bda6608 - '@cloudflare/vitest-pool-workers@0.8.19(@cloudflare/workers-types@4.20251217.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3)': - dependencies: - '@vitest/runner': 3.2.3 - '@vitest/snapshot': 3.2.3 - birpc: 0.2.14 - cjs-module-lexer: 1.2.3 - devalue: 4.3.3 - miniflare: 4.20250417.0 - semver: 7.7.3 - vitest: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) - wrangler: 4.12.1(@cloudflare/workers-types@4.20251217.0) - zod: 3.22.3 - transitivePeerDependencies: - - '@cloudflare/workers-types' - - bufferutil - - utf-8-validate - - '@cloudflare/workerd-darwin-64@1.20250310.0': - optional: true - - '@cloudflare/workerd-darwin-64@1.20250417.0': - optional: true - -======= - '@cloudflare/vitest-pool-workers@0.8.19(@cloudflare/workers-types@4.20251219.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3)': - dependencies: - '@vitest/runner': 3.2.3 - '@vitest/snapshot': 3.2.3 - birpc: 0.2.14 - cjs-module-lexer: 1.2.3 - devalue: 4.3.3 - miniflare: 4.20250417.0 - semver: 7.7.3 - vitest: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) - wrangler: 4.12.1(@cloudflare/workers-types@4.20251219.0) - zod: 3.22.3 - transitivePeerDependencies: - - '@cloudflare/workers-types' - - bufferutil - - utf-8-validate - - '@cloudflare/workerd-darwin-64@1.20250310.0': - optional: true - - '@cloudflare/workerd-darwin-64@1.20250417.0': - optional: true - ->>>>>>> origin/main '@cloudflare/workerd-darwin-64@1.20251202.0': optional: true -<<<<<<< HEAD '@cloudflare/workerd-darwin-64@1.20251210.0': optional: true - '@cloudflare/workerd-darwin-64@1.20251217.0': -||||||| f5bda6608 - '@cloudflare/workerd-darwin-64@1.20251217.0': -======= '@cloudflare/workerd-darwin-64@1.20251219.0': ->>>>>>> origin/main optional: true '@cloudflare/workerd-darwin-arm64@1.20251202.0': optional: true -<<<<<<< HEAD '@cloudflare/workerd-darwin-arm64@1.20251210.0': optional: true - '@cloudflare/workerd-darwin-arm64@1.20251217.0': -||||||| f5bda6608 - '@cloudflare/workerd-darwin-arm64@1.20251217.0': -======= '@cloudflare/workerd-darwin-arm64@1.20251219.0': ->>>>>>> origin/main optional: true '@cloudflare/workerd-linux-64@1.20251202.0': optional: true -<<<<<<< HEAD '@cloudflare/workerd-linux-64@1.20251210.0': optional: true - '@cloudflare/workerd-linux-64@1.20251217.0': -||||||| f5bda6608 - '@cloudflare/workerd-linux-64@1.20251217.0': -======= '@cloudflare/workerd-linux-64@1.20251219.0': ->>>>>>> origin/main optional: true '@cloudflare/workerd-linux-arm64@1.20251202.0': optional: true -<<<<<<< HEAD '@cloudflare/workerd-linux-arm64@1.20251210.0': optional: true - '@cloudflare/workerd-linux-arm64@1.20251217.0': -||||||| f5bda6608 - '@cloudflare/workerd-linux-arm64@1.20251217.0': -======= '@cloudflare/workerd-linux-arm64@1.20251219.0': ->>>>>>> origin/main optional: true '@cloudflare/workerd-windows-64@1.20251202.0': optional: true -<<<<<<< HEAD '@cloudflare/workerd-windows-64@1.20251210.0': optional: true - '@cloudflare/workerd-windows-64@1.20251217.0': -||||||| f5bda6608 - '@cloudflare/workerd-windows-64@1.20251217.0': -======= '@cloudflare/workerd-windows-64@1.20251219.0': ->>>>>>> origin/main optional: true '@cloudflare/workers-types@4.20251219.0': {} @@ -19634,7 +19450,7 @@ snapshots: assertion-error: 2.0.1 check-error: 2.1.1 deep-eql: 5.0.2 - loupe: 3.2.1 + loupe: 3.1.3 pathval: 2.0.0 chai@6.2.1: {} @@ -20986,6 +20802,8 @@ snapshots: expect-type@0.15.0: {} + expect-type@1.2.1: {} + expect-type@1.3.0: {} expect@29.7.0: @@ -25532,7 +25350,6 @@ snapshots: vitest@3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1): dependencies: -<<<<<<< HEAD '@types/chai': 5.2.2 '@vitest/expect': 3.2.4 '@vitest/mocker': 3.2.4(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) @@ -25541,174 +25358,13 @@ snapshots: '@vitest/snapshot': 3.2.4 '@vitest/spy': 3.2.4 '@vitest/utils': 3.2.4 -||||||| f5bda6608 - '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) - '@vitest/pretty-format': 2.1.9 - '@vitest/runner': 2.1.9 - '@vitest/snapshot': 2.1.9 - '@vitest/spy': 2.1.9 - '@vitest/utils': 2.1.9 - chai: 5.1.2 - debug: 4.4.1(supports-color@9.2.2) - expect-type: 1.1.0 - magic-string: 0.30.17 - pathe: 1.1.2 - std-env: 3.8.0 - tinybench: 2.9.0 - tinyexec: 0.3.1 - tinypool: 1.0.1 - tinyrainbow: 1.2.0 - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - vite-node: 2.1.9(@types/node@20.19.9)(lightningcss@1.30.2) - why-is-node-running: 2.3.0 - optionalDependencies: - '@types/node': 20.19.9 - '@vitest/ui': 2.1.9(vitest@2.1.9) - transitivePeerDependencies: - - less - - lightningcss - - msw - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - vitest@2.1.9(@types/node@20.19.9)(@vitest/ui@2.1.9)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3)): - dependencies: - '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) - '@vitest/pretty-format': 2.1.9 - '@vitest/runner': 2.1.9 - '@vitest/snapshot': 2.1.9 - '@vitest/spy': 2.1.9 - '@vitest/utils': 2.1.9 - chai: 5.1.2 - debug: 4.4.1(supports-color@9.2.2) - expect-type: 1.1.0 - magic-string: 0.30.17 - pathe: 1.1.2 - std-env: 3.8.0 - tinybench: 2.9.0 - tinyexec: 0.3.1 - tinypool: 1.0.1 - tinyrainbow: 1.2.0 - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - vite-node: 2.1.9(@types/node@20.19.9)(lightningcss@1.30.2) - why-is-node-running: 2.3.0 - optionalDependencies: - '@types/node': 20.19.9 - '@vitest/ui': 2.1.9(vitest@2.1.9) - transitivePeerDependencies: - - less - - lightningcss - - msw - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - vitest@3.0.9(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.2))(yaml@2.8.1): - dependencies: - '@vitest/expect': 3.0.9 - '@vitest/mocker': 3.0.9(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.2))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) - '@vitest/pretty-format': 3.2.3 - '@vitest/runner': 3.0.9 - '@vitest/snapshot': 3.0.9 - '@vitest/spy': 3.0.9 - '@vitest/utils': 3.0.9 -======= - '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) - '@vitest/pretty-format': 2.1.9 - '@vitest/runner': 2.1.9 - '@vitest/snapshot': 2.1.9 - '@vitest/spy': 2.1.9 - '@vitest/utils': 2.1.9 - chai: 5.1.2 - debug: 4.4.1(supports-color@9.2.2) - expect-type: 1.1.0 - magic-string: 0.30.17 - pathe: 1.1.2 - std-env: 3.8.0 - tinybench: 2.9.0 - tinyexec: 0.3.1 - tinypool: 1.0.1 - tinyrainbow: 1.2.0 - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - vite-node: 2.1.9(@types/node@20.19.9)(lightningcss@1.30.2) - why-is-node-running: 2.3.0 - optionalDependencies: - '@types/node': 20.19.9 - '@vitest/ui': 2.1.9(vitest@2.1.9) - transitivePeerDependencies: - - less - - lightningcss - - msw - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - vitest@2.1.9(@types/node@20.19.9)(@vitest/ui@2.1.9)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3)): - dependencies: - '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) - '@vitest/pretty-format': 2.1.9 - '@vitest/runner': 2.1.9 - '@vitest/snapshot': 2.1.9 - '@vitest/spy': 2.1.9 - '@vitest/utils': 2.1.9 - chai: 5.1.2 - debug: 4.4.1(supports-color@9.2.2) - expect-type: 1.1.0 - magic-string: 0.30.17 - pathe: 1.1.2 - std-env: 3.8.0 - tinybench: 2.9.0 - tinyexec: 0.3.1 - tinypool: 1.0.1 - tinyrainbow: 1.2.0 - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - vite-node: 2.1.9(@types/node@20.19.9)(lightningcss@1.30.2) - why-is-node-running: 2.3.0 - optionalDependencies: - '@types/node': 20.19.9 - '@vitest/ui': 2.1.9(vitest@2.1.9) - transitivePeerDependencies: - - less - - lightningcss - - msw - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - vitest@3.0.9(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3(vitest@3.2.3))(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.2))(yaml@2.8.1): - dependencies: - '@vitest/expect': 3.0.9 - '@vitest/mocker': 3.0.9(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.2))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) - '@vitest/pretty-format': 3.2.3 - '@vitest/runner': 3.0.9 - '@vitest/snapshot': 3.0.9 - '@vitest/spy': 3.0.9 - '@vitest/utils': 3.0.9 ->>>>>>> origin/main chai: 5.2.0 debug: 4.4.1(supports-color@9.2.2) - expect-type: 1.3.0 + expect-type: 1.2.1 magic-string: 0.30.21 pathe: 2.0.3 picomatch: 4.0.3 - std-env: 3.10.0 + std-env: 3.9.0 tinybench: 2.9.0 tinyexec: 0.3.2 tinyglobby: 0.2.15 @@ -25747,11 +25403,11 @@ snapshots: '@vitest/utils': 3.2.4 chai: 5.2.0 debug: 4.4.1(supports-color@9.2.2) - expect-type: 1.3.0 + expect-type: 1.2.1 magic-string: 0.30.21 pathe: 2.0.3 picomatch: 4.0.3 - std-env: 3.10.0 + std-env: 3.9.0 tinybench: 2.9.0 tinyexec: 0.3.2 tinyglobby: 0.2.15 @@ -26013,7 +25669,6 @@ snapshots: '@cloudflare/workerd-linux-arm64': 1.20251202.0 '@cloudflare/workerd-windows-64': 1.20251202.0 -<<<<<<< HEAD workerd@1.20251210.0: optionalDependencies: '@cloudflare/workerd-darwin-64': 1.20251210.0 @@ -26022,12 +25677,7 @@ snapshots: '@cloudflare/workerd-linux-arm64': 1.20251210.0 '@cloudflare/workerd-windows-64': 1.20251210.0 - workerd@1.20251217.0: -||||||| f5bda6608 - workerd@1.20251217.0: -======= workerd@1.20251219.0: ->>>>>>> origin/main optionalDependencies: '@cloudflare/workerd-darwin-64': 1.20251219.0 '@cloudflare/workerd-darwin-arm64': 1.20251219.0 @@ -26035,13 +25685,7 @@ snapshots: '@cloudflare/workerd-linux-arm64': 1.20251219.0 '@cloudflare/workerd-windows-64': 1.20251219.0 -<<<<<<< HEAD - wrangler@4.54.0(@cloudflare/workers-types@4.20251217.0): -||||||| f5bda6608 - wrangler@3.114.1(@cloudflare/workers-types@4.20251217.0): -======= - wrangler@3.114.1(@cloudflare/workers-types@4.20251219.0): ->>>>>>> origin/main + wrangler@4.54.0(@cloudflare/workers-types@4.20251219.0): dependencies: '@cloudflare/kv-asset-handler': 0.4.1 '@cloudflare/unenv-preset': 2.7.13(unenv@2.0.0-rc.24)(workerd@1.20251210.0) @@ -26054,48 +25698,6 @@ snapshots: optionalDependencies: '@cloudflare/workers-types': 4.20251219.0 fsevents: 2.3.3 -<<<<<<< HEAD -||||||| f5bda6608 - sharp: 0.33.5 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - wrangler@4.12.1(@cloudflare/workers-types@4.20251217.0): - dependencies: - '@cloudflare/kv-asset-handler': 0.4.0 - '@cloudflare/unenv-preset': 2.3.1(unenv@2.0.0-rc.15)(workerd@1.20250417.0) - blake3-wasm: 2.1.5 - esbuild: 0.25.2 - miniflare: 4.20250417.0 - path-to-regexp: 6.3.0 - unenv: 2.0.0-rc.15 - workerd: 1.20250417.0 - optionalDependencies: - '@cloudflare/workers-types': 4.20251217.0 - fsevents: 2.3.3 - sharp: 0.33.5 -======= - sharp: 0.33.5 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - wrangler@4.12.1(@cloudflare/workers-types@4.20251219.0): - dependencies: - '@cloudflare/kv-asset-handler': 0.4.0 - '@cloudflare/unenv-preset': 2.3.1(unenv@2.0.0-rc.15)(workerd@1.20250417.0) - blake3-wasm: 2.1.5 - esbuild: 0.25.2 - miniflare: 4.20250417.0 - path-to-regexp: 6.3.0 - unenv: 2.0.0-rc.15 - workerd: 1.20250417.0 - optionalDependencies: - '@cloudflare/workers-types': 4.20251219.0 - fsevents: 2.3.3 - sharp: 0.33.5 ->>>>>>> origin/main transitivePeerDependencies: - bufferutil - utf-8-validate From c6af16d3e39ee37242e844dee8f8bd71f9a29fdc Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Fri, 19 Dec 2025 22:40:34 +0000 Subject: [PATCH 10/45] green --- packages/vite-plugin-cloudflare/package.json | 2 +- .../src/worker/types-globals.d.ts | 2 +- pnpm-lock.yaml | 20 +++++++------------ 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/packages/vite-plugin-cloudflare/package.json b/packages/vite-plugin-cloudflare/package.json index e744178720bf..06a25a181d75 100644 --- a/packages/vite-plugin-cloudflare/package.json +++ b/packages/vite-plugin-cloudflare/package.json @@ -71,7 +71,7 @@ "tsdown": "0.16.3", "typescript": "catalog:default", "vite": "catalog:vite-plugin", - "vitest": "catalog:default" + "vitest": "catalog:vitest-3" }, "peerDependencies": { "vite": "^6.1.0 || ^7.0.0", diff --git a/packages/vitest-pool-workers/src/worker/types-globals.d.ts b/packages/vitest-pool-workers/src/worker/types-globals.d.ts index 5385b54de990..f0f719723ebc 100644 --- a/packages/vitest-pool-workers/src/worker/types-globals.d.ts +++ b/packages/vitest-pool-workers/src/worker/types-globals.d.ts @@ -8,7 +8,7 @@ declare global { // https://github.com/vitest-dev/vitest/blob/1ec3a8b687c57153ed3d0d4777d7765c18f3cc82/packages/vitest/src/runtime/moduleRunner/moduleRunner.ts#L86 const __vitest_mocker__: VitestUtils & { moduleRunner: { - import: (id: string) => Promise; + import: (id: string) => Promise>; }; }; // Original, un-patched console that always logs directly to stdout/err, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3174cb46f120..d83587cb2b6a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2408,8 +2408,8 @@ importers: specifier: catalog:vite-plugin version: 7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) vitest: - specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + specifier: catalog:vitest-3 + version: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) packages/vite-plugin-cloudflare/playground: devDependencies: @@ -9810,10 +9810,6 @@ packages: expect-type@0.15.0: resolution: {integrity: sha512-yWnriYB4e8G54M5/fAFj7rCIBiKs1HAACaY13kCz6Ku0dezjS9aMcfcdVK2X8Tv2tEV1BPz/wKfQ7WA4S/d8aA==} - expect-type@1.2.1: - resolution: {integrity: sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==} - engines: {node: '>=12.0.0'} - expect-type@1.3.0: resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==} engines: {node: '>=12.0.0'} @@ -19450,7 +19446,7 @@ snapshots: assertion-error: 2.0.1 check-error: 2.1.1 deep-eql: 5.0.2 - loupe: 3.1.3 + loupe: 3.2.1 pathval: 2.0.0 chai@6.2.1: {} @@ -20802,8 +20798,6 @@ snapshots: expect-type@0.15.0: {} - expect-type@1.2.1: {} - expect-type@1.3.0: {} expect@29.7.0: @@ -25360,11 +25354,11 @@ snapshots: '@vitest/utils': 3.2.4 chai: 5.2.0 debug: 4.4.1(supports-color@9.2.2) - expect-type: 1.2.1 + expect-type: 1.3.0 magic-string: 0.30.21 pathe: 2.0.3 picomatch: 4.0.3 - std-env: 3.9.0 + std-env: 3.10.0 tinybench: 2.9.0 tinyexec: 0.3.2 tinyglobby: 0.2.15 @@ -25403,11 +25397,11 @@ snapshots: '@vitest/utils': 3.2.4 chai: 5.2.0 debug: 4.4.1(supports-color@9.2.2) - expect-type: 1.2.1 + expect-type: 1.3.0 magic-string: 0.30.21 pathe: 2.0.3 picomatch: 4.0.3 - std-env: 3.9.0 + std-env: 3.10.0 tinybench: 2.9.0 tinyexec: 0.3.2 tinyglobby: 0.2.15 From 64982d4771f1bea7101d4df603aba622928dc5b6 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Fri, 19 Dec 2025 23:10:22 +0000 Subject: [PATCH 11/45] run with vitest3 --- .../vite-plugin-cloudflare/playground/package.json | 3 ++- pnpm-lock.yaml | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/vite-plugin-cloudflare/playground/package.json b/packages/vite-plugin-cloudflare/playground/package.json index 6c7afc09c9eb..1ec319441ccd 100644 --- a/packages/vite-plugin-cloudflare/playground/package.json +++ b/packages/vite-plugin-cloudflare/playground/package.json @@ -19,6 +19,7 @@ "playwright-chromium": "catalog:default", "strip-ansi": "^7.1.0", "ts-dedent": "^2.2.0", - "typescript": "catalog:default" + "typescript": "catalog:default", + "vitest": "catalog:vitest-3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d83587cb2b6a..d9c1c88f4829 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2431,6 +2431,9 @@ importers: typescript: specifier: catalog:default version: 5.8.3 + vitest: + specifier: catalog:vitest-3 + version: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) packages/vite-plugin-cloudflare/playground/additional-modules: devDependencies: @@ -13223,8 +13226,8 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - strip-literal@3.0.0: - resolution: {integrity: sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==} + strip-literal@3.1.0: + resolution: {integrity: sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==} stripe@20.1.0: resolution: {integrity: sha512-o1VNRuMkY76ZCq92U3EH3/XHm/WHp7AerpzDs4Zyo8uE5mFL4QUcv/2SudWsSnhBSp4moO2+ZoGCZ7mT8crPmQ==} @@ -18660,7 +18663,7 @@ snapshots: dependencies: '@vitest/utils': 3.2.4 pathe: 2.0.3 - strip-literal: 3.0.0 + strip-literal: 3.1.0 '@vitest/runner@4.0.16': dependencies: @@ -24444,7 +24447,7 @@ snapshots: strip-json-comments@3.1.1: {} - strip-literal@3.0.0: + strip-literal@3.1.0: dependencies: js-tokens: 9.0.1 From adc5e544eb9d1aba2db678e14a54698a7ac35612 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Mon, 19 Jan 2026 15:36:30 +0000 Subject: [PATCH 12/45] address some comments --- .../context-exports/test/integration-self.test.ts | 12 ++++++------ packages/vitest-pool-workers/package.json | 6 +++--- packages/vitest-pool-workers/src/pool/plugin.ts | 2 +- .../vitest-pool-workers/types/cloudflare-test.d.ts | 8 -------- packages/wrangler/src/codemod.ts | 2 -- 5 files changed, 10 insertions(+), 20 deletions(-) diff --git a/fixtures/vitest-pool-workers-examples/context-exports/test/integration-self.test.ts b/fixtures/vitest-pool-workers-examples/context-exports/test/integration-self.test.ts index 7140718de599..cbf5487a56ab 100644 --- a/fixtures/vitest-pool-workers-examples/context-exports/test/integration-self.test.ts +++ b/fixtures/vitest-pool-workers-examples/context-exports/test/integration-self.test.ts @@ -9,14 +9,14 @@ it("can use context exports on the SELF worker", async () => { ); }); -it("can use context exports (parameterized with props) on the SELF worker", async () => { +it("can use context exports (parameterized with props) on the exports.default worker", async () => { const response = await exports.default.fetch("http://example.com/props"); expect(await response.text()).toBe( "👋 Hello MainWorker from Main NamedEntryPoint!\nAdditional props!!" ); }); -it("will warn on missing context exports on the SELF worker", async () => { +it("will warn on missing context exports on the exports.default worker", async () => { const warnSpy = vi.spyOn(console, "warn"); const response = await exports.default.fetch( "http://example.com/invalid-export" @@ -29,7 +29,7 @@ it("will warn on missing context exports on the SELF worker", async () => { ); }); -it("will warn on implicit re-exports that will exist in production but cannot not be guessed on the SELF worker", async () => { +it("will warn on implicit re-exports that will exist in production but cannot not be guessed on the exports.default worker", async () => { // In this test, we are trying to access an entry-point that is wildcard (*) re-exported from a virtual module. // This virtual module is understood by Vitest and TypeScript but not the lightweight esbuild that we use to guess exports. const warnSpy = vi.spyOn(console, "warn"); @@ -44,7 +44,7 @@ it("will warn on implicit re-exports that will exist in production but cannot no ); }); -it("will still guess re-exports on the SELF worker that cannot be fully analyzed by esbuild", async () => { +it("will still guess re-exports on the exports.default worker that cannot be fully analyzed by esbuild", async () => { // In this test, we are trying to access an entry-point that is explicitly re-exported from a virtual module. // Although esbuild cannot really analyze what is being re-exported, it can at least see that something is being re-exported with that name. const warnSpy = vi.spyOn(console, "warn"); @@ -56,7 +56,7 @@ it("will still guess re-exports on the SELF worker that cannot be fully analyzed ); }); -it("can access configured virtual entry points on the SELF worker that cannot be fully analyzed by esbuild", async () => { +it("can access configured virtual entry points on the exports.default worker that cannot be fully analyzed by esbuild", async () => { // In this test, we are trying to access an entry-point that is explicitly re-exported from a virtual module. // Although esbuild cannot really analyze what is being re-exported, it can at least see that something is being re-exported with that name. const warnSpy = vi.spyOn(console, "warn"); @@ -68,7 +68,7 @@ it("can access configured virtual entry points on the SELF worker that cannot be ); }); -it("can access imported context exports for SELF worker", async () => { +it("can access imported context exports for exports.default worker", async () => { const msg = await exports.NamedEntryPoint.greet(); expect(msg).toMatchInlineSnapshot( `"Hello MainWorker from Main NamedEntryPoint!"` diff --git a/packages/vitest-pool-workers/package.json b/packages/vitest-pool-workers/package.json index 527a03f7191d..df7f6e1cb721 100644 --- a/packages/vitest-pool-workers/package.json +++ b/packages/vitest-pool-workers/package.json @@ -80,9 +80,9 @@ "vitest": "catalog:default" }, "peerDependencies": { - "@vitest/runner": "4.0.16", - "@vitest/snapshot": "4.0.16", - "vitest": "4.0.16" + "@vitest/runner": "4.0.16 - 4.0.17", + "@vitest/snapshot": "4.0.16 - 4.0.17", + "vitest": "4.0.16 - 4.0.17" }, "volta": { "extends": "../../package.json" diff --git a/packages/vitest-pool-workers/src/pool/plugin.ts b/packages/vitest-pool-workers/src/pool/plugin.ts index 8e07c5b0757c..c8762f1d39c5 100644 --- a/packages/vitest-pool-workers/src/pool/plugin.ts +++ b/packages/vitest-pool-workers/src/pool/plugin.ts @@ -108,7 +108,7 @@ export function cloudflareTest( return contents; } if (id.endsWith("msw/lib/node/index.mjs")) { - // HACK: This is a tempory solution while MSW works on some changes to better support the Workers + // HACK: This is a temporary solution while MSW works on some changes to better support the Workers // environment. In the meantime, this replaces the `msw/node` entrypoint with the `msw/native` // entrypoint (which is designed for React Native and does work in Workers). Users can't use // `msw/native` themselves directly as the export conditions are not compatible with the Vitest Pool diff --git a/packages/vitest-pool-workers/types/cloudflare-test.d.ts b/packages/vitest-pool-workers/types/cloudflare-test.d.ts index 63f2c02c5e7b..002f540029dc 100644 --- a/packages/vitest-pool-workers/types/cloudflare-test.d.ts +++ b/packages/vitest-pool-workers/types/cloudflare-test.d.ts @@ -13,14 +13,6 @@ declare module "cloudflare:test" { */ export const SELF: Fetcher; - /** - * Declarative interface for mocking outbound `fetch()` requests. Deactivated - * by default and reset before running each test file. Only mocks `fetch()` - * requests for the current test runner worker. Auxiliary workers should mock - * `fetch()`es with the Miniflare `fetchMock`/`outboundService` options. - */ - export const fetchMock: MockAgent; - /** * Runs `callback` inside the Durable Object pointed-to by `stub`'s context. * Conceptually, this temporarily replaces your Durable Object's `fetch()` diff --git a/packages/wrangler/src/codemod.ts b/packages/wrangler/src/codemod.ts index 8318d7291bfc..8e9ccfb01ea5 100644 --- a/packages/wrangler/src/codemod.ts +++ b/packages/wrangler/src/codemod.ts @@ -44,8 +44,6 @@ function vitestPoolV3ToV4(args: string | undefined) { throw new UserError("Could not find Vitest config file to modify"); } - logger.log(filePath); - transformFile(filePath, { visitProgram(n) { // Find the existing import of @cloudflare/vitest-pool-workers/config From 114969648a57b0eb4b9cbf60cbca8d94a006952a Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Mon, 19 Jan 2026 16:35:11 +0000 Subject: [PATCH 13/45] fix tests --- packages/vitest-pool-workers/test/inspector.test.ts | 2 +- .../__tests__/generate-dependabot-pr-changesets.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vitest-pool-workers/test/inspector.test.ts b/packages/vitest-pool-workers/test/inspector.test.ts index bdb5dba5ba8e..18c31568945d 100644 --- a/packages/vitest-pool-workers/test/inspector.test.ts +++ b/packages/vitest-pool-workers/test/inspector.test.ts @@ -84,7 +84,7 @@ test("opens an inspector with the `--inspect` argument", async ({ flags: ["--inspect", "--no-file-parallelism"], }); - expect(result.stdout).toMatch("inspector on port 9229"); + expect(result.stdout).toMatch("inspector on port"); }); test("customize inspector config", async ({ expect, seed, vitestRun }) => { diff --git a/tools/dependabot/__tests__/generate-dependabot-pr-changesets.test.ts b/tools/dependabot/__tests__/generate-dependabot-pr-changesets.test.ts index eaa4599f0ed8..7b1656316967 100644 --- a/tools/dependabot/__tests__/generate-dependabot-pr-changesets.test.ts +++ b/tools/dependabot/__tests__/generate-dependabot-pr-changesets.test.ts @@ -193,7 +193,7 @@ describe("writeChangeSet()", () => { }); describe("commitAndPush()", () => { - it("should call spawnSync with appropriate git commands", ({ expect }) => { + it("should call spawnSync with appropriate git commands", () => { (spawnSync as Mock).mockClear(); (spawnSync as Mock).mockReturnValue({ output: [] }); const commitMessage = dedent` From 9f80b753930f10bc540a16a8318677b7edbf2915 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Mon, 19 Jan 2026 17:29:04 +0000 Subject: [PATCH 14/45] lockfile --- pnpm-lock.yaml | 391 +++++++++++++++++-------------------------------- 1 file changed, 136 insertions(+), 255 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b97bc56a693e..05d15c4a9b0c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,7 +8,7 @@ catalogs: default: '@cloudflare/workers-types': specifier: ^4.20260116.0 - version: 4.20260116.0 + version: 4.20260118.0 '@typescript-eslint/eslint-plugin': specifier: ^8.35.1 version: 8.46.3 @@ -171,7 +171,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -216,7 +216,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 ts-dedent: specifier: ^2.2.0 version: 2.2.0 @@ -234,7 +234,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -255,7 +255,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -279,7 +279,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -315,7 +315,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 undici: specifier: catalog:default version: 7.18.2 @@ -330,7 +330,7 @@ importers: devDependencies: '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@types/mimetext': specifier: ^2.0.4 version: 2.0.4 @@ -369,7 +369,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@types/jest-image-snapshot': specifier: ^6.4.0 version: 6.4.0 @@ -396,7 +396,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 miniflare: specifier: workspace:* version: link:../../packages/miniflare @@ -466,7 +466,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@types/node': specifier: ^20.19.9 version: 20.19.9 @@ -490,7 +490,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@types/is-even': specifier: ^1.0.2 version: 1.0.2 @@ -527,7 +527,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -555,7 +555,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@types/node': specifier: ^20.19.9 version: 20.19.9 @@ -585,7 +585,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 undici: specifier: catalog:default version: 7.18.2 @@ -603,7 +603,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@types/debug': specifier: 4.1.12 version: 4.1.12 @@ -636,7 +636,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -657,7 +657,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -682,7 +682,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@fixture/pages-plugin': specifier: workspace:* version: link:../pages-plugin-example @@ -706,7 +706,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -745,7 +745,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -766,7 +766,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -787,7 +787,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -805,7 +805,7 @@ importers: devDependencies: '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 is-odd: specifier: ^3.0.1 version: 3.0.1 @@ -824,7 +824,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@fixture/pages-plugin': specifier: workspace:* version: link:../pages-plugin-example @@ -884,7 +884,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -905,7 +905,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -1082,19 +1082,19 @@ importers: devDependencies: '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 fixtures/rules-app: devDependencies: '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 fixtures/secrets-store: devDependencies: '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1118,7 +1118,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@types/is-even': specifier: ^1.0.2 version: 1.0.2 @@ -1142,7 +1142,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 vitest: specifier: catalog:default version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) @@ -1157,7 +1157,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 esbuild: specifier: catalog:default version: 0.27.0 @@ -1190,7 +1190,7 @@ importers: version: link:../../packages/vitest-pool-workers '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@microlabs/otel-cf-workers': specifier: 1.0.0-rc.45 version: 1.0.0-rc.45(@opentelemetry/api@1.7.0) @@ -1261,7 +1261,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 undici: specifier: catalog:default version: 7.18.2 @@ -1316,7 +1316,7 @@ importers: devDependencies: '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1355,7 +1355,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 run-script-os: specifier: ^1.1.6 version: 1.1.6 @@ -1379,7 +1379,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -1400,7 +1400,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -1421,7 +1421,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -1442,7 +1442,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -1463,7 +1463,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@types/jest-image-snapshot': specifier: ^6.4.0 version: 6.4.0 @@ -1496,16 +1496,10 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default -<<<<<<< HEAD - version: 4.20260115.0 + version: 4.20260118.0 '@types/node': specifier: ^20.19.9 version: 20.19.9 -||||||| 4ac7c8260 - version: 4.20260115.0 -======= - version: 4.20260116.0 ->>>>>>> origin/main playwright-chromium: specifier: catalog:default version: 1.56.1 @@ -1529,7 +1523,7 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -1547,7 +1541,7 @@ importers: devDependencies: '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -1649,7 +1643,7 @@ importers: version: link:../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@cloudflare/workers-utils': specifier: workspace:* version: link:../workers-utils @@ -1787,7 +1781,7 @@ importers: version: link:../eslint-config-shared '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@octokit/types': specifier: ^13.8.0 version: 13.8.0 @@ -1811,7 +1805,7 @@ importers: version: link:../eslint-config-shared '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@types/cookie': specifier: ^0.6.0 version: 0.6.0 @@ -1877,7 +1871,7 @@ importers: version: link:../eslint-config-shared '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 eslint: specifier: catalog:default version: 9.39.1(jiti@2.6.0) @@ -1906,19 +1900,11 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': -<<<<<<< HEAD specifier: catalog:vitest-3 - version: 0.10.15(@cloudflare/workers-types@4.20260115.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) -||||||| 4ac7c8260 - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260115.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9) -======= - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260116.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9) ->>>>>>> origin/main + version: 0.10.15(@cloudflare/workers-types@4.20260118.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@types/mime': specifier: ^3.0.4 version: 3.0.4 @@ -1979,7 +1965,7 @@ importers: version: link:../workers-shared '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@cloudflare/workflows-shared': specifier: workspace:* version: link:../workflows-shared @@ -2147,16 +2133,8 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': -<<<<<<< HEAD specifier: catalog:vitest-3 - version: 0.10.15(@cloudflare/workers-types@4.20260115.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) -||||||| 4ac7c8260 - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260115.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3) -======= - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260116.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3) ->>>>>>> origin/main + version: 0.10.15(@cloudflare/workers-types@4.20260118.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) '@cloudflare/workers-shared': specifier: workspace:* version: link:../workers-shared @@ -2165,7 +2143,7 @@ importers: version: link:../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 concurrently: specifier: ^8.2.2 version: 8.2.2 @@ -2205,7 +2183,7 @@ importers: version: link:../eslint-config-shared '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@types/cookie': specifier: ^0.6.0 version: 0.6.0 @@ -2245,7 +2223,7 @@ importers: version: link:../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@types/node': specifier: ^20.19.9 version: 20.19.9 @@ -2275,7 +2253,7 @@ importers: version: link:../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 esbuild: specifier: catalog:default version: 0.27.0 @@ -2364,7 +2342,7 @@ importers: version: link:../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@cloudflare/workers-utils': specifier: workspace:* version: link:../workers-utils @@ -2454,7 +2432,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2475,7 +2453,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2496,7 +2474,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2517,7 +2495,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2538,7 +2516,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2559,7 +2537,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2580,7 +2558,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2601,7 +2579,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2622,7 +2600,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2643,7 +2621,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2664,7 +2642,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2685,7 +2663,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2706,7 +2684,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2727,7 +2705,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2748,7 +2726,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2769,7 +2747,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2790,7 +2768,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@types/mimetext': specifier: ^2.0.4 version: 2.0.4 @@ -2823,7 +2801,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2844,7 +2822,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2865,7 +2843,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2886,7 +2864,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2907,7 +2885,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2928,7 +2906,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -2949,7 +2927,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@playground/main-resolution-package': specifier: file:./package version: file:packages/vite-plugin-cloudflare/playground/main-resolution/package @@ -2973,7 +2951,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@types/express': specifier: ^5.0.1 version: 5.0.1 @@ -3000,7 +2978,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@playground/module-resolution-excludes': specifier: file:./packages/excludes version: file:packages/vite-plugin-cloudflare/playground/module-resolution/packages/excludes @@ -3012,7 +2990,7 @@ importers: version: file:packages/vite-plugin-cloudflare/playground/module-resolution/packages/requires '@remix-run/cloudflare': specifier: 2.12.0 - version: 2.12.0(@cloudflare/workers-types@4.20260116.0)(typescript@5.8.3) + version: 2.12.0(@cloudflare/workers-types@4.20260118.0)(typescript@5.8.3) '@types/react': specifier: ^18.3.11 version: 18.3.18 @@ -3045,7 +3023,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -3066,7 +3044,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@types/debug': specifier: ^4.1.12 version: 4.1.12 @@ -3115,7 +3093,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@types/react': specifier: 19.1.0 version: 19.1.0 @@ -3136,7 +3114,7 @@ importers: dependencies: partyserver: specifier: ^0.0.64 - version: 0.0.64(@cloudflare/workers-types@4.20260116.0) + version: 0.0.64(@cloudflare/workers-types@4.20260118.0) partysocket: specifier: ^1.0.3 version: 1.0.3 @@ -3155,7 +3133,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@tailwindcss/vite': specifier: ^4.0.15 version: 4.0.15(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1)) @@ -3191,7 +3169,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@prisma/adapter-d1': specifier: ^7.0.0 version: 7.0.1 @@ -3228,7 +3206,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@types/react': specifier: 19.1.0 version: 19.1.0 @@ -3258,7 +3236,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -3279,7 +3257,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -3307,7 +3285,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@types/react': specifier: 19.1.0 version: 19.1.0 @@ -3340,7 +3318,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -3361,7 +3339,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -3382,7 +3360,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@vitejs/plugin-basic-ssl': specifier: ^2.0.0 version: 2.0.0(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1)) @@ -3406,7 +3384,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -3427,7 +3405,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -3448,7 +3426,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -3469,7 +3447,7 @@ importers: version: link:../../../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 typescript: specifier: catalog:default version: 5.8.3 @@ -3509,7 +3487,7 @@ importers: version: link:../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@cloudflare/workflows-shared': specifier: workspace:* version: link:../workflows-shared @@ -3729,22 +3707,14 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': -<<<<<<< HEAD specifier: catalog:vitest-3 - version: 0.10.15(@cloudflare/workers-types@4.20260115.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) -||||||| 4ac7c8260 - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260115.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9) -======= - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260116.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9) ->>>>>>> origin/main + version: 0.10.15(@cloudflare/workers-types@4.20260118.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) '@cloudflare/workers-tsconfig': specifier: workspace:* version: link:../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@sentry/cli': specifier: ^2.37.0 version: 2.41.1(encoding@0.1.13) @@ -3860,22 +3830,14 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': -<<<<<<< HEAD specifier: catalog:vitest-3 - version: 0.10.15(@cloudflare/workers-types@4.20260115.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) -||||||| 4ac7c8260 - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260115.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3) -======= - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260116.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3) ->>>>>>> origin/main + version: 0.10.15(@cloudflare/workers-types@4.20260118.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) '@cloudflare/workers-tsconfig': specifier: workspace:* version: link:../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@types/mime': specifier: ^3.0.4 version: 3.0.4 @@ -3952,7 +3914,7 @@ importers: version: link:../workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default - version: 4.20260116.0 + version: 4.20260118.0 '@cloudflare/workers-utils': specifier: workspace:* version: link:../workers-utils @@ -5057,8 +5019,8 @@ packages: cpu: [x64] os: [win32] - '@cloudflare/workers-types@4.20260116.0': - resolution: {integrity: sha512-iMZIQDco7ARzzH+r8j90757kbPKEetKY3/6V5UurOzS6T1GJ+rsREw5i7vlBA4XjFV5UMaPtUD6HuUFSMLcxPQ==} + '@cloudflare/workers-types@4.20260118.0': + resolution: {integrity: sha512-t+2Q421kAQqwBzMUDvgg2flp8zFVxOpiAyZPbyNcnPxMDHf0z3B7LqBIVQawwI6ntZinbk9f4oUmaA5bGeYwlg==} '@colors/colors@1.5.0': resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} @@ -8771,9 +8733,6 @@ packages: birpc@0.2.14: resolution: {integrity: sha512-37FHE8rqsYM5JEKCnXFyHpBCzvgHEExwVVTq+nUmloInU7l8ezD1TpOhKpS8oe1DTYFqEK27rFZVKG43oTqXRA==} - birpc@2.6.1: - resolution: {integrity: sha512-LPnFhlDpdSH6FJhJyn4M0kFO7vtQ5iPw24FnG0y21q09xC7e8+1LeR31S1MAIrDAHp4m7aas4bEkTDTvMAtebQ==} - birpc@2.8.0: resolution: {integrity: sha512-Bz2a4qD/5GRhiHSwj30c/8kC8QGj12nNDwz3D4ErQ4Xhy35dsSDvF+RA/tWpjyU0pdGtSDiEk6B5fBGE1qNVhw==} @@ -8872,10 +8831,6 @@ packages: resolution: {integrity: sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==} engines: {node: '>= 0.4'} - call-bound@1.0.3: - resolution: {integrity: sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==} - engines: {node: '>= 0.4'} - call-bound@1.0.4: resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} engines: {node: '>= 0.4'} @@ -9640,10 +9595,6 @@ packages: es-module-lexer@1.7.0: resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} - es-object-atoms@1.0.0: - resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} - engines: {node: '>= 0.4'} - es-object-atoms@1.1.1: resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} engines: {node: '>= 0.4'} @@ -11656,10 +11607,6 @@ packages: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} - object-inspect@1.13.3: - resolution: {integrity: sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==} - engines: {node: '>= 0.4'} - object-inspect@1.13.4: resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} engines: {node: '>= 0.4'} @@ -13660,10 +13607,6 @@ packages: resolution: {integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==} engines: {node: '>=10'} - type-fest@4.26.1: - resolution: {integrity: sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg==} - engines: {node: '>=16'} - type-fest@4.41.0: resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} engines: {node: '>=16'} @@ -15651,13 +15594,7 @@ snapshots: lodash.memoize: 4.1.2 marked: 0.3.19 -<<<<<<< HEAD - '@cloudflare/vitest-pool-workers@0.10.15(@cloudflare/workers-types@4.20260115.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4)': -||||||| 4ac7c8260 - '@cloudflare/vitest-pool-workers@0.10.15(@cloudflare/workers-types@4.20260115.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9)': -======= - '@cloudflare/vitest-pool-workers@0.10.15(@cloudflare/workers-types@4.20260116.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9)': ->>>>>>> origin/main + '@cloudflare/vitest-pool-workers@0.10.15(@cloudflare/workers-types@4.20260118.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4)': dependencies: '@vitest/runner': 4.0.16 '@vitest/snapshot': 4.0.16 @@ -15666,50 +15603,8 @@ snapshots: devalue: 5.3.2 miniflare: 4.20251210.0 semver: 7.7.3 -<<<<<<< HEAD - vitest: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) - wrangler: 4.54.0(@cloudflare/workers-types@4.20260115.0) -||||||| 4ac7c8260 - vitest: 2.1.9(@types/node@20.19.9)(@vitest/ui@2.1.9)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3)) - wrangler: 4.54.0(@cloudflare/workers-types@4.20260115.0) - zod: 3.25.76 - transitivePeerDependencies: - - '@cloudflare/workers-types' - - bufferutil - - utf-8-validate - - '@cloudflare/vitest-pool-workers@0.10.15(@cloudflare/workers-types@4.20260115.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3)': - dependencies: - '@vitest/runner': 3.2.3 - '@vitest/snapshot': 3.2.3 - birpc: 0.2.14 - cjs-module-lexer: 1.2.3 - devalue: 5.3.2 - miniflare: 4.20251210.0 - semver: 7.7.3 - vitest: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) - wrangler: 4.54.0(@cloudflare/workers-types@4.20260115.0) -======= - vitest: 2.1.9(@types/node@20.19.9)(@vitest/ui@2.1.9)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3)) - wrangler: 4.54.0(@cloudflare/workers-types@4.20260116.0) - zod: 3.25.76 - transitivePeerDependencies: - - '@cloudflare/workers-types' - - bufferutil - - utf-8-validate - - '@cloudflare/vitest-pool-workers@0.10.15(@cloudflare/workers-types@4.20260116.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3)': - dependencies: - '@vitest/runner': 3.2.3 - '@vitest/snapshot': 3.2.3 - birpc: 0.2.14 - cjs-module-lexer: 1.2.3 - devalue: 5.3.2 - miniflare: 4.20251210.0 - semver: 7.7.3 - vitest: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) - wrangler: 4.54.0(@cloudflare/workers-types@4.20260116.0) ->>>>>>> origin/main + vitest: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + wrangler: 4.54.0(@cloudflare/workers-types@4.20260118.0) zod: 3.25.76 transitivePeerDependencies: - '@cloudflare/workers-types' @@ -15761,7 +15656,7 @@ snapshots: '@cloudflare/workerd-windows-64@1.20260116.0': optional: true - '@cloudflare/workers-types@4.20260116.0': {} + '@cloudflare/workers-types@4.20260118.0': {} '@colors/colors@1.5.0': optional: true @@ -17015,7 +16910,7 @@ snapshots: '@prisma/adapter-d1@7.0.1': dependencies: - '@cloudflare/workers-types': 4.20260116.0 + '@cloudflare/workers-types': 4.20260118.0 '@prisma/driver-adapter-utils': 7.0.1 ky: 1.7.5 @@ -17242,10 +17137,10 @@ snapshots: optionalDependencies: '@types/react': 18.3.3 - '@remix-run/cloudflare@2.12.0(@cloudflare/workers-types@4.20260116.0)(typescript@5.8.3)': + '@remix-run/cloudflare@2.12.0(@cloudflare/workers-types@4.20260118.0)(typescript@5.8.3)': dependencies: '@cloudflare/kv-asset-handler': 0.1.3 - '@cloudflare/workers-types': 4.20260116.0 + '@cloudflare/workers-types': 4.20260118.0 '@remix-run/server-runtime': 2.12.0(typescript@5.8.3) optionalDependencies: typescript: 5.8.3 @@ -19326,8 +19221,6 @@ snapshots: birpc@0.2.14: {} - birpc@2.6.1: {} - birpc@2.8.0: {} bl@4.1.0: @@ -19460,11 +19353,6 @@ snapshots: get-intrinsic: 1.3.0 set-function-length: 1.2.2 - call-bound@1.0.3: - dependencies: - call-bind-apply-helpers: 1.0.2 - get-intrinsic: 1.3.0 - call-bound@1.0.4: dependencies: call-bind-apply-helpers: 1.0.2 @@ -19983,7 +19871,8 @@ snapshots: detect-indent@6.1.0: {} - detect-libc@2.0.3: {} + detect-libc@2.0.3: + optional: true detect-libc@2.1.2: {} @@ -20033,7 +19922,7 @@ snapshots: dot-prop@9.0.0: dependencies: - type-fest: 4.26.1 + type-fest: 4.41.0 dotenv-cli@7.3.0: dependencies: @@ -20182,7 +20071,7 @@ snapshots: is-string: 1.0.7 is-typed-array: 1.1.15 is-weakref: 1.0.2 - object-inspect: 1.13.3 + object-inspect: 1.13.4 object-keys: 1.1.1 object.assign: 4.1.7 regexp.prototype.flags: 1.5.3 @@ -20282,10 +20171,6 @@ snapshots: es-module-lexer@1.7.0: {} - es-object-atoms@1.0.0: - dependencies: - es-errors: 1.3.0 - es-object-atoms@1.1.1: dependencies: es-errors: 1.3.0 @@ -21053,7 +20938,7 @@ snapshots: escape-html: 1.0.3 on-finished: 2.4.1 parseurl: 1.3.3 - statuses: 2.0.1 + statuses: 2.0.2 transitivePeerDependencies: - supports-color @@ -22082,7 +21967,7 @@ snapshots: lightningcss@1.29.2: dependencies: - detect-libc: 2.0.3 + detect-libc: 2.1.2 optionalDependencies: lightningcss-darwin-arm64: 1.29.2 lightningcss-darwin-x64: 1.29.2 @@ -22592,8 +22477,6 @@ snapshots: object-assign@4.1.1: {} - object-inspect@1.13.3: {} - object-inspect@1.13.4: {} object-is@1.1.6: @@ -22630,7 +22513,7 @@ snapshots: call-bind: 1.0.8 define-properties: 1.2.1 es-abstract: 1.23.5 - es-object-atoms: 1.0.0 + es-object-atoms: 1.1.1 object.groupby@1.0.3: dependencies: @@ -22641,9 +22524,9 @@ snapshots: object.values@1.2.1: dependencies: call-bind: 1.0.8 - call-bound: 1.0.3 + call-bound: 1.0.4 define-properties: 1.2.1 - es-object-atoms: 1.0.0 + es-object-atoms: 1.1.1 obuf@1.1.2: {} @@ -22799,9 +22682,9 @@ snapshots: parseurl@1.3.3: {} - partyserver@0.0.64(@cloudflare/workers-types@4.20260116.0): + partyserver@0.0.64(@cloudflare/workers-types@4.20260118.0): dependencies: - '@cloudflare/workers-types': 4.20260116.0 + '@cloudflare/workers-types': 4.20260118.0 nanoid: 5.1.0 partysocket@1.0.3: @@ -23515,7 +23398,7 @@ snapshots: '@types/normalize-package-data': 2.4.4 normalize-package-data: 6.0.2 parse-json: 8.3.0 - type-fest: 4.26.1 + type-fest: 4.41.0 unicorn-magic: 0.1.0 read-yaml-file@1.1.0: @@ -23693,7 +23576,7 @@ snapshots: '@babel/parser': 7.28.4 '@babel/types': 7.28.4 ast-kit: 2.1.3 - birpc: 2.6.1 + birpc: 2.8.0 debug: 4.4.3 dts-resolver: 2.1.2 get-tsconfig: 4.13.0 @@ -23953,7 +23836,7 @@ snapshots: ms: 2.1.3 on-finished: 2.4.1 range-parser: 1.2.1 - statuses: 2.0.1 + statuses: 2.0.2 transitivePeerDependencies: - supports-color @@ -24096,7 +23979,7 @@ snapshots: dependencies: call-bind: 1.0.8 get-intrinsic: 1.3.0 - object-inspect: 1.13.3 + object-inspect: 1.13.4 side-channel@1.1.0: dependencies: @@ -24350,9 +24233,9 @@ snapshots: string.prototype.trimend@1.0.9: dependencies: call-bind: 1.0.8 - call-bound: 1.0.3 + call-bound: 1.0.4 define-properties: 1.2.1 - es-object-atoms: 1.0.0 + es-object-atoms: 1.1.1 string.prototype.trimstart@1.0.8: dependencies: @@ -24850,8 +24733,6 @@ snapshots: type-fest@1.4.0: {} - type-fest@4.26.1: {} - type-fest@4.41.0: {} type-fest@5.4.1: @@ -25621,7 +25502,7 @@ snapshots: '@cloudflare/workerd-linux-arm64': 1.20260116.0 '@cloudflare/workerd-windows-64': 1.20260116.0 - wrangler@4.54.0(@cloudflare/workers-types@4.20260116.0): + wrangler@4.54.0(@cloudflare/workers-types@4.20260118.0): dependencies: '@cloudflare/kv-asset-handler': 0.4.1 '@cloudflare/unenv-preset': 2.7.13(unenv@2.0.0-rc.24)(workerd@1.20251210.0) @@ -25632,7 +25513,7 @@ snapshots: unenv: 2.0.0-rc.24 workerd: 1.20251210.0 optionalDependencies: - '@cloudflare/workers-types': 4.20260116.0 + '@cloudflare/workers-types': 4.20260118.0 fsevents: 2.3.3 transitivePeerDependencies: - bufferutil From 20eb0a6afb43b496a4888893256474b315dc8563 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Tue, 20 Jan 2026 15:52:32 +0000 Subject: [PATCH 15/45] fix snapshot --- packages/wrangler/src/__tests__/index.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/wrangler/src/__tests__/index.test.ts b/packages/wrangler/src/__tests__/index.test.ts index dfc59ffca7c4..8dfc19f3eea7 100644 --- a/packages/wrangler/src/__tests__/index.test.ts +++ b/packages/wrangler/src/__tests__/index.test.ts @@ -38,6 +38,8 @@ describe("wrangler", () => { COMMANDS wrangler docs [search..] 📚 Open Wrangler's command documentation in your browser + wrangler codemod [name] 🔨 Apply a code modification to your project [experimental] + ACCOUNT wrangler auth 🔐 Manage authentication wrangler login 🔓 Login to Cloudflare @@ -109,6 +111,8 @@ describe("wrangler", () => { COMMANDS wrangler docs [search..] 📚 Open Wrangler's command documentation in your browser + wrangler codemod [name] 🔨 Apply a code modification to your project [experimental] + ACCOUNT wrangler auth 🔐 Manage authentication wrangler login 🔓 Login to Cloudflare From 2f511bee95903a686ad75980f57decad79103f15 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Tue, 20 Jan 2026 16:18:01 +0000 Subject: [PATCH 16/45] lock down versions --- packages/vitest-pool-workers/package.json | 6 +- pnpm-lock.yaml | 329 +++++++++++----------- pnpm-workspace.yaml | 8 +- 3 files changed, 174 insertions(+), 169 deletions(-) diff --git a/packages/vitest-pool-workers/package.json b/packages/vitest-pool-workers/package.json index df7f6e1cb721..4c2fa9c19c36 100644 --- a/packages/vitest-pool-workers/package.json +++ b/packages/vitest-pool-workers/package.json @@ -80,9 +80,9 @@ "vitest": "catalog:default" }, "peerDependencies": { - "@vitest/runner": "4.0.16 - 4.0.17", - "@vitest/snapshot": "4.0.16 - 4.0.17", - "vitest": "4.0.16 - 4.0.17" + "@vitest/runner": "4.1.0-beta.1", + "@vitest/snapshot": "4.1.0-beta.1", + "vitest": "4.1.0-beta.1" }, "volta": { "extends": "../../package.json" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 05d15c4a9b0c..8be35158941f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,14 +16,14 @@ catalogs: specifier: ^8.35.1 version: 8.46.3 '@vitest/runner': - specifier: 4.0.16 - version: 4.0.16 + specifier: 4.1.0-beta.1 + version: 4.1.0-beta.1 '@vitest/snapshot': - specifier: 4.0.16 - version: 4.0.16 + specifier: 4.1.0-beta.1 + version: 4.1.0-beta.1 '@vitest/ui': - specifier: 4.0.16 - version: 4.0.16 + specifier: 4.1.0-beta.1 + version: 4.1.0-beta.1 capnp-es: specifier: ^0.0.14 version: 0.0.14 @@ -55,8 +55,8 @@ catalogs: specifier: ^5.4.14 version: 5.4.14 vitest: - specifier: 4.0.16 - version: 4.0.16 + specifier: 4.1.0-beta.1 + version: 4.1.0-beta.1 ws: specifier: 8.18.0 version: 8.18.0 @@ -162,7 +162,7 @@ importers: version: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) fixtures/additional-modules: devDependencies: @@ -180,7 +180,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -204,7 +204,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -243,7 +243,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -264,7 +264,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -288,7 +288,7 @@ importers: version: 7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -303,7 +303,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -321,7 +321,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -357,7 +357,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -384,7 +384,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -405,7 +405,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -429,7 +429,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -453,7 +453,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) fixtures/isomorphic-random-example: {} @@ -478,7 +478,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -511,7 +511,7 @@ importers: version: 7.0.0 vitest: specifier: catalog:default - version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -536,7 +536,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -573,7 +573,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -591,7 +591,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -624,7 +624,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -645,7 +645,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -666,7 +666,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -694,7 +694,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -715,7 +715,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -733,7 +733,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -754,7 +754,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -775,7 +775,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -796,7 +796,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -836,7 +836,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -857,7 +857,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -872,7 +872,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -893,7 +893,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -914,7 +914,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -932,7 +932,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -950,7 +950,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -968,7 +968,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -986,7 +986,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1004,7 +1004,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1022,7 +1022,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1043,7 +1043,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1058,7 +1058,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1073,7 +1073,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1145,7 +1145,7 @@ importers: version: 4.20260118.0 vitest: specifier: catalog:default - version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1181,7 +1181,7 @@ importers: devDependencies: '@better-auth/stripe': specifier: ^1.4.6 - version: 1.4.15(@better-auth/core@1.4.15(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.5))(jose@5.9.3)(kysely@0.28.10)(nanostores@1.1.0))(better-auth@1.4.15(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.0.16))(stripe@20.2.0(@types/node@20.19.9)) + version: 1.4.15(@better-auth/core@1.4.15(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.5))(jose@5.9.3)(kysely@0.28.10)(nanostores@1.1.0))(better-auth@1.4.15(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.1.0-beta.1))(stripe@20.2.0(@types/node@20.19.9)) '@cloudflare/containers': specifier: ^0.0.25 version: 0.0.25 @@ -1199,7 +1199,7 @@ importers: version: 20.19.9 better-auth: specifier: ^1.4.6 - version: 1.4.15(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.0.16) + version: 1.4.15(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.1.0-beta.1) discord-api-types: specifier: 0.37.98 version: 0.37.98 @@ -1232,7 +1232,7 @@ importers: version: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1247,7 +1247,7 @@ importers: version: 5.8.2 vitest: specifier: catalog:default - version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.2))(yaml@2.8.1) + version: 4.1.0-beta.1(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.2))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1289,7 +1289,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1307,7 +1307,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1337,7 +1337,7 @@ importers: version: 2.2.3 vitest: specifier: catalog:default - version: 4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1367,7 +1367,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1388,7 +1388,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1409,7 +1409,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1430,7 +1430,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1451,7 +1451,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1484,7 +1484,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1511,7 +1511,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1532,7 +1532,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1550,7 +1550,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1613,7 +1613,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) packages/create-cloudflare: devDependencies: @@ -1901,7 +1901,7 @@ importers: version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': specifier: catalog:vitest-3 - version: 0.10.15(@cloudflare/workers-types@4.20260118.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) + version: 0.10.15(@cloudflare/workers-types@4.20260118.0)(@vitest/runner@4.1.0-beta.1)(@vitest/snapshot@4.1.0-beta.1)(vitest@3.2.4) '@cloudflare/workers-types': specifier: catalog:default version: 4.20260118.0 @@ -2088,7 +2088,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) which: specifier: ^2.0.2 version: 2.0.2 @@ -2134,7 +2134,7 @@ importers: version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': specifier: catalog:vitest-3 - version: 0.10.15(@cloudflare/workers-types@4.20260118.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) + version: 0.10.15(@cloudflare/workers-types@4.20260118.0)(@vitest/runner@4.1.0-beta.1)(@vitest/snapshot@4.1.0-beta.1)(vitest@3.2.4) '@cloudflare/workers-shared': specifier: workspace:* version: link:../workers-shared @@ -3499,10 +3499,10 @@ importers: version: 7.5.1 '@vitest/runner': specifier: catalog:default - version: 4.0.16 + version: 4.1.0-beta.1 '@vitest/snapshot': specifier: catalog:default - version: 4.0.16 + version: 4.1.0-beta.1 birpc: specifier: 0.2.14 version: 0.2.14 @@ -3535,7 +3535,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) packages/workers-editor-shared: dependencies: @@ -3708,7 +3708,7 @@ importers: version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': specifier: catalog:vitest-3 - version: 0.10.15(@cloudflare/workers-types@4.20260118.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) + version: 0.10.15(@cloudflare/workers-types@4.20260118.0)(@vitest/runner@4.1.0-beta.1)(@vitest/snapshot@4.1.0-beta.1)(vitest@3.2.4) '@cloudflare/workers-tsconfig': specifier: workspace:* version: link:../workers-tsconfig @@ -3773,7 +3773,7 @@ importers: version: 20.19.9 '@vitest/ui': specifier: catalog:default - version: 4.0.16(vitest@4.0.16) + version: 4.1.0-beta.1(vitest@4.1.0-beta.1) cloudflare: specifier: ^5.2.0 version: 5.2.0(encoding@0.1.13) @@ -3806,7 +3806,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + version: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) xdg-app-paths: specifier: ^8.3.0 version: 8.3.0 @@ -3831,7 +3831,7 @@ importers: version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': specifier: catalog:vitest-3 - version: 0.10.15(@cloudflare/workers-types@4.20260118.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4) + version: 0.10.15(@cloudflare/workers-types@4.20260118.0)(@vitest/runner@4.1.0-beta.1)(@vitest/snapshot@4.1.0-beta.1)(vitest@3.2.4) '@cloudflare/workers-tsconfig': specifier: workspace:* version: link:../workers-tsconfig @@ -7645,6 +7645,9 @@ packages: '@standard-schema/spec@1.0.0': resolution: {integrity: sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==} + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + '@styled-system/background@5.1.2': resolution: {integrity: sha512-jtwH2C/U6ssuGSvwTN3ri/IyjdHb8W9X/g8Y0JLcrH02G+BW3OS8kZdHphF1/YyRklnrKrBT2ngwGUK6aqqV3A==} @@ -8204,8 +8207,8 @@ packages: '@vitest/expect@3.2.4': resolution: {integrity: sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==} - '@vitest/expect@4.0.16': - resolution: {integrity: sha512-eshqULT2It7McaJkQGLkPjPjNph+uevROGuIMJdG3V+0BSR2w9u6J9Lwu+E8cK5TETlfou8GRijhafIMhXsimA==} + '@vitest/expect@4.1.0-beta.1': + resolution: {integrity: sha512-LpwvdERiCpuXWE8IRLGgqMWPvcGxZVUNmVyRnvs4ZPCazbEgjkm5wlqFN7lJYfQkRamldHO+38348EefLtRY0A==} '@vitest/mocker@3.2.4': resolution: {integrity: sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==} @@ -8218,8 +8221,8 @@ packages: vite: optional: true - '@vitest/mocker@4.0.16': - resolution: {integrity: sha512-yb6k4AZxJTB+q9ycAvsoxGn+j/po0UaPgajllBgt1PzoMAAmJGYFdDk0uCcRcxb3BrME34I6u8gHZTQlkqSZpg==} + '@vitest/mocker@4.1.0-beta.1': + resolution: {integrity: sha512-IiiJL8aqJrk5oNgiOsTvrzMAt71qWL1pvHKJJiaKQCMX3Lvj6w++HvNJIl3d0rm5D9sngAJYtF87EN0CTWhF8Q==} peerDependencies: msw: ^2.4.9 vite: ^6.0.0 || ^7.0.0-0 @@ -8235,36 +8238,36 @@ packages: '@vitest/pretty-format@3.2.4': resolution: {integrity: sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==} - '@vitest/pretty-format@4.0.16': - resolution: {integrity: sha512-eNCYNsSty9xJKi/UdVD8Ou16alu7AYiS2fCPRs0b1OdhJiV89buAXQLpTbe+X8V9L6qrs9CqyvU7OaAopJYPsA==} + '@vitest/pretty-format@4.1.0-beta.1': + resolution: {integrity: sha512-CeI3uthjV/XKA6KBCr/B5HlCQaFdCgprdl7gBg/sUExQPary8BBhYoVWJeAPTeg9u+ppT9S4v/sYjjNjn3Qsrw==} '@vitest/runner@3.2.4': resolution: {integrity: sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==} - '@vitest/runner@4.0.16': - resolution: {integrity: sha512-VWEDm5Wv9xEo80ctjORcTQRJ539EGPB3Pb9ApvVRAY1U/WkHXmmYISqU5E79uCwcW7xYUV38gwZD+RV755fu3Q==} + '@vitest/runner@4.1.0-beta.1': + resolution: {integrity: sha512-oE0nFu+0zT6IhhAu8Z9wWCWWy63a7btZLvq4zUkrGwJ9U4sabXHWzYakBE6ZDLXpI8aDv796+0AMej2AJ7m3tw==} '@vitest/snapshot@3.2.4': resolution: {integrity: sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==} - '@vitest/snapshot@4.0.16': - resolution: {integrity: sha512-sf6NcrYhYBsSYefxnry+DR8n3UV4xWZwWxYbCJUt2YdvtqzSPR7VfGrY0zsv090DAbjFZsi7ZaMi1KnSRyK1XA==} + '@vitest/snapshot@4.1.0-beta.1': + resolution: {integrity: sha512-wSt0PAy1QCZjzPUgpIYXBtZFTFXPw65GIQxz9mjhl0yjkAE+wnRU08+w3R3X5hrCKYVhTS3HHV8zs6Yin2K0Dw==} '@vitest/spy@3.2.4': resolution: {integrity: sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==} - '@vitest/spy@4.0.16': - resolution: {integrity: sha512-4jIOWjKP0ZUaEmJm00E0cOBLU+5WE0BpeNr3XN6TEF05ltro6NJqHWxXD0kA8/Zc8Nh23AT8WQxwNG+WeROupw==} + '@vitest/spy@4.1.0-beta.1': + resolution: {integrity: sha512-DzHg9PJuWYivWLt4O9SYF2u5/mGlfM3tgP8DdlSwMr7C+hBusejK+r0rqaCSYwBH47ePhU4jccBm4i6bE2dahg==} '@vitest/ui@3.2.4': resolution: {integrity: sha512-hGISOaP18plkzbWEcP/QvtRW1xDXF2+96HbEX6byqQhAUbiS5oH6/9JwW+QsQCIYON2bI6QZBF+2PvOmrRZ9wA==} peerDependencies: vitest: 3.2.4 - '@vitest/ui@4.0.16': - resolution: {integrity: sha512-rkoPH+RqWopVxDnCBE/ysIdfQ2A7j1eDmW8tCxxrR9nnFBa9jKf86VgsSAzxBd1x+ny0GC4JgiD3SNfRHv3pOg==} + '@vitest/ui@4.1.0-beta.1': + resolution: {integrity: sha512-ZkZKwtvKqFXwGo6HjahLCKDVpOr6WxbOhZI70rbAkiyg9HS1TMFxqvRecwkpNwT4bfu8cfKZcNhjD8hOYBkBOw==} peerDependencies: - vitest: 4.0.16 + vitest: 4.1.0-beta.1 '@vitest/utils@2.1.8': resolution: {integrity: sha512-dwSoui6djdwbfFmIgbIjX2ZhIoG7Ex/+xpxyiEgIGzjliY8xGkcpITKTlp6B4MgtGkF2ilvm97cPM96XZaAgcA==} @@ -8272,8 +8275,8 @@ packages: '@vitest/utils@3.2.4': resolution: {integrity: sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==} - '@vitest/utils@4.0.16': - resolution: {integrity: sha512-h8z9yYhV3e1LEfaQ3zdypIrnAg/9hguReGZoS7Gl0aBG5xgA410zBqECqmaF/+RkTggRsfnzc1XaAHA6bmUufA==} + '@vitest/utils@4.1.0-beta.1': + resolution: {integrity: sha512-IUCsqDFj8E8WJq3wGRQ7MiMb2571tjTnjyrJ1oy+0HODutA2TpZGRqBA8ziLCIWTOL/e4RArE2k6eZh/jXgk9A==} '@volar/language-core@2.3.4': resolution: {integrity: sha512-wXBhY11qG6pCDAqDnbBRFIDSIwbqkWI7no+lj5+L7IlA7HRIjRP7YQLGzT0LF4lS6eHkMSsclXqy9DwYJasZTQ==} @@ -14019,18 +14022,18 @@ packages: jsdom: optional: true - vitest@4.0.16: - resolution: {integrity: sha512-E4t7DJ9pESL6E3I8nFjPa4xGUd3PmiWDLsDztS2qXSJWfHtbQnwAWylaBvSNY48I3vr8PTqIZlyK8TE3V3CA4Q==} + vitest@4.1.0-beta.1: + resolution: {integrity: sha512-iJKx5pLpS9eRgHJuVCKuuphoKZNCUtSoBiqpHdgrVyqFAZNU66m90H9lSHek1WiRCeqPfgV/ugK0Bl+ZOv8K9Q==} engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@opentelemetry/api': ^1.9.0 '@types/node': ^20.19.9 - '@vitest/browser-playwright': 4.0.16 - '@vitest/browser-preview': 4.0.16 - '@vitest/browser-webdriverio': 4.0.16 - '@vitest/ui': 4.0.16 + '@vitest/browser-playwright': 4.1.0-beta.1 + '@vitest/browser-preview': 4.1.0-beta.1 + '@vitest/browser-webdriverio': 4.1.0-beta.1 + '@vitest/ui': 4.1.0-beta.1 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -15082,10 +15085,10 @@ snapshots: nanostores: 1.1.0 zod: 4.3.5 - '@better-auth/stripe@1.4.15(@better-auth/core@1.4.15(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.5))(jose@5.9.3)(kysely@0.28.10)(nanostores@1.1.0))(better-auth@1.4.15(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.0.16))(stripe@20.2.0(@types/node@20.19.9))': + '@better-auth/stripe@1.4.15(@better-auth/core@1.4.15(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.5))(jose@5.9.3)(kysely@0.28.10)(nanostores@1.1.0))(better-auth@1.4.15(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.1.0-beta.1))(stripe@20.2.0(@types/node@20.19.9))': dependencies: '@better-auth/core': 1.4.15(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.5))(jose@5.9.3)(kysely@0.28.10)(nanostores@1.1.0) - better-auth: 1.4.15(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.0.16) + better-auth: 1.4.15(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.1.0-beta.1) defu: 6.1.4 stripe: 20.2.0(@types/node@20.19.9) zod: 4.3.5 @@ -15594,16 +15597,16 @@ snapshots: lodash.memoize: 4.1.2 marked: 0.3.19 - '@cloudflare/vitest-pool-workers@0.10.15(@cloudflare/workers-types@4.20260118.0)(@vitest/runner@4.0.16)(@vitest/snapshot@4.0.16)(vitest@3.2.4)': + '@cloudflare/vitest-pool-workers@0.10.15(@cloudflare/workers-types@4.20260118.0)(@vitest/runner@4.1.0-beta.1)(@vitest/snapshot@4.1.0-beta.1)(vitest@3.2.4)': dependencies: - '@vitest/runner': 4.0.16 - '@vitest/snapshot': 4.0.16 + '@vitest/runner': 4.1.0-beta.1 + '@vitest/snapshot': 4.1.0-beta.1 birpc: 0.2.14 cjs-module-lexer: 1.2.3 devalue: 5.3.2 miniflare: 4.20251210.0 semver: 7.7.3 - vitest: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + vitest: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) wrangler: 4.54.0(@cloudflare/workers-types@4.20260118.0) zod: 3.25.76 transitivePeerDependencies: @@ -17909,6 +17912,8 @@ snapshots: '@standard-schema/spec@1.0.0': {} + '@standard-schema/spec@1.1.0': {} + '@styled-system/background@5.1.2': dependencies: '@styled-system/core': 5.1.2 @@ -18606,12 +18611,12 @@ snapshots: chai: 5.2.0 tinyrainbow: 2.0.0 - '@vitest/expect@4.0.16': + '@vitest/expect@4.1.0-beta.1': dependencies: - '@standard-schema/spec': 1.0.0 + '@standard-schema/spec': 1.1.0 '@types/chai': 5.2.2 - '@vitest/spy': 4.0.16 - '@vitest/utils': 4.0.16 + '@vitest/spy': 4.1.0-beta.1 + '@vitest/utils': 4.1.0-beta.1 chai: 6.2.2 tinyrainbow: 3.0.3 @@ -18633,32 +18638,32 @@ snapshots: msw: 2.12.4(@types/node@20.19.9)(typescript@5.9.3) vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - '@vitest/mocker@4.0.16(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.2))(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1))': + '@vitest/mocker@4.1.0-beta.1(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.2))(vite@7.2.7(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1))': dependencies: - '@vitest/spy': 4.0.16 + '@vitest/spy': 4.1.0-beta.1 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: msw: 2.12.4(@types/node@20.19.9)(typescript@5.8.2) - vite: 7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) + vite: 7.2.7(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) - '@vitest/mocker@4.0.16(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1))': + '@vitest/mocker@4.1.0-beta.1(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.2.7(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1))': dependencies: - '@vitest/spy': 4.0.16 + '@vitest/spy': 4.1.0-beta.1 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: msw: 2.12.4(@types/node@20.19.9)(typescript@5.8.3) - vite: 7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) + vite: 7.2.7(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) - '@vitest/mocker@4.0.16(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1))': + '@vitest/mocker@4.1.0-beta.1(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.2.7(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1))': dependencies: - '@vitest/spy': 4.0.16 + '@vitest/spy': 4.1.0-beta.1 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: msw: 2.12.4(@types/node@20.19.9)(typescript@5.9.3) - vite: 7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) + vite: 7.2.7(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) '@vitest/pretty-format@2.1.8': dependencies: @@ -18668,7 +18673,7 @@ snapshots: dependencies: tinyrainbow: 2.0.0 - '@vitest/pretty-format@4.0.16': + '@vitest/pretty-format@4.1.0-beta.1': dependencies: tinyrainbow: 3.0.3 @@ -18678,9 +18683,9 @@ snapshots: pathe: 2.0.3 strip-literal: 3.0.0 - '@vitest/runner@4.0.16': + '@vitest/runner@4.1.0-beta.1': dependencies: - '@vitest/utils': 4.0.16 + '@vitest/utils': 4.1.0-beta.1 pathe: 2.0.3 '@vitest/snapshot@3.2.4': @@ -18689,9 +18694,9 @@ snapshots: magic-string: 0.30.21 pathe: 2.0.3 - '@vitest/snapshot@4.0.16': + '@vitest/snapshot@4.1.0-beta.1': dependencies: - '@vitest/pretty-format': 4.0.16 + '@vitest/pretty-format': 4.1.0-beta.1 magic-string: 0.30.21 pathe: 2.0.3 @@ -18699,7 +18704,7 @@ snapshots: dependencies: tinyspy: 4.0.3 - '@vitest/spy@4.0.16': {} + '@vitest/spy@4.1.0-beta.1': {} '@vitest/ui@3.2.4(vitest@3.2.4)': dependencies: @@ -18712,16 +18717,16 @@ snapshots: tinyrainbow: 2.0.0 vitest: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) - '@vitest/ui@4.0.16(vitest@4.0.16)': + '@vitest/ui@4.1.0-beta.1(vitest@4.1.0-beta.1)': dependencies: - '@vitest/utils': 4.0.16 + '@vitest/utils': 4.1.0-beta.1 fflate: 0.8.2 flatted: 3.3.3 pathe: 2.0.3 sirv: 3.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vitest: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + vitest: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) '@vitest/utils@2.1.8': dependencies: @@ -18735,9 +18740,9 @@ snapshots: loupe: 3.2.1 tinyrainbow: 2.0.0 - '@vitest/utils@4.0.16': + '@vitest/utils@4.1.0-beta.1': dependencies: - '@vitest/pretty-format': 4.0.16 + '@vitest/pretty-format': 4.1.0-beta.1 tinyrainbow: 3.0.3 '@volar/language-core@2.3.4': @@ -19179,7 +19184,7 @@ snapshots: before-after-hook@2.2.3: {} - better-auth@1.4.15(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.0.16): + better-auth@1.4.15(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.1.0-beta.1): dependencies: '@better-auth/core': 1.4.15(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.5))(jose@5.9.3)(kysely@0.28.10)(nanostores@1.1.0) '@better-auth/telemetry': 1.4.15(@better-auth/core@1.4.15(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.5))(jose@6.1.3)(kysely@0.28.10)(nanostores@1.1.0)) @@ -19200,7 +19205,7 @@ snapshots: prisma: 7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3) react: 19.2.1 react-dom: 19.2.1(react@19.2.1) - vitest: 4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) + vitest: 4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1) better-call@1.1.8(zod@4.3.5): dependencies: @@ -25253,15 +25258,15 @@ snapshots: - tsx - yaml - vitest@4.0.16(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1): + vitest@4.1.0-beta.1(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(yaml@2.8.1): dependencies: - '@vitest/expect': 4.0.16 - '@vitest/mocker': 4.0.16(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1)) - '@vitest/pretty-format': 4.0.16 - '@vitest/runner': 4.0.16 - '@vitest/snapshot': 4.0.16 - '@vitest/spy': 4.0.16 - '@vitest/utils': 4.0.16 + '@vitest/expect': 4.1.0-beta.1 + '@vitest/mocker': 4.1.0-beta.1(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.2.7(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1)) + '@vitest/pretty-format': 4.1.0-beta.1 + '@vitest/runner': 4.1.0-beta.1 + '@vitest/snapshot': 4.1.0-beta.1 + '@vitest/spy': 4.1.0-beta.1 + '@vitest/utils': 4.1.0-beta.1 es-module-lexer: 1.7.0 expect-type: 1.3.0 magic-string: 0.30.21 @@ -25273,12 +25278,12 @@ snapshots: tinyexec: 1.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vite: 7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) + vite: 7.2.7(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) why-is-node-running: 2.3.0 optionalDependencies: '@opentelemetry/api': 1.7.0 '@types/node': 20.19.9 - '@vitest/ui': 4.0.16(vitest@4.0.16) + '@vitest/ui': 4.1.0-beta.1(vitest@4.1.0-beta.1) transitivePeerDependencies: - jiti - less @@ -25292,15 +25297,15 @@ snapshots: - tsx - yaml - vitest@4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.2))(yaml@2.8.1): + vitest@4.1.0-beta.1(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.2))(yaml@2.8.1): dependencies: - '@vitest/expect': 4.0.16 - '@vitest/mocker': 4.0.16(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.2))(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1)) - '@vitest/pretty-format': 4.0.16 - '@vitest/runner': 4.0.16 - '@vitest/snapshot': 4.0.16 - '@vitest/spy': 4.0.16 - '@vitest/utils': 4.0.16 + '@vitest/expect': 4.1.0-beta.1 + '@vitest/mocker': 4.1.0-beta.1(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.2))(vite@7.2.7(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1)) + '@vitest/pretty-format': 4.1.0-beta.1 + '@vitest/runner': 4.1.0-beta.1 + '@vitest/snapshot': 4.1.0-beta.1 + '@vitest/spy': 4.1.0-beta.1 + '@vitest/utils': 4.1.0-beta.1 es-module-lexer: 1.7.0 expect-type: 1.3.0 magic-string: 0.30.21 @@ -25312,11 +25317,11 @@ snapshots: tinyexec: 1.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vite: 7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) + vite: 7.2.7(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 20.19.9 - '@vitest/ui': 4.0.16(vitest@4.0.16) + '@vitest/ui': 4.1.0-beta.1(vitest@4.1.0-beta.1) transitivePeerDependencies: - jiti - less @@ -25330,15 +25335,15 @@ snapshots: - tsx - yaml - vitest@4.0.16(@types/node@20.19.9)(@vitest/ui@4.0.16)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1): + vitest@4.1.0-beta.1(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.1)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1): dependencies: - '@vitest/expect': 4.0.16 - '@vitest/mocker': 4.0.16(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1)) - '@vitest/pretty-format': 4.0.16 - '@vitest/runner': 4.0.16 - '@vitest/snapshot': 4.0.16 - '@vitest/spy': 4.0.16 - '@vitest/utils': 4.0.16 + '@vitest/expect': 4.1.0-beta.1 + '@vitest/mocker': 4.1.0-beta.1(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.2.7(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1)) + '@vitest/pretty-format': 4.1.0-beta.1 + '@vitest/runner': 4.1.0-beta.1 + '@vitest/snapshot': 4.1.0-beta.1 + '@vitest/spy': 4.1.0-beta.1 + '@vitest/utils': 4.1.0-beta.1 es-module-lexer: 1.7.0 expect-type: 1.3.0 magic-string: 0.30.21 @@ -25350,11 +25355,11 @@ snapshots: tinyexec: 1.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vite: 7.1.12(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) + vite: 7.2.7(@types/node@20.19.9)(jiti@2.6.0)(lightningcss@1.30.2)(yaml@2.8.1) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 20.19.9 - '@vitest/ui': 4.0.16(vitest@4.0.16) + '@vitest/ui': 4.1.0-beta.1(vitest@4.1.0-beta.1) transitivePeerDependencies: - jiti - less diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index f420e79cbfd8..d637fad5e52e 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -19,9 +19,9 @@ catalog: "@types/node": "^20.19.9" "@typescript-eslint/eslint-plugin": "^8.35.1" "@typescript-eslint/parser": "^8.35.1" - "@vitest/runner": 4.0.16 - "@vitest/snapshot": 4.0.16 - "@vitest/ui": 4.0.16 + "@vitest/runner": 4.1.0-beta.1 + "@vitest/snapshot": 4.1.0-beta.1 + "@vitest/ui": 4.1.0-beta.1 # rimraf@6 requires node 20 or >=22 rimraf: "^6.0.1" typescript: "~5.8.3" @@ -29,7 +29,7 @@ catalog: # Override undici-types from @types/node so that the Cloudflare SDK typings match our installed # version of Undici undici-types: "7.18.2" - vitest: "4.0.16" + vitest: "4.1.0-beta.1" vite: "^5.4.14" "ws": "8.18.0" esbuild: "0.27.0" From 7143d5d4e753b2f8285dcdb593f987efb7a4455a Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Tue, 20 Jan 2026 16:32:02 +0000 Subject: [PATCH 17/45] fix? --- .../vitest-pool-workers/src/worker/lib/cloudflare/snapshot.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vitest-pool-workers/src/worker/lib/cloudflare/snapshot.ts b/packages/vitest-pool-workers/src/worker/lib/cloudflare/snapshot.ts index 1cceee806f57..d0631c13cc9c 100644 --- a/packages/vitest-pool-workers/src/worker/lib/cloudflare/snapshot.ts +++ b/packages/vitest-pool-workers/src/worker/lib/cloudflare/snapshot.ts @@ -1,7 +1,7 @@ import assert from "node:assert"; import { dirname } from "node:path"; import { env } from "cloudflare:workers"; -import { VitestSnapshotEnvironment } from "vitest/snapshot"; +import { VitestSnapshotEnvironment } from "vitest/runtime"; // Define a custom `SnapshotEnvironment` that uses a service binding for file // system operations, rather than `node:fs` From de5f57fa13eed248e76e3a4925e86e602af5a2ca Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 22 Jan 2026 20:53:57 +0000 Subject: [PATCH 18/45] Add nunjucks to module-resolution fixture --- .../module-resolution/src/index.ts | 17 +++- .../vitest-pool-workers-examples/package.json | 1 + pnpm-lock.yaml | 98 ++++++++----------- 3 files changed, 58 insertions(+), 58 deletions(-) diff --git a/fixtures/vitest-pool-workers-examples/module-resolution/src/index.ts b/fixtures/vitest-pool-workers-examples/module-resolution/src/index.ts index de54b91ac247..ba0c8cd47c6e 100644 --- a/fixtures/vitest-pool-workers-examples/module-resolution/src/index.ts +++ b/fixtures/vitest-pool-workers-examples/module-resolution/src/index.ts @@ -7,6 +7,7 @@ import * as bAuth from "better-auth"; // @see https://github.com/cloudflare/workers-sdk/issues/6591 import * as discord from "discord-api-types/v10"; import * as jose from "jose"; +import nunjucks from "nunjucks"; import Stripe from "stripe"; import { Toucan } from "toucan-js"; @@ -18,9 +19,23 @@ export default { }); const a = Stripe; + nunjucks.configure({ autoescape: true }); + + console.log( + nunjucks.renderString("Hello {{ username }}", { username: "James" }) + ); + // Make sure none of the imports are tree shaken return new Response( - JSON.stringify({ discord, otel, jose, bAuth, bAuthStripe, a }) + JSON.stringify({ + discord, + otel, + jose, + bAuth, + bAuthStripe, + a, + n: nunjucks.renderString("Hello {{ username }}", { username: "James" }), + }) ); }, }; diff --git a/fixtures/vitest-pool-workers-examples/package.json b/fixtures/vitest-pool-workers-examples/package.json index 91eef69f9fc6..8b9b52c9f15b 100644 --- a/fixtures/vitest-pool-workers-examples/package.json +++ b/fixtures/vitest-pool-workers-examples/package.json @@ -23,6 +23,7 @@ "jose": "^5.9.3", "miniflare": "workspace:*", "msw": "catalog:default", + "nunjucks": "^3.2.4", "run-script-os": "^1.1.6", "stripe": "^20.0.0", "toucan-js": "4.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8be35158941f..85fb19a4cdc3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,71 +9,18 @@ catalogs: '@cloudflare/workers-types': specifier: ^4.20260116.0 version: 4.20260118.0 - '@typescript-eslint/eslint-plugin': - specifier: ^8.35.1 - version: 8.46.3 - '@typescript-eslint/parser': - specifier: ^8.35.1 - version: 8.46.3 - '@vitest/runner': - specifier: 4.1.0-beta.1 - version: 4.1.0-beta.1 - '@vitest/snapshot': - specifier: 4.1.0-beta.1 - version: 4.1.0-beta.1 - '@vitest/ui': - specifier: 4.1.0-beta.1 - version: 4.1.0-beta.1 - capnp-es: - specifier: ^0.0.14 - version: 0.0.14 - esbuild: - specifier: 0.27.0 - version: 0.27.0 - eslint: - specifier: ^9.39.1 - version: 9.39.1 msw: specifier: 2.12.4 version: 2.12.4 - playwright-chromium: - specifier: ^1.56.1 - version: 1.56.1 - rimraf: - specifier: ^6.0.1 - version: 6.0.1 - smol-toml: - specifier: ^1.5.2 - version: 1.5.2 typescript: specifier: ~5.8.3 version: 5.8.3 - undici: - specifier: 7.18.2 - version: 7.18.2 vite: specifier: ^5.4.14 version: 5.4.14 vitest: specifier: 4.1.0-beta.1 version: 4.1.0-beta.1 - ws: - specifier: 8.18.0 - version: 8.18.0 - vite-plugin: - vite: - specifier: 7.1.12 - version: 7.1.12 - vitest-3: - '@cloudflare/vitest-pool-workers': - specifier: ^0.10.0 - version: 0.10.15 - '@vitest/ui': - specifier: 3.2.4 - version: 3.2.4 - vitest: - specifier: 3.2.4 - version: 3.2.4 overrides: '@types/react-dom@18>@types/react': ^18 @@ -1215,6 +1162,9 @@ importers: msw: specifier: catalog:default version: 2.12.4(@types/node@20.19.9)(typescript@5.8.3) + nunjucks: + specifier: ^3.2.4 + version: 3.2.4(chokidar@3.6.0) run-script-os: specifier: ^1.1.6 version: 1.1.6 @@ -8344,6 +8294,9 @@ packages: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} hasBin: true + a-sync-waterfall@1.0.1: + resolution: {integrity: sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA==} + abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} @@ -8522,6 +8475,9 @@ packages: resolution: {integrity: sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==} engines: {node: '>= 0.4'} + asap@2.0.6: + resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} + asn1@0.2.6: resolution: {integrity: sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==} @@ -8996,6 +8952,10 @@ packages: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} engines: {node: '>= 6'} + commander@5.1.0: + resolution: {integrity: sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==} + engines: {node: '>= 6'} + commander@7.2.0: resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} engines: {node: '>= 10'} @@ -11601,6 +11561,16 @@ packages: nth-check@2.1.1: resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} + nunjucks@3.2.4: + resolution: {integrity: sha512-26XRV6BhkgK0VOxfbU5cQI+ICFUtMLixv1noZn1tGU38kQH5A5nmmbk/O45xdyBhD1esk47nKrY0mvQpZIhRjQ==} + engines: {node: '>= 6.9.0'} + hasBin: true + peerDependencies: + chokidar: ^3.3.0 + peerDependenciesMeta: + chokidar: + optional: true + nypm@0.6.1: resolution: {integrity: sha512-hlacBiRiv1k9hZFiphPUkfSQ/ZfQzZDzC+8z0wL3lvDAOUu/2NnChkKuMoMjNur/9OpKuz2QsIeiPVN0xM5Q0w==} engines: {node: ^14.16.0 || >=16.10.0} @@ -18715,7 +18685,7 @@ snapshots: sirv: 3.0.2 tinyglobby: 0.2.15 tinyrainbow: 2.0.0 - vitest: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + vitest: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) '@vitest/ui@4.1.0-beta.1(vitest@4.1.0-beta.1)': dependencies: @@ -18851,6 +18821,8 @@ snapshots: jsonparse: 1.3.1 through: 2.3.8 + a-sync-waterfall@1.0.1: {} + abort-controller@3.0.0: dependencies: event-target-shim: 5.0.1 @@ -19060,6 +19032,8 @@ snapshots: get-intrinsic: 1.3.0 is-array-buffer: 3.0.5 + asap@2.0.6: {} + asn1@0.2.6: dependencies: safer-buffer: 2.1.2 @@ -19441,7 +19415,7 @@ snapshots: citty@0.1.6: dependencies: - consola: 3.3.3 + consola: 3.4.2 cjs-module-lexer@1.2.3: {} @@ -19521,6 +19495,8 @@ snapshots: commander@4.1.1: {} + commander@5.1.0: {} + commander@7.2.0: {} comment-json@4.5.0: @@ -19535,7 +19511,7 @@ snapshots: compressible@2.0.18: dependencies: - mime-db: 1.52.0 + mime-db: 1.54.0 compression@1.7.5: dependencies: @@ -19995,7 +19971,7 @@ snapshots: effect@3.18.4: dependencies: - '@standard-schema/spec': 1.0.0 + '@standard-schema/spec': 1.1.0 fast-check: 3.23.2 electron-to-chromium@1.5.45: {} @@ -22472,6 +22448,14 @@ snapshots: dependencies: boolbase: 1.0.0 + nunjucks@3.2.4(chokidar@3.6.0): + dependencies: + a-sync-waterfall: 1.0.1 + asap: 2.0.6 + commander: 5.1.0 + optionalDependencies: + chokidar: 3.6.0 + nypm@0.6.1: dependencies: citty: 0.1.6 From 7870094f70fba887c0785f7c5e401c790337c147 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 22 Jan 2026 20:55:10 +0000 Subject: [PATCH 19/45] Add comment re hardcoded event names --- packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts b/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts index 431659a2a5d8..edf0bb2a67ec 100644 --- a/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts +++ b/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts @@ -220,6 +220,8 @@ export class CloudflarePoolWorker implements PoolWorker { } off(_event: string, callback: (_arg: unknown) => void): void { + // The event names that Vitest uses and the event names that Websockets use don't fully match up. + // As such, we hardcode "close" given that Vitest's internals only actually seem to call off() for "close". this.socket?.removeEventListener("close", callback as () => void); } From 3f6fef8946666d701a694af18c3af8fa343b3d1e Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 22 Jan 2026 20:57:03 +0000 Subject: [PATCH 20/45] delete temp dirs --- packages/vitest-pool-workers/test/helpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vitest-pool-workers/test/helpers.ts b/packages/vitest-pool-workers/test/helpers.ts index 88ee609ca577..1640bd632cc4 100644 --- a/packages/vitest-pool-workers/test/helpers.ts +++ b/packages/vitest-pool-workers/test/helpers.ts @@ -110,7 +110,7 @@ export const test = baseTest.extend<{ const tmpPathBase = path.join(tmpPoolInstallationPath, "test-"); const tmpPath = await fs.mkdtemp(tmpPathBase); await use(tmpPath); - // await fs.rm(tmpPath, { recursive: true, maxRetries: 10 }); + await fs.rm(tmpPath, { recursive: true, maxRetries: 10 }); }, // Fixture for seeding data in the temporary directory async seed({ tmpPath }, use) { From 131244aa77c587c4be8133591c058b1b92285c72 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 22 Jan 2026 21:05:33 +0000 Subject: [PATCH 21/45] address more comments --- .../vitest.isolated_storage.config.ts | 29 ------------------ .../vitest.single_worker.config.ts | 30 ------------------- packages/pages-shared/vitest.config.mts | 1 + .../src/pool/cloudflare-pool-worker.ts | 2 +- 4 files changed, 2 insertions(+), 60 deletions(-) delete mode 100644 fixtures/vitest-pool-workers-examples/context-exports/vitest.isolated_storage.config.ts delete mode 100644 fixtures/vitest-pool-workers-examples/context-exports/vitest.single_worker.config.ts diff --git a/fixtures/vitest-pool-workers-examples/context-exports/vitest.isolated_storage.config.ts b/fixtures/vitest-pool-workers-examples/context-exports/vitest.isolated_storage.config.ts deleted file mode 100644 index c07c51a8f497..000000000000 --- a/fixtures/vitest-pool-workers-examples/context-exports/vitest.isolated_storage.config.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; -import { defineConfig } from "vitest/config"; -import { auxiliaryWorker } from "./vitest.config"; - -export default defineConfig({ - plugins: [ - cloudflareTest({ - wrangler: { configPath: "./src/wrangler.jsonc" }, - miniflare: { - workers: [auxiliaryWorker], - }, - additionalExports: { - // This entrypoint is wildcard re-exported from a virtual module so we cannot automatically infer it. - ConfiguredVirtualEntryPoint: "WorkerEntrypoint", - }, - }), - ], - - test: { - name: "context-exports-isolated-storage", - globalSetup: ["./global-setup.ts"], - - alias: { - // This alias is used to simulate a virtual module that Vitest and TypeScript can understand, - // but esbuild (used by the vitest-pool-workers to guess exports) cannot. - "@virtual-module": "./virtual.ts", - }, - }, -}); diff --git a/fixtures/vitest-pool-workers-examples/context-exports/vitest.single_worker.config.ts b/fixtures/vitest-pool-workers-examples/context-exports/vitest.single_worker.config.ts deleted file mode 100644 index 49b75c639696..000000000000 --- a/fixtures/vitest-pool-workers-examples/context-exports/vitest.single_worker.config.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; -import { defineConfig } from "vitest/config"; -import { kCurrentWorker } from "../../../packages/miniflare/dist/src"; -import { auxiliaryWorker } from "./vitest.config"; - -export default defineConfig({ - plugins: [ - cloudflareTest({ - wrangler: { configPath: "./src/wrangler.jsonc" }, - miniflare: { - workers: [auxiliaryWorker], - }, - additionalExports: { - // This entrypoint is wildcard re-exported from a virtual module so we cannot automatically infer it. - ConfiguredVirtualEntryPoint: "WorkerEntrypoint", - }, - }), - ], - - test: { - name: "context-exports-single-worker", - globalSetup: ["./global-setup.ts"], - - alias: { - // This alias is used to simulate a virtual module that Vitest and TypeScript can understand, - // but esbuild (used by the vitest-pool-workers to guess exports) cannot. - "@virtual-module": "./virtual.ts", - }, - }, -}); diff --git a/packages/pages-shared/vitest.config.mts b/packages/pages-shared/vitest.config.mts index b3958f8349e0..0661d7382795 100644 --- a/packages/pages-shared/vitest.config.mts +++ b/packages/pages-shared/vitest.config.mts @@ -5,6 +5,7 @@ export default defineWorkersProject({ poolOptions: { workers: { isolatedStorage: false, + singleWorker: true, miniflare: { compatibilityDate: "2025-01-01", }, diff --git a/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts b/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts index edf0bb2a67ec..8cfe0d7b16f6 100644 --- a/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts +++ b/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts @@ -48,7 +48,7 @@ export class CloudflarePoolWorker implements PoolWorker { async start(): Promise { let resolvedPoolOptions: WorkersPoolOptions; if (typeof this.poolOptions === "function") { - // hhttps://github.com/vitest-dev/vitest/blob/v4.0.15/packages/vitest/src/integrations/inject.ts + // https://github.com/vitest-dev/vitest/blob/v4.0.15/packages/vitest/src/integrations/inject.ts const inject = ( key: K ): ProvidedContext[K] => { From 858ed071a9e1cf7a9b7073ad6609e52ed263da28 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 22 Jan 2026 21:42:07 +0000 Subject: [PATCH 22/45] fix tests after merge --- fixtures/vitest-pool-workers-examples/package.json | 1 + packages/wrangler/src/__tests__/index.test.ts | 2 -- pnpm-lock.yaml | 10 +++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/fixtures/vitest-pool-workers-examples/package.json b/fixtures/vitest-pool-workers-examples/package.json index 8b9b52c9f15b..b9630a3192be 100644 --- a/fixtures/vitest-pool-workers-examples/package.json +++ b/fixtures/vitest-pool-workers-examples/package.json @@ -17,6 +17,7 @@ "@cloudflare/workers-types": "catalog:default", "@microlabs/otel-cf-workers": "1.0.0-rc.45", "@types/node": "catalog:default", + "@types/nunjucks": "^3.2.6", "better-auth": "^1.4.6", "discord-api-types": "0.37.98", "ext-dep": "file:./module-resolution/vendor/ext-dep", diff --git a/packages/wrangler/src/__tests__/index.test.ts b/packages/wrangler/src/__tests__/index.test.ts index 8c2909dca5b7..6e7da0bd86f5 100644 --- a/packages/wrangler/src/__tests__/index.test.ts +++ b/packages/wrangler/src/__tests__/index.test.ts @@ -38,7 +38,6 @@ describe("wrangler", () => { COMMANDS wrangler docs [search..] 📚 Open Wrangler's command documentation in your browser wrangler complete [shell] ⌨️ Generate and handle shell completions - wrangler codemod [name] 🔨 Apply a code modification to your project [experimental] ACCOUNT @@ -112,7 +111,6 @@ describe("wrangler", () => { COMMANDS wrangler docs [search..] 📚 Open Wrangler's command documentation in your browser wrangler complete [shell] ⌨️ Generate and handle shell completions - wrangler codemod [name] 🔨 Apply a code modification to your project [experimental] ACCOUNT diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a8d89e103274..29841a9bdefc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1197,6 +1197,9 @@ importers: '@types/node': specifier: ^20.19.9 version: 20.19.9 + '@types/nunjucks': + specifier: ^3.2.6 + version: 3.2.6 better-auth: specifier: ^1.4.6 version: 1.4.15(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.1.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.1.0-beta.1) @@ -7968,6 +7971,9 @@ packages: '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} + '@types/nunjucks@3.2.6': + resolution: {integrity: sha512-pHiGtf83na1nCzliuAdq8GowYiXvH5l931xZ0YEHaLMNFgynpEqx+IPStlu7UaDkehfvl01e4x/9Tpwhy7Ue3w==} + '@types/pg@8.11.6': resolution: {integrity: sha512-/2WmmBXHLsfRqzfHW7BNZ8SbYzE8OSk7i3WjFYvfgRHj7S1xj+16Je5fUKv3lVdVzk/zn9TXOqf+avFCFIE0yQ==} @@ -18263,6 +18269,8 @@ snapshots: '@types/normalize-package-data@2.4.4': {} + '@types/nunjucks@3.2.6': {} + '@types/pg@8.11.6': dependencies: '@types/node': 20.19.9 @@ -18775,7 +18783,7 @@ snapshots: sirv: 3.0.2 tinyglobby: 0.2.15 tinyrainbow: 2.0.0 - vitest: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(yaml@2.8.1) + vitest: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.0)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(yaml@2.8.1) '@vitest/ui@4.1.0-beta.1(vitest@4.1.0-beta.1)': dependencies: From 1f1072a70b6ff5bf455d888b667052677969752b Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Wed, 18 Feb 2026 09:41:26 +0000 Subject: [PATCH 23/45] [vitest-pool-workers] Fix vitest 4.1.0-beta.4 compatibility - Upgrade vitest to 4.1.0-beta.4 and vite to ^7.3.1 - Add node:v8 polyfill stub (workerd doesn't support node:v8) - Move zod from devDependencies to dependencies (needed at runtime) - Remove obsolete DO storage isolation tests (API removed in v4 rewrite) --- packages/vitest-pool-workers/package.json | 12 +- .../vitest-pool-workers/src/pool/index.ts | 5 + .../vitest-pool-workers/src/worker/node/v8.ts | 11 + .../vitest-pool-workers/test/watch.test.ts | 200 +-- pnpm-lock.yaml | 1322 ++++++++++------- pnpm-workspace.yaml | 10 +- 6 files changed, 826 insertions(+), 734 deletions(-) create mode 100644 packages/vitest-pool-workers/src/worker/node/v8.ts diff --git a/packages/vitest-pool-workers/package.json b/packages/vitest-pool-workers/package.json index a8566b9b1fd3..3f59d855eda4 100644 --- a/packages/vitest-pool-workers/package.json +++ b/packages/vitest-pool-workers/package.json @@ -54,7 +54,8 @@ "cjs-module-lexer": "^1.2.3", "esbuild": "catalog:default", "miniflare": "workspace:*", - "wrangler": "workspace:*" + "wrangler": "workspace:*", + "zod": "^3.25.76" }, "devDependencies": { "@cloudflare/eslint-config-shared": "workspace:*", @@ -77,13 +78,12 @@ "tsdown": "0.16.3", "typescript": "catalog:default", "undici": "catalog:default", - "vitest": "catalog:default", - "zod": "^3.25.76" + "vitest": "catalog:default" }, "peerDependencies": { - "@vitest/runner": "4.1.0-beta.1", - "@vitest/snapshot": "4.1.0-beta.1", - "vitest": "4.1.0-beta.1" + "@vitest/runner": "4.1.0-beta.4", + "@vitest/snapshot": "4.1.0-beta.4", + "vitest": "4.1.0-beta.4" }, "volta": { "extends": "../../package.json" diff --git a/packages/vitest-pool-workers/src/pool/index.ts b/packages/vitest-pool-workers/src/pool/index.ts index ff2c1cc6dff1..0d7571dabb27 100644 --- a/packages/vitest-pool-workers/src/pool/index.ts +++ b/packages/vitest-pool-workers/src/pool/index.ts @@ -502,6 +502,11 @@ async function buildProjectWorkerOptions( path: path.join(modulesRoot, "node:vm"), contents: fs.readFileSync(path.join(DIST_PATH, `worker/node/vm.mjs`)), }, + { + type: "ESModule", + path: path.join(modulesRoot, "node:v8"), + contents: fs.readFileSync(path.join(DIST_PATH, `worker/node/v8.mjs`)), + }, ]; // Build array of workers contributed by the workspace diff --git a/packages/vitest-pool-workers/src/worker/node/v8.ts b/packages/vitest-pool-workers/src/worker/node/v8.ts new file mode 100644 index 000000000000..c9c22fb5d17a --- /dev/null +++ b/packages/vitest-pool-workers/src/worker/node/v8.ts @@ -0,0 +1,11 @@ +// Stub polyfill for node:v8 — workerd doesn't natively support this module. +// Vitest 4.1.0-beta.4 imports node:v8 to check `v8.startupSnapshot.isBuildingSnapshot()` +// which should always return false in workerd. + +export const startupSnapshot = { + isBuildingSnapshot() { + return false; + }, +}; + +export default { startupSnapshot }; diff --git a/packages/vitest-pool-workers/test/watch.test.ts b/packages/vitest-pool-workers/test/watch.test.ts index c01b5e3c7f75..c2d0bf5fc58f 100644 --- a/packages/vitest-pool-workers/test/watch.test.ts +++ b/packages/vitest-pool-workers/test/watch.test.ts @@ -1,204 +1,8 @@ import dedent from "ts-dedent"; import { test, vitestConfig, waitFor } from "./helpers"; -const durableObjectWorker = dedent` - export class Counter { - count = 0; - - constructor(readonly state: DurableObjectState) { - void state.blockConcurrencyWhile(async () => { - this.count = (await state.storage.get("count")) ?? 0; - }); - } - - fetch(request: Request) { - this.count++; - void this.state.storage.put("count", this.count); - return new Response(this.count.toString()); - } - } - - export default { - fetch(request: Request, env: any) { - const { pathname } = new URL(request.url); - const id = env.COUNTER.idFromName(pathname); - const stub = env.COUNTER.get(id); - return stub.fetch(request); - } - } -`; - -function makeDurableObjectConfig(isolatedStorage: boolean) { - return dedent` - import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; - export default defineWorkersConfig({ - test: { - poolOptions: { - workers: { - main: "./index.ts", - singleWorker: true, - isolatedStorage: ${isolatedStorage}, - miniflare: { - compatibilityDate: "2024-01-01", - compatibilityFlags: ["nodejs_compat"], - durableObjects: { - COUNTER: "Counter", - }, - }, - }, - }, - } - }); - `; -} - -// when isolatedStorage: true storage be reset at every test -const isolatedStorageTests = dedent` - import { SELF } from "cloudflare:test"; - import { it, expect } from "vitest"; - - it("first test: verifies incrementing works", async () => { - // First fetch returns 1 - let response = await SELF.fetch("https://example.com/test-path"); - expect(await response.text()).toBe("1"); - // Second fetch returns 2 (counter increments) - response = await SELF.fetch("https://example.com/test-path"); - expect(await response.text()).toBe("2"); - // Third fetch returns 3 - response = await SELF.fetch("https://example.com/test-path"); - expect(await response.text()).toBe("3"); - }); - - it("second test: storage is reset, starts at 1 again", async () => { - // With isolatedStorage: true, storage is reset between tests - const response = await SELF.fetch("https://example.com/test-path"); - expect(await response.text()).toBe("1"); - }); - - it("third test: storage is reset, starts at 1 again", async () => { - // With isolatedStorage: true, storage is reset between tests - const response = await SELF.fetch("https://example.com/test-path"); - expect(await response.text()).toBe("1"); - }); -`; - -// when isolatedStorage: false storage should leak in between tests -const sharedStorageTests = dedent` - import { SELF } from "cloudflare:test"; - import { it, expect } from "vitest"; - - it("first increment", async () => { - const response = await SELF.fetch("https://example.com/test-path"); - // First test in a run should always see "1" (storage reset between runs) - expect(await response.text()).toBe("1"); - }); - - it("second increment", async () => { - const response = await SELF.fetch("https://example.com/test-path"); - // With isolatedStorage: false, storage leaks between tests - expect(await response.text()).toBe("2"); - }); - - it("third increment", async () => { - const response = await SELF.fetch("https://example.com/test-path"); - // With isolatedStorage: false, storage leaks between tests - expect(await response.text()).toBe("3"); - }); -`; - -test( - "DO storage is reset between vitest runs (isolatedStorage: true)", - { timeout: 60_000 }, - async ({ expect, seed, vitestRun }) => { - await seed({ - "vitest.config.mts": makeDurableObjectConfig(true), - "index.ts": durableObjectWorker, - "index.test.ts": isolatedStorageTests, - }); - - let result = await vitestRun(); - expect(result.stdout).toMatch(/Tests.*3 passed/s); - expect(await result.exitCode).toBe(0); - - result = await vitestRun(); - expect(result.stdout).toMatch(/Tests.*3 passed/s); - expect(await result.exitCode).toBe(0); - } -); - -test( - "DO storage is reset between vitest runs (isolatedStorage: false)", - { timeout: 60_000 }, - async ({ expect, seed, vitestRun }) => { - await seed({ - "vitest.config.mts": makeDurableObjectConfig(false), - "index.ts": durableObjectWorker, - "index.test.ts": sharedStorageTests, - }); - - let result = await vitestRun(); - expect(result.stdout).toMatch(/Tests.*3 passed/s); - expect(await result.exitCode).toBe(0); - - result = await vitestRun(); - expect(result.stdout).toMatch(/Tests.*3 passed/s); - expect(await result.exitCode).toBe(0); - } -); - -test( - "DO storage is reset in watch mode (isolatedStorage: true)", - { timeout: 50000 }, - async ({ expect, seed, vitestDev }) => { - await seed({ - "vitest.config.mts": makeDurableObjectConfig(true), - "index.ts": durableObjectWorker, - "index.test.ts": isolatedStorageTests, - }); - - const result = vitestDev(); - - await waitFor(() => { - expect(result.stdout).toMatch(/Tests.*3 passed/s); - }); - - await seed({ - "index.test.ts": isolatedStorageTests + "\n// trigger re-run", - }); - - await waitFor(() => { - const matches = result.stdout.match(/Tests\s+3 passed/g); - expect(matches?.length).toBeGreaterThanOrEqual(2); - }); - } -); - -test( - "DO storage is reset in watch mode (isolatedStorage: false)", - { timeout: 50000 }, - async ({ expect, seed, vitestDev }) => { - await seed({ - "vitest.config.mts": makeDurableObjectConfig(false), - "index.ts": durableObjectWorker, - "index.test.ts": sharedStorageTests, - }); - - const result = vitestDev(); - - await waitFor(() => { - expect(result.stdout).toMatch(/Tests.*3 passed/s); - }); - - await seed({ - "index.test.ts": sharedStorageTests + "\n// trigger re-run", - }); - - await waitFor(() => { - const matches = result.stdout.match(/Tests\s+3 passed/g); - expect(matches?.length).toBeGreaterThanOrEqual(2); - }); - } -); +// NOTE: The DO storage isolation tests (isolatedStorage/singleWorker) were removed +// because these features were dropped in the vitest 4 pool rewrite. test("automatically re-runs unit tests", async ({ expect, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bd31ddad99a3..e53929ab52d1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,9 +6,6 @@ settings: catalogs: default: - '@cloudflare/vitest-pool-workers': - specifier: ^0.10.11 - version: 0.10.15 '@cloudflare/workers-types': specifier: ^4.20260217.0 version: 4.20260217.0 @@ -19,14 +16,14 @@ catalogs: specifier: ^8.35.1 version: 8.46.3 '@vitest/runner': - specifier: ~3.2.0 - version: 3.2.3 + specifier: 4.1.0-beta.4 + version: 4.1.0-beta.4 '@vitest/snapshot': - specifier: ~3.2.0 - version: 3.2.3 + specifier: 4.1.0-beta.4 + version: 4.1.0-beta.4 '@vitest/ui': - specifier: ~3.2.0 - version: 3.2.3 + specifier: 4.1.0-beta.4 + version: 4.1.0-beta.4 capnp-es: specifier: ^0.0.14 version: 0.0.14 @@ -42,6 +39,9 @@ catalogs: jsonc-parser: specifier: ^3.2.0 version: 3.2.0 + msw: + specifier: 2.12.4 + version: 2.12.4 playwright-chromium: specifier: ^1.56.1 version: 1.56.1 @@ -58,11 +58,11 @@ catalogs: specifier: 7.18.2 version: 7.18.2 vite: - specifier: ^5.4.14 - version: 5.4.14 + specifier: ^7.3.1 + version: 7.3.1 vitest: - specifier: ~3.2.0 - version: 3.2.3 + specifier: 4.1.0-beta.4 + version: 4.1.0-beta.4 ws: specifier: 8.18.0 version: 8.18.0 @@ -70,6 +70,16 @@ catalogs: vite: specifier: 7.1.12 version: 7.1.12 + vitest-3: + '@cloudflare/vitest-pool-workers': + specifier: ^0.10.0 + version: 0.10.15 + '@vitest/ui': + specifier: 3.2.4 + version: 3.2.4 + vitest: + specifier: 3.2.4 + version: 3.2.4 overrides: '@types/react-dom@18>@types/react': ^18 @@ -77,8 +87,9 @@ overrides: '@types/react-transition-group>@types/react': ^18 '@cloudflare/elements>@types/react': ^18 '@types/node': ^20.19.9 - vitest>vite: ^5.0.0 '@types/node>undici-types': 7.18.2 + vitest@4>vite: 7.1.12 + vitest@3>vite: ^5.0.0 patchedDependencies: '@cloudflare/component-listbox@1.10.6': @@ -154,10 +165,10 @@ importers: version: 5.8.3 vite: specifier: catalog:default - version: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) + version: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) fixtures/additional-modules: devDependencies: @@ -178,7 +189,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -205,7 +216,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -247,7 +258,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -271,7 +282,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -298,7 +309,7 @@ importers: version: 7.1.12(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -316,7 +327,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -337,7 +348,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -376,7 +387,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -406,7 +417,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -430,7 +441,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -457,7 +468,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -481,7 +492,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) fixtures/isomorphic-random-example: {} @@ -509,7 +520,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -545,7 +556,7 @@ importers: version: 7.0.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -573,7 +584,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -613,7 +624,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -634,7 +645,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -670,7 +681,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -694,7 +705,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -718,7 +729,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -749,7 +760,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -773,7 +784,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -794,7 +805,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -818,7 +829,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -842,7 +853,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -866,7 +877,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -909,7 +920,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -933,7 +944,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -951,7 +962,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -975,7 +986,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -999,7 +1010,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1020,7 +1031,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1041,7 +1052,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1062,7 +1073,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1083,7 +1094,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1104,7 +1115,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1125,7 +1136,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1149,7 +1160,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1167,7 +1178,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1185,7 +1196,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1260,7 +1271,7 @@ importers: version: 4.20260217.0 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1294,6 +1305,9 @@ importers: fixtures/vitest-pool-workers-examples: devDependencies: + '@better-auth/stripe': + specifier: ^1.4.6 + version: 1.4.18(@better-auth/core@1.4.18(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@5.9.3)(kysely@0.28.11)(nanostores@1.1.0))(better-auth@1.4.18(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.1.0-beta.4))(stripe@20.3.1(@types/node@20.19.9)) '@cloudflare/containers': specifier: ^0.0.25 version: 0.0.25 @@ -1315,6 +1329,12 @@ importers: '@types/node': specifier: ^20.19.9 version: 20.19.9 + '@types/nunjucks': + specifier: ^3.2.6 + version: 3.2.6 + better-auth: + specifier: ^1.4.6 + version: 1.4.18(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.1.0-beta.4) discord-api-types: specifier: 0.37.98 version: 0.37.98 @@ -1322,7 +1342,7 @@ importers: specifier: file:./module-resolution/vendor/ext-dep version: file:fixtures/vitest-pool-workers-examples/module-resolution/vendor/ext-dep jose: - specifier: ^5.2.2 + specifier: ^5.9.3 version: 5.9.3 mime-types: specifier: ^2.1.35 @@ -1330,9 +1350,18 @@ importers: miniflare: specifier: workspace:* version: link:../../packages/miniflare + msw: + specifier: catalog:default + version: 2.12.4(@types/node@20.19.9)(typescript@5.8.3) + nunjucks: + specifier: ^3.2.4 + version: 3.2.4(chokidar@3.6.0) run-script-os: specifier: ^1.1.6 version: 1.1.6 + stripe: + specifier: ^20.0.0 + version: 20.3.1(@types/node@20.19.9) toucan-js: specifier: 4.0.0 version: 4.0.0(patch_hash=qxsfpdzvzbhq2ecirbu5xq4vlq) @@ -1341,10 +1370,10 @@ importers: version: 5.8.3 vite: specifier: catalog:default - version: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) + version: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1362,7 +1391,7 @@ importers: version: 5.8.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.2))(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.2))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1410,7 +1439,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1428,7 +1457,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1461,7 +1490,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1485,7 +1514,7 @@ importers: version: 2.2.3 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1518,7 +1547,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1542,7 +1571,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1566,7 +1595,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1590,7 +1619,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1614,7 +1643,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1650,7 +1679,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1666,6 +1695,9 @@ importers: '@cloudflare/workers-types': specifier: catalog:default version: 4.20260217.0 + '@types/node': + specifier: ^20.19.9 + version: 20.19.9 playwright-chromium: specifier: catalog:default version: 1.56.1 @@ -1677,7 +1709,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1701,7 +1733,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1722,7 +1754,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) wrangler: specifier: workspace:* version: link:../../packages/wrangler @@ -1783,7 +1815,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) packages/create-cloudflare: devDependencies: @@ -1924,13 +1956,13 @@ importers: version: 7.18.2 vite: specifier: catalog:default - version: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) + version: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) vite-tsconfig-paths: specifier: ^4.0.8 - version: 4.2.0(typescript@5.8.3)(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) + version: 4.2.0(typescript@5.8.3)(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) vitest: - specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + specifier: catalog:vitest-3 + version: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) which-pm-runs: specifier: ^1.1.0 version: 1.1.0 @@ -2073,8 +2105,8 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260217.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9) + specifier: catalog:vitest-3 + version: 0.10.15(@cloudflare/workers-types@4.20260217.0)(@vitest/runner@4.1.0-beta.4)(@vitest/snapshot@4.1.0-beta.4)(vitest@3.2.4) '@cloudflare/workers-types': specifier: catalog:default version: 4.20260217.0 @@ -2094,8 +2126,8 @@ importers: specifier: 8.3.0 version: 8.3.0(@microsoft/api-extractor@7.52.8(@types/node@20.19.9))(jiti@2.6.1)(postcss@8.5.6)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1) vitest: - specifier: ~2.1.0 - version: 2.1.9(@types/node@20.19.9)(@vitest/ui@2.1.9)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3)) + specifier: catalog:vitest-3 + version: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(tsx@4.21.0)(yaml@2.8.1) packages/local-explorer-ui: dependencies: @@ -2104,13 +2136,13 @@ importers: version: 1.1.0(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1) '@cloudflare/kumo': specifier: ^1.5.0 - version: 1.5.0(@phosphor-icons/react@2.1.10(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1) + version: 1.5.0(@phosphor-icons/react@2.1.10(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(zod@4.3.6) '@phosphor-icons/react': specifier: ^2.1.10 version: 2.1.10(react-dom@19.2.1(react@19.2.1))(react@19.2.1) '@tailwindcss/vite': specifier: ^4.0.15 - version: 4.0.15(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) + version: 4.0.15(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) '@tanstack/react-router': specifier: ^1.158.0 version: 1.158.0(react-dom@19.2.1(react@19.2.1))(react@19.2.1) @@ -2138,7 +2170,7 @@ importers: version: 1.158.0(@tanstack/react-router@1.158.0(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(@tanstack/router-core@1.158.0)(csstype@3.2.3)(react-dom@19.2.1(react@19.2.1))(react@19.2.1) '@tanstack/router-plugin': specifier: ^1.158.0 - version: 1.158.0(@tanstack/react-router@1.158.0(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) + version: 1.158.0(@tanstack/react-router@1.158.0(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) '@types/react': specifier: ^19.2.0 version: 19.2.10 @@ -2147,7 +2179,7 @@ importers: version: 19.2.3(@types/react@19.2.10) '@vitejs/plugin-react': specifier: ^4.4.1 - version: 4.7.0(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) + version: 4.7.0(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) concurrently: specifier: ^9.0.0 version: 9.2.1 @@ -2156,13 +2188,13 @@ importers: version: 5.8.3 vite: specifier: catalog:default - version: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) + version: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) vite-plugin-svgr: specifier: ^4.3.0 - version: 4.5.0(rollup@4.44.1)(typescript@5.8.3)(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) + version: 4.5.0(rollup@4.44.1)(typescript@5.8.3)(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) packages/miniflare: dependencies: @@ -2328,7 +2360,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.7)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) which: specifier: ^2.0.2 version: 2.0.2 @@ -2379,8 +2411,8 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260217.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3) + specifier: catalog:vitest-3 + version: 0.10.15(@cloudflare/workers-types@4.20260217.0)(@vitest/runner@4.1.0-beta.4)(@vitest/snapshot@4.1.0-beta.4)(vitest@3.2.4) '@cloudflare/workers-shared': specifier: workspace:* version: link:../workers-shared @@ -2409,8 +2441,8 @@ importers: specifier: catalog:default version: 5.8.3 vitest: - specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + specifier: catalog:vitest-3 + version: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) packages/playground-preview-worker: dependencies: @@ -2635,8 +2667,8 @@ importers: specifier: catalog:vite-plugin version: 7.1.12(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) vitest: - specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + specifier: catalog:vitest-3 + version: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) packages/vite-plugin-cloudflare/playground: devDependencies: @@ -2658,6 +2690,9 @@ importers: typescript: specifier: catalog:default version: 5.8.3 + vitest: + specifier: catalog:vitest-3 + version: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) packages/vite-plugin-cloudflare/playground/additional-modules: devDependencies: @@ -3730,6 +3765,9 @@ importers: wrangler: specifier: workspace:* version: link:../wrangler + zod: + specifier: ^3.25.76 + version: 3.25.76 devDependencies: '@cloudflare/eslint-config-shared': specifier: workspace:* @@ -3754,10 +3792,10 @@ importers: version: 7.5.1 '@vitest/runner': specifier: catalog:default - version: 3.2.3 + version: 4.1.0-beta.4 '@vitest/snapshot': specifier: catalog:default - version: 3.2.3 + version: 4.1.0-beta.4 birpc: specifier: 0.2.14 version: 0.2.14 @@ -3782,6 +3820,9 @@ importers: ts-dedent: specifier: ^2.2.0 version: 2.2.0 + tsdown: + specifier: 0.16.3 + version: 0.16.3(ms@2.1.3)(typescript@5.8.3) typescript: specifier: catalog:default version: 5.8.3 @@ -3790,10 +3831,7 @@ importers: version: 7.18.2 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) - zod: - specifier: ^3.25.76 - version: 3.25.76 + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) packages/workers-editor-shared: dependencies: @@ -3818,7 +3856,7 @@ importers: version: 18.3.3 '@vitejs/plugin-react': specifier: ^4.3.3 - version: 4.3.3(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) + version: 4.3.3(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) eslint: specifier: catalog:default version: 9.39.1(jiti@2.6.1) @@ -3833,10 +3871,10 @@ importers: version: 5.8.3 vite: specifier: catalog:default - version: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) + version: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) vite-plugin-dts: specifier: ^4.0.1 - version: 4.0.1(@types/node@20.19.9)(rollup@4.44.1)(typescript@5.8.3)(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) + version: 4.0.1(@types/node@20.19.9)(rollup@4.44.1)(typescript@5.8.3)(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) packages/workers-playground: dependencies: @@ -3939,7 +3977,7 @@ importers: version: 9.0.4 '@vitejs/plugin-react': specifier: ^4.3.3 - version: 4.3.3(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) + version: 4.3.3(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@3.12.10)(yaml@2.8.1)) eslint: specifier: catalog:default version: 9.39.1(jiti@2.6.1) @@ -3954,7 +3992,7 @@ importers: version: 7.18.2 vite: specifier: catalog:default - version: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) + version: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@3.12.10)(yaml@2.8.1) wrangler: specifier: workspace:^ version: link:../wrangler @@ -3965,8 +4003,8 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260217.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9) + specifier: catalog:vitest-3 + version: 0.10.15(@cloudflare/workers-types@4.20260217.0)(@vitest/runner@4.1.0-beta.4)(@vitest/snapshot@4.1.0-beta.4)(vitest@3.2.4) '@cloudflare/workers-tsconfig': specifier: workspace:* version: link:../workers-tsconfig @@ -3998,8 +4036,8 @@ importers: specifier: catalog:default version: 5.8.3 vitest: - specifier: ~2.1.0 - version: 2.1.9(@types/node@20.19.9)(@vitest/ui@2.1.9)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3)) + specifier: catalog:vitest-3 + version: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) zod: specifier: ^3.25.76 version: 3.25.76 @@ -4025,7 +4063,7 @@ importers: version: 20.19.9 '@vitest/ui': specifier: catalog:default - version: 3.2.3(vitest@3.2.3) + version: 4.1.0-beta.4(vitest@4.1.0-beta.4) cloudflare: specifier: ^5.2.0 version: 5.2.0(encoding@0.1.13) @@ -4058,7 +4096,7 @@ importers: version: 5.8.3 vitest: specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + version: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) xdg-app-paths: specifier: ^8.3.0 version: 8.3.0 @@ -4082,8 +4120,8 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260217.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3) + specifier: catalog:vitest-3 + version: 0.10.15(@cloudflare/workers-types@4.20260217.0)(@vitest/runner@4.1.0-beta.4)(@vitest/snapshot@4.1.0-beta.4)(vitest@3.2.4) '@cloudflare/workers-tsconfig': specifier: workspace:* version: link:../workers-tsconfig @@ -4103,8 +4141,8 @@ importers: specifier: catalog:default version: 5.8.3 vitest: - specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + specifier: catalog:vitest-3 + version: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) packages/wrangler: dependencies: @@ -4240,8 +4278,8 @@ importers: specifier: ^17.0.22 version: 17.0.24 '@vitest/ui': - specifier: catalog:default - version: 3.2.3(vitest@3.2.3) + specifier: catalog:vitest-3 + version: 3.2.4(vitest@3.2.4) '@webcontainer/env': specifier: ^1.1.0 version: 1.1.0 @@ -4336,8 +4374,8 @@ importers: specifier: ^9.3.1 version: 9.3.1 msw: - specifier: 2.12.0 - version: 2.12.0(@types/node@20.19.9)(typescript@5.8.3) + specifier: catalog:default + version: 2.12.4(@types/node@20.19.9)(typescript@5.8.3) node-forge: specifier: ^1.3.1 version: 1.3.1 @@ -4405,11 +4443,11 @@ importers: specifier: ^1.5.4 version: 1.5.4 vitest: - specifier: catalog:default - version: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + specifier: catalog:vitest-3 + version: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) vitest-websocket-mock: specifier: ^0.4.0 - version: 0.4.0(vitest@3.2.3) + version: 0.4.0(vitest@3.2.4) ws: specifier: catalog:default version: 8.18.0 @@ -4891,6 +4929,34 @@ packages: '@types/react': optional: true + '@better-auth/core@1.4.18': + resolution: {integrity: sha512-q+awYgC7nkLEBdx2sW0iJjkzgSHlIxGnOpsN1r/O1+a4m7osJNHtfK2mKJSL1I+GfNyIlxJF8WvD/NLuYMpmcg==} + peerDependencies: + '@better-auth/utils': 0.3.0 + '@better-fetch/fetch': 1.1.21 + better-call: 1.1.8 + jose: ^6.1.0 + kysely: ^0.28.5 + nanostores: ^1.0.1 + + '@better-auth/stripe@1.4.18': + resolution: {integrity: sha512-T1vUPHEnzd3/gQH2e9BigfqcaOZ3W+jBVlfHpXZVGoat1oKFPtKnJ3OHmfU1MwSCjNSdIFllrN6U6DhsQlZoEQ==} + peerDependencies: + '@better-auth/core': 1.4.18 + better-auth: 1.4.18 + stripe: ^18 || ^19 || ^20 + + '@better-auth/telemetry@1.4.18': + resolution: {integrity: sha512-e5rDF8S4j3Um/0LIVATL2in9dL4lfO2fr2v1Wio4qTMRbfxqnUDTa+6SZtwdeJrbc4O+a3c+IyIpjG9Q/6GpfQ==} + peerDependencies: + '@better-auth/core': 1.4.18 + + '@better-auth/utils@0.3.0': + resolution: {integrity: sha512-W+Adw6ZA6mgvnSnhOki270rwJ42t4XzSK6YWGF//BbVXL6SwCLWfyzBc1lN2m/4RM28KubdBKQ4X5VMoLRNPQw==} + + '@better-fetch/fetch@1.1.21': + resolution: {integrity: sha512-/ImESw0sskqlVR94jB+5+Pxjf+xBwDZF/N5+y2/q4EqD7IARUTSpPfIo8uf39SYpCxyOCtbyYpUrZ3F/k0zT4A==} + '@bomb.sh/tab@0.0.12': resolution: {integrity: sha512-dYRwg4MqfHR5/BcTy285XOGRhjQFmNpaJBZ0tl2oU+RY595MQ5ApTF6j3OvauPAooHL6cfoOZMySQrOQztT8RQ==} hasBin: true @@ -6910,6 +6976,14 @@ packages: engines: {node: '>=18.14.0'} hasBin: true + '@noble/ciphers@2.1.1': + resolution: {integrity: sha512-bysYuiVfhxNJuldNXlFEitTVdNnYUc+XNJZd7Qm2a5j1vZHgY+fazadNFWFaMK/2vye0JVlxV3gHmC0WDfAOQw==} + engines: {node: '>= 20.19.0'} + + '@noble/hashes@2.0.1': + resolution: {integrity: sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw==} + engines: {node: '>= 20.19.0'} + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -8127,6 +8201,9 @@ packages: '@standard-schema/spec@1.0.0': resolution: {integrity: sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==} + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + '@styled-system/background@5.1.2': resolution: {integrity: sha512-jtwH2C/U6ssuGSvwTN3ri/IyjdHb8W9X/g8Y0JLcrH02G+BW3OS8kZdHphF1/YyRklnrKrBT2ngwGUK6aqqV3A==} @@ -8555,6 +8632,9 @@ packages: '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} + '@types/nunjucks@3.2.6': + resolution: {integrity: sha512-pHiGtf83na1nCzliuAdq8GowYiXvH5l931xZ0YEHaLMNFgynpEqx+IPStlu7UaDkehfvl01e4x/9Tpwhy7Ue3w==} + '@types/pg@8.11.6': resolution: {integrity: sha512-/2WmmBXHLsfRqzfHW7BNZ8SbYzE8OSk7i3WjFYvfgRHj7S1xj+16Je5fUKv3lVdVzk/zn9TXOqf+avFCFIE0yQ==} @@ -8636,8 +8716,8 @@ packages: '@types/stack-utils@2.0.3': resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} - '@types/statuses@2.0.5': - resolution: {integrity: sha512-jmIUGWrAiwu3dZpxntxieC+1n/5c3mjrImkmOSQ2NC5uP6cYO4aAZDdSmRcI5C1oiTmqlZGHC+/NmJrKogbP5A==} + '@types/statuses@2.0.6': + resolution: {integrity: sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA==} '@types/stoppable@1.1.3': resolution: {integrity: sha512-7wGKIBJGE4ZxFjk9NkjAxZMLlIXroETqP1FJCdoSvKmEznwmBxQFmTB1dsCkAvVcNemuSZM5qkkd9HE/NL2JTw==} @@ -8838,28 +8918,28 @@ packages: peerDependencies: vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 - '@vitest/expect@2.1.9': - resolution: {integrity: sha512-UJCIkTBenHeKT1TTlKMJWy1laZewsRIzYighyYiJKZreqtdxSos/S1t+ktRMQWu2CKqaarrkeszJx1cgC5tGZw==} + '@vitest/expect@3.2.4': + resolution: {integrity: sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==} - '@vitest/expect@3.2.3': - resolution: {integrity: sha512-W2RH2TPWVHA1o7UmaFKISPvdicFJH+mjykctJFoAkUw+SPTJTGjUNdKscFBrqM7IPnCVu6zihtKYa7TkZS1dkQ==} + '@vitest/expect@4.1.0-beta.4': + resolution: {integrity: sha512-50CzsTy9kVrlI7V0Ot63jPb5q069r1Xn/z489q/pWmFImEUC30oiO9gaRInkWUmgHpSZTO8E9rSdu6jFZwRHjg==} - '@vitest/mocker@2.1.9': - resolution: {integrity: sha512-tVL6uJgoUdi6icpxmdrn5YNo3g3Dxv+IHJBr0GXHaEdTcw3F+cPKnsXFhli6nO+f/6SDKPHEK1UN+k+TQv0Ehg==} + '@vitest/mocker@3.2.4': + resolution: {integrity: sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==} peerDependencies: msw: ^2.4.9 - vite: ^5.0.0 + vite: ^5.0.0 || ^6.0.0 || ^7.0.0-0 peerDependenciesMeta: msw: optional: true vite: optional: true - '@vitest/mocker@3.2.3': - resolution: {integrity: sha512-cP6fIun+Zx8he4rbWvi+Oya6goKQDZK+Yq4hhlggwQBbrlOQ4qtZ+G4nxB6ZnzI9lyIb+JnvyiJnPC2AGbKSPA==} + '@vitest/mocker@4.1.0-beta.4': + resolution: {integrity: sha512-JIHUUrevhes/tP8U3TqPHo/n8lmruITvC9YdnbYyA+L0Y9zyYZ5zW/07+i/aXpmabtxIiJG7eKIv2ootcBu4Vw==} peerDependencies: msw: ^2.4.9 - vite: ^5.0.0 || ^6.0.0 || ^7.0.0-0 + vite: ^6.0.0 || ^7.0.0-0 peerDependenciesMeta: msw: optional: true @@ -8869,48 +8949,48 @@ packages: '@vitest/pretty-format@2.1.8': resolution: {integrity: sha512-9HiSZ9zpqNLKlbIDRWOnAWqgcA7xu+8YxXSekhr0Ykab7PAYFkhkwoqVArPOtJhPmYeE2YHgKZlj3CP36z2AJQ==} - '@vitest/pretty-format@2.1.9': - resolution: {integrity: sha512-KhRIdGV2U9HOUzxfiHmY8IFHTdqtOhIzCpd8WRdJiE7D/HUcZVD0EgQCVjm+Q9gkUXWgBvMmTtZgIG48wq7sOQ==} + '@vitest/pretty-format@3.2.4': + resolution: {integrity: sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==} - '@vitest/pretty-format@3.2.3': - resolution: {integrity: sha512-yFglXGkr9hW/yEXngO+IKMhP0jxyFw2/qys/CK4fFUZnSltD+MU7dVYGrH8rvPcK/O6feXQA+EU33gjaBBbAng==} + '@vitest/pretty-format@4.1.0-beta.4': + resolution: {integrity: sha512-rAJOtUSRzgobQtuW98WV3bSkomdILArhgSc4JQ5G6Et0eaD6DTeMpr+k7B//F/xYG7oVeuabOTx3EWu06ILCgA==} - '@vitest/runner@2.1.9': - resolution: {integrity: sha512-ZXSSqTFIrzduD63btIfEyOmNcBmQvgOVsPNPe0jYtESiXkhd8u2erDLnMxmGrDCwHCCHE7hxwRDCT3pt0esT4g==} + '@vitest/runner@3.2.4': + resolution: {integrity: sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==} - '@vitest/runner@3.2.3': - resolution: {integrity: sha512-83HWYisT3IpMaU9LN+VN+/nLHVBCSIUKJzGxC5RWUOsK1h3USg7ojL+UXQR3b4o4UBIWCYdD2fxuzM7PQQ1u8w==} + '@vitest/runner@4.1.0-beta.4': + resolution: {integrity: sha512-/uhv354dTwbqiDCAk9IUCVXNBGByn40Xh8DkJ5EdzqEYN3aw5x25OmmpxpSjxlkBkoxQEUP3zg6WOUGeTYKoOw==} - '@vitest/snapshot@2.1.9': - resolution: {integrity: sha512-oBO82rEjsxLNJincVhLhaxxZdEtV0EFHMK5Kmx5sJ6H9L183dHECjiefOAdnqpIgT5eZwT04PoggUnW88vOBNQ==} + '@vitest/snapshot@3.2.4': + resolution: {integrity: sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==} - '@vitest/snapshot@3.2.3': - resolution: {integrity: sha512-9gIVWx2+tysDqUmmM1L0hwadyumqssOL1r8KJipwLx5JVYyxvVRfxvMq7DaWbZZsCqZnu/dZedaZQh4iYTtneA==} + '@vitest/snapshot@4.1.0-beta.4': + resolution: {integrity: sha512-ukET4KPzUZgCD1flrQFuhuXS9J2/c6bzMoRCCmjB12+JwwgYvxCEE6wURZXRUjwcA6jD2HCpxeKiVq/4Ojz0EQ==} - '@vitest/spy@2.1.9': - resolution: {integrity: sha512-E1B35FwzXXTs9FHNK6bDszs7mtydNi5MIfUWpceJ8Xbfb1gBMscAnwLbEu+B44ed6W3XjL9/ehLPHR1fkf1KLQ==} + '@vitest/spy@3.2.4': + resolution: {integrity: sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==} - '@vitest/spy@3.2.3': - resolution: {integrity: sha512-JHu9Wl+7bf6FEejTCREy+DmgWe+rQKbK+y32C/k5f4TBIAlijhJbRBIRIOCEpVevgRsCQR2iHRUH2/qKVM/plw==} + '@vitest/spy@4.1.0-beta.4': + resolution: {integrity: sha512-aRsQ3vLSKbEifcMufUXAp1OCBcLEWDDmGAItaVa2WDwh08pxcpoDCCfchCDDYjftajq5Mi22ZNN9Afy9IW4ZJw==} - '@vitest/ui@2.1.9': - resolution: {integrity: sha512-izzd2zmnk8Nl5ECYkW27328RbQ1nKvkm6Bb5DAaz1Gk59EbLkiCMa6OLT0NoaAYTjOFS6N+SMYW1nh4/9ljPiw==} + '@vitest/ui@3.2.4': + resolution: {integrity: sha512-hGISOaP18plkzbWEcP/QvtRW1xDXF2+96HbEX6byqQhAUbiS5oH6/9JwW+QsQCIYON2bI6QZBF+2PvOmrRZ9wA==} peerDependencies: - vitest: 2.1.9 + vitest: 3.2.4 - '@vitest/ui@3.2.3': - resolution: {integrity: sha512-9aR2tY/WT7GRHGEH/9sSIipJqeA21Eh3C6xmiOVmfyBCFmezUSUFLalpaSmRHlRzWCKQU10yz3AHhKuYcdnZGQ==} + '@vitest/ui@4.1.0-beta.4': + resolution: {integrity: sha512-ls/+b2iM34IRacIzUClZwSdpvkg+L0Zz40m/Z6lKFUUXk1hG/bYgGTj5s4bykxrbgIsFRuTXr00HwmxDWx6VlA==} peerDependencies: - vitest: 3.2.3 + vitest: 4.1.0-beta.4 '@vitest/utils@2.1.8': resolution: {integrity: sha512-dwSoui6djdwbfFmIgbIjX2ZhIoG7Ex/+xpxyiEgIGzjliY8xGkcpITKTlp6B4MgtGkF2ilvm97cPM96XZaAgcA==} - '@vitest/utils@2.1.9': - resolution: {integrity: sha512-v0psaMSkNJ3A2NMrUEHFRzJtDPFn+/VWZ5WxImB21T9fjucJRmS7xCS3ppEnARb9y11OAzaD+P2Ps+b+BGX5iQ==} + '@vitest/utils@3.2.4': + resolution: {integrity: sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==} - '@vitest/utils@3.2.3': - resolution: {integrity: sha512-4zFBCU5Pf+4Z6v+rwnZ1HU1yzOKKvDkMXZrymE2PBlbjKJRlrOxbvpfPSvJTGRIwGoahaOGvp+kbCoxifhzJ1Q==} + '@vitest/utils@4.1.0-beta.4': + resolution: {integrity: sha512-c6oj0FpdLwmOisNpeVwhXqwe9Harehj+n9Pfz4/Iv45dSR32VHDzK2uosqT2ocCZhgzXwX4xpL8thl2Wr/wyrw==} '@volar/language-core@2.3.4': resolution: {integrity: sha512-wXBhY11qG6pCDAqDnbBRFIDSIwbqkWI7no+lj5+L7IlA7HRIjRP7YQLGzT0LF4lS6eHkMSsclXqy9DwYJasZTQ==} @@ -8978,6 +9058,9 @@ packages: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} hasBin: true + a-sync-waterfall@1.0.1: + resolution: {integrity: sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA==} + abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} @@ -9156,6 +9239,9 @@ packages: resolution: {integrity: sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==} engines: {node: '>= 0.4'} + asap@2.0.6: + resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} + asn1@0.2.6: resolution: {integrity: sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==} @@ -9288,6 +9374,76 @@ packages: before-after-hook@2.2.3: resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==} + better-auth@1.4.18: + resolution: {integrity: sha512-bnyifLWBPcYVltH3RhS7CM62MoelEqC6Q+GnZwfiDWNfepXoQZBjEvn4urcERC7NTKgKq5zNBM8rvPvRBa6xcg==} + peerDependencies: + '@lynx-js/react': '*' + '@prisma/client': ^5.0.0 || ^6.0.0 || ^7.0.0 + '@sveltejs/kit': ^2.0.0 + '@tanstack/react-start': ^1.0.0 + '@tanstack/solid-start': ^1.0.0 + better-sqlite3: ^12.0.0 + drizzle-kit: '>=0.31.4' + drizzle-orm: '>=0.41.0' + mongodb: ^6.0.0 || ^7.0.0 + mysql2: ^3.0.0 + next: ^14.0.0 || ^15.0.0 || ^16.0.0 + pg: ^8.0.0 + prisma: ^5.0.0 || ^6.0.0 || ^7.0.0 + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + solid-js: ^1.0.0 + svelte: ^4.0.0 || ^5.0.0 + vitest: ^2.0.0 || ^3.0.0 || ^4.0.0 + vue: ^3.0.0 + peerDependenciesMeta: + '@lynx-js/react': + optional: true + '@prisma/client': + optional: true + '@sveltejs/kit': + optional: true + '@tanstack/react-start': + optional: true + '@tanstack/solid-start': + optional: true + better-sqlite3: + optional: true + drizzle-kit: + optional: true + drizzle-orm: + optional: true + mongodb: + optional: true + mysql2: + optional: true + next: + optional: true + pg: + optional: true + prisma: + optional: true + react: + optional: true + react-dom: + optional: true + solid-js: + optional: true + svelte: + optional: true + vitest: + optional: true + vue: + optional: true + + better-call@1.1.8: + resolution: {integrity: sha512-XMQ2rs6FNXasGNfMjzbyroSwKwYbZ/T3IxruSS6U2MJRsSYh3wYtG3o6H00ZlKZ/C/UPOAD97tqgQJNsxyeTXw==} + peerDependencies: + zod: ^4.0.0 + peerDependenciesMeta: + zod: + optional: true + better-path-resolve@1.0.0: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} @@ -9441,14 +9597,14 @@ packages: caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} - chai@5.1.2: - resolution: {integrity: sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==} - engines: {node: '>=12'} - chai@5.2.0: resolution: {integrity: sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==} engines: {node: '>=12'} + chai@6.2.2: + resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==} + engines: {node: '>=18'} + chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} @@ -9594,6 +9750,10 @@ packages: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} engines: {node: '>= 6'} + commander@5.1.0: + resolution: {integrity: sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==} + engines: {node: '>= 6'} + commander@7.2.0: resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} engines: {node: '>= 10'} @@ -10226,6 +10386,9 @@ packages: es-module-lexer@1.7.0: resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} + es-module-lexer@2.0.0: + resolution: {integrity: sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw==} + es-object-atoms@1.0.0: resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} engines: {node: '>= 0.4'} @@ -10480,14 +10643,14 @@ packages: expect-type@0.15.0: resolution: {integrity: sha512-yWnriYB4e8G54M5/fAFj7rCIBiKs1HAACaY13kCz6Ku0dezjS9aMcfcdVK2X8Tv2tEV1BPz/wKfQ7WA4S/d8aA==} - expect-type@1.1.0: - resolution: {integrity: sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==} - engines: {node: '>=12.0.0'} - expect-type@1.2.1: resolution: {integrity: sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==} engines: {node: '>=12.0.0'} + expect-type@1.3.0: + resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==} + engines: {node: '>=12.0.0'} + expect@29.7.0: resolution: {integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -10902,8 +11065,8 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - graphql@16.8.1: - resolution: {integrity: sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==} + graphql@16.12.0: + resolution: {integrity: sha512-DKKrynuQRne0PNpEbzuEdHlYOMksHSUI8Zc9Unei5gTsMNA2/vMpoMz/yKba50pejK56qj98qM0SjYxAKi13gQ==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} gunzip-maybe@1.4.2: @@ -11491,6 +11654,9 @@ packages: jose@5.9.3: resolution: {integrity: sha512-egLIoYSpcd+QUF+UHgobt5YzI2Pkw/H39ou9suW687MY6PmCwPmkNV/4TNjn1p2tX5xO3j0d0sq5hiYE24bSlg==} + jose@6.1.3: + resolution: {integrity: sha512-0TpaTfihd4QMNwrz/ob2Bp7X04yuxJkjRGi4aKmOqwhov54i6u79oCv7T+C7lo70MKH6BesI3vscD1yb/yzKXQ==} + joycon@3.1.1: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} engines: {node: '>=10'} @@ -11617,6 +11783,10 @@ packages: resolution: {integrity: sha512-HzhziW6sc5m0pwi5M196+7cEBtbt0lCYi67wNsiwMUmz833wloE0gbzJPWKs1gliFKQb34huItDQX97LyOdPdA==} engines: {node: '>=18'} + kysely@0.28.11: + resolution: {integrity: sha512-zpGIFg0HuoC893rIjYX1BETkVWdDnzTzF5e0kWXJFg5lE0k1/LfNWBejrcnOFu8Q2Rfq/hTDTU7XLUM8QOrpzg==} + engines: {node: '>=20.0.0'} + levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -11862,6 +12032,9 @@ packages: loupe@3.1.3: resolution: {integrity: sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==} + loupe@3.2.1: + resolution: {integrity: sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==} + lowdb@1.0.0: resolution: {integrity: sha512-2+x8esE/Wb9SQ1F9IHaYWfsC9FIecLOPrK4g17FGEayjUWH172H6nwicRovGvSE2CPZouc2MCIqCI7h9d+GftQ==} engines: {node: '>=4'} @@ -12096,8 +12269,8 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - msw@2.12.0: - resolution: {integrity: sha512-jzf2eVnd8+iWXN74dccLrHUw3i3hFVvNVQRWS4vBl2KxaUt7Tdur0Eyda/DODGFkZDu2P5MXaeLe/9Qx8PZkrg==} + msw@2.12.4: + resolution: {integrity: sha512-rHNiVfTyKhzc0EjoXUBVGteNKBevdjOlVC6GlIRXpy+/3LHEIGRovnB5WPjcvmNODVQ1TNFnoa7wsGbd0V3epg==} engines: {node: '>=18'} hasBin: true peerDependencies: @@ -12141,6 +12314,10 @@ packages: engines: {node: ^18 || >=20} hasBin: true + nanostores@1.1.0: + resolution: {integrity: sha512-yJBmDJr18xy47dbNVlHcgdPrulSn1nhSE6Ns9vTG+Nx9VPT6iV1MD6aQFp/t52zpf82FhLLTXAXr30NuCnxvwA==} + engines: {node: ^20.0.0 || >=22.0.0} + napi-build-utils@2.0.0: resolution: {integrity: sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==} @@ -12232,6 +12409,16 @@ packages: nth-check@2.1.1: resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} + nunjucks@3.2.4: + resolution: {integrity: sha512-26XRV6BhkgK0VOxfbU5cQI+ICFUtMLixv1noZn1tGU38kQH5A5nmmbk/O45xdyBhD1esk47nKrY0mvQpZIhRjQ==} + engines: {node: '>= 6.9.0'} + hasBin: true + peerDependencies: + chokidar: ^3.3.0 + peerDependenciesMeta: + chokidar: + optional: true + nypm@0.6.1: resolution: {integrity: sha512-hlacBiRiv1k9hZFiphPUkfSQ/ZfQzZDzC+8z0wL3lvDAOUu/2NnChkKuMoMjNur/9OpKuz2QsIeiPVN0xM5Q0w==} engines: {node: ^14.16.0 || >=16.10.0} @@ -12292,6 +12479,9 @@ packages: ms: optional: true + obug@2.1.1: + resolution: {integrity: sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==} + ohash@2.0.11: resolution: {integrity: sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==} @@ -13378,6 +13568,9 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + rou3@0.7.12: + resolution: {integrity: sha512-iFE4hLDuloSWcD7mjdCDhx2bKcIsYbtOTpfH5MHHLSKMOUyjqQXTeZVa289uuwEGEKFoE/BAPbhaU4B774nceg==} + router@2.2.0: resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==} engines: {node: '>= 18'} @@ -13512,6 +13705,9 @@ packages: set-cookie-parser@2.6.0: resolution: {integrity: sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==} + set-cookie-parser@2.7.2: + resolution: {integrity: sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==} + set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} @@ -13735,8 +13931,8 @@ packages: resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} engines: {node: '>= 0.8'} - std-env@3.8.0: - resolution: {integrity: sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==} + std-env@3.10.0: + resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==} std-env@3.9.0: resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==} @@ -13837,6 +14033,15 @@ packages: strip-literal@3.0.0: resolution: {integrity: sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==} + stripe@20.3.1: + resolution: {integrity: sha512-k990yOT5G5rhX3XluRPw5Y8RLdJDW4dzQ29wWT66piHrbnM2KyamJ1dKgPsw4HzGHRWjDiSSdcI2WdxQUPV3aQ==} + engines: {node: '>=16'} + peerDependencies: + '@types/node': ^20.19.9 + peerDependenciesMeta: + '@types/node': + optional: true + stripe@9.16.0: resolution: {integrity: sha512-Dn8K+jSoQcXjxCobRI4HXUdHjOXsiF/KszK49fJnkbeCFjZ3EZxLG2JiM/CX+Hcq27NBDtv/Sxhvy+HhTmvyaQ==} engines: {node: ^8.1 || >=10.*} @@ -13897,6 +14102,10 @@ packages: tabbable@6.4.0: resolution: {integrity: sha512-05PUHKSNE8ou2dwIxTngl4EzcnsCDZGJ/iCLtDflR/SHB/ny14rXc+qU5P4mG9JkusiV7EivzY9Mhm55AzAvCg==} + tagged-tag@1.0.0: + resolution: {integrity: sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==} + engines: {node: '>=20'} + tailwind-merge@3.4.0: resolution: {integrity: sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g==} @@ -13958,9 +14167,6 @@ packages: tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} - tinyexec@0.3.1: - resolution: {integrity: sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==} - tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} @@ -13979,12 +14185,8 @@ packages: resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} engines: {node: '>=12.0.0'} - tinypool@1.0.1: - resolution: {integrity: sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==} - engines: {node: ^18.0.0 || >=20.0.0} - - tinypool@1.1.0: - resolution: {integrity: sha512-7CotroY9a8DKsKprEy/a14aCCm8jYVmR7aFy4fpkZM8sdpNJbKkixuNjgM50yCmip2ezc8z4N7k3oe2+rfRJCQ==} + tinypool@1.1.1: + resolution: {integrity: sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==} engines: {node: ^18.0.0 || >=20.0.0} tinyrainbow@1.2.0: @@ -13995,8 +14197,8 @@ packages: resolution: {integrity: sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==} engines: {node: '>=14.0.0'} - tinyspy@3.0.2: - resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} + tinyrainbow@3.0.3: + resolution: {integrity: sha512-PSkbLUoxOFRzJYjjxHJt9xro7D+iilgMX/C9lawzVuYiIdcihh9DXmVibBe8lmcFrRi/VzlPjBxbN7rH24q8/Q==} engines: {node: '>=14.0.0'} tinyspy@4.0.3: @@ -14265,6 +14467,10 @@ packages: resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} engines: {node: '>=16'} + type-fest@5.4.4: + resolution: {integrity: sha512-JnTrzGu+zPV3aXIUhnyWJj4z/wigMsdYajGLIYakqyOW1nPllzXEJee0QQbHj+CTIQtXGlAjuK0UY+2xTyjVAw==} + engines: {node: '>=20'} + type-is@1.6.18: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} @@ -14507,13 +14713,8 @@ packages: resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==} engines: {'0': node >=0.6.0} - vite-node@2.1.9: - resolution: {integrity: sha512-AM9aQ/IPrW/6ENLQg3AGY4K1N2TGZdR5e4gu/MmmR2xR3Ll1+dib+nook92g4TV3PXVyeyxdWwtaCAiUL0hMxA==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - - vite-node@3.2.3: - resolution: {integrity: sha512-gc8aAifGuDIpZHrPjuHyP4dpQmYXqWw7D1GmDnWeNWP654UEXzVfQ5IHPSK5HaHkwB/+p1atpYpSdw/2kOv8iQ==} + vite-node@3.2.4: + resolution: {integrity: sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true @@ -14611,8 +14812,8 @@ packages: yaml: optional: true - vite@7.2.7: - resolution: {integrity: sha512-ITcnkFeR3+fI8P1wMgItjGrR10170d8auB4EpMLPqmx6uxElH3a/hHGQabSHKdqd4FXWO1nFIp9rRn7JQ34ACQ==} + vite@7.3.1: + resolution: {integrity: sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -14656,20 +14857,23 @@ packages: peerDependencies: vitest: '>=2' - vitest@2.1.9: - resolution: {integrity: sha512-MSmPM9REYqDGBI8439mA4mWhV5sKmDlBKWIYbA3lRb2PTHACE0mgKwA8yQ2xq9vxDTuk4iPrECBAEW2aoFXY0Q==} - engines: {node: ^18.0.0 || >=20.0.0} + vitest@3.2.4: + resolution: {integrity: sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' + '@types/debug': ^4.1.12 '@types/node': ^20.19.9 - '@vitest/browser': 2.1.9 - '@vitest/ui': 2.1.9 + '@vitest/browser': 3.2.4 + '@vitest/ui': 3.2.4 happy-dom: '*' jsdom: '*' peerDependenciesMeta: '@edge-runtime/vm': optional: true + '@types/debug': + optional: true '@types/node': optional: true '@vitest/browser': @@ -14681,26 +14885,33 @@ packages: jsdom: optional: true - vitest@3.2.3: - resolution: {integrity: sha512-E6U2ZFXe3N/t4f5BwUaVCKRLHqUpk1CBWeMh78UT4VaTPH/2dyvH6ALl29JTovEPu9dVKr/K/J4PkXgrMbw4Ww==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + vitest@4.1.0-beta.4: + resolution: {integrity: sha512-MimZ9YLGPFhLGVR+WWQdSvc2vmOwH75f5SDRttg+cnlBJ0XNs6mTvrV4Oi6xIF3FOsH3LPs2f/LM1WyCGy40qA==} + engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' - '@types/debug': ^4.1.12 + '@opentelemetry/api': ^1.9.0 '@types/node': ^20.19.9 - '@vitest/browser': 3.2.3 - '@vitest/ui': 3.2.3 + '@vitest/browser-playwright': 4.1.0-beta.4 + '@vitest/browser-preview': 4.1.0-beta.4 + '@vitest/browser-webdriverio': 4.1.0-beta.4 + '@vitest/ui': 4.1.0-beta.4 happy-dom: '*' jsdom: '*' + vite: ^6.0.0 || ^7.0.0 || ^8.0.0-0 peerDependenciesMeta: '@edge-runtime/vm': optional: true - '@types/debug': + '@opentelemetry/api': optional: true '@types/node': optional: true - '@vitest/browser': + '@vitest/browser-playwright': + optional: true + '@vitest/browser-preview': + optional: true + '@vitest/browser-webdriverio': optional: true '@vitest/ui': optional: true @@ -14930,6 +15141,9 @@ packages: zod@3.25.76: resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==} + zod@4.3.6: + resolution: {integrity: sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==} + snapshots: '@actions/core@1.11.1': @@ -15765,6 +15979,35 @@ snapshots: optionalDependencies: '@types/react': 19.2.10 + '@better-auth/core@1.4.18(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@5.9.3)(kysely@0.28.11)(nanostores@1.1.0)': + dependencies: + '@better-auth/utils': 0.3.0 + '@better-fetch/fetch': 1.1.21 + '@standard-schema/spec': 1.0.0 + better-call: 1.1.8(zod@4.3.6) + jose: 5.9.3 + kysely: 0.28.11 + nanostores: 1.1.0 + zod: 4.3.6 + + '@better-auth/stripe@1.4.18(@better-auth/core@1.4.18(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@5.9.3)(kysely@0.28.11)(nanostores@1.1.0))(better-auth@1.4.18(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.1.0-beta.4))(stripe@20.3.1(@types/node@20.19.9))': + dependencies: + '@better-auth/core': 1.4.18(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@5.9.3)(kysely@0.28.11)(nanostores@1.1.0) + better-auth: 1.4.18(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.1.0-beta.4) + defu: 6.1.4 + stripe: 20.3.1(@types/node@20.19.9) + zod: 4.3.6 + + '@better-auth/telemetry@1.4.18(@better-auth/core@1.4.18(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@6.1.3)(kysely@0.28.11)(nanostores@1.1.0))': + dependencies: + '@better-auth/core': 1.4.18(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@5.9.3)(kysely@0.28.11)(nanostores@1.1.0) + '@better-auth/utils': 0.3.0 + '@better-fetch/fetch': 1.1.21 + + '@better-auth/utils@0.3.0': {} + + '@better-fetch/fetch@1.1.21': {} + '@bomb.sh/tab@0.0.12(cac@6.7.14)(citty@0.1.6)': optionalDependencies: cac: 6.7.14 @@ -16172,7 +16415,7 @@ snapshots: dependencies: react: 19.2.1 - '@cloudflare/kumo@1.5.0(@phosphor-icons/react@2.1.10(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)': + '@cloudflare/kumo@1.5.0(@phosphor-icons/react@2.1.10(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(zod@4.3.6)': dependencies: '@base-ui/react': 1.1.0(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1) '@phosphor-icons/react': 2.1.10(react-dom@19.2.1(react@19.2.1))(react@19.2.1) @@ -16180,6 +16423,8 @@ snapshots: react: 19.2.1 react-dom: 19.2.1(react@19.2.1) tailwind-merge: 3.4.0 + optionalDependencies: + zod: 4.3.6 transitivePeerDependencies: - '@types/react' @@ -16275,33 +16520,16 @@ snapshots: lodash.memoize: 4.1.2 marked: 0.3.19 - '@cloudflare/vitest-pool-workers@0.10.15(@cloudflare/workers-types@4.20260217.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9)': - dependencies: - '@vitest/runner': 3.2.3 - '@vitest/snapshot': 3.2.3 - birpc: 0.2.14 - cjs-module-lexer: 1.2.3 - devalue: 5.3.2 - miniflare: 4.20251210.0 - semver: 7.7.3 - vitest: 2.1.9(@types/node@20.19.9)(@vitest/ui@2.1.9)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3)) - wrangler: 4.54.0(@cloudflare/workers-types@4.20260217.0) - zod: 3.25.76 - transitivePeerDependencies: - - '@cloudflare/workers-types' - - bufferutil - - utf-8-validate - - '@cloudflare/vitest-pool-workers@0.10.15(@cloudflare/workers-types@4.20260217.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3)': + '@cloudflare/vitest-pool-workers@0.10.15(@cloudflare/workers-types@4.20260217.0)(@vitest/runner@4.1.0-beta.4)(@vitest/snapshot@4.1.0-beta.4)(vitest@3.2.4)': dependencies: - '@vitest/runner': 3.2.3 - '@vitest/snapshot': 3.2.3 + '@vitest/runner': 4.1.0-beta.4 + '@vitest/snapshot': 4.1.0-beta.4 birpc: 0.2.14 cjs-module-lexer: 1.2.3 devalue: 5.3.2 miniflare: 4.20251210.0 semver: 7.7.3 - vitest: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + vitest: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(tsx@4.21.0)(yaml@2.8.1) wrangler: 4.54.0(@cloudflare/workers-types@4.20260217.0) zod: 3.25.76 transitivePeerDependencies: @@ -17545,6 +17773,10 @@ snapshots: yaml: 2.8.1 yargs: 17.7.2 + '@noble/ciphers@2.1.1': {} + + '@noble/hashes@2.0.1': {} + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -18769,6 +19001,8 @@ snapshots: '@standard-schema/spec@1.0.0': {} + '@standard-schema/spec@1.1.0': {} + '@styled-system/background@5.1.2': dependencies: '@styled-system/core': 5.1.2 @@ -18943,21 +19177,21 @@ snapshots: '@tailwindcss/oxide-win32-arm64-msvc': 4.0.15 '@tailwindcss/oxide-win32-x64-msvc': 4.0.15 - '@tailwindcss/vite@4.0.15(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2))': + '@tailwindcss/vite@4.0.15(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1))': dependencies: '@tailwindcss/node': 4.0.15 '@tailwindcss/oxide': 4.0.15 lightningcss: 1.29.2 tailwindcss: 4.0.15 - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) + vite: 7.1.12(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) - '@tailwindcss/vite@4.0.15(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1))': + '@tailwindcss/vite@4.0.15(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1))': dependencies: '@tailwindcss/node': 4.0.15 '@tailwindcss/oxide': 4.0.15 lightningcss: 1.29.2 tailwindcss: 4.0.15 - vite: 7.1.12(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) + vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) '@tanstack/history@1.154.14': {} @@ -19022,7 +19256,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@tanstack/router-plugin@1.158.0(@tanstack/react-router@1.158.0(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2))': + '@tanstack/router-plugin@1.158.0(@tanstack/react-router@1.158.0(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1))': dependencies: '@babel/core': 7.28.5 '@babel/plugin-syntax-jsx': 7.28.6(@babel/core@7.28.5) @@ -19039,7 +19273,7 @@ snapshots: zod: 3.25.76 optionalDependencies: '@tanstack/react-router': 1.158.0(react-dom@19.2.1(react@19.2.1))(react@19.2.1) - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) + vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) transitivePeerDependencies: - supports-color @@ -19236,6 +19470,8 @@ snapshots: '@types/normalize-package-data@2.4.4': {} + '@types/nunjucks@3.2.6': {} + '@types/pg@8.11.6': dependencies: '@types/node': 20.19.9 @@ -19323,7 +19559,7 @@ snapshots: '@types/stack-utils@2.0.3': {} - '@types/statuses@2.0.5': {} + '@types/statuses@2.0.6': {} '@types/stoppable@1.1.3': dependencies: @@ -19621,18 +19857,29 @@ snapshots: dependencies: vite: 7.1.12(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) - '@vitejs/plugin-react@4.3.3(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2))': + '@vitejs/plugin-react@4.3.3(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@3.12.10)(yaml@2.8.1))': dependencies: '@babel/core': 7.26.0 '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.0) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) + vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@3.12.10)(yaml@2.8.1) + transitivePeerDependencies: + - supports-color + + '@vitejs/plugin-react@4.3.3(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1))': + dependencies: + '@babel/core': 7.26.0 + '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.0) + '@types/babel__core': 7.20.5 + react-refresh: 0.14.2 + vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) transitivePeerDependencies: - supports-color - '@vitejs/plugin-react@4.7.0(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2))': + '@vitejs/plugin-react@4.7.0(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1))': dependencies: '@babel/core': 7.28.5 '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.28.5) @@ -19640,11 +19887,11 @@ snapshots: '@rolldown/pluginutils': 1.0.0-beta.27 '@types/babel__core': 7.20.5 react-refresh: 0.17.0 - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) + vite: 7.1.12(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) transitivePeerDependencies: - supports-color - '@vitejs/plugin-react@4.7.0(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1))': + '@vitejs/plugin-react@4.7.0(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1))': dependencies: '@babel/core': 7.28.5 '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.28.5) @@ -19652,135 +19899,144 @@ snapshots: '@rolldown/pluginutils': 1.0.0-beta.27 '@types/babel__core': 7.20.5 react-refresh: 0.17.0 - vite: 7.1.12(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) + vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) transitivePeerDependencies: - supports-color - '@vitest/expect@2.1.9': + '@vitest/expect@3.2.4': dependencies: - '@vitest/spy': 2.1.9 - '@vitest/utils': 2.1.9 + '@types/chai': 5.2.2 + '@vitest/spy': 3.2.4 + '@vitest/utils': 3.2.4 chai: 5.2.0 - tinyrainbow: 1.2.0 + tinyrainbow: 2.0.0 - '@vitest/expect@3.2.3': + '@vitest/expect@4.1.0-beta.4': dependencies: + '@standard-schema/spec': 1.1.0 '@types/chai': 5.2.2 - '@vitest/spy': 3.2.3 - '@vitest/utils': 3.2.3 - chai: 5.2.0 - tinyrainbow: 2.0.0 + '@vitest/spy': 4.1.0-beta.4 + '@vitest/utils': 4.1.0-beta.4 + chai: 6.2.2 + tinyrainbow: 3.0.3 - '@vitest/mocker@2.1.9(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2))': + '@vitest/mocker@3.2.4(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2))': dependencies: - '@vitest/spy': 2.1.9 + '@vitest/spy': 3.2.4 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - msw: 2.12.0(@types/node@20.19.9)(typescript@5.8.3) + msw: 2.12.4(@types/node@20.19.9)(typescript@5.8.3) vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - '@vitest/mocker@2.1.9(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2))': + '@vitest/mocker@3.2.4(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2))': dependencies: - '@vitest/spy': 2.1.9 + '@vitest/spy': 3.2.4 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - msw: 2.12.0(@types/node@20.19.9)(typescript@5.9.3) + msw: 2.12.4(@types/node@20.19.9)(typescript@5.9.3) vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - '@vitest/mocker@3.2.3(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.2))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2))': + '@vitest/mocker@4.1.0-beta.4(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.2))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1))': dependencies: - '@vitest/spy': 3.2.3 + '@vitest/spy': 4.1.0-beta.4 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - msw: 2.12.0(@types/node@20.19.9)(typescript@5.8.2) - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) + msw: 2.12.4(@types/node@20.19.9)(typescript@5.8.2) + vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) - '@vitest/mocker@3.2.3(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2))': + '@vitest/mocker@4.1.0-beta.4(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1))': dependencies: - '@vitest/spy': 3.2.3 + '@vitest/spy': 4.1.0-beta.4 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - msw: 2.12.0(@types/node@20.19.9)(typescript@5.8.3) - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) + msw: 2.12.4(@types/node@20.19.9)(typescript@5.8.3) + vite: 7.1.12(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) - '@vitest/mocker@3.2.3(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2))': + '@vitest/mocker@4.1.0-beta.4(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1))': dependencies: - '@vitest/spy': 3.2.3 + '@vitest/spy': 4.1.0-beta.4 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - msw: 2.12.0(@types/node@20.19.9)(typescript@5.9.3) - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) + msw: 2.12.4(@types/node@20.19.9)(typescript@5.8.3) + vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) - '@vitest/pretty-format@2.1.8': + '@vitest/mocker@4.1.0-beta.4(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1))': dependencies: - tinyrainbow: 1.2.0 + '@vitest/spy': 4.1.0-beta.4 + estree-walker: 3.0.3 + magic-string: 0.30.21 + optionalDependencies: + msw: 2.12.4(@types/node@20.19.9)(typescript@5.9.3) + vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) - '@vitest/pretty-format@2.1.9': + '@vitest/pretty-format@2.1.8': dependencies: tinyrainbow: 1.2.0 - '@vitest/pretty-format@3.2.3': + '@vitest/pretty-format@3.2.4': dependencies: tinyrainbow: 2.0.0 - '@vitest/runner@2.1.9': + '@vitest/pretty-format@4.1.0-beta.4': dependencies: - '@vitest/utils': 2.1.9 - pathe: 1.1.2 + tinyrainbow: 3.0.3 - '@vitest/runner@3.2.3': + '@vitest/runner@3.2.4': dependencies: - '@vitest/utils': 3.2.3 + '@vitest/utils': 3.2.4 pathe: 2.0.3 strip-literal: 3.0.0 - '@vitest/snapshot@2.1.9': + '@vitest/runner@4.1.0-beta.4': dependencies: - '@vitest/pretty-format': 2.1.9 - magic-string: 0.30.21 - pathe: 1.1.2 + '@vitest/utils': 4.1.0-beta.4 + pathe: 2.0.3 - '@vitest/snapshot@3.2.3': + '@vitest/snapshot@3.2.4': dependencies: - '@vitest/pretty-format': 3.2.3 + '@vitest/pretty-format': 3.2.4 magic-string: 0.30.21 pathe: 2.0.3 - '@vitest/spy@2.1.9': + '@vitest/snapshot@4.1.0-beta.4': dependencies: - tinyspy: 3.0.2 + '@vitest/pretty-format': 4.1.0-beta.4 + '@vitest/utils': 4.1.0-beta.4 + magic-string: 0.30.21 + pathe: 2.0.3 - '@vitest/spy@3.2.3': + '@vitest/spy@3.2.4': dependencies: tinyspy: 4.0.3 - '@vitest/ui@2.1.9(vitest@2.1.9)': + '@vitest/spy@4.1.0-beta.4': {} + + '@vitest/ui@3.2.4(vitest@3.2.4)': dependencies: - '@vitest/utils': 2.1.9 + '@vitest/utils': 3.2.4 fflate: 0.8.2 flatted: 3.3.3 - pathe: 1.1.2 + pathe: 2.0.3 sirv: 3.0.2 tinyglobby: 0.2.15 - tinyrainbow: 1.2.0 - vitest: 2.1.9(@types/node@20.19.9)(@vitest/ui@2.1.9)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3)) - optional: true + tinyrainbow: 2.0.0 + vitest: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) - '@vitest/ui@3.2.3(vitest@3.2.3)': + '@vitest/ui@4.1.0-beta.4(vitest@4.1.0-beta.4)': dependencies: - '@vitest/utils': 3.2.3 + '@vitest/utils': 4.1.0-beta.4 fflate: 0.8.2 flatted: 3.3.3 pathe: 2.0.3 sirv: 3.0.2 tinyglobby: 0.2.15 - tinyrainbow: 2.0.0 - vitest: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + tinyrainbow: 3.0.3 + vitest: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) '@vitest/utils@2.1.8': dependencies: @@ -19788,17 +20044,16 @@ snapshots: loupe: 3.1.3 tinyrainbow: 1.2.0 - '@vitest/utils@2.1.9': + '@vitest/utils@3.2.4': dependencies: - '@vitest/pretty-format': 2.1.9 - loupe: 3.1.3 - tinyrainbow: 1.2.0 + '@vitest/pretty-format': 3.2.4 + loupe: 3.2.1 + tinyrainbow: 2.0.0 - '@vitest/utils@3.2.3': + '@vitest/utils@4.1.0-beta.4': dependencies: - '@vitest/pretty-format': 3.2.3 - loupe: 3.1.3 - tinyrainbow: 2.0.0 + '@vitest/pretty-format': 4.1.0-beta.4 + tinyrainbow: 3.0.3 '@volar/language-core@2.3.4': dependencies: @@ -19906,6 +20161,8 @@ snapshots: jsonparse: 1.3.1 through: 2.3.8 + a-sync-waterfall@1.0.1: {} + abort-controller@3.0.0: dependencies: event-target-shim: 5.0.1 @@ -20115,6 +20372,8 @@ snapshots: get-intrinsic: 1.3.0 is-array-buffer: 3.0.5 + asap@2.0.6: {} + asn1@0.2.6: dependencies: safer-buffer: 2.1.2 @@ -20248,6 +20507,38 @@ snapshots: before-after-hook@2.2.3: {} + better-auth@1.4.18(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.1.0-beta.4): + dependencies: + '@better-auth/core': 1.4.18(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@5.9.3)(kysely@0.28.11)(nanostores@1.1.0) + '@better-auth/telemetry': 1.4.18(@better-auth/core@1.4.18(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@6.1.3)(kysely@0.28.11)(nanostores@1.1.0)) + '@better-auth/utils': 0.3.0 + '@better-fetch/fetch': 1.1.21 + '@noble/ciphers': 2.1.1 + '@noble/hashes': 2.0.1 + better-call: 1.1.8(zod@4.3.6) + defu: 6.1.4 + jose: 6.1.3 + kysely: 0.28.11 + nanostores: 1.1.0 + zod: 4.3.6 + optionalDependencies: + '@prisma/client': 7.0.1(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3) + mysql2: 3.15.3 + pg: 8.16.3 + prisma: 7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3) + react: 19.2.1 + react-dom: 19.2.1(react@19.2.1) + vitest: 4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) + + better-call@1.1.8(zod@4.3.6): + dependencies: + '@better-auth/utils': 0.3.0 + '@better-fetch/fetch': 1.1.21 + rou3: 0.7.12 + set-cookie-parser: 2.7.2 + optionalDependencies: + zod: 4.3.6 + better-path-resolve@1.0.0: dependencies: is-windows: 1.0.2 @@ -20432,14 +20723,6 @@ snapshots: caseless@0.12.0: {} - chai@5.1.2: - dependencies: - assertion-error: 2.0.1 - check-error: 2.1.1 - deep-eql: 5.0.2 - loupe: 3.1.3 - pathval: 2.0.0 - chai@5.2.0: dependencies: assertion-error: 2.0.1 @@ -20448,6 +20731,8 @@ snapshots: loupe: 3.1.3 pathval: 2.0.0 + chai@6.2.2: {} + chalk@4.1.2: dependencies: ansi-styles: 4.3.0 @@ -20589,6 +20874,8 @@ snapshots: commander@4.1.1: {} + commander@5.1.0: {} + commander@7.2.0: {} comment-json@4.5.0: @@ -21272,6 +21559,8 @@ snapshots: es-module-lexer@1.7.0: {} + es-module-lexer@2.0.0: {} + es-object-atoms@1.0.0: dependencies: es-errors: 1.3.0 @@ -21794,10 +22083,10 @@ snapshots: expect-type@0.15.0: {} - expect-type@1.1.0: {} - expect-type@1.2.1: {} + expect-type@1.3.0: {} + expect@29.7.0: dependencies: '@jest/expect-utils': 29.7.0 @@ -22344,7 +22633,7 @@ snapshots: graphemer@1.4.0: {} - graphql@16.8.1: {} + graphql@16.12.0: {} gunzip-maybe@1.4.2: dependencies: @@ -22900,6 +23189,8 @@ snapshots: jose@5.9.3: {} + jose@6.1.3: {} + joycon@3.1.1: {} js-base64@3.7.7: {} @@ -23021,6 +23312,8 @@ snapshots: ky@1.7.5: {} + kysely@0.28.11: {} + levn@0.4.1: dependencies: prelude-ls: 1.2.1 @@ -23206,6 +23499,8 @@ snapshots: loupe@3.1.3: {} + loupe@3.2.1: {} + lowdb@1.0.0: dependencies: graceful-fs: 4.2.11 @@ -23411,14 +23706,14 @@ snapshots: ms@2.1.3: {} - msw@2.12.0(@types/node@20.19.9)(typescript@5.8.2): + msw@2.12.4(@types/node@20.19.9)(typescript@5.8.2): dependencies: '@inquirer/confirm': 5.1.21(@types/node@20.19.9) '@mswjs/interceptors': 0.40.0 '@open-draft/deferred-promise': 2.2.0 - '@types/statuses': 2.0.5 + '@types/statuses': 2.0.6 cookie: 1.0.2 - graphql: 16.8.1 + graphql: 16.12.0 headers-polyfill: 4.0.3 is-node-process: 1.2.0 outvariant: 1.4.3 @@ -23428,7 +23723,7 @@ snapshots: statuses: 2.0.2 strict-event-emitter: 0.5.1 tough-cookie: 6.0.0 - type-fest: 4.41.0 + type-fest: 5.4.4 until-async: 3.0.2 yargs: 17.7.2 optionalDependencies: @@ -23437,14 +23732,14 @@ snapshots: - '@types/node' optional: true - msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3): + msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3): dependencies: '@inquirer/confirm': 5.1.21(@types/node@20.19.9) '@mswjs/interceptors': 0.40.0 '@open-draft/deferred-promise': 2.2.0 - '@types/statuses': 2.0.5 + '@types/statuses': 2.0.6 cookie: 1.0.2 - graphql: 16.8.1 + graphql: 16.12.0 headers-polyfill: 4.0.3 is-node-process: 1.2.0 outvariant: 1.4.3 @@ -23454,7 +23749,7 @@ snapshots: statuses: 2.0.2 strict-event-emitter: 0.5.1 tough-cookie: 6.0.0 - type-fest: 4.41.0 + type-fest: 5.4.4 until-async: 3.0.2 yargs: 17.7.2 optionalDependencies: @@ -23462,14 +23757,14 @@ snapshots: transitivePeerDependencies: - '@types/node' - msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3): + msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3): dependencies: '@inquirer/confirm': 5.1.21(@types/node@20.19.9) '@mswjs/interceptors': 0.40.0 '@open-draft/deferred-promise': 2.2.0 - '@types/statuses': 2.0.5 + '@types/statuses': 2.0.6 cookie: 1.0.2 - graphql: 16.8.1 + graphql: 16.12.0 headers-polyfill: 4.0.3 is-node-process: 1.2.0 outvariant: 1.4.3 @@ -23479,7 +23774,7 @@ snapshots: statuses: 2.0.2 strict-event-emitter: 0.5.1 tough-cookie: 6.0.0 - type-fest: 4.41.0 + type-fest: 5.4.4 until-async: 3.0.2 yargs: 17.7.2 optionalDependencies: @@ -23523,6 +23818,8 @@ snapshots: nanoid@5.1.0: {} + nanostores@1.1.0: {} + napi-build-utils@2.0.0: optional: true @@ -23598,6 +23895,14 @@ snapshots: dependencies: boolbase: 1.0.0 + nunjucks@3.2.4(chokidar@3.6.0): + dependencies: + a-sync-waterfall: 1.0.1 + asap: 2.0.6 + commander: 5.1.0 + optionalDependencies: + chokidar: 3.6.0 + nypm@0.6.1: dependencies: citty: 0.1.6 @@ -23667,6 +23972,8 @@ snapshots: optionalDependencies: ms: 2.1.3 + obug@2.1.1: {} + ohash@2.0.11: {} on-exit-leak-free@2.1.2: {} @@ -24835,6 +25142,8 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.44.1 fsevents: 2.3.3 + rou3@0.7.12: {} + router@2.2.0: dependencies: debug: 4.4.1(supports-color@9.2.2) @@ -24998,6 +25307,8 @@ snapshots: set-cookie-parser@2.6.0: {} + set-cookie-parser@2.7.2: {} + set-function-length@1.2.2: dependencies: define-data-property: 1.1.4 @@ -25286,7 +25597,7 @@ snapshots: statuses@2.0.2: {} - std-env@3.8.0: {} + std-env@3.10.0: {} std-env@3.9.0: {} @@ -25414,6 +25725,10 @@ snapshots: dependencies: js-tokens: 9.0.1 + stripe@20.3.1(@types/node@20.19.9): + optionalDependencies: + '@types/node': 20.19.9 + stripe@9.16.0: dependencies: '@types/node': 20.19.9 @@ -25489,6 +25804,8 @@ snapshots: tabbable@6.4.0: {} + tagged-tag@1.0.0: {} + tailwind-merge@3.4.0: {} tailwindcss@4.0.15: {} @@ -25571,8 +25888,6 @@ snapshots: tinybench@2.9.0: {} - tinyexec@0.3.1: {} - tinyexec@0.3.2: {} tinyexec@1.0.1: {} @@ -25589,15 +25904,13 @@ snapshots: fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 - tinypool@1.0.1: {} - - tinypool@1.1.0: {} + tinypool@1.1.1: {} tinyrainbow@1.2.0: {} tinyrainbow@2.0.0: {} - tinyspy@3.0.2: {} + tinyrainbow@3.0.3: {} tinyspy@4.0.3: {} @@ -25882,6 +26195,10 @@ snapshots: type-fest@4.41.0: {} + type-fest@5.4.4: + dependencies: + tagged-tag: 1.0.0 + type-is@1.6.18: dependencies: media-typer: 0.3.0 @@ -26221,31 +26538,13 @@ snapshots: core-util-is: 1.0.2 extsprintf: 1.3.0 - vite-node@2.1.9(@types/node@20.19.9)(lightningcss@1.30.2): - dependencies: - cac: 6.7.14 - debug: 4.4.1(supports-color@9.2.2) - es-module-lexer: 1.7.0 - pathe: 1.1.2 - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - transitivePeerDependencies: - - '@types/node' - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - vite-node@3.2.3(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1): + vite-node@3.2.4(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1): dependencies: cac: 6.7.14 debug: 4.4.1(supports-color@9.2.2) es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 7.2.7(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) + vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) transitivePeerDependencies: - '@types/node' - jiti @@ -26260,7 +26559,7 @@ snapshots: - tsx - yaml - vite-plugin-dts@4.0.1(@types/node@20.19.9)(rollup@4.44.1)(typescript@5.8.3)(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)): + vite-plugin-dts@4.0.1(@types/node@20.19.9)(rollup@4.44.1)(typescript@5.8.3)(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)): dependencies: '@microsoft/api-extractor': 7.47.4(@types/node@20.19.9) '@rollup/pluginutils': 5.1.0(rollup@4.44.1) @@ -26274,30 +26573,30 @@ snapshots: typescript: 5.8.3 vue-tsc: 2.0.29(typescript@5.8.3) optionalDependencies: - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) + vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) transitivePeerDependencies: - '@types/node' - rollup - supports-color - vite-plugin-svgr@4.5.0(rollup@4.44.1)(typescript@5.8.3)(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)): + vite-plugin-svgr@4.5.0(rollup@4.44.1)(typescript@5.8.3)(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)): dependencies: '@rollup/pluginutils': 5.3.0(rollup@4.44.1) '@svgr/core': 8.1.0(typescript@5.8.3) '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.8.3)) - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) + vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) transitivePeerDependencies: - rollup - supports-color - typescript - vite-tsconfig-paths@4.2.0(typescript@5.8.3)(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)): + vite-tsconfig-paths@4.2.0(typescript@5.8.3)(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)): dependencies: debug: 4.4.1(supports-color@9.2.2) globrex: 0.1.2 tsconfck: 2.1.1(typescript@5.8.3) optionalDependencies: - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) + vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) transitivePeerDependencies: - supports-color - typescript @@ -26328,9 +26627,9 @@ snapshots: tsx: 4.21.0 yaml: 2.8.1 - vite@7.2.7(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1): + vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@3.12.10)(yaml@2.8.1): dependencies: - esbuild: 0.25.4 + esbuild: 0.27.3 fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 postcss: 8.5.6 @@ -26341,97 +26640,41 @@ snapshots: fsevents: 2.3.3 jiti: 2.6.1 lightningcss: 1.30.2 - tsx: 4.21.0 + tsx: 3.12.10 yaml: 2.8.1 - vitest-websocket-mock@0.4.0(vitest@3.2.3): + vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1): dependencies: - '@vitest/utils': 2.1.8 - mock-socket: 9.3.1 - vitest: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) - - vitest@2.1.9(@types/node@20.19.9)(@vitest/ui@2.1.9)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3)): - dependencies: - '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) - '@vitest/pretty-format': 2.1.9 - '@vitest/runner': 2.1.9 - '@vitest/snapshot': 2.1.9 - '@vitest/spy': 2.1.9 - '@vitest/utils': 2.1.9 - chai: 5.1.2 - debug: 4.4.1(supports-color@9.2.2) - expect-type: 1.1.0 - magic-string: 0.30.17 - pathe: 1.1.2 - std-env: 3.8.0 - tinybench: 2.9.0 - tinyexec: 0.3.1 - tinypool: 1.0.1 - tinyrainbow: 1.2.0 - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - vite-node: 2.1.9(@types/node@20.19.9)(lightningcss@1.30.2) - why-is-node-running: 2.3.0 + esbuild: 0.27.3 + fdir: 6.5.0(picomatch@4.0.3) + picomatch: 4.0.3 + postcss: 8.5.6 + rollup: 4.44.1 + tinyglobby: 0.2.15 optionalDependencies: '@types/node': 20.19.9 - '@vitest/ui': 2.1.9(vitest@2.1.9) - transitivePeerDependencies: - - less - - lightningcss - - msw - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser + fsevents: 2.3.3 + jiti: 2.6.1 + lightningcss: 1.30.2 + tsx: 4.21.0 + yaml: 2.8.1 - vitest@2.1.9(@types/node@20.19.9)(@vitest/ui@2.1.9)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3)): + vitest-websocket-mock@0.4.0(vitest@3.2.4): dependencies: - '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) - '@vitest/pretty-format': 2.1.9 - '@vitest/runner': 2.1.9 - '@vitest/snapshot': 2.1.9 - '@vitest/spy': 2.1.9 - '@vitest/utils': 2.1.9 - chai: 5.1.2 - debug: 4.4.1(supports-color@9.2.2) - expect-type: 1.1.0 - magic-string: 0.30.17 - pathe: 1.1.2 - std-env: 3.8.0 - tinybench: 2.9.0 - tinyexec: 0.3.1 - tinypool: 1.0.1 - tinyrainbow: 1.2.0 - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - vite-node: 2.1.9(@types/node@20.19.9)(lightningcss@1.30.2) - why-is-node-running: 2.3.0 - optionalDependencies: - '@types/node': 20.19.9 - '@vitest/ui': 2.1.9(vitest@2.1.9) - transitivePeerDependencies: - - less - - lightningcss - - msw - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser + '@vitest/utils': 2.1.8 + mock-socket: 9.3.1 + vitest: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) - vitest@3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.2))(tsx@4.21.0)(yaml@2.8.1): + vitest@3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1): dependencies: '@types/chai': 5.2.2 - '@vitest/expect': 3.2.3 - '@vitest/mocker': 3.2.3(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.2))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) - '@vitest/pretty-format': 3.2.3 - '@vitest/runner': 3.2.3 - '@vitest/snapshot': 3.2.3 - '@vitest/spy': 3.2.3 - '@vitest/utils': 3.2.3 + '@vitest/expect': 3.2.4 + '@vitest/mocker': 3.2.4(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) + '@vitest/pretty-format': 3.2.4 + '@vitest/runner': 3.2.4 + '@vitest/snapshot': 3.2.4 + '@vitest/spy': 3.2.4 + '@vitest/utils': 3.2.4 chai: 5.2.0 debug: 4.4.1(supports-color@9.2.2) expect-type: 1.2.1 @@ -26442,15 +26685,15 @@ snapshots: tinybench: 2.9.0 tinyexec: 0.3.2 tinyglobby: 0.2.15 - tinypool: 1.1.0 + tinypool: 1.1.1 tinyrainbow: 2.0.0 vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - vite-node: 3.2.3(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + vite-node: 3.2.4(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) why-is-node-running: 2.3.0 optionalDependencies: '@types/debug': 4.1.12 '@types/node': 20.19.9 - '@vitest/ui': 3.2.3(vitest@3.2.3) + '@vitest/ui': 3.2.4(vitest@3.2.4) transitivePeerDependencies: - jiti - less @@ -26465,16 +26708,16 @@ snapshots: - tsx - yaml - vitest@3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1): + vitest@3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(tsx@4.21.0)(yaml@2.8.1): dependencies: '@types/chai': 5.2.2 - '@vitest/expect': 3.2.3 - '@vitest/mocker': 3.2.3(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) - '@vitest/pretty-format': 3.2.3 - '@vitest/runner': 3.2.3 - '@vitest/snapshot': 3.2.3 - '@vitest/spy': 3.2.3 - '@vitest/utils': 3.2.3 + '@vitest/expect': 3.2.4 + '@vitest/mocker': 3.2.4(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) + '@vitest/pretty-format': 3.2.4 + '@vitest/runner': 3.2.4 + '@vitest/snapshot': 3.2.4 + '@vitest/spy': 3.2.4 + '@vitest/utils': 3.2.4 chai: 5.2.0 debug: 4.4.1(supports-color@9.2.2) expect-type: 1.2.1 @@ -26485,15 +26728,15 @@ snapshots: tinybench: 2.9.0 tinyexec: 0.3.2 tinyglobby: 0.2.15 - tinypool: 1.1.0 + tinypool: 1.1.1 tinyrainbow: 2.0.0 vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - vite-node: 3.2.3(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + vite-node: 3.2.4(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) why-is-node-running: 2.3.0 optionalDependencies: '@types/debug': 4.1.12 '@types/node': 20.19.9 - '@vitest/ui': 3.2.3(vitest@3.2.3) + '@vitest/ui': 3.2.4(vitest@3.2.4) transitivePeerDependencies: - jiti - less @@ -26508,91 +26751,118 @@ snapshots: - tsx - yaml - vitest@3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(tsx@4.21.0)(yaml@2.8.1): - dependencies: - '@types/chai': 5.2.2 - '@vitest/expect': 3.2.3 - '@vitest/mocker': 3.2.3(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) - '@vitest/pretty-format': 3.2.3 - '@vitest/runner': 3.2.3 - '@vitest/snapshot': 3.2.3 - '@vitest/spy': 3.2.3 - '@vitest/utils': 3.2.3 - chai: 5.2.0 - debug: 4.4.1(supports-color@9.2.2) - expect-type: 1.2.1 + vitest@4.1.0-beta.4(@opentelemetry/api@1.7.0)(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)): + dependencies: + '@vitest/expect': 4.1.0-beta.4 + '@vitest/mocker': 4.1.0-beta.4(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) + '@vitest/pretty-format': 4.1.0-beta.4 + '@vitest/runner': 4.1.0-beta.4 + '@vitest/snapshot': 4.1.0-beta.4 + '@vitest/spy': 4.1.0-beta.4 + '@vitest/utils': 4.1.0-beta.4 + es-module-lexer: 2.0.0 + expect-type: 1.3.0 magic-string: 0.30.21 + obug: 2.1.1 pathe: 2.0.3 picomatch: 4.0.3 - std-env: 3.9.0 + std-env: 3.10.0 tinybench: 2.9.0 - tinyexec: 0.3.2 + tinyexec: 1.0.2 tinyglobby: 0.2.15 - tinypool: 1.1.0 - tinyrainbow: 2.0.0 - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - vite-node: 3.2.3(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + tinyrainbow: 3.0.3 + vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) why-is-node-running: 2.3.0 optionalDependencies: - '@types/debug': 4.1.12 + '@opentelemetry/api': 1.7.0 '@types/node': 20.19.9 - '@vitest/ui': 3.2.3(vitest@3.2.3) + '@vitest/ui': 4.1.0-beta.4(vitest@4.1.0-beta.4) transitivePeerDependencies: - - jiti - - less - - lightningcss - msw - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - tsx - - yaml - vitest@3.2.3(@types/debug@4.1.7)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(tsx@4.21.0)(yaml@2.8.1): - dependencies: - '@types/chai': 5.2.2 - '@vitest/expect': 3.2.3 - '@vitest/mocker': 3.2.3(msw@2.12.0(@types/node@20.19.9)(typescript@5.8.3))(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) - '@vitest/pretty-format': 3.2.3 - '@vitest/runner': 3.2.3 - '@vitest/snapshot': 3.2.3 - '@vitest/spy': 3.2.3 - '@vitest/utils': 3.2.3 - chai: 5.2.0 - debug: 4.4.1(supports-color@9.2.2) - expect-type: 1.2.1 + vitest@4.1.0-beta.4(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.2))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)): + dependencies: + '@vitest/expect': 4.1.0-beta.4 + '@vitest/mocker': 4.1.0-beta.4(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.2))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) + '@vitest/pretty-format': 4.1.0-beta.4 + '@vitest/runner': 4.1.0-beta.4 + '@vitest/snapshot': 4.1.0-beta.4 + '@vitest/spy': 4.1.0-beta.4 + '@vitest/utils': 4.1.0-beta.4 + es-module-lexer: 2.0.0 + expect-type: 1.3.0 magic-string: 0.30.21 + obug: 2.1.1 pathe: 2.0.3 picomatch: 4.0.3 - std-env: 3.9.0 + std-env: 3.10.0 tinybench: 2.9.0 - tinyexec: 0.3.2 + tinyexec: 1.0.2 tinyglobby: 0.2.15 - tinypool: 1.1.0 - tinyrainbow: 2.0.0 - vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) - vite-node: 3.2.3(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) + tinyrainbow: 3.0.3 + vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) why-is-node-running: 2.3.0 optionalDependencies: - '@types/debug': 4.1.7 '@types/node': 20.19.9 - '@vitest/ui': 3.2.3(vitest@3.2.3) + '@vitest/ui': 4.1.0-beta.4(vitest@4.1.0-beta.4) + transitivePeerDependencies: + - msw + + vitest@4.1.0-beta.4(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)): + dependencies: + '@vitest/expect': 4.1.0-beta.4 + '@vitest/mocker': 4.1.0-beta.4(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(vite@7.1.12(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) + '@vitest/pretty-format': 4.1.0-beta.4 + '@vitest/runner': 4.1.0-beta.4 + '@vitest/snapshot': 4.1.0-beta.4 + '@vitest/spy': 4.1.0-beta.4 + '@vitest/utils': 4.1.0-beta.4 + es-module-lexer: 2.0.0 + expect-type: 1.3.0 + magic-string: 0.30.21 + obug: 2.1.1 + pathe: 2.0.3 + picomatch: 4.0.3 + std-env: 3.10.0 + tinybench: 2.9.0 + tinyexec: 1.0.2 + tinyglobby: 0.2.15 + tinyrainbow: 3.0.3 + vite: 7.1.12(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 20.19.9 + '@vitest/ui': 4.1.0-beta.4(vitest@4.1.0-beta.4) + transitivePeerDependencies: + - msw + + vitest@4.1.0-beta.4(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)): + dependencies: + '@vitest/expect': 4.1.0-beta.4 + '@vitest/mocker': 4.1.0-beta.4(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) + '@vitest/pretty-format': 4.1.0-beta.4 + '@vitest/runner': 4.1.0-beta.4 + '@vitest/snapshot': 4.1.0-beta.4 + '@vitest/spy': 4.1.0-beta.4 + '@vitest/utils': 4.1.0-beta.4 + es-module-lexer: 2.0.0 + expect-type: 1.3.0 + magic-string: 0.30.21 + obug: 2.1.1 + pathe: 2.0.3 + picomatch: 4.0.3 + std-env: 3.10.0 + tinybench: 2.9.0 + tinyexec: 1.0.2 + tinyglobby: 0.2.15 + tinyrainbow: 3.0.3 + vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 20.19.9 + '@vitest/ui': 4.1.0-beta.4(vitest@4.1.0-beta.4) transitivePeerDependencies: - - jiti - - less - - lightningcss - msw - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - tsx - - yaml vscode-uri@3.0.8: {} @@ -26847,3 +27117,5 @@ snapshots: zod@3.22.3: {} zod@3.25.76: {} + + zod@4.3.6: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 5542e4a69f39..d9402e511ff1 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -19,16 +19,16 @@ catalog: "@types/node": "^20.19.9" "@typescript-eslint/eslint-plugin": "^8.35.1" "@typescript-eslint/parser": "^8.35.1" - "@vitest/runner": 4.1.0-beta.1 - "@vitest/snapshot": 4.1.0-beta.1 - "@vitest/ui": 4.1.0-beta.1 + "@vitest/runner": 4.1.0-beta.4 + "@vitest/snapshot": 4.1.0-beta.4 + "@vitest/ui": 4.1.0-beta.4 typescript: "~5.8.3" undici: "7.18.2" # Override undici-types from @types/node so that the Cloudflare SDK typings match our installed # version of Undici undici-types: "7.18.2" - vitest: "4.1.0-beta.1" - vite: "^5.4.14" + vitest: "4.1.0-beta.4" + vite: "^7.3.1" "ws": "8.18.0" esbuild: "0.27.3" playwright-chromium: "^1.56.1" From a925f45479546209411d60966697a4c07adc7ce0 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Wed, 18 Feb 2026 10:37:51 +0000 Subject: [PATCH 24/45] [vitest-pool-workers] Fix Windows CI failures - Exclude durable-objects project on Windows (workerd SQLITE_CANTOPEN) - Fix path.posix.dirname to path.dirname in loopback.ts for Windows - Remove run-script-os, simplify test:ci command --- fixtures/vitest-pool-workers-examples/package.json | 5 +---- fixtures/vitest-pool-workers-examples/vitest.config.ts | 9 ++++++++- packages/vitest-pool-workers/src/pool/loopback.ts | 2 +- pnpm-lock.yaml | 3 --- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/fixtures/vitest-pool-workers-examples/package.json b/fixtures/vitest-pool-workers-examples/package.json index 38cbe65228be..3e540d8bc60e 100644 --- a/fixtures/vitest-pool-workers-examples/package.json +++ b/fixtures/vitest-pool-workers-examples/package.json @@ -6,9 +6,7 @@ "check:type": "node tsc-all.mjs", "list": "vitest list", "test": "vitest", - "test:ci": "run-script-os", - "test:ci:default": "vitest run", - "test:ci:win32": "vitest run --exclude test/sqlite-in-do.test.ts" + "test:ci": "vitest run" }, "devDependencies": { "@better-auth/stripe": "^1.4.6", @@ -28,7 +26,6 @@ "miniflare": "workspace:*", "msw": "catalog:default", "nunjucks": "^3.2.4", - "run-script-os": "^1.1.6", "stripe": "^20.0.0", "toucan-js": "4.0.0", "typescript": "catalog:default", diff --git a/fixtures/vitest-pool-workers-examples/vitest.config.ts b/fixtures/vitest-pool-workers-examples/vitest.config.ts index edc00aef4fb2..a842bd642bb6 100644 --- a/fixtures/vitest-pool-workers-examples/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/vitest.config.ts @@ -5,7 +5,14 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { teardownTimeout: 1_000, - projects: ["*/vitest.*config.*ts"], + projects: [ + "*/vitest.*config.*ts", + // workerd's disk service has issues with SQLite on Windows, + // so exclude fixtures that use SQLite-backed Durable Objects + ...(process.platform === "win32" + ? ["!durable-objects/vitest.*config.*ts"] + : []), + ], globalSetup: ["./vitest.global.ts"], }, }); diff --git a/packages/vitest-pool-workers/src/pool/loopback.ts b/packages/vitest-pool-workers/src/pool/loopback.ts index f7b1e3e2739c..c70536ae03eb 100644 --- a/packages/vitest-pool-workers/src/pool/loopback.ts +++ b/packages/vitest-pool-workers/src/pool/loopback.ts @@ -23,7 +23,7 @@ async function handleSnapshotRequest( if (request.method === "PUT" /* saveSnapshotFile */) { const snapshot = await request.arrayBuffer(); - await fs.mkdir(path.posix.dirname(filePath), { recursive: true }); + await fs.mkdir(path.dirname(filePath), { recursive: true }); await fs.writeFile(filePath, new Uint8Array(snapshot)); return new Response(null, { status: 204 }); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e53929ab52d1..6722b9d09ff3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1356,9 +1356,6 @@ importers: nunjucks: specifier: ^3.2.4 version: 3.2.4(chokidar@3.6.0) - run-script-os: - specifier: ^1.1.6 - version: 1.1.6 stripe: specifier: ^20.0.0 version: 20.3.1(@types/node@20.19.9) From 522b117d828a8ec4331b3e20a205b4ee6060a0a1 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Wed, 18 Feb 2026 11:57:01 +0000 Subject: [PATCH 25/45] [vitest-pool-workers] Fix lint errors and dep validation - Add zod to EXTERNAL_DEPENDENCIES list - Remove unused imports (opendirSync, rmSync) from loopback.ts --- packages/vitest-pool-workers/scripts/deps.ts | 3 +++ packages/vitest-pool-workers/src/pool/loopback.ts | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/vitest-pool-workers/scripts/deps.ts b/packages/vitest-pool-workers/scripts/deps.ts index 6b71448498c3..712bd38ce6e4 100644 --- a/packages/vitest-pool-workers/scripts/deps.ts +++ b/packages/vitest-pool-workers/scripts/deps.ts @@ -10,4 +10,7 @@ export const EXTERNAL_DEPENDENCIES = [ // Native binary - cannot be bundled, used to bundle test files at runtime "esbuild", + + // Used for config validation at runtime - must be available when package is installed + "zod", ]; diff --git a/packages/vitest-pool-workers/src/pool/loopback.ts b/packages/vitest-pool-workers/src/pool/loopback.ts index c70536ae03eb..fb8cb5b8d9ce 100644 --- a/packages/vitest-pool-workers/src/pool/loopback.ts +++ b/packages/vitest-pool-workers/src/pool/loopback.ts @@ -1,5 +1,4 @@ import assert from "node:assert"; -import { opendirSync, rmSync } from "node:fs"; import fs from "node:fs/promises"; import path from "node:path"; import { Response } from "miniflare"; From 6fdaa5641d7856eccbe136528e239ed0ba8e53cc Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Wed, 18 Feb 2026 12:13:42 +0000 Subject: [PATCH 26/45] [create-cloudflare] Fix vite type conflict with vitest 3 - Add vite ^5.4.14 to vitest-3 catalog - Use catalog:vitest-3 for vite in create-cloudflare (vitest 3 requires vite 5) --- packages/create-cloudflare/package.json | 2 +- pnpm-lock.yaml | 13 ++++++++----- pnpm-workspace.yaml | 3 ++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/create-cloudflare/package.json b/packages/create-cloudflare/package.json index 1159ae578633..ee50a9de4c9e 100644 --- a/packages/create-cloudflare/package.json +++ b/packages/create-cloudflare/package.json @@ -83,7 +83,7 @@ "tree-kill": "catalog:default", "typescript": "catalog:default", "undici": "catalog:default", - "vite": "catalog:default", + "vite": "catalog:vitest-3", "vite-tsconfig-paths": "^4.0.8", "vitest": "catalog:vitest-3", "which-pm-runs": "^1.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1ab443fb94b4..261626712e69 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -77,6 +77,9 @@ catalogs: '@vitest/ui': specifier: 3.2.4 version: 3.2.4 + vite: + specifier: ^5.4.14 + version: 5.4.14 vitest: specifier: 3.2.4 version: 3.2.4 @@ -1952,11 +1955,11 @@ importers: specifier: catalog:default version: 7.18.2 vite: - specifier: catalog:default - version: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) + specifier: catalog:vitest-3 + version: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) vite-tsconfig-paths: specifier: ^4.0.8 - version: 4.2.0(typescript@5.8.3)(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) + version: 4.2.0(typescript@5.8.3)(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)) vitest: specifier: catalog:vitest-3 version: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.8.3))(supports-color@9.2.2)(tsx@4.21.0)(yaml@2.8.1) @@ -26637,13 +26640,13 @@ snapshots: - supports-color - typescript - vite-tsconfig-paths@4.2.0(typescript@5.8.3)(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)): + vite-tsconfig-paths@4.2.0(typescript@5.8.3)(vite@5.4.14(@types/node@20.19.9)(lightningcss@1.30.2)): dependencies: debug: 4.4.1(supports-color@9.2.2) globrex: 0.1.2 tsconfck: 2.1.1(typescript@5.8.3) optionalDependencies: - vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1) + vite: 5.4.14(@types/node@20.19.9)(lightningcss@1.30.2) transitivePeerDependencies: - supports-color - typescript diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index df4344e910d8..3a2c8b682ece 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -51,7 +51,8 @@ catalogs: vitest-3: "vitest": 3.2.4 "@vitest/ui": 3.2.4 - # CAUTION: Most usage of @cloudflare/vitest-pool-workers in this mono repo should use workspace:* instead of this catalog version + "vite": "^5.4.14" + # CAUTION: Most usage of @cloudflare/vitest-pool-workers in this monorepo should use workspace:* instead of this catalog version # However, some packages (pages-shared, workers-shared, etc...) need to be tested using vitest-pool-workers but are themselves # ultimately included in vitest-pool-workers (through Wrangler), causing a circular dependency. "@cloudflare/vitest-pool-workers": "^0.10.0" From 177e94c6d75b83f7a9b943c5dff6723d8f7988ad Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Wed, 18 Feb 2026 15:14:35 +0000 Subject: [PATCH 27/45] [vitest-pool-workers] Add @types/node to fixture tsconfig The v4 types subpath doesn't transitively include node types like the v3 base package did. Tests using Node.js compat APIs need them. --- fixtures/vitest-pool-workers-examples/tsconfig.workerd-test.json | 1 + 1 file changed, 1 insertion(+) diff --git a/fixtures/vitest-pool-workers-examples/tsconfig.workerd-test.json b/fixtures/vitest-pool-workers-examples/tsconfig.workerd-test.json index ff5096b87cf8..3aa2158e58aa 100644 --- a/fixtures/vitest-pool-workers-examples/tsconfig.workerd-test.json +++ b/fixtures/vitest-pool-workers-examples/tsconfig.workerd-test.json @@ -4,6 +4,7 @@ "types": [ "@cloudflare/workers-types/experimental", "@cloudflare/vitest-pool-workers/types", + "@types/node", // For tests using Node.js compat APIs (process, Buffer, node:*) "vite/client" // For `?raw`, `?url`, etc. import types ] } From 2e76e3c76eedd9cd374e2031456bb102702a803d Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Wed, 18 Feb 2026 16:04:26 +0000 Subject: [PATCH 28/45] [miniflare] Normalize persist paths to forward slashes for Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit workerd's disk service cannot handle Windows backslash paths, causing SQLITE_CANTOPEN errors. Normalize all persist paths to forward slashes in getPersistPath() — this works for both Node.js fs APIs and workerd on all platforms. Reverts the durable-objects project exclusion since the root cause (backslash paths in disk service config) is now fixed for all plugins. --- .../vitest.config.ts | 9 +-- .../miniflare/src/plugins/shared/index.ts | 60 +++++++++++-------- 2 files changed, 36 insertions(+), 33 deletions(-) diff --git a/fixtures/vitest-pool-workers-examples/vitest.config.ts b/fixtures/vitest-pool-workers-examples/vitest.config.ts index a842bd642bb6..edc00aef4fb2 100644 --- a/fixtures/vitest-pool-workers-examples/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/vitest.config.ts @@ -5,14 +5,7 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { teardownTimeout: 1_000, - projects: [ - "*/vitest.*config.*ts", - // workerd's disk service has issues with SQLite on Windows, - // so exclude fixtures that use SQLite-backed Durable Objects - ...(process.platform === "win32" - ? ["!durable-objects/vitest.*config.*ts"] - : []), - ], + projects: ["*/vitest.*config.*ts"], globalSetup: ["./vitest.global.ts"], }, }); diff --git a/packages/miniflare/src/plugins/shared/index.ts b/packages/miniflare/src/plugins/shared/index.ts index a2aca7b3d926..4757793e31fb 100644 --- a/packages/miniflare/src/plugins/shared/index.ts +++ b/packages/miniflare/src/plugins/shared/index.ts @@ -231,35 +231,45 @@ export function getPersistPath( // keep Miniflare 2's behaviour, so persist to a temporary path which we // destroy on `dispose()`. const memoryishPath = path.join(tmpPath, pluginName); - if (persist === false) { - return memoryishPath; - } - // If `persist` is undefined, use either the default path or fallback to the tmpPath - if (persist === undefined) { - return defaultPersistRoot === undefined - ? memoryishPath - : path.join(defaultPersistRoot, pluginName); - } - - // Try parse `persist` as a URL - const url = maybeParseURL(persist); - if (url !== undefined) { - if (url.protocol === "memory:") { - return memoryishPath; - } else if (url.protocol === "file:") { - return fileURLToPath(url); + let result: string; + if (persist === false) { + result = memoryishPath; + } else if (persist === undefined) { + // If `persist` is undefined, use either the default path or fallback to the tmpPath + result = + defaultPersistRoot === undefined + ? memoryishPath + : path.join(defaultPersistRoot, pluginName); + } else { + // Try parse `persist` as a URL + const url = maybeParseURL(persist); + if (url !== undefined) { + if (url.protocol === "memory:") { + result = memoryishPath; + } else if (url.protocol === "file:") { + result = fileURLToPath(url); + } else { + throw new MiniflareCoreError( + "ERR_PERSIST_UNSUPPORTED", + `Unsupported "${url.protocol}" persistence protocol for storage: ${url.href}` + ); + } + } else { + // Otherwise, fallback to file storage + result = + persist === true + ? path.join(defaultPersistRoot ?? DEFAULT_PERSIST_ROOT, pluginName) + : persist; } - throw new MiniflareCoreError( - "ERR_PERSIST_UNSUPPORTED", - `Unsupported "${url.protocol}" persistence protocol for storage: ${url.href}` - ); } - // Otherwise, fallback to file storage - return persist === true - ? path.join(defaultPersistRoot ?? DEFAULT_PERSIST_ROOT, pluginName) - : persist; + // Normalize to forward slashes for workerd's disk service compatibility on + // Windows. workerd is a Unix-oriented C++ program and its disk service does + // not handle Windows backslash paths correctly, resulting in SQLITE_CANTOPEN + // errors. Forward slashes work for both Node.js fs APIs and workerd on all + // platforms. + return result.replaceAll("\\", "/"); } // https://github.com/cloudflare/workerd/blob/81d97010e44f848bb95d0083e2677bca8d1658b7/src/workerd/server/workerd-api.c%2B%2B#L436 From ccaf85fb841aacaa0b0b28456513b69bc6f48cb3 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Wed, 18 Feb 2026 22:21:13 +0000 Subject: [PATCH 29/45] [edge-preview-authenticated-proxy] Migrate to vitest-pool-workers v4 API - Use workspace:* for @cloudflare/vitest-pool-workers (v4 compatible) - Convert vitest config from defineWorkersConfig + poolOptions to cloudflareTest plugin - Update test tsconfig types for v4 (@cloudflare/workers-types + /types export) --- .../package.json | 2 +- .../tests/tsconfig.json | 6 ++++- .../vitest.config.mts | 22 +++++++++---------- pnpm-lock.yaml | 21 ++---------------- 4 files changed, 18 insertions(+), 33 deletions(-) diff --git a/packages/edge-preview-authenticated-proxy/package.json b/packages/edge-preview-authenticated-proxy/package.json index d0fb5b2d275e..a276ec4f5c73 100644 --- a/packages/edge-preview-authenticated-proxy/package.json +++ b/packages/edge-preview-authenticated-proxy/package.json @@ -12,7 +12,7 @@ }, "devDependencies": { "@cloudflare/eslint-config-shared": "workspace:*", - "@cloudflare/vitest-pool-workers": "catalog:vitest-3", + "@cloudflare/vitest-pool-workers": "workspace:*", "@cloudflare/workers-types": "catalog:default", "@types/cookie": "^0.6.0", "cookie": "^0.7.2", diff --git a/packages/edge-preview-authenticated-proxy/tests/tsconfig.json b/packages/edge-preview-authenticated-proxy/tests/tsconfig.json index 1ba476ce3ea9..588b1e21c815 100644 --- a/packages/edge-preview-authenticated-proxy/tests/tsconfig.json +++ b/packages/edge-preview-authenticated-proxy/tests/tsconfig.json @@ -4,7 +4,11 @@ "lib": ["esnext"], "module": "esnext", "moduleResolution": "bundler", - "types": ["@cloudflare/vitest-pool-workers"], + "types": [ + "@types/node", + "@cloudflare/workers-types", + "@cloudflare/vitest-pool-workers/types" + ], "allowJs": true, "checkJs": false, "noEmit": true, diff --git a/packages/edge-preview-authenticated-proxy/vitest.config.mts b/packages/edge-preview-authenticated-proxy/vitest.config.mts index d5e9dbec6b78..22c6c7801b78 100644 --- a/packages/edge-preview-authenticated-proxy/vitest.config.mts +++ b/packages/edge-preview-authenticated-proxy/vitest.config.mts @@ -1,21 +1,19 @@ import path from "node:path"; import { fileURLToPath } from "node:url"; -import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; +import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; +import { defineConfig } from "vitest/config"; const __dirname = path.dirname(fileURLToPath(import.meta.url)); -export default defineWorkersConfig({ - test: { - poolOptions: { - workers: { - singleWorker: true, - isolatedStorage: false, - wrangler: { - configPath: "./wrangler.jsonc", - }, +export default defineConfig({ + plugins: [ + cloudflareTest({ + wrangler: { + configPath: "./wrangler.jsonc", }, - }, - }, + }), + ], + test: {}, resolve: { // promjs has broken package.json (main points to lib/index.js but files are at root) alias: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 74366feee445..914ce6cdcba8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2003,8 +2003,8 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': - specifier: catalog:vitest-3 - version: 0.10.15(@cloudflare/workers-types@4.20260218.0)(@vitest/runner@4.1.0-beta.4)(@vitest/snapshot@4.1.0-beta.4)(vitest@4.1.0-beta.4) + specifier: workspace:* + version: link:../vitest-pool-workers '@cloudflare/workers-types': specifier: catalog:default version: 4.20260218.0 @@ -16577,23 +16577,6 @@ snapshots: - bufferutil - utf-8-validate - '@cloudflare/vitest-pool-workers@0.10.15(@cloudflare/workers-types@4.20260218.0)(@vitest/runner@4.1.0-beta.4)(@vitest/snapshot@4.1.0-beta.4)(vitest@4.1.0-beta.4)': - dependencies: - '@vitest/runner': 4.1.0-beta.4 - '@vitest/snapshot': 4.1.0-beta.4 - birpc: 0.2.14 - cjs-module-lexer: 1.2.3 - devalue: 5.3.2 - miniflare: 4.20251210.0 - semver: 7.7.3 - vitest: 4.1.0-beta.4(@types/node@20.19.9)(@vitest/ui@4.1.0-beta.4)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.1)) - wrangler: 4.54.0(@cloudflare/workers-types@4.20260218.0) - zod: 3.25.76 - transitivePeerDependencies: - - '@cloudflare/workers-types' - - bufferutil - - utf-8-validate - '@cloudflare/workerd-darwin-64@1.20251210.0': optional: true From ebb56c4ce928e43cc57d7bf601b3cd8e1048cd8c Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 19 Feb 2026 09:28:22 +0000 Subject: [PATCH 30/45] [vitest-pool-workers] Exclude SQLite DO fixture on Windows (workerd bug) workerd's Windows SQLite code path in sqlite.c++:511 uses kj::Path::toString() which produces Unix-style forward-slash paths (e.g. D:/a/_temp/...), but passes nullptr VFS to sqlite3_open_v2() which uses the win32 VFS expecting native paths. This causes SQLITE_CANTOPEN. The fix is in workerd (toString -> toNativeString), skip the test until then. --- fixtures/vitest-pool-workers-examples/vitest.config.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/fixtures/vitest-pool-workers-examples/vitest.config.ts b/fixtures/vitest-pool-workers-examples/vitest.config.ts index edc00aef4fb2..7c372d5dad24 100644 --- a/fixtures/vitest-pool-workers-examples/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/vitest.config.ts @@ -5,7 +5,15 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { teardownTimeout: 1_000, - projects: ["*/vitest.*config.*ts"], + projects: [ + "*/vitest.*config.*ts", + // workerd's SQLite VFS on Windows uses kj::Path::toString() which produces + // Unix-style forward-slash paths, causing SQLITE_CANTOPEN with the win32 VFS. + // Exclude SQLite-backed DO fixtures until workerd fixes sqlite.c++:511. + ...(process.platform === "win32" + ? ["!durable-objects/vitest.*config.*ts"] + : []), + ], globalSetup: ["./vitest.global.ts"], }, }); From b5561cfef6a503ebdc8011297a60d4f3b785b7d2 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 19 Feb 2026 12:04:14 +0000 Subject: [PATCH 31/45] [vitest-pool-workers] Make runner DO ephemeral MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The __VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__ doesn't need persistent state — it's just a singleton host for running tests. Making it ephemeral avoids disk-backed SQLite, which hits a workerd bug on Windows (sqlite.c++ uses Unix-style paths with the win32 VFS, causing SQLITE_CANTOPEN for any project with DOs). --- packages/vitest-pool-workers/src/pool/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/vitest-pool-workers/src/pool/index.ts b/packages/vitest-pool-workers/src/pool/index.ts index 0d7571dabb27..37d353836c35 100644 --- a/packages/vitest-pool-workers/src/pool/index.ts +++ b/packages/vitest-pool-workers/src/pool/index.ts @@ -8,6 +8,7 @@ import getPort, { portNumbers } from "get-port"; import { getNodeCompat, kCurrentWorker, + kUnsafeEphemeralUniqueKey, Log, LogLevel, maybeApply, @@ -435,10 +436,13 @@ async function buildProjectWorkerOptions( } // Make sure we define the `__VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__` Durable Object, - // which is the singleton host for running tests. + // which is the singleton host for running tests. It's ephemeral because the + // runner doesn't need persistent state, and disk-backed DOs hit a workerd bug + // on Windows (sqlite.c++ uses Unix-style paths with the win32 SQLite VFS). runnerWorker.durableObjects[RUNNER_OBJECT_BINDING] = { className: "__VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__", unsafePreventEviction: true, + unsafeUniqueKey: kUnsafeEphemeralUniqueKey, }; // Vite has its own define mechanism, but we can't control it from custom From 632464396568b062797e491200d86c83b9558109 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 19 Feb 2026 14:10:35 +0000 Subject: [PATCH 32/45] [vitest-pool-workers] Revert ephemeral runner DO Ephemeral DOs don't support getByName() which the pool needs to connect to the runner singleton via getDurableObjectNamespace(). The runner DO uses KV-backed storage (not SQLite) so it isn't affected by the Windows SQLite path bug anyway. --- packages/vitest-pool-workers/src/pool/index.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/vitest-pool-workers/src/pool/index.ts b/packages/vitest-pool-workers/src/pool/index.ts index 37d353836c35..0d7571dabb27 100644 --- a/packages/vitest-pool-workers/src/pool/index.ts +++ b/packages/vitest-pool-workers/src/pool/index.ts @@ -8,7 +8,6 @@ import getPort, { portNumbers } from "get-port"; import { getNodeCompat, kCurrentWorker, - kUnsafeEphemeralUniqueKey, Log, LogLevel, maybeApply, @@ -436,13 +435,10 @@ async function buildProjectWorkerOptions( } // Make sure we define the `__VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__` Durable Object, - // which is the singleton host for running tests. It's ephemeral because the - // runner doesn't need persistent state, and disk-backed DOs hit a workerd bug - // on Windows (sqlite.c++ uses Unix-style paths with the win32 SQLite VFS). + // which is the singleton host for running tests. runnerWorker.durableObjects[RUNNER_OBJECT_BINDING] = { className: "__VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__", unsafePreventEviction: true, - unsafeUniqueKey: kUnsafeEphemeralUniqueKey, }; // Vite has its own define mechanism, but we can't control it from custom From 8791f8b2a07a73a6f502b078d4ef552de95ca197 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 19 Feb 2026 15:27:17 +0000 Subject: [PATCH 33/45] [vitest-pool-workers] Use in-memory DO storage on Windows workerd's Windows SQLite VFS uses kj::Path::toString() which produces Unix-style forward-slash paths, causing SQLITE_CANTOPEN with the win32 VFS (cloudflare/workerd#6110). Instead of excluding SQLite DO fixtures on Windows, use unsafeEphemeralDurableObjects to switch all DOs to in-memory storage. This avoids disk SQLite paths entirely while keeping DOs fully functional (including SQLite-backed ones). Cross-restart persistence isn't needed for tests. --- .../vitest.config.ts | 10 +--------- packages/vitest-pool-workers/src/pool/index.ts | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/fixtures/vitest-pool-workers-examples/vitest.config.ts b/fixtures/vitest-pool-workers-examples/vitest.config.ts index 7c372d5dad24..edc00aef4fb2 100644 --- a/fixtures/vitest-pool-workers-examples/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/vitest.config.ts @@ -5,15 +5,7 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { teardownTimeout: 1_000, - projects: [ - "*/vitest.*config.*ts", - // workerd's SQLite VFS on Windows uses kj::Path::toString() which produces - // Unix-style forward-slash paths, causing SQLITE_CANTOPEN with the win32 VFS. - // Exclude SQLite-backed DO fixtures until workerd fixes sqlite.c++:511. - ...(process.platform === "win32" - ? ["!durable-objects/vitest.*config.*ts"] - : []), - ], + projects: ["*/vitest.*config.*ts"], globalSetup: ["./vitest.global.ts"], }, }); diff --git a/packages/vitest-pool-workers/src/pool/index.ts b/packages/vitest-pool-workers/src/pool/index.ts index 0d7571dabb27..705f3fe11455 100644 --- a/packages/vitest-pool-workers/src/pool/index.ts +++ b/packages/vitest-pool-workers/src/pool/index.ts @@ -614,11 +614,25 @@ async function buildProjectMiniflareOptions( } } + const workers = [runnerWorker, ...auxiliaryWorkers]; + + // workerd's Windows SQLite VFS uses kj::Path::toString() which produces + // Unix-style forward-slash paths, causing SQLITE_CANTOPEN with the default + // win32 VFS. Use in-memory DO storage on Windows to avoid disk SQLite + // entirely. DOs still work (including SQLite-backed ones), just without + // cross-restart persistence, which doesn't matter for tests. + // TODO: Remove once workerd ships the fix (cloudflare/workerd#6110) + if (process.platform === "win32") { + for (const worker of workers) { + worker.unsafeEphemeralDurableObjects = true; + } + } + return { ...SHARED_MINIFLARE_OPTIONS, inspectorPort, unsafeModuleFallbackService: moduleFallbackService, - workers: [runnerWorker, ...auxiliaryWorkers], + workers, }; } export async function getProjectMiniflare( From 4bb7043f822e0cd2c62209d19ba6a6b537f756ca Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 19 Feb 2026 15:37:17 +0000 Subject: [PATCH 34/45] [vitest-pool-workers] Revert in-memory DOs, re-add Windows exclusion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit unsafeEphemeralDurableObjects doesn't work: inMemory storage doesn't support enableSql (SQLite-backed DOs) and listDurableObjectIds reads from disk. There's no miniflare-level workaround for the workerd Windows SQLite path bug — disk-backed SQLite DOs require localDisk storage. Re-add the durable-objects fixture exclusion on Windows until workerd#6110 ships. --- .../vitest.config.ts | 10 +++++++++- packages/vitest-pool-workers/src/pool/index.ts | 16 +--------------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/fixtures/vitest-pool-workers-examples/vitest.config.ts b/fixtures/vitest-pool-workers-examples/vitest.config.ts index edc00aef4fb2..771d884e53f0 100644 --- a/fixtures/vitest-pool-workers-examples/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/vitest.config.ts @@ -5,7 +5,15 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { teardownTimeout: 1_000, - projects: ["*/vitest.*config.*ts"], + projects: [ + "*/vitest.*config.*ts", + // workerd's Windows SQLite VFS uses kj::Path::toString() (Unix-style + // paths) with the win32 VFS, causing SQLITE_CANTOPEN for disk-backed + // SQLite DOs. Exclude until workerd ships the fix (cloudflare/workerd#6110). + ...(process.platform === "win32" + ? ["!durable-objects/vitest.*config.*ts"] + : []), + ], globalSetup: ["./vitest.global.ts"], }, }); diff --git a/packages/vitest-pool-workers/src/pool/index.ts b/packages/vitest-pool-workers/src/pool/index.ts index 705f3fe11455..0d7571dabb27 100644 --- a/packages/vitest-pool-workers/src/pool/index.ts +++ b/packages/vitest-pool-workers/src/pool/index.ts @@ -614,25 +614,11 @@ async function buildProjectMiniflareOptions( } } - const workers = [runnerWorker, ...auxiliaryWorkers]; - - // workerd's Windows SQLite VFS uses kj::Path::toString() which produces - // Unix-style forward-slash paths, causing SQLITE_CANTOPEN with the default - // win32 VFS. Use in-memory DO storage on Windows to avoid disk SQLite - // entirely. DOs still work (including SQLite-backed ones), just without - // cross-restart persistence, which doesn't matter for tests. - // TODO: Remove once workerd ships the fix (cloudflare/workerd#6110) - if (process.platform === "win32") { - for (const worker of workers) { - worker.unsafeEphemeralDurableObjects = true; - } - } - return { ...SHARED_MINIFLARE_OPTIONS, inspectorPort, unsafeModuleFallbackService: moduleFallbackService, - workers, + workers: [runnerWorker, ...auxiliaryWorkers], }; } export async function getProjectMiniflare( From a8a1a8c1a94cff331bcf45a48f5eddfd7a1ece32 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 19 Feb 2026 16:23:37 +0000 Subject: [PATCH 35/45] [vitest-pool-workers] Make runner DO ephemeral to avoid Windows SQLite path bug --- packages/vitest-pool-workers/src/pool/index.ts | 10 ++++++++-- .../vitest-pool-workers/src/worker/durable-objects.ts | 10 ++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/packages/vitest-pool-workers/src/pool/index.ts b/packages/vitest-pool-workers/src/pool/index.ts index 0d7571dabb27..7c1673c787c1 100644 --- a/packages/vitest-pool-workers/src/pool/index.ts +++ b/packages/vitest-pool-workers/src/pool/index.ts @@ -8,6 +8,7 @@ import getPort, { portNumbers } from "get-port"; import { getNodeCompat, kCurrentWorker, + kUnsafeEphemeralUniqueKey, Log, LogLevel, maybeApply, @@ -435,10 +436,14 @@ async function buildProjectWorkerOptions( } // Make sure we define the `__VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__` Durable Object, - // which is the singleton host for running tests. + // which is the singleton host for running tests. It's ephemeral (in-memory) + // because the runner doesn't need persistent state, and all disk-backed DOs + // hit a workerd bug on Windows where SQLite paths use Unix-style forward + // slashes (cloudflare/workerd#6110). runnerWorker.durableObjects[RUNNER_OBJECT_BINDING] = { className: "__VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__", unsafePreventEviction: true, + unsafeUniqueKey: kUnsafeEphemeralUniqueKey, }; // Vite has its own define mechanism, but we can't control it from custom @@ -668,7 +673,8 @@ export async function connectToMiniflareSocket( workerName ); - const stub = ns.getByName("singleton"); + // @ts-expect-error `ColoLocalActorNamespace`s are not included in types + const stub = ns.get("singleton"); const res = await stub.fetch("http://placeholder", { headers: { diff --git a/packages/vitest-pool-workers/src/worker/durable-objects.ts b/packages/vitest-pool-workers/src/worker/durable-objects.ts index bdc993a700e3..b5a8d564c276 100644 --- a/packages/vitest-pool-workers/src/worker/durable-objects.ts +++ b/packages/vitest-pool-workers/src/worker/durable-objects.ts @@ -177,10 +177,12 @@ export function runInRunnerObject( instance: __VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__ ) => R | Promise ): Promise { - const stub = - exports.__VITEST_POOL_WORKERS_RUNNER_DURABLE_OBJECT__.getByName( - "singleton" - ); + // Runner DO is ephemeral (ColoLocalActorNamespace), which has .get(name) + // instead of the standard idFromName()/get(id) API + const ns = env["__VITEST_POOL_WORKERS_RUNNER_OBJECT"] as unknown as { + get(name: string): Fetcher; + }; + const stub = ns.get("singleton"); return runInStub(stub, callback); } From 8ca9dadd3d236f24494f939303780fd884c16d62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Somhairle=20MacLe=C3=B2id?= Date: Thu, 19 Feb 2026 17:43:21 +0000 Subject: [PATCH 36/45] Update packages/wrangler/src/codemod.ts Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- packages/wrangler/src/codemod.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/wrangler/src/codemod.ts b/packages/wrangler/src/codemod.ts index 8e9ccfb01ea5..263c0341967f 100644 --- a/packages/wrangler/src/codemod.ts +++ b/packages/wrangler/src/codemod.ts @@ -35,7 +35,7 @@ function vitestPoolV3ToV4(args: string | undefined) { `Selected Vitest config file does not exist: '${args}'` ); } - filePath = path.join(process.cwd(), args); + filePath = path.resolve(process.cwd(), args); } else if (existsSync(filePathTS)) { filePath = filePathTS; } else if (existsSync(filePathJS)) { From d3ef67419f4e8dd0e371d6eb1d83b7a1fb8f0799 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 19 Feb 2026 17:52:42 +0000 Subject: [PATCH 37/45] [vitest-pool-workers] Fix review findings: bugs, error handling, and dead code - Remove duplicate tailStream in WORKER_ENTRYPOINT_KEYS - Fix cycle detection in getCjsNamedExports (seen.add wrong variable) - Fix isEnabled() to match assertIsEnabled() semantics (disable flag precedence) - Fix missing space in user-facing error message - Fix SELF proxy crash on non-function properties - Fix structuredSerializableStringify mutating caller's object - Improve connectToMiniflareSocket error on WebSocket failure - Add no-op methods to BroadcastChannel stub - Fix off() to map Vitest event names to WebSocket events - Fix garbled getSerializedOptions error message - Remove TODO(now), commented-out code, stale comments - Remove redundant ?? true after Zod default - Add cross-referencing comments for shared magic strings --- .../vitest.config.ts | 3 +-- .../src/pool/cloudflare-pool-worker.ts | 18 ++++++++++++++---- .../src/pool/compatibility-flag-assertions.ts | 4 +++- .../vitest-pool-workers/src/pool/config.ts | 19 +++++++++---------- .../vitest-pool-workers/src/pool/index.ts | 9 +++++++-- .../src/pool/module-fallback.ts | 3 +-- .../src/worker/durable-objects.ts | 2 +- .../src/worker/entrypoints.ts | 6 +----- .../vitest-pool-workers/src/worker/env.ts | 12 ++++++++---- .../vitest-pool-workers/src/worker/index.ts | 13 +++++++++++-- 10 files changed, 56 insertions(+), 33 deletions(-) diff --git a/fixtures/vitest-pool-workers-examples/vitest.config.ts b/fixtures/vitest-pool-workers-examples/vitest.config.ts index 771d884e53f0..164ab4e8df4a 100644 --- a/fixtures/vitest-pool-workers-examples/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/vitest.config.ts @@ -1,5 +1,4 @@ -// This file is named `vitest.workers.config.ts` so it doesn't get included -// in the monorepo's `vitest.workspace.ts`. +// Root vitest config for the vitest-pool-workers-examples fixture. import { defineConfig } from "vitest/config"; export default defineConfig({ diff --git a/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts b/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts index f0caf5e074ce..0e331d24df5a 100644 --- a/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts +++ b/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts @@ -220,10 +220,20 @@ export class CloudflarePoolWorker implements PoolWorker { } } - off(_event: string, callback: (_arg: unknown) => void): void { - // The event names that Vitest uses and the event names that Websockets use don't fully match up. - // As such, we hardcode "close" given that Vitest's internals only actually seem to call off() for "close". - this.socket?.removeEventListener("close", callback as () => void); + off(event: string, callback: (_arg: unknown) => void): void { + // Map Vitest event names to WebSocket event names + const eventMap: Record = { + exit: "close", + message: "message", + error: "error", + }; + const wsEvent = eventMap[event]; + if (wsEvent !== undefined) { + this.socket?.removeEventListener( + wsEvent as "close" | "message" | "error", + callback as () => void + ); + } } // Vitest does not have a corresponding `serialize()` option, so we can't actually use this for serialisation diff --git a/packages/vitest-pool-workers/src/pool/compatibility-flag-assertions.ts b/packages/vitest-pool-workers/src/pool/compatibility-flag-assertions.ts index 22e92faf1224..aaa9574393c6 100644 --- a/packages/vitest-pool-workers/src/pool/compatibility-flag-assertions.ts +++ b/packages/vitest-pool-workers/src/pool/compatibility-flag-assertions.ts @@ -62,8 +62,10 @@ export class CompatibilityFlagAssertions { disableFlag: string, defaultOnDate?: string ): boolean { + if (this.#flagExists(disableFlag)) { + return false; + } return ( - !this.#flagExists(disableFlag) || this.#flagExists(enableFlag) || isDateSufficient(this.#compatibilityDate, defaultOnDate) ); diff --git a/packages/vitest-pool-workers/src/pool/config.ts b/packages/vitest-pool-workers/src/pool/config.ts index 992f26c86262..2baab1005a9a 100644 --- a/packages/vitest-pool-workers/src/pool/config.ts +++ b/packages/vitest-pool-workers/src/pool/config.ts @@ -258,16 +258,15 @@ async function parseCustomPoolOptions( ? remoteProxySessionsDataMap.get(options.wrangler.configPath) : undefined; - const remoteProxySessionData = - options.remoteBindings ?? true - ? await wrangler.maybeStartOrUpdateRemoteProxySession( - { - path: options.wrangler.configPath, - environment: options.wrangler.environment, - }, - preExistingRemoteProxySessionData ?? null - ) - : null; + const remoteProxySessionData = options.remoteBindings + ? await wrangler.maybeStartOrUpdateRemoteProxySession( + { + path: options.wrangler.configPath, + environment: options.wrangler.environment, + }, + preExistingRemoteProxySessionData ?? null + ) + : null; if (options.wrangler?.configPath && remoteProxySessionData) { remoteProxySessionsDataMap.set( diff --git a/packages/vitest-pool-workers/src/pool/index.ts b/packages/vitest-pool-workers/src/pool/index.ts index 7c1673c787c1..6dec7f7552df 100644 --- a/packages/vitest-pool-workers/src/pool/index.ts +++ b/packages/vitest-pool-workers/src/pool/index.ts @@ -473,7 +473,7 @@ async function buildProjectWorkerOptions( // module names. Setting `modulesRoot` to a drive letter and prepending this // to paths ensures correct names. This requires us to specify `contents` // with module definitions though, as the new paths don't exist. - // TODO(now): need to add source URL comments here to ensure those are correct + // TODO: add source URL comments to injected modules for better stack traces const modulesRoot = process.platform === "win32" ? "Z:\\" : "/"; runnerWorker.modulesRoot = modulesRoot; @@ -686,7 +686,12 @@ export async function connectToMiniflareSocket( }); const webSocket = res.webSocket; - assert(webSocket !== null); + if (webSocket === null) { + const body = await res.text().catch(() => ""); + throw new Error( + `Failed to establish WebSocket to runner (status ${res.status}): ${body}` + ); + } webSocket.accept(); diff --git a/packages/vitest-pool-workers/src/pool/module-fallback.ts b/packages/vitest-pool-workers/src/pool/module-fallback.ts index 25bcdcb4fffd..8a358206ea24 100644 --- a/packages/vitest-pool-workers/src/pool/module-fallback.ts +++ b/packages/vitest-pool-workers/src/pool/module-fallback.ts @@ -162,14 +162,13 @@ async function getCjsNamedExports( } try { const resolvedContents = fs.readFileSync(resolved, "utf8"); - seen.add(filePath); + seen.add(resolved); const resolvedNames = await getCjsNamedExports( vite, resolved, resolvedContents, seen ); - seen.delete(filePath); for (const name of resolvedNames) { result.add(name); } diff --git a/packages/vitest-pool-workers/src/worker/durable-objects.ts b/packages/vitest-pool-workers/src/worker/durable-objects.ts index b5a8d564c276..9bd26f011392 100644 --- a/packages/vitest-pool-workers/src/worker/durable-objects.ts +++ b/packages/vitest-pool-workers/src/worker/durable-objects.ts @@ -178,7 +178,7 @@ export function runInRunnerObject( ) => R | Promise ): Promise { // Runner DO is ephemeral (ColoLocalActorNamespace), which has .get(name) - // instead of the standard idFromName()/get(id) API + // instead of the standard idFromName()/get(id) API. const ns = env["__VITEST_POOL_WORKERS_RUNNER_OBJECT"] as unknown as { get(name: string): Fetcher; }; diff --git a/packages/vitest-pool-workers/src/worker/entrypoints.ts b/packages/vitest-pool-workers/src/worker/entrypoints.ts index 6bd30b3034de..cd38eb44aaa6 100644 --- a/packages/vitest-pool-workers/src/worker/entrypoints.ts +++ b/packages/vitest-pool-workers/src/worker/entrypoints.ts @@ -182,7 +182,6 @@ const WORKER_ENTRYPOINT_KEYS = [ "scheduled", "queue", "test", - "tailStream", "email", ] as const; const DURABLE_OBJECT_KEYS = [ @@ -298,7 +297,6 @@ export function createWorkerEntrypointWrapper( ); // Add prototype methods for all default handlers - // const prototype = Entrypoint.prototype as unknown as Record; for (const key of WORKER_ENTRYPOINT_KEYS) { Wrapper.prototype[key] = async function ( this: WorkerEntrypoint, @@ -337,7 +335,7 @@ export function createWorkerEntrypointWrapper( } } else { // Assuming the user has messed up - const message = `Expected ${entrypoint} export of ${mainPath}to be an object or a class, got ${entrypointValue}`; + const message = `Expected ${entrypoint} export of ${mainPath} to be an object or a class, got ${entrypointValue}`; throw new TypeError(message); } }); @@ -410,8 +408,6 @@ export function createDurableObjectWrapper( return getRPCPropertyCallableThenable(key, property); }); - // Wrapper[Symbol.hasInstance] = () => true - Wrapper.prototype[kEnsureInstance] = async function ( this: DurableObjectWrapper ) { diff --git a/packages/vitest-pool-workers/src/worker/env.ts b/packages/vitest-pool-workers/src/worker/env.ts index c396bbc01374..f07b2b38e822 100644 --- a/packages/vitest-pool-workers/src/worker/env.ts +++ b/packages/vitest-pool-workers/src/worker/env.ts @@ -11,8 +11,12 @@ export const SELF = new Proxy( {}, { get(_, p) { - // @ts-expect-error This works at runtime - return exports.default[p].bind(exports.default); + const target = exports.default as unknown as Record< + string | symbol, + unknown + >; + const value = target[p]; + return typeof value === "function" ? value.bind(target) : value; }, } ); @@ -24,8 +28,8 @@ export function getSerializedOptions(): SerializedOptions { assert( options !== undefined, - "Expected serialised options" + - Object.keys(__vitest_worker__.providedContext) + "Expected serialised options, got keys: " + + Object.keys(__vitest_worker__.providedContext).join(", ") ); const parsedOptions = JSON.parse(options); return { diff --git a/packages/vitest-pool-workers/src/worker/index.ts b/packages/vitest-pool-workers/src/worker/index.ts index 69d17585181c..917fda91f35d 100644 --- a/packages/vitest-pool-workers/src/worker/index.ts +++ b/packages/vitest-pool-workers/src/worker/index.ts @@ -27,8 +27,17 @@ function structuredSerializableParse(value: string): unknown { globalThis.Buffer = Buffer; // Required by `vite-node/source-map` -// Mock Service Worker needs this -globalThis.BroadcastChannel = class {}; +// Mock Service Worker needs this — stub with no-op methods since workerd +// doesn't provide BroadcastChannel +globalThis.BroadcastChannel = class { + constructor(public name: string) {} + postMessage(_message: unknown) {} + close() {} + addEventListener(_type: string, _listener: unknown) {} + removeEventListener(_type: string, _listener: unknown) {} + onmessage: ((event: unknown) => void) | null = null; + onmessageerror: ((event: unknown) => void) | null = null; +} as unknown as typeof BroadcastChannel; globalThis.process = process; // Required by `vite-node` process.argv = []; // Required by `@vitest/utils` From c4e2a7ce75b34972adf602524a04d48f8da68d2b Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Mon, 23 Feb 2026 14:06:47 +0000 Subject: [PATCH 38/45] [vitest-pool-workers] Update Vitest source links to v4.0.18 --- .../vitest.workers.config.staging.ts | 28 ------------------- .../vitest.workers.config.ts | 28 ------------------- .../src/pool/cloudflare-pool-worker.ts | 4 +-- .../vitest-pool-workers/src/pool/loopback.ts | 2 +- .../vitest-pool-workers/src/pool/plugin.ts | 4 +-- .../src/worker/node/console.ts | 2 +- .../src/worker/types-globals.d.ts | 4 +-- 7 files changed, 8 insertions(+), 64 deletions(-) diff --git a/fixtures/vitest-pool-workers-remote-bindings/vitest.workers.config.staging.ts b/fixtures/vitest-pool-workers-remote-bindings/vitest.workers.config.staging.ts index 597e89590521..b2be2630b95e 100644 --- a/fixtures/vitest-pool-workers-remote-bindings/vitest.workers.config.staging.ts +++ b/fixtures/vitest-pool-workers-remote-bindings/vitest.workers.config.staging.ts @@ -1,15 +1,5 @@ import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; -class FilteredPushArray extends Array { - constructor(private readonly predicate: (item: T) => boolean) { - super(); - } - - push(...items: T[]) { - return super.push(...items.filter(this.predicate)); - } -} - export default defineWorkersConfig({ test: { include: ["test-staging/**/*.spec.ts"], @@ -18,26 +8,8 @@ export default defineWorkersConfig({ wrangler: { configPath: "./wrangler.json", environment: "staging" }, }, }, - - // Configure the `vite-node` server used by Vitest code to import configs, - // custom pools and tests. By default, Vitest effectively applies Vite - // transforms to all files outside `node_modules`. This means by default, - // our custom pool code is transformed by Vite during development, but not - // when published, leading to possible behaviour mismatches. To fix this, - // we ensure file paths containing `packages/vitest-pool-workers/dist` are - // 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/v2.1.1/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: any) => { - const str = item.toString(); - return str !== "/^(?!.*node_modules).*\\.mjs$/"; - }), external: [ /packages\/vitest-pool-workers\/dist/, /packages\/wrangler\//, diff --git a/fixtures/vitest-pool-workers-remote-bindings/vitest.workers.config.ts b/fixtures/vitest-pool-workers-remote-bindings/vitest.workers.config.ts index 0bd74ad25c15..c84e97c883ae 100644 --- a/fixtures/vitest-pool-workers-remote-bindings/vitest.workers.config.ts +++ b/fixtures/vitest-pool-workers-remote-bindings/vitest.workers.config.ts @@ -1,15 +1,5 @@ import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; -class FilteredPushArray extends Array { - constructor(private readonly predicate: (item: T) => boolean) { - super(); - } - - push(...items: T[]) { - return super.push(...items.filter(this.predicate)); - } -} - export default defineWorkersConfig({ test: { include: ["test/**/*.spec.ts"], @@ -18,26 +8,8 @@ export default defineWorkersConfig({ wrangler: { configPath: "./wrangler.json" }, }, }, - - // Configure the `vite-node` server used by Vitest code to import configs, - // custom pools and tests. By default, Vitest effectively applies Vite - // transforms to all files outside `node_modules`. This means by default, - // our custom pool code is transformed by Vite during development, but not - // when published, leading to possible behaviour mismatches. To fix this, - // we ensure file paths containing `packages/vitest-pool-workers/dist` are - // 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/v2.1.1/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: any) => { - const str = item.toString(); - return str !== "/^(?!.*node_modules).*\\.mjs$/"; - }), external: [ /packages\/vitest-pool-workers\/dist/, /packages\/wrangler\//, diff --git a/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts b/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts index 0e331d24df5a..69bc1d0650ac 100644 --- a/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts +++ b/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts @@ -48,7 +48,7 @@ export class CloudflarePoolWorker implements PoolWorker { async start(): Promise { let resolvedPoolOptions: WorkersPoolOptions; if (typeof this.poolOptions === "function") { - // https://github.com/vitest-dev/vitest/blob/v4.0.15/packages/vitest/src/integrations/inject.ts + // https://github.com/vitest-dev/vitest/blob/v4.0.18/packages/vitest/src/integrations/inject.ts const inject = ( key: K ): ProvidedContext[K] => { @@ -158,7 +158,7 @@ export class CloudflarePoolWorker implements PoolWorker { ) as WorkerResponse; // This is a birpc serialised message before it's been parsed, which is why the properties are so unintelligible - // We're looking for a `fetch()` RPC call: https://github.com/vitest-dev/vitest/blob/772923645f250674e937dd887572e76e971524b9/packages/vitest/src/types/rpc.ts#L8 + // We're looking for a `fetch()` RPC call: https://github.com/vitest-dev/vitest/blob/v4.0.18/packages/vitest/src/types/rpc.ts#L8 if ( d && typeof d === "object" && diff --git a/packages/vitest-pool-workers/src/pool/loopback.ts b/packages/vitest-pool-workers/src/pool/loopback.ts index fb8cb5b8d9ce..5c380d574d9f 100644 --- a/packages/vitest-pool-workers/src/pool/loopback.ts +++ b/packages/vitest-pool-workers/src/pool/loopback.ts @@ -5,7 +5,7 @@ import { Response } from "miniflare"; import { isFileNotFoundError } from "./helpers"; import type { Awaitable, Miniflare, Request } from "miniflare"; -// Based on https://github.com/vitest-dev/vitest/blob/v4.0.15/packages/snapshot/src/env/node.ts +// Based on https://github.com/vitest-dev/vitest/blob/v4.0.18/packages/snapshot/src/env/node.ts async function handleSnapshotRequest( request: Request, url: URL diff --git a/packages/vitest-pool-workers/src/pool/plugin.ts b/packages/vitest-pool-workers/src/pool/plugin.ts index c8762f1d39c5..ef120d6bebba 100644 --- a/packages/vitest-pool-workers/src/pool/plugin.ts +++ b/packages/vitest-pool-workers/src/pool/plugin.ts @@ -61,7 +61,7 @@ export function cloudflareTest( context.project.config.snapshotEnvironment = "cloudflare:snapshot"; }, // Run after `vitest:project` plugin: - // https://github.com/vitest-dev/vitest/blob/v3.0.5/packages/vitest/src/node/plugins/workspace.ts#L37 + // https://github.com/vitest-dev/vitest/blob/v4.0.18/packages/vitest/src/node/plugins/workspace.ts#L122 config(config) { config.resolve ??= {}; config.resolve.conditions ??= []; @@ -84,7 +84,7 @@ export function cloudflareTest( 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/v3.0.5/packages/vitest/src/node/plugins/utils.ts#L156 + // https://github.com/vitest-dev/vitest/blob/v4.0.18/packages/vitest/src/node/plugins/utils.ts#L121 ensureArrayIncludes(config.resolve.mainFields, requiredMainFields); // Apply `package.json` `browser` field remapping in SSR mode: diff --git a/packages/vitest-pool-workers/src/worker/node/console.ts b/packages/vitest-pool-workers/src/worker/node/console.ts index d3f69e0b9747..1ec811d02f3c 100644 --- a/packages/vitest-pool-workers/src/worker/node/console.ts +++ b/packages/vitest-pool-workers/src/worker/node/console.ts @@ -47,7 +47,7 @@ export class Console { } // Vitest expects this function to be called `value`: - // https://github.com/vitest-dev/vitest/blob/v1.0.0-beta.5/packages/vitest/src/runtime/console.ts#L16 + // https://github.com/vitest-dev/vitest/blob/v4.0.18/packages/vitest/src/runtime/console.ts#L19 value(stream: Writable, data: unknown[]): void { stream.write(formatWithOptions(this.#inspectOptions, ...data) + "\n"); } diff --git a/packages/vitest-pool-workers/src/worker/types-globals.d.ts b/packages/vitest-pool-workers/src/worker/types-globals.d.ts index f0f719723ebc..2c6db96357d5 100644 --- a/packages/vitest-pool-workers/src/worker/types-globals.d.ts +++ b/packages/vitest-pool-workers/src/worker/types-globals.d.ts @@ -3,9 +3,9 @@ import type { VitestUtils, WorkerGlobalState } from "vitest"; declare global { - // https://github.com/vitest-dev/vitest/blob/1ec3a8b687c57153ed3d0d4777d7765c18f3cc82/packages/vitest/src/runtime/utils.ts#L24 + // https://github.com/vitest-dev/vitest/blob/v4.0.18/packages/vitest/src/runtime/utils.ts#L24 const __vitest_worker__: WorkerGlobalState; - // https://github.com/vitest-dev/vitest/blob/1ec3a8b687c57153ed3d0d4777d7765c18f3cc82/packages/vitest/src/runtime/moduleRunner/moduleRunner.ts#L86 + // https://github.com/vitest-dev/vitest/blob/v4.0.18/packages/vitest/src/runtime/moduleRunner/moduleRunner.ts#L86 const __vitest_mocker__: VitestUtils & { moduleRunner: { import: (id: string) => Promise>; From ef2ba23748e05ab14b84995096b7155c0975de74 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Mon, 23 Feb 2026 14:59:21 +0000 Subject: [PATCH 39/45] [vitest-pool-workers] Fix review findings: bugs, tests, and nits - Fix prototype nesting in createProxyPrototypeClass (re-wraps on every construction) - Fix off() unable to remove wrapped message/error listeners - Close WebSocket explicitly in stop() - Guard actionResults map against fetch failure leaks - Avoid mutating caller objects in structuredSerializableStringify and send() - Fix chunking test to use meaningful 1.2 MiB payload - Fix console test no-op assertion and remove debug log - Remove duplicate isolation test, clean up stale config options - Add wrangler changeset for new codemod command - Fix pnpm path in setTimeout caller detection regex - Remove unused warnSpy variables in context-exports fixture - Use semver check instead of startsWith for version guard --- .changeset/wrangler-codemod-command.md | 5 + .../test/integration-self.test.ts | 2 - .../src/pool/cloudflare-pool-worker.ts | 111 ++++++++++++------ .../vitest-pool-workers/src/pool/index.ts | 11 +- .../vitest-pool-workers/src/worker/index.ts | 4 +- .../vitest-pool-workers/test/chunking.test.ts | 2 +- .../vitest-pool-workers/test/console.test.ts | 10 +- .../test/isolation.test.ts | 48 +------- 8 files changed, 94 insertions(+), 99 deletions(-) create mode 100644 .changeset/wrangler-codemod-command.md diff --git a/.changeset/wrangler-codemod-command.md b/.changeset/wrangler-codemod-command.md new file mode 100644 index 000000000000..a776d6452c36 --- /dev/null +++ b/.changeset/wrangler-codemod-command.md @@ -0,0 +1,5 @@ +--- +"wrangler": minor +--- + +Add `wrangler codemod vitest-pool-v3-to-v4` command to help migrate `@cloudflare/vitest-pool-workers` config files from v3 to v4. diff --git a/fixtures/vitest-pool-workers-examples/context-exports/test/integration-self.test.ts b/fixtures/vitest-pool-workers-examples/context-exports/test/integration-self.test.ts index 1c239cb26fd6..7da1c676d717 100644 --- a/fixtures/vitest-pool-workers-examples/context-exports/test/integration-self.test.ts +++ b/fixtures/vitest-pool-workers-examples/context-exports/test/integration-self.test.ts @@ -55,7 +55,6 @@ it("will still guess re-exports on the exports.default worker that cannot be ful }) => { // In this test, we are trying to access an entry-point that is explicitly re-exported from a virtual module. // Although esbuild cannot really analyze what is being re-exported, it can at least see that something is being re-exported with that name. - const warnSpy = vi.spyOn(console, "warn"); const response = await exports.default.fetch( "http://example.com/virtual-explicit" ); @@ -69,7 +68,6 @@ it("can access configured virtual entry points on the exports.default worker tha }) => { // In this test, we are trying to access an entry-point that is explicitly re-exported from a virtual module. // Although esbuild cannot really analyze what is being re-exported, it can at least see that something is being re-exported with that name. - const warnSpy = vi.spyOn(console, "warn"); const response = await exports.default.fetch( "http://example.com/virtual-configured" ); diff --git a/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts b/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts index 69bc1d0650ac..99fad3f28ac5 100644 --- a/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts +++ b/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts @@ -19,7 +19,11 @@ import type { WorkersPoolOptions, WorkersPoolOptionsWithDefines, } from "./config"; -import type { Miniflare, WebSocket } from "miniflare"; +import type { + Miniflare, + MessageEvent as MiniflareMessageEvent, + WebSocket, +} from "miniflare"; import type { PoolOptions, PoolWorker, @@ -33,6 +37,11 @@ export class CloudflarePoolWorker implements PoolWorker { private socket: WebSocket | undefined; private parsedPoolOptions: WorkersPoolOptionsWithDefines | undefined; private main: string | undefined; + // Store wrapped listeners so off() can remove them correctly. + // Vitest registers at most one listener per event type. + private messageListener?: (event: MiniflareMessageEvent) => void; + private errorListener?: (event: Event) => void; + private closeListener?: () => void; constructor( private options: PoolOptions, @@ -94,6 +103,8 @@ export class CloudflarePoolWorker implements PoolWorker { } async stop(): Promise { + this.socket?.close(); + this.socket = undefined; await this.mf?.dispose(); this.mf = undefined; } @@ -106,32 +117,55 @@ export class CloudflarePoolWorker implements PoolWorker { "Message sent to Worker before initialisation" ); - // This is an initialisation message containing the config. Some properties need modifying + // Avoid mutating Vitest's message objects — shallow-copy the parts we modify + let toSend: WorkerRequest = message; if (message.type === "start") { // Users can write `vitest --inspect` to start an inspector connection for their tests // We intercept that option and use it to enable inspection of the Workers running in workerd // We need to stop it passing through into Vitest's in-Worker code, or Vitest will try and import // and run `inspector.open()` from `node:inspector` - message.context.config.inspector ??= {}; - message.context.config.inspector.enabled = false; + toSend = { + ...message, + context: { + ...message.context, + config: { + ...message.context.config, + inspector: { + ...message.context.config.inspector, + enabled: false, + }, + }, + }, + }; } else if (message.type === "run") { // For some reason providing this using the Vitest `project.provide` API // doesn't work in Vitest Projects, and so we just provide the context directly - message.context.providedContext.cloudflarePoolOptions = JSON.stringify({ - // Include resolved `main` if defined - main: this.main, - // Include designators of all Durable Object namespaces bound in the - // runner worker. We'll use this to list IDs in a namespace. We'll - // also use this to check Durable Object test runner helpers are - // only used with classes defined in the current worker, as these - // helpers rely on wrapping the object. - durableObjectBindingDesignators: [ - ...getDurableObjectDesignators(this.parsedPoolOptions).entries(), - ], - selfName: getRunnerName(this.options.project), - }); + toSend = { + ...message, + context: { + ...message.context, + providedContext: { + ...message.context.providedContext, + cloudflarePoolOptions: JSON.stringify({ + // Include resolved `main` if defined + main: this.main, + // Include designators of all Durable Object namespaces bound in the + // runner worker. We'll use this to list IDs in a namespace. We'll + // also use this to check Durable Object test runner helpers are + // only used with classes defined in the current worker, as these + // helpers rely on wrapping the object. + durableObjectBindingDesignators: [ + ...getDurableObjectDesignators( + this.parsedPoolOptions + ).entries(), + ], + selfName: getRunnerName(this.options.project), + }), + }, + }, + }; } - this.socket.send(structuredSerializableStringify(message)); + this.socket.send(structuredSerializableStringify(toSend)); } on( @@ -152,7 +186,7 @@ export class CloudflarePoolWorker implements PoolWorker { const compiledRules = compileModuleRules(rules ?? []); if (event === "message") { - this.socket.addEventListener("message", (m) => { + const messageWrapper = (m: { data: string | ArrayBuffer }) => { const d = structuredSerializableParse( m.data as string ) as WorkerResponse; @@ -210,29 +244,32 @@ export class CloudflarePoolWorker implements PoolWorker { } } (callback as (response: WorkerResponse) => void)(d); - }); + }; + this.messageListener = messageWrapper as ( + event: MiniflareMessageEvent + ) => void; + this.socket.addEventListener("message", this.messageListener); } else if (event === "error") { - this.socket.addEventListener("error", (e) => { - (callback as (maybeError: unknown) => void)(e.error); - }); + this.errorListener = (e: Event) => { + (callback as (maybeError: unknown) => void)("error" in e ? e.error : e); + }; + this.socket.addEventListener("error", this.errorListener); } else if (event === "exit") { - this.socket.addEventListener("close", callback as () => void); + this.closeListener = callback as () => void; + this.socket.addEventListener("close", this.closeListener); } } - off(event: string, callback: (_arg: unknown) => void): void { - // Map Vitest event names to WebSocket event names - const eventMap: Record = { - exit: "close", - message: "message", - error: "error", - }; - const wsEvent = eventMap[event]; - if (wsEvent !== undefined) { - this.socket?.removeEventListener( - wsEvent as "close" | "message" | "error", - callback as () => void - ); + off(event: string, _callback: (_arg: unknown) => void): void { + if (event === "message" && this.messageListener) { + this.socket?.removeEventListener("message", this.messageListener); + this.messageListener = undefined; + } else if (event === "error" && this.errorListener) { + this.socket?.removeEventListener("error", this.errorListener); + this.errorListener = undefined; + } else if (event === "exit" && this.closeListener) { + this.socket?.removeEventListener("close", this.closeListener); + this.closeListener = undefined; } } diff --git a/packages/vitest-pool-workers/src/pool/index.ts b/packages/vitest-pool-workers/src/pool/index.ts index 6dec7f7552df..37c9e577d91f 100644 --- a/packages/vitest-pool-workers/src/pool/index.ts +++ b/packages/vitest-pool-workers/src/pool/index.ts @@ -39,9 +39,9 @@ import type { Readable } from "node:stream"; import type { TestProject, Vitest } from "vitest/node"; export 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 + // Vitest v2+ sends a sourcemap to its runner, which we can't serialise currently. + // Stripping 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 && @@ -52,7 +52,8 @@ export function structuredSerializableStringify(value: unknown): string { "map" in value.r && value.r.map ) { - delete value.r.map; + // Shallow-copy to avoid mutating the caller's object + value = { ...value, r: { ...value.r, map: undefined } }; } return devalue.stringify(value, structuredSerializableReducers); } @@ -748,7 +749,7 @@ export function assertCompatibleVitestVersion(ctx: Vitest) { ); // Hard error on Vitest v3, which definitely won't work - if (actualVitestVersion.startsWith("3")) { + if (semverSatisfies(actualVitestVersion, "3.x")) { const message = `You're running \`vitest@${actualVitestVersion}\`, but this version of \`@cloudflare/vitest-pool-workers\` only supports \`vitest ${expectedVitestVersion}\`.`; throw new Error(message); } diff --git a/packages/vitest-pool-workers/src/worker/index.ts b/packages/vitest-pool-workers/src/worker/index.ts index 917fda91f35d..288155240552 100644 --- a/packages/vitest-pool-workers/src/worker/index.ts +++ b/packages/vitest-pool-workers/src/worker/index.ts @@ -53,7 +53,7 @@ Object.setPrototypeOf(process, events.EventEmitter.prototype); // Required by `v // Vitest needs this // @ts-expect-error Apparently this is read-only -process.versions = { node: "20.0.0" }; +process.versions = { ...process.versions, node: "20.0.0" }; globalThis.__console = console; @@ -87,7 +87,7 @@ const monkeypatchedSetTimeout = (...args: Parameters) => { const callbackName = args[0]?.name ?? ""; const callerFileName = getCallerFileName(monkeypatchedSetTimeout); const fromVitest = - /\/node_modules\/(\.store\/)?vitest/.test(callerFileName ?? "") || + /\/node_modules\/(\.pnpm\/|\.store\/)?vitest/.test(callerFileName ?? "") || /\/packages\/vitest\/dist/.test(callerFileName ?? ""); // If this `setTimeout()` isn't from Vitest, or has a non-zero delay, diff --git a/packages/vitest-pool-workers/test/chunking.test.ts b/packages/vitest-pool-workers/test/chunking.test.ts index d5d9c24a128b..333cabd7272f 100644 --- a/packages/vitest-pool-workers/test/chunking.test.ts +++ b/packages/vitest-pool-workers/test/chunking.test.ts @@ -7,7 +7,7 @@ test("chunks large WebSocket messages bi-directionally", async ({ vitestRun, }) => { // Check loads module greater than 1 MiB `workerd` limit... - const bigText = "xyz".repeat(4); + const bigText = "xyz".repeat(400_000); await seed({ "big.txt": bigText, "vitest.config.mts": vitestConfig({ diff --git a/packages/vitest-pool-workers/test/console.test.ts b/packages/vitest-pool-workers/test/console.test.ts index 9db9018cdaf6..ede1d6340ecd 100644 --- a/packages/vitest-pool-workers/test/console.test.ts +++ b/packages/vitest-pool-workers/test/console.test.ts @@ -52,15 +52,14 @@ test.skipIf(process.platform === "win32")( } ); -test("handles detatched console methods", async ({ +test("handles detached console methods", async ({ expect, seed, - vitestDev, + vitestRun, }) => { await seed({ "vitest.config.mts": vitestConfig(), "index.test.ts": dedent` - import { SELF } from "cloudflare:test"; import { expect, it } from "vitest"; it("does not crash when using a detached console method", async () => { const fn = console["debug"]; @@ -69,8 +68,8 @@ test("handles detatched console methods", async ({ }); `, }); - const result = vitestDev(); - expect(result.stderr).toMatch(""); + const result = await vitestRun(); + expect(await result.exitCode).toBe(0); }); test("console.logs() inside `export default`ed handlers with SELF", async ({ @@ -106,7 +105,6 @@ test("console.logs() inside `export default`ed handlers with SELF", async ({ `, }); const result = await vitestRun(); - console.log(result.stderr); expect(result.stdout).toMatch( "stdout | index.test.ts > sends request\none\ntwo" ); diff --git a/packages/vitest-pool-workers/test/isolation.test.ts b/packages/vitest-pool-workers/test/isolation.test.ts index d9439ebae00f..d6085a816281 100644 --- a/packages/vitest-pool-workers/test/isolation.test.ts +++ b/packages/vitest-pool-workers/test/isolation.test.ts @@ -124,53 +124,11 @@ test( } ); -test( - "shared storage with multiple workers", - { timeout: 60_000 }, - async ({ expect, seed, vitestRun }) => { - await seed({ - "vitest.config.mts": vitestConfig({ - miniflare: { - compatibilityDate: "2025-12-02", - compatibilityFlags: ["nodejs_compat"], - kvNamespaces: ["NAMESPACE"], - }, - }), - "a.test.ts": dedent/* javascript */ ` - import { env } from "cloudflare:test"; - import { it, expect } from "vitest"; - it("does something", async () => { - globalThis.A_THING = true; - await env.NAMESPACE.put("a", "1"); - - expect(globalThis.B_THING).toBe(undefined); - }); - `, - "b.test.ts": dedent/* javascript */ ` - import { env } from "cloudflare:test"; - import { it, expect } from "vitest"; - it("does something else", async () => { - globalThis.B_THING = true; - await env.NAMESPACE.put("b", "2"); - - expect(globalThis.A_THING).toBe(true); - expect(await env.NAMESPACE.get("a")).toBe("1"); - }); - `, - }); - const result = await vitestRun({ - flags: ["--no-isolate", "--max-workers=1"], - }); - expect(await result.exitCode).toBe(0); - } -); - test( "shared storage with single worker", { timeout: 60_000 }, async ({ expect, seed, vitestRun }) => { - // Check shared global scopes, storage shared, and shared auxiliaries: - // https://developers.cloudflare.com/workers/testing/vitest-integration/isolation-and-concurrency/#isolatedstorage-false-singleworker-true + // With --no-isolate --max-workers=1, test files share globals, storage, and auxiliaries await seed({ "auxiliary.mjs": dedent/* javascript */ ` let count = 0; @@ -181,10 +139,8 @@ test( } `, "vitest.config.mts": vitestConfig({ - isolatedStorage: false, - singleWorker: true, miniflare: { - compatibilityDate: "2024-01-01", + compatibilityDate: "2025-12-02", compatibilityFlags: ["nodejs_compat"], kvNamespaces: ["NAMESPACE"], serviceBindings: { AUXILIARY: "auxiliary" }, From ac943579b74d88189845bcf2be8adfd8bb8747e6 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Mon, 23 Feb 2026 22:47:30 +0000 Subject: [PATCH 40/45] [vitest-pool-workers] Fix leaked FSWatcher handles in Pages ASSETS binding (#7717) generateAssetsFetch() in wrangler creates a chokidar watcher for _headers and _redirects files that was never closed. This kept the Node.js event loop alive, causing Vitest's "close timed out" warning on every test run. Wire an AbortSignal through generateAssetsFetch() so the watcher can be closed on demand. In vitest-pool-workers, track AbortControllers in a module-level registry and abort them all in CloudflarePoolWorker.stop(). --- .../src/pool/cloudflare-pool-worker.ts | 7 ++ .../vitest-pool-workers/src/pool/pages.ts | 23 ++++++- packages/wrangler/src/cli.ts | 1 + packages/wrangler/src/miniflare-cli/assets.ts | 67 +++++++++++-------- 4 files changed, 68 insertions(+), 30 deletions(-) diff --git a/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts b/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts index 99fad3f28ac5..f58d5b8ba8a8 100644 --- a/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts +++ b/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts @@ -3,6 +3,7 @@ import { compileModuleRules, testRegExps } from "miniflare"; import { type ProvidedContext } from "vitest"; import { workerdBuiltinModules } from "../shared/builtin-modules"; import { parseProjectOptions } from "./config"; +import { disposeAllPagesBindings } from "./pages"; import { type WorkerPoolOptionsContext } from "./plugin"; import { assertCompatibleVitestVersion, @@ -107,6 +108,12 @@ export class CloudflarePoolWorker implements PoolWorker { this.socket = undefined; await this.mf?.dispose(); this.mf = undefined; + + // Clean up file watchers created by buildPagesASSETSBinding(). These are + // registered globally because vitest evaluates all project configs at + // startup, so watchers may exist for projects whose pool workers were + // never started. + disposeAllPagesBindings(); } send(message: WorkerRequest): void { diff --git a/packages/vitest-pool-workers/src/pool/pages.ts b/packages/vitest-pool-workers/src/pool/pages.ts index f383d60de7f6..f5b6e50422ed 100644 --- a/packages/vitest-pool-workers/src/pool/pages.ts +++ b/packages/vitest-pool-workers/src/pool/pages.ts @@ -1,6 +1,20 @@ import type { Request, Response } from "miniflare"; import type { Unstable_ASSETSBindingsOptions } from "wrangler"; +// Track all AbortControllers created by buildPagesASSETSBinding so they can +// be cleaned up when any pool worker stops. This is necessary because vitest +// evaluates all project configs at startup (to discover the workspace), even +// for projects that won't run — so the watchers are created before any pool +// worker exists, and the creating project's pool worker may never start. +const registeredControllers = new Set(); + +export function disposeAllPagesBindings(): void { + for (const ac of registeredControllers) { + ac.abort(); + } + registeredControllers.clear(); +} + export async function buildPagesASSETSBinding( assetsPath: string ): Promise<(request: Request) => Promise> { @@ -11,6 +25,9 @@ export async function buildPagesASSETSBinding( ); } + const ac = new AbortController(); + registeredControllers.add(ac); + const { unstable_generateASSETSBinding } = await import("wrangler"); // (lazy) const log = { ...console, @@ -18,5 +35,9 @@ export async function buildPagesASSETSBinding( loggerLevel: "info", columns: process.stdout.columns, } as unknown as Unstable_ASSETSBindingsOptions["log"]; - return unstable_generateASSETSBinding({ log, directory: assetsPath }); + return unstable_generateASSETSBinding({ + log, + directory: assetsPath, + signal: ac.signal, + }); } diff --git a/packages/wrangler/src/cli.ts b/packages/wrangler/src/cli.ts index cc7086752910..3126104b8883 100644 --- a/packages/wrangler/src/cli.ts +++ b/packages/wrangler/src/cli.ts @@ -103,6 +103,7 @@ export interface Unstable_ASSETSBindingsOptions { log: Logger; proxyPort?: number; directory?: string; + signal?: AbortSignal; } export const unstable_generateASSETSBinding: ( opts: Unstable_ASSETSBindingsOptions diff --git a/packages/wrangler/src/miniflare-cli/assets.ts b/packages/wrangler/src/miniflare-cli/assets.ts index ff9877eed5ad..e1ef1ce1ca28 100644 --- a/packages/wrangler/src/miniflare-cli/assets.ts +++ b/packages/wrangler/src/miniflare-cli/assets.ts @@ -23,12 +23,17 @@ export interface Options { log: Logger; proxyPort?: number; directory?: string; + signal?: AbortSignal; } export default async function generateASSETSBinding(options: Options) { const assetsFetch = options.directory !== undefined - ? await generateAssetsFetch(options.directory, options.log) + ? await generateAssetsFetch( + options.directory, + options.log, + options.signal + ) : invalidAssetsFetch; return async function (miniflareRequest: Request) { @@ -128,7 +133,8 @@ class ProxyDispatcher extends Dispatcher { async function generateAssetsFetch( directory: string, - log: Logger + log: Logger, + signal?: AbortSignal ): Promise { directory = resolve(directory); // Defer importing miniflare until we really need it @@ -174,35 +180,38 @@ async function generateAssetsFetch( logger: log, }); - watch([headersFile, redirectsFile], { persistent: true }).on( - "change", - (path) => { - switch (path) { - case headersFile: { - log.log("_headers modified. Re-evaluating..."); - const contents = readFileSync(headersFile).toString(); - headers = parseHeaders(contents); - break; - } - case redirectsFile: { - log.log("_redirects modified. Re-evaluating..."); - const contents = readFileSync(redirectsFile).toString(); - redirects = parseRedirects(contents, { - htmlHandling: undefined, // Pages dev server doesn't expose html_handling configuration in this context. - }); - break; - } + const watcher = watch([headersFile, redirectsFile], { + persistent: true, + }).on("change", (path) => { + switch (path) { + case headersFile: { + log.log("_headers modified. Re-evaluating..."); + const contents = readFileSync(headersFile).toString(); + headers = parseHeaders(contents); + break; + } + case redirectsFile: { + log.log("_redirects modified. Re-evaluating..."); + const contents = readFileSync(redirectsFile).toString(); + redirects = parseRedirects(contents, { + htmlHandling: undefined, // Pages dev server doesn't expose html_handling configuration in this context. + }); + break; } - - metadata = createMetadataObject({ - redirects, - headers, - redirectsFile, - headersFile, - logger: log, - }); } - ); + + metadata = createMetadataObject({ + redirects, + headers, + redirectsFile, + headersFile, + logger: log, + }); + }); + + if (signal) { + signal.addEventListener("abort", () => watcher.close(), { once: true }); + } const generateResponse = async (request: Request) => { const assetKeyEntryMap = new Map(); From 989f55940a99e7e0dcdf71dd28a92f930bac9c2e Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Mon, 23 Feb 2026 22:47:57 +0000 Subject: [PATCH 41/45] [vitest-pool-workers] Add regression tests for bare specifier resolution and large provide data - bare-specifiers.test.ts: import "url", "path", "buffer" without node: prefix (#6214) - large-provide.test.ts: 50 KB provide/inject payload that exceeded v3 header limit (#9957) --- .../misc/global-setup.ts | 12 +++++++++ .../misc/test/bare-specifiers.test.ts | 26 +++++++++++++++++++ .../misc/test/large-provide.test.ts | 12 +++++++++ .../misc/vitest.config.ts | 1 + 4 files changed, 51 insertions(+) create mode 100644 fixtures/vitest-pool-workers-examples/misc/global-setup.ts create mode 100644 fixtures/vitest-pool-workers-examples/misc/test/bare-specifiers.test.ts create mode 100644 fixtures/vitest-pool-workers-examples/misc/test/large-provide.test.ts diff --git a/fixtures/vitest-pool-workers-examples/misc/global-setup.ts b/fixtures/vitest-pool-workers-examples/misc/global-setup.ts new file mode 100644 index 000000000000..3ebff2e7876f --- /dev/null +++ b/fixtures/vitest-pool-workers-examples/misc/global-setup.ts @@ -0,0 +1,12 @@ +// Regression test for #9957: In v3, `provide` data was sent via HTTP headers +// (~8 KB limit). Large payloads caused silent failures. v4 sends provide data +// through WebSocket messages (32 MiB limit). +import type { TestProject } from "vitest/node"; + +export default function ({ provide }: TestProject) { + // No ProvidedContext declaration for this key, so cast is needed + (provide as (key: string, value: unknown) => void)( + "largePayload", + "x".repeat(50_000) + ); +} diff --git a/fixtures/vitest-pool-workers-examples/misc/test/bare-specifiers.test.ts b/fixtures/vitest-pool-workers-examples/misc/test/bare-specifiers.test.ts new file mode 100644 index 000000000000..6fbeea5debfe --- /dev/null +++ b/fixtures/vitest-pool-workers-examples/misc/test/bare-specifiers.test.ts @@ -0,0 +1,26 @@ +// Regression test for #6214: bare Node.js module specifiers (without `node:` +// prefix) should resolve. The `module-fallback.ts` `viteResolve()` codepath +// prepends `node:` when a bare specifier isn't found in workerd built-ins. +import { describe, it } from "vitest"; + +describe("bare Node module specifiers", () => { + it("resolves 'url' without node: prefix", async ({ expect }) => { + const urlModule = await import("url"); + expect(urlModule.URL).toBeDefined(); + expect(new urlModule.URL("https://example.com").hostname).toBe( + "example.com" + ); + }); + + it("resolves 'path' without node: prefix", async ({ expect }) => { + const pathModule = await import("path"); + expect(pathModule.join).toBeDefined(); + expect(pathModule.join("/foo", "bar")).toBe("/foo/bar"); + }); + + it("resolves 'buffer' without node: prefix", async ({ expect }) => { + const bufferModule = await import("buffer"); + expect(bufferModule.Buffer).toBeDefined(); + expect(bufferModule.Buffer.from("hello").toString()).toBe("hello"); + }); +}); diff --git a/fixtures/vitest-pool-workers-examples/misc/test/large-provide.test.ts b/fixtures/vitest-pool-workers-examples/misc/test/large-provide.test.ts new file mode 100644 index 000000000000..3e6998623077 --- /dev/null +++ b/fixtures/vitest-pool-workers-examples/misc/test/large-provide.test.ts @@ -0,0 +1,12 @@ +// Regression test for #9957: In v3, `provide` data was sent via HTTP headers +// (~8 KB limit). v4 sends provide data through WebSocket messages (32 MiB +// limit). This test injects a 50 KB string provided by global-setup.ts. +import { inject, it } from "vitest"; + +it("receives 50 KB of provided data without truncation", ({ expect }) => { + const data = inject("largePayload" as never); + expect(data).toBeDefined(); + expect(typeof data).toBe("string"); + expect((data as string).length).toBe(50_000); + expect(data).toBe("x".repeat(50_000)); +}); diff --git a/fixtures/vitest-pool-workers-examples/misc/vitest.config.ts b/fixtures/vitest-pool-workers-examples/misc/vitest.config.ts index b3ee7098f7c0..901773eeb8d4 100644 --- a/fixtures/vitest-pool-workers-examples/misc/vitest.config.ts +++ b/fixtures/vitest-pool-workers-examples/misc/vitest.config.ts @@ -36,6 +36,7 @@ export default defineConfig({ test: { exclude: ["test/assets.test.ts", "test/nodejs.test.ts"], + globalSetup: ["./global-setup.ts"], setupFiles: ["test/setup.ts"], }, }); From 8003a66fedd5abdbbaf8e6e93f2e5b8e82f70013 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Mon, 23 Feb 2026 23:39:46 +0000 Subject: [PATCH 42/45] [vitest-pool-workers] Fix review findings in Pages watcher cleanup - Reference-count active workers so watchers only close when the last worker stops, not when the first one does - Move AbortController registration after the wrangler import so a failed import does not leak an orphaned controller - Handle already-aborted signals in generateAssetsFetch - Catch errors from watcher.close() to avoid unhandled rejections --- .../src/pool/cloudflare-pool-worker.ts | 14 ++++---- .../vitest-pool-workers/src/pool/pages.ts | 34 ++++++++++++++----- packages/wrangler/src/miniflare-cli/assets.ts | 10 +++++- 3 files changed, 42 insertions(+), 16 deletions(-) diff --git a/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts b/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts index f58d5b8ba8a8..3ed330821c34 100644 --- a/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts +++ b/packages/vitest-pool-workers/src/pool/cloudflare-pool-worker.ts @@ -3,7 +3,7 @@ import { compileModuleRules, testRegExps } from "miniflare"; import { type ProvidedContext } from "vitest"; import { workerdBuiltinModules } from "../shared/builtin-modules"; import { parseProjectOptions } from "./config"; -import { disposeAllPagesBindings } from "./pages"; +import { poolWorkerStarted, poolWorkerStopped } from "./pages"; import { type WorkerPoolOptionsContext } from "./plugin"; import { assertCompatibleVitestVersion, @@ -56,6 +56,8 @@ export class CloudflarePoolWorker implements PoolWorker { } async start(): Promise { + poolWorkerStarted(); + let resolvedPoolOptions: WorkersPoolOptions; if (typeof this.poolOptions === "function") { // https://github.com/vitest-dev/vitest/blob/v4.0.18/packages/vitest/src/integrations/inject.ts @@ -109,11 +111,11 @@ export class CloudflarePoolWorker implements PoolWorker { await this.mf?.dispose(); this.mf = undefined; - // Clean up file watchers created by buildPagesASSETSBinding(). These are - // registered globally because vitest evaluates all project configs at - // startup, so watchers may exist for projects whose pool workers were - // never started. - disposeAllPagesBindings(); + // Decrement the active worker count. When the last worker stops, this + // closes file watchers created by buildPagesASSETSBinding() during config + // evaluation — they're registered globally because vitest evaluates all + // project configs at startup, even for projects that won't run. + poolWorkerStopped(); } send(message: WorkerRequest): void { diff --git a/packages/vitest-pool-workers/src/pool/pages.ts b/packages/vitest-pool-workers/src/pool/pages.ts index f5b6e50422ed..56b41df8acf8 100644 --- a/packages/vitest-pool-workers/src/pool/pages.ts +++ b/packages/vitest-pool-workers/src/pool/pages.ts @@ -2,17 +2,30 @@ import type { Request, Response } from "miniflare"; import type { Unstable_ASSETSBindingsOptions } from "wrangler"; // Track all AbortControllers created by buildPagesASSETSBinding so they can -// be cleaned up when any pool worker stops. This is necessary because vitest -// evaluates all project configs at startup (to discover the workspace), even -// for projects that won't run — so the watchers are created before any pool -// worker exists, and the creating project's pool worker may never start. +// be cleaned up when the last pool worker stops. This is necessary because +// vitest evaluates all project configs at startup (to discover the workspace), +// even for projects that won't run — so the watchers are created before any +// pool worker exists, and the creating project's pool worker may never start. const registeredControllers = new Set(); -export function disposeAllPagesBindings(): void { - for (const ac of registeredControllers) { - ac.abort(); +// Reference count of active pool workers. Watchers are only closed when the +// last worker stops, so that early-finishing workers don't kill watchers that +// later workers (or other projects in the workspace) still need. +let activeWorkers = 0; + +export function poolWorkerStarted(): void { + activeWorkers++; +} + +export function poolWorkerStopped(): void { + activeWorkers--; + if (activeWorkers <= 0) { + activeWorkers = 0; + for (const ac of registeredControllers) { + ac.abort(); + } + registeredControllers.clear(); } - registeredControllers.clear(); } export async function buildPagesASSETSBinding( @@ -25,10 +38,13 @@ export async function buildPagesASSETSBinding( ); } + const { unstable_generateASSETSBinding } = await import("wrangler"); // (lazy) + + // Create the AbortController after the import succeeds so we don't leak + // a registered controller if the import throws. const ac = new AbortController(); registeredControllers.add(ac); - const { unstable_generateASSETSBinding } = await import("wrangler"); // (lazy) const log = { ...console, debugWithSanitization: console.debug, diff --git a/packages/wrangler/src/miniflare-cli/assets.ts b/packages/wrangler/src/miniflare-cli/assets.ts index e1ef1ce1ca28..1bc823818638 100644 --- a/packages/wrangler/src/miniflare-cli/assets.ts +++ b/packages/wrangler/src/miniflare-cli/assets.ts @@ -210,7 +210,15 @@ async function generateAssetsFetch( }); if (signal) { - signal.addEventListener("abort", () => watcher.close(), { once: true }); + if (signal.aborted) { + void watcher.close().catch(() => {}); + } else { + signal.addEventListener( + "abort", + () => void watcher.close().catch(() => {}), + { once: true } + ); + } } const generateResponse = async (request: Request) => { From 017ad0c4290161288072fbeb885b83a092487528 Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Thu, 26 Feb 2026 19:39:14 +0000 Subject: [PATCH 43/45] Fix lockfile after merge --- pnpm-lock.yaml | 149 +++++++++---------------------------------------- 1 file changed, 25 insertions(+), 124 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8169831b3bf1..66dc9a116dca 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1313,7 +1313,7 @@ importers: devDependencies: '@better-auth/stripe': specifier: ^1.4.6 - version: 1.4.19(@better-auth/core@1.4.19(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@5.9.3)(kysely@0.28.11)(nanostores@1.1.0))(better-auth@1.4.19(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.1.0-beta.4))(better-call@1.1.8(zod@4.3.6))(stripe@20.3.1(@types/node@20.19.9)) + version: 1.4.19(@better-auth/core@1.4.19(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@5.9.3)(kysely@0.28.11)(nanostores@1.1.1))(better-auth@1.4.19(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.1.0-beta.4))(better-call@1.1.8(zod@4.3.6))(stripe@20.4.0(@types/node@20.19.9)) '@cloudflare/containers': specifier: ^0.0.25 version: 0.0.25 @@ -1364,7 +1364,7 @@ importers: version: 3.2.4(chokidar@3.6.0) stripe: specifier: ^20.0.0 - version: 20.3.1(@types/node@20.19.9) + version: 20.4.0(@types/node@20.19.9) toucan-js: specifier: 4.0.0 version: 4.0.0(patch_hash=qxsfpdzvzbhq2ecirbu5xq4vlq) @@ -1700,16 +1700,10 @@ importers: version: link:../../packages/workers-tsconfig '@cloudflare/workers-types': specifier: catalog:default -<<<<<<< HEAD - version: 4.20260302.0 + version: 4.20260305.0 '@types/node': specifier: ^20.19.9 version: 20.19.9 -||||||| 19df0993d - version: 4.20260302.0 -======= - version: 4.20260305.0 ->>>>>>> origin/main playwright-chromium: specifier: catalog:default version: 1.56.1 @@ -2021,16 +2015,8 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': -<<<<<<< HEAD specifier: workspace:* version: link:../vitest-pool-workers -||||||| 19df0993d - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260302.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3) -======= - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260305.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3) ->>>>>>> origin/main '@cloudflare/workers-types': specifier: catalog:default version: 4.20260305.0 @@ -2131,16 +2117,8 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': -<<<<<<< HEAD specifier: catalog:vitest-3 - version: 0.10.15(@cloudflare/workers-types@4.20260302.0)(@vitest/runner@4.1.0-beta.4)(@vitest/snapshot@4.1.0-beta.4)(vitest@3.2.4) -||||||| 19df0993d - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260302.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9) -======= - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260305.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9) ->>>>>>> origin/main + version: 0.10.15(@cloudflare/workers-types@4.20260305.0)(@vitest/runner@4.1.0-beta.4)(@vitest/snapshot@4.1.0-beta.4)(vitest@3.2.4) '@cloudflare/workers-types': specifier: catalog:default version: 4.20260305.0 @@ -2469,16 +2447,8 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': -<<<<<<< HEAD specifier: catalog:vitest-3 - version: 0.10.15(@cloudflare/workers-types@4.20260302.0)(@vitest/runner@4.1.0-beta.4)(@vitest/snapshot@4.1.0-beta.4)(vitest@3.2.4) -||||||| 19df0993d - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260302.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3) -======= - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260305.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3) ->>>>>>> origin/main + version: 0.10.15(@cloudflare/workers-types@4.20260305.0)(@vitest/runner@4.1.0-beta.4)(@vitest/snapshot@4.1.0-beta.4)(vitest@3.2.4) '@cloudflare/workers-shared': specifier: workspace:* version: link:../workers-shared @@ -4075,16 +4045,8 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': -<<<<<<< HEAD specifier: catalog:vitest-3 - version: 0.10.15(@cloudflare/workers-types@4.20260302.0)(@vitest/runner@4.1.0-beta.4)(@vitest/snapshot@4.1.0-beta.4)(vitest@3.2.4) -||||||| 19df0993d - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260302.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9) -======= - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260305.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9) ->>>>>>> origin/main + version: 0.10.15(@cloudflare/workers-types@4.20260305.0)(@vitest/runner@4.1.0-beta.4)(@vitest/snapshot@4.1.0-beta.4)(vitest@3.2.4) '@cloudflare/workers-tsconfig': specifier: workspace:* version: link:../workers-tsconfig @@ -4200,16 +4162,8 @@ importers: specifier: workspace:* version: link:../eslint-config-shared '@cloudflare/vitest-pool-workers': -<<<<<<< HEAD specifier: catalog:vitest-3 - version: 0.10.15(@cloudflare/workers-types@4.20260302.0)(@vitest/runner@4.1.0-beta.4)(@vitest/snapshot@4.1.0-beta.4)(vitest@3.2.4) -||||||| 19df0993d - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260302.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3) -======= - specifier: catalog:default - version: 0.10.15(@cloudflare/workers-types@4.20260305.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3) ->>>>>>> origin/main + version: 0.10.15(@cloudflare/workers-types@4.20260305.0)(@vitest/runner@4.1.0-beta.4)(@vitest/snapshot@4.1.0-beta.4)(vitest@3.2.4) '@cloudflare/workers-tsconfig': specifier: workspace:* version: link:../workers-tsconfig @@ -9609,9 +9563,6 @@ packages: birpc@0.2.14: resolution: {integrity: sha512-37FHE8rqsYM5JEKCnXFyHpBCzvgHEExwVVTq+nUmloInU7l8ezD1TpOhKpS8oe1DTYFqEK27rFZVKG43oTqXRA==} - birpc@2.6.1: - resolution: {integrity: sha512-LPnFhlDpdSH6FJhJyn4M0kFO7vtQ5iPw24FnG0y21q09xC7e8+1LeR31S1MAIrDAHp4m7aas4bEkTDTvMAtebQ==} - birpc@2.8.0: resolution: {integrity: sha512-Bz2a4qD/5GRhiHSwj30c/8kC8QGj12nNDwz3D4ErQ4Xhy35dsSDvF+RA/tWpjyU0pdGtSDiEk6B5fBGE1qNVhw==} @@ -12463,8 +12414,8 @@ packages: engines: {node: ^18 || >=20} hasBin: true - nanostores@1.1.0: - resolution: {integrity: sha512-yJBmDJr18xy47dbNVlHcgdPrulSn1nhSE6Ns9vTG+Nx9VPT6iV1MD6aQFp/t52zpf82FhLLTXAXr30NuCnxvwA==} + nanostores@1.1.1: + resolution: {integrity: sha512-EYJqS25r2iBeTtGQCHidXl1VfZ1jXM7Q04zXJOrMlxVVmD0ptxJaNux92n1mJ7c5lN3zTq12MhH/8x59nP+qmg==} engines: {node: ^20.0.0 || >=22.0.0} napi-build-utils@2.0.0: @@ -14183,8 +14134,8 @@ packages: strip-literal@3.0.0: resolution: {integrity: sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==} - stripe@20.3.1: - resolution: {integrity: sha512-k990yOT5G5rhX3XluRPw5Y8RLdJDW4dzQ29wWT66piHrbnM2KyamJ1dKgPsw4HzGHRWjDiSSdcI2WdxQUPV3aQ==} + stripe@20.4.0: + resolution: {integrity: sha512-F/aN1IQ9vHmlyLNi3DkiIbyzQb6gyBG0uYFd/VrEVQSc9BLtlgknPUx0EvzZdBMRLFuRaPFIFd7Mxwtg7Pbwzw==} engines: {node: '>=16'} peerDependencies: '@types/node': ^20.19.9 @@ -16176,7 +16127,7 @@ snapshots: optionalDependencies: '@types/react': 19.2.10 - '@better-auth/core@1.4.19(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@5.9.3)(kysely@0.28.11)(nanostores@1.1.0)': + '@better-auth/core@1.4.19(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@5.9.3)(kysely@0.28.11)(nanostores@1.1.1)': dependencies: '@better-auth/utils': 0.3.0 '@better-fetch/fetch': 1.1.21 @@ -16184,21 +16135,21 @@ snapshots: better-call: 1.1.8(zod@4.3.6) jose: 5.9.3 kysely: 0.28.11 - nanostores: 1.1.0 + nanostores: 1.1.1 zod: 4.3.6 - '@better-auth/stripe@1.4.19(@better-auth/core@1.4.19(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@5.9.3)(kysely@0.28.11)(nanostores@1.1.0))(better-auth@1.4.19(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.1.0-beta.4))(better-call@1.1.8(zod@4.3.6))(stripe@20.3.1(@types/node@20.19.9))': + '@better-auth/stripe@1.4.19(@better-auth/core@1.4.19(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@5.9.3)(kysely@0.28.11)(nanostores@1.1.1))(better-auth@1.4.19(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.1.0-beta.4))(better-call@1.1.8(zod@4.3.6))(stripe@20.4.0(@types/node@20.19.9))': dependencies: - '@better-auth/core': 1.4.19(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@5.9.3)(kysely@0.28.11)(nanostores@1.1.0) + '@better-auth/core': 1.4.19(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@5.9.3)(kysely@0.28.11)(nanostores@1.1.1) better-auth: 1.4.19(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.1.0-beta.4) better-call: 1.1.8(zod@4.3.6) defu: 6.1.4 - stripe: 20.3.1(@types/node@20.19.9) + stripe: 20.4.0(@types/node@20.19.9) zod: 4.3.6 - '@better-auth/telemetry@1.4.19(@better-auth/core@1.4.19(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@6.1.3)(kysely@0.28.11)(nanostores@1.1.0))': + '@better-auth/telemetry@1.4.19(@better-auth/core@1.4.19(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@6.1.3)(kysely@0.28.11)(nanostores@1.1.1))': dependencies: - '@better-auth/core': 1.4.19(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@5.9.3)(kysely@0.28.11)(nanostores@1.1.0) + '@better-auth/core': 1.4.19(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@5.9.3)(kysely@0.28.11)(nanostores@1.1.1) '@better-auth/utils': 0.3.0 '@better-fetch/fetch': 1.1.21 @@ -16742,13 +16693,7 @@ snapshots: lodash.memoize: 4.1.2 marked: 0.3.19 -<<<<<<< HEAD - '@cloudflare/vitest-pool-workers@0.10.15(@cloudflare/workers-types@4.20260302.0)(@vitest/runner@4.1.0-beta.4)(@vitest/snapshot@4.1.0-beta.4)(vitest@3.2.4)': -||||||| 19df0993d - '@cloudflare/vitest-pool-workers@0.10.15(@cloudflare/workers-types@4.20260302.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9)': -======= - '@cloudflare/vitest-pool-workers@0.10.15(@cloudflare/workers-types@4.20260305.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@2.1.9)': ->>>>>>> origin/main + '@cloudflare/vitest-pool-workers@0.10.15(@cloudflare/workers-types@4.20260305.0)(@vitest/runner@4.1.0-beta.4)(@vitest/snapshot@4.1.0-beta.4)(vitest@3.2.4)': dependencies: '@vitest/runner': 4.1.0-beta.4 '@vitest/snapshot': 4.1.0-beta.4 @@ -16757,50 +16702,8 @@ snapshots: devalue: 5.3.2 miniflare: 4.20251210.0 semver: 7.7.3 -<<<<<<< HEAD vitest: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.4)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.4(@types/node@20.19.9)(typescript@5.9.3))(tsx@4.21.0)(yaml@2.8.1) - wrangler: 4.54.0(@cloudflare/workers-types@4.20260302.0) -||||||| 19df0993d - vitest: 2.1.9(@types/node@20.19.9)(@vitest/ui@2.1.9)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3)) - wrangler: 4.54.0(@cloudflare/workers-types@4.20260302.0) - zod: 3.25.76 - transitivePeerDependencies: - - '@cloudflare/workers-types' - - bufferutil - - utf-8-validate - - '@cloudflare/vitest-pool-workers@0.10.15(@cloudflare/workers-types@4.20260302.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3)': - dependencies: - '@vitest/runner': 3.2.3 - '@vitest/snapshot': 3.2.3 - birpc: 0.2.14 - cjs-module-lexer: 1.2.3 - devalue: 5.3.2 - miniflare: 4.20251210.0 - semver: 7.7.3 - vitest: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(tsx@4.21.0)(yaml@2.8.1) - wrangler: 4.54.0(@cloudflare/workers-types@4.20260302.0) -======= - vitest: 2.1.9(@types/node@20.19.9)(@vitest/ui@2.1.9)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3)) - wrangler: 4.54.0(@cloudflare/workers-types@4.20260305.0) - zod: 3.25.76 - transitivePeerDependencies: - - '@cloudflare/workers-types' - - bufferutil - - utf-8-validate - - '@cloudflare/vitest-pool-workers@0.10.15(@cloudflare/workers-types@4.20260305.0)(@vitest/runner@3.2.3)(@vitest/snapshot@3.2.3)(vitest@3.2.3)': - dependencies: - '@vitest/runner': 3.2.3 - '@vitest/snapshot': 3.2.3 - birpc: 0.2.14 - cjs-module-lexer: 1.2.3 - devalue: 5.3.2 - miniflare: 4.20251210.0 - semver: 7.7.3 - vitest: 3.2.3(@types/debug@4.1.12)(@types/node@20.19.9)(@vitest/ui@3.2.3)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.12.0(@types/node@20.19.9)(typescript@5.9.3))(tsx@4.21.0)(yaml@2.8.1) wrangler: 4.54.0(@cloudflare/workers-types@4.20260305.0) ->>>>>>> origin/main zod: 3.25.76 transitivePeerDependencies: - '@cloudflare/workers-types' @@ -20850,8 +20753,8 @@ snapshots: better-auth@1.4.19(@prisma/client@7.0.1(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3))(mysql2@3.15.3)(pg@8.16.3)(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(vitest@4.1.0-beta.4): dependencies: - '@better-auth/core': 1.4.19(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@5.9.3)(kysely@0.28.11)(nanostores@1.1.0) - '@better-auth/telemetry': 1.4.19(@better-auth/core@1.4.19(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@6.1.3)(kysely@0.28.11)(nanostores@1.1.0)) + '@better-auth/core': 1.4.19(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@5.9.3)(kysely@0.28.11)(nanostores@1.1.1) + '@better-auth/telemetry': 1.4.19(@better-auth/core@1.4.19(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@6.1.3)(kysely@0.28.11)(nanostores@1.1.1)) '@better-auth/utils': 0.3.0 '@better-fetch/fetch': 1.1.21 '@noble/ciphers': 2.1.1 @@ -20860,7 +20763,7 @@ snapshots: defu: 6.1.4 jose: 6.1.3 kysely: 0.28.11 - nanostores: 1.1.0 + nanostores: 1.1.1 zod: 4.3.6 optionalDependencies: '@prisma/client': 7.0.1(prisma@7.0.1(@types/react@19.2.10)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.8.3))(typescript@5.8.3) @@ -20888,8 +20791,6 @@ snapshots: birpc@0.2.14: {} - birpc@2.6.1: {} - birpc@2.8.0: {} bl@4.1.0: @@ -24152,7 +24053,7 @@ snapshots: nanoid@5.1.0: {} - nanostores@1.1.0: {} + nanostores@1.1.1: {} napi-build-utils@2.0.0: optional: true @@ -25363,7 +25264,7 @@ snapshots: '@babel/parser': 7.28.4 '@babel/types': 7.28.4 ast-kit: 2.1.3 - birpc: 2.6.1 + birpc: 2.8.0 debug: 4.4.3 dts-resolver: 2.1.2 get-tsconfig: 4.13.0 @@ -26075,7 +25976,7 @@ snapshots: dependencies: js-tokens: 9.0.1 - stripe@20.3.1(@types/node@20.19.9): + stripe@20.4.0(@types/node@20.19.9): optionalDependencies: '@types/node': 20.19.9 From 755f295dfc5a08d9e31ec4f36bfa79b38796da7b Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Fri, 27 Feb 2026 00:13:01 +0000 Subject: [PATCH 44/45] [vitest-pool-workers] Remove redundant polyfills, use workerd compat flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace hand-written polyfills with workerd's native implementations: - node:v8 stub → nodejs_v8_module compat flag - process.memoryUsage/EventEmitter prototype → nodejs_process_v2 compat flag - globalThis.Buffer → already provided by nodejs_compat_v2 - globalThis.process, process.argv, process.versions.node → already provided by nodejs_compat_v2/process_v2 Fix unhandled rejection in runDurableObjectAlarm (return → return await) to prevent intermediate rejected promise with process_v2's proper unhandledrejection tracking. Fix request-mocking fixture: replace HttpResponse.error() with HTTP 400 to avoid MSW-internal TypeError escaping as unhandled rejection. --- .../request-mocking/test/declarative.test.ts | 11 +++++------ packages/vitest-pool-workers/src/pool/index.ts | 7 ++----- .../src/worker/durable-objects.ts | 2 +- packages/vitest-pool-workers/src/worker/index.ts | 15 --------------- .../vitest-pool-workers/src/worker/node/v8.ts | 11 ----------- 5 files changed, 8 insertions(+), 38 deletions(-) delete mode 100644 packages/vitest-pool-workers/src/worker/node/v8.ts diff --git a/fixtures/vitest-pool-workers-examples/request-mocking/test/declarative.test.ts b/fixtures/vitest-pool-workers-examples/request-mocking/test/declarative.test.ts index d08a40077e87..b5d022e629b6 100644 --- a/fixtures/vitest-pool-workers-examples/request-mocking/test/declarative.test.ts +++ b/fixtures/vitest-pool-workers-examples/request-mocking/test/declarative.test.ts @@ -40,23 +40,22 @@ it("mocks POST requests", async () => { server.use( http.post("https://cloudflare.com/path", async ({ request }) => { const text = await request.text(); - console.log(text); if (text !== "✨") { - return HttpResponse.error(); + return HttpResponse.text("Bad request body", { status: 400 }); } return HttpResponse.text("✅"); }) ); - // Sending a request without the expected body shouldn't match... + // Sending a request without the expected body returns an error response... let response = await SELF.fetch("https://example.com/path", { method: "POST", body: "🙃", }); - expect(response.status).toBe(500); - expect(await response.text()).toMatch("TypeError: Failed to fetch"); + expect(response.status).toBe(400); + expect(await response.text()).toBe("Bad request body"); - // ...but the correct body should + // ...but the correct body should succeed response = await SELF.fetch("https://example.com/path", { method: "POST", body: "✨", diff --git a/packages/vitest-pool-workers/src/pool/index.ts b/packages/vitest-pool-workers/src/pool/index.ts index 37c9e577d91f..64aa759b7398 100644 --- a/packages/vitest-pool-workers/src/pool/index.ts +++ b/packages/vitest-pool-workers/src/pool/index.ts @@ -353,6 +353,8 @@ async function buildProjectWorkerOptions( ensureFeature(runnerWorker.compatibilityFlags, "nodejs_fs_module"); ensureFeature(runnerWorker.compatibilityFlags, "nodejs_http_modules"); ensureFeature(runnerWorker.compatibilityFlags, "nodejs_perf_hooks_module"); + ensureFeature(runnerWorker.compatibilityFlags, "nodejs_v8_module"); + ensureFeature(runnerWorker.compatibilityFlags, "nodejs_process_v2"); // Make sure we define an unsafe eval binding and enable the fallback service runnerWorker.unsafeEvalBinding = "__VITEST_POOL_WORKERS_UNSAFE_EVAL"; @@ -508,11 +510,6 @@ async function buildProjectWorkerOptions( path: path.join(modulesRoot, "node:vm"), contents: fs.readFileSync(path.join(DIST_PATH, `worker/node/vm.mjs`)), }, - { - type: "ESModule", - path: path.join(modulesRoot, "node:v8"), - contents: fs.readFileSync(path.join(DIST_PATH, `worker/node/v8.mjs`)), - }, ]; // Build array of workers contributed by the workspace diff --git a/packages/vitest-pool-workers/src/worker/durable-objects.ts b/packages/vitest-pool-workers/src/worker/durable-objects.ts index 9bd26f011392..9b83545c7191 100644 --- a/packages/vitest-pool-workers/src/worker/durable-objects.ts +++ b/packages/vitest-pool-workers/src/worker/durable-objects.ts @@ -157,7 +157,7 @@ export async function runDurableObjectAlarm( "Failed to execute 'runDurableObjectAlarm': parameter 1 is not of type 'DurableObjectStub'." ); } - return runInDurableObject(stub, runAlarm); + return await runInDurableObject(stub, runAlarm); } /** diff --git a/packages/vitest-pool-workers/src/worker/index.ts b/packages/vitest-pool-workers/src/worker/index.ts index 288155240552..534cb66c4b24 100644 --- a/packages/vitest-pool-workers/src/worker/index.ts +++ b/packages/vitest-pool-workers/src/worker/index.ts @@ -1,7 +1,4 @@ import assert from "node:assert"; -import { Buffer } from "node:buffer"; -import events from "node:events"; -import process from "node:process"; import * as vm from "node:vm"; import defines from "__VITEST_POOL_WORKERS_DEFINES"; import { @@ -25,8 +22,6 @@ function structuredSerializableParse(value: string): unknown { return devalue.parse(value, structuredSerializableRevivers); } -globalThis.Buffer = Buffer; // Required by `vite-node/source-map` - // Mock Service Worker needs this — stub with no-op methods since workerd // doesn't provide BroadcastChannel globalThis.BroadcastChannel = class { @@ -39,21 +34,11 @@ globalThis.BroadcastChannel = class { onmessageerror: ((event: unknown) => void) | null = null; } as unknown as typeof BroadcastChannel; -globalThis.process = process; // Required by `vite-node` -process.argv = []; // Required by `@vitest/utils` let cwd: string | undefined; process.cwd = () => { assert(cwd !== undefined, "Expected cwd to be set"); return cwd; }; -// Required by vitest/worker -// @ts-expect-error We don't actually implement `process.memoryUsage()` -process.memoryUsage = () => ({}); -Object.setPrototypeOf(process, events.EventEmitter.prototype); // Required by `vitest` - -// Vitest needs this -// @ts-expect-error Apparently this is read-only -process.versions = { ...process.versions, node: "20.0.0" }; globalThis.__console = console; diff --git a/packages/vitest-pool-workers/src/worker/node/v8.ts b/packages/vitest-pool-workers/src/worker/node/v8.ts deleted file mode 100644 index c9c22fb5d17a..000000000000 --- a/packages/vitest-pool-workers/src/worker/node/v8.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Stub polyfill for node:v8 — workerd doesn't natively support this module. -// Vitest 4.1.0-beta.4 imports node:v8 to check `v8.startupSnapshot.isBuildingSnapshot()` -// which should always return false in workerd. - -export const startupSnapshot = { - isBuildingSnapshot() { - return false; - }, -}; - -export default { startupSnapshot }; From 6cce1597d015c8737533b440de8b9bc12f91cf3e Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Fri, 27 Feb 2026 00:48:24 +0000 Subject: [PATCH 45/45] [edge-preview-authenticated-proxy] Use return await for async sub-handlers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add `await` to `return` statements in handleRequest() that call async sub-handlers (handleTokenExchange, updatePreviewToken, handleRawHttp). Without `await`, when these functions throw synchronously (e.g. via assertValidURL), the intermediate rejected promise is reported as an unhandled rejection before the outer try/catch can handle it. This is a workerd process_v2 behaviour difference vs Node.js — to be reported upstream. --- packages/edge-preview-authenticated-proxy/src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/edge-preview-authenticated-proxy/src/index.ts b/packages/edge-preview-authenticated-proxy/src/index.ts index a3e6bc7baa73..49935ac06df1 100644 --- a/packages/edge-preview-authenticated-proxy/src/index.ts +++ b/packages/edge-preview-authenticated-proxy/src/index.ts @@ -129,15 +129,15 @@ async function handleRequest( const url = new URL(request.url); if (isTokenExchangeRequest(request, url, env)) { - return handleTokenExchange(url); + return await handleTokenExchange(url); } if (isPreviewUpdateRequest(request, url, env)) { - return updatePreviewToken(url, env, ctx); + return await updatePreviewToken(url, env, ctx); } if (isRawHttpRequest(url, env)) { - return handleRawHttp(request, url); + return await handleRawHttp(request, url); } /**