Skip to content

Commit de6e6b1

Browse files
authored
fix(vitest-pool-workers): update peer dependency for vitest to 4.1 (#12867)
1 parent b980af6 commit de6e6b1

File tree

4 files changed

+194
-187
lines changed

4 files changed

+194
-187
lines changed

.changeset/many-fishes-raise.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,4 @@ npx jscodeshift -t https://unpkg.com/@cloudflare/vitest-pool-workers/dist/codemo
5454
- **`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`
5555
- **`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, write an integration test using [`startDevWorker()`](https://developers.cloudflare.com/workers/testing/unstable_startworker/)
5656
- **`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/).
57+
- **Vitest peer dependency:** `@cloudflare/vitest-pool-workers` now requires `vitest@^4.1.0`.

packages/vitest-pool-workers/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@
8787
"vitest": "catalog:default"
8888
},
8989
"peerDependencies": {
90-
"@vitest/runner": "4.1.0-beta.4",
91-
"@vitest/snapshot": "4.1.0-beta.4",
92-
"vitest": "4.1.0-beta.4"
90+
"@vitest/runner": "^4.1.0",
91+
"@vitest/snapshot": "^4.1.0",
92+
"vitest": "^4.1.0"
9393
},
9494
"volta": {
9595
"extends": "../../package.json"

0 commit comments

Comments
 (0)