299 KiB
@cloudflare/vitest-pool-workers
0.18.4
Patch Changes
-
#14535
1b965c5Thanks @Naapperas! - Support dynamic retry delays for Workflow steps in local devA step's
retries.delaycan now be a function that computes the delay per failed attempt, in addition to a static duration. The function receives{ ctx, error }and returns a delay (a number of milliseconds or a duration string like"30 seconds"), and its result is fed into the configuredbackoff.await step.do( "call flaky API", { retries: { limit: 5, backoff: "constant", delay: ({ ctx }) => ctx.attempt * 1000, }, }, async () => { /* ... */ } );The function is invoked once per failed attempt with a 5 second timeout. If it throws, times out, or returns an invalid value, the step fails without further retries.
0.18.3
Patch Changes
-
#14489
e3f0cd6Thanks @edmundhung! - AddlistDurableObjectIds()to MiniflareMiniflare now exposes
listDurableObjectIds()for listing persisted Durable Object instance IDs by binding name. The Vitest pool now uses this shared Miniflare API internally instead of duplicating Miniflare's storage listing logic. -
Updated dependencies [
e3f0cd6,8511ddf,9f74a5f,e3f0cd6,c782e2a,2fedb1f,17d2fc1]:
0.18.2
Patch Changes
0.18.1
Patch Changes
-
#14409
16fbf81Thanks @matingathani! -reset()fromcloudflare:testnow resets ratelimit binding state between tests. Previously,RATE_LIMITERSbindings retained their in-memory bucket counts across test boundaries, causing later tests in the same file to see stale rate-limit exhaustion state. -
Updated dependencies [
e7e5780,d88555e,5fd8bee,5d9990e,bf49a41,1ac96a1,f416dd9,1ca8d8f,16fbf81,b973ed3]:
0.18.0
Minor Changes
-
#14382
fd92d56Thanks @petebacondarwin! - Add support for declarative Durable Object exportswrangler deploynow accepts anexportsmap inwrangler.jsonas a declarative alternative to the legacymigrationsarray.Each entry in
exportsis keyed by Durable Object class name.typecarries the export kind (currently always"durable-object"); thestatefield carries the lifecycle and defaults to"created"(live) when omitted:{ "exports": { // Provision a new Durable Object class (`MyDO`) "MyDO": { "type": "durable-object", "storage": "sqlite" }, // Delete Durable Object class (`OldGone`) "OldGone": { "type": "durable-object", "state": "deleted" }, // Rename a Durable Object class (from `OldName` to `NewName`) "OldName": { "type": "durable-object", "state": "renamed", "renamed_to": "NewName" }, "NewName": { "type": "durable-object", "storage": "sqlite" }, // Transfer a Durable Object (`Outgoing`) to a new Worker (`target-worker`) "Outgoing": { "type": "durable-object", "state": "transferred", "transferred_to": "target-worker" }, // Prepare to receive the transfer of a Durable Object (`Incoming`) from another Worker (`source-worker`) "Incoming": { "type": "durable-object", "state": "expecting-transfer", "storage": "sqlite", "transfer_from": "source-worker" } } }When a Worker declares Durable Object class bindings but no lifecycle for them (neither a
migrationsarray nor anexportsmap), wrangler warns and now suggests a declarativeexportsentry for each class (previously it suggested a legacymigrationsblock).The deployment response now surfaces the server's reconciliation result — created namespaces, applied tombstones, structured per-scenario info entries, and a
removable_entrieshint for stale tombstones that are safe to delete from the config. Blocking errors return the structured per-class detail with scenario tags, suggested remediation, and any referencing-script context.wrangler versions uploadalso forwardsexports. Declarativeexportslifecycle changes are reconciled when the version is deployed (wrangler versions deployorwrangler deploy), so aversions uploadpayload can declare new classes inexportswithout immediately provisioning them. An actor binding (durable_objects.bindings) to a class declared only inexportson the sameversions uploadis rejected with a clear error (code 100406) — the binding cannot be resolved until the namespace is provisioned. Either stage the new class viactx.exports.X(no binding required) onversions uploadand add the binding at deploy time, or usewrangler deployto provision and bind in one step (the same constraint applies to themigrationsflow).Multi-version deploys (
wrangler versions deploy A@50% B@50%) where the selected versions disagree on declarativeexportsare rejected server-side with a clear message: deploy the version that changesexportsat 100% first, then run the percentage-split deploy. This prevents traffic on one branch routing to code that references unprovisioned or just-deleted DO namespaces. Single-version (100%) deploys are unaffected.Local development (
wrangler dev,vite devandunstable_startWorker) reads Durable Object SQLite storage settings from the newexportsfield, so applications using the declarative flow get correct local-dev storage without needing to also declare amigrationsblock.@cloudflare/vitest-pool-workersalso picks up Durable Object configuration fromexports, so tests against anexports-only Worker run with the correct local SQLite storage and can reach unbound Durable Object classes viactx.exports.X.wrangler typesis also aware ofexports. Live entries (includingexpecting-transfer, the receiving side of a two-phase transfer) are added toCloudflare.GlobalProps.durableNamespaces, which typesctx.exports.Xfor unbound Durable Objects declared only viaexports.
Patch Changes
0.17.0
Minor Changes
-
#14490
75d8cb0Thanks @petebacondarwin! - Make Workflow introspectorget()asyncThe
introspectWorkflow(...).get()method now returns a promise, so callers must await it:const introspector = await introspectWorkflow(env.MY_WORKFLOW); // Before const instances = introspector.get(); // After const instances = await introspector.get();This aligns Workflow introspection with the shared implementation used by
createTestHarness().
Patch Changes
-
#14490
75d8cb0Thanks @petebacondarwin! - Supportrequire("./x.wasm?module")in CommonJS dependenciesPreviously, only literal
await import("./x.wasm?module")specifiers were rewritten through the static analysis path added in #11094. CommonJS dependencies that userequire("./x.wasm?module")reach the module-fallback service at runtime, where the?modulesuffix went unhandled. The fallback either failed withNo such module "<abs>/x.wasm?module"or, when aCompiledWasmrule was configured, attempted to evaluate the WebAssembly bytes as JavaScript.However, these
require()s work in deployed workers because esbuild's bundler statically rewrites theserequire()calls into ES dynamic imports. vitest-pool-workers' Vite-based pipeline doesn't do that rewrite and instead defers to the module-fallback at runtime.The module-fallback now strips
?modulefrom the resolved target and synthesizes a CommonJS wrapper that re-requires the underlying.wasmby absolute path, exposing it ondefaultto match what workerd produces forCompiledWasmmodules. -
Updated dependencies [
75d8cb0,75d8cb0,75d8cb0,75d8cb0,75d8cb0,f10d4ad,75d8cb0,75d8cb0,75d8cb0,75d8cb0,d292046,75d8cb0,75d8cb0,75d8cb0,75d8cb0,75d8cb0,75d8cb0,e0cc2cb,75d8cb0,75d8cb0,75d8cb0]:
0.16.20
Patch Changes
-
#14398
c5014ccThanks @apeacock1991! - AddevictDurableObjectandevictAllDurableObjectstest helpers tocloudflare:testThese helpers let you exercise how a Durable Object behaves across evictions in your tests. Eviction is graceful: durable storage is preserved, in-memory state is reset by tearing down the instance, hibernatable WebSockets are hibernated rather than closed, and eviction waits for in-flight requests to drain.
import { evictDurableObject, evictAllDurableObjects } from "cloudflare:test"; import { env } from "cloudflare:workers"; const id = env.COUNTER.idFromName("my-counter"); const stub = env.COUNTER.get(id); // Evict the Durable Object instance pointed to by a specific stub await evictDurableObject(stub); await evictDurableObject(stub, { webSockets: "close" }); // Evict all currently-running Durable Objects in evictable namespaces await evictAllDurableObjects(); -
#14394
8a5cf8cThanks @Partha-Shankar! - fix(d1): escapemigrationsTableNameand filenames in SQLite queriesD1 migration commands in both
wranglerand@cloudflare/vitest-pool-workersinterpolated themigrationsTableNameconfig value and migration filenames directly into SQL strings without any escaping. This meant:- A table name such as
my"tablewould produce invalid SQL inCREATE TABLE,SELECT, andINSERTstatements, and - A migration filename containing an apostrophe (e.g.
what's-new.sql) would break theINSERT INTO ... VALUES ('...')statement appended after each migration inwrangler.
Both identifiers are now properly escaped before interpolation:
migrationsTableNameis wrapped in double-quotes with internal double-quotes doubled (SQL-standard identifier quoting), and migration filenames used as string literals have their single-quotes doubled before insertion. - A table name such as
-
Updated dependencies [
5f40dd5,34e0cef,3b743c1,daa5389,8a5cf8c]:
0.16.19
Patch Changes
0.16.18
Patch Changes
0.16.17
Patch Changes
-
#14347
673b09eThanks @jamesopstad! - Update undici from 7.24.8 to 7.28.0 -
#14314
5c3bb11Thanks @harryzcy! - Bump esbuild to 0.28.1This update includes several bug fixes from esbuild versions 0.27.3 through 0.28.1. See the esbuild changelog for details.
-
Updated dependencies [
673b09e,e930bd4,f6e49dd,5c3bb11,296ad65,594544d,a79b899,5dfb788,ca61558,36777db]:
0.16.16
Patch Changes
- Updated dependencies [
0e055d3,27db82c,2a6a26b,9a424ed,ecfdd5a,604be26,1fb7ba5,208b3bb,41f391f,32f9307,8b2ce41,3578919,ee82c76,41f391f,21dbc12,7e63948,035917f]:
0.16.15
Patch Changes
- Updated dependencies [
98c9afe,e305126,f3990b2,4597f08,25722ac,41f75c0,10b5538,818c105,2ae6099,2047a32,2047a32,e8561c2]:
0.16.14
Patch Changes
- Updated dependencies [
23aecac,b932e47,d076bcc,24497d0,4bb572f,165adb2,776098c,0706fbf,7993711,48c4ff0,8cf8c61,8923f97,b205fb7,a61ac29]:
0.16.13
Patch Changes
- Updated dependencies [
c6c61b5,c6c61b5,a3eea27,7a6b1a4,7539a9b,1fdd8de,3b8b80a,0bb2d55,8400fb9,b502d54,7949f81,d462013,c2280cd,3b8b80a,ea12b58,acf7817]:
0.16.12
Patch Changes
-
#14152
3d7992eThanks @petebacondarwin! - Fix module resolution failing when project path contains spacesWhen a project lived under a directory with spaces (e.g.
/Users/me/Documents/Master CMS/project), the vitest pool would fail withNo such module "threads.js"before any test executed. The module fallback service now uses therawSpecifierfrom workerd's fallback request to correctly decodefile://URLs, avoiding the double-encoding of spaces (%20→%2520) that occurred when workerd resolved these URLs as relative paths. -
#14105
337e912Thanks @dario-piotrowicz! - Remove trailing periods from URLs in terminal outputURLs printed to the terminal with a sentence-ending period (e.g.
https://example.com/path.) would include the period when clicked in some terminal emulators, causing 404 errors. This removes trailing periods from all URLs displayed in CLI output across wrangler, miniflare, vitest-pool-workers, and workers-utils. -
#14112
3a746acThanks @penalosa! - Pin non-bundled runtime dependencies to exact versionsDependencies that are not bundled into a package's published output are installed directly into consumers' dependency trees, so they are now pinned to exact versions instead of semver ranges. This closes a supply-chain gap where an unpinned external dependency could resolve to a compromised upstream release on a fresh install. A new
pnpm check:pinned-depslint enforces this for all published packages (and for the shared pnpm catalog) going forward. -
#14061
da8e306Thanks @Vardiak! - Preserve Durable Object WebSocket handler invocation orderDurable Object WebSocket events could begin executing out of order in the Workers Vitest integration when several events arrived while the test wrapper was resolving user code.
Handler invocation now preserves arrival order while still allowing asynchronous handler completion to run concurrently.
-
Updated dependencies [
b210c5e,aec1bb8,e06cbb7,9a26191,5565823,4ef790b,890fca7,6fc9777,337e912,8e7b74f,e86489a,42288d4,65b5f9e,3a746ac,64ef9fd,94b29f7]:
0.16.11
Patch Changes
-
#14087
e3c862aThanks @edmundhung! - Fix Durable Object RPC dispatch for constructors that return proxiesDurable Object RPC methods mediated by a returned
Proxyare now resolved through that proxy after validating prototype exposure. This allows wrappers that bind methods to the underlying instance to use private fields and methods in Vitest, while matching workerd's rejection of constructor-assigned RPC overrides. -
Updated dependencies [
e3c862a,cbb39bd,cbb39bd,408432a,1103c07,7bb5c7a,5b5cbd3,e3c862a,e3c862a,97d7d81,c647ccc,e3c862a,e3c862a,e3c862a,e3c862a,e3c862a,b64b7e4,e3c862a,e3c862a,e4c8fd9,2dffeeb,e3c862a,e3c862a,4c0da7b,972d13d,13cbadb,59e43e4]:
0.16.10
Patch Changes
0.16.9
Patch Changes
-
#13933
90092c0Thanks @petebacondarwin! - Derive bundler externals frompackage.jsonand shrink the published bundleThe bundler's
externallist was previously hand-maintained and out of sync withpackage.json—undiciandsemverwere both listed as external despite being onlydevDependencies. The publisheddist/pool/index.mjsconsequently contained a top-levelimport { fetch } from "undici"that was only resolvable because pnpm happened to hoistundicifrom other packages' devDependencies during local development.The bundler now derives its
externallist fromdependencies+peerDependenciesinpackage.json, making it impossible for adevDependencyto silently end up externalized.Combined with the new
"sideEffects": falsedeclaration in@cloudflare/workers-utils, the unusedcloudflared/tunnelexports (and their transitiveundiciimport) are now tree-shaken out of the pool entirely.dist/pool/index.mjsno longer referencesundiciat all, and shrinks from ~489 KB to ~125 KB. -
Updated dependencies [
52e9082,0733688,fc1f7b9,30657e1,8c569c6,f598eac,3a1fbed]:
0.16.8
Patch Changes
-
#13919
c7eab7fThanks @petebacondarwin! - Fix the outboundCF-Workerheader reflecting the route pattern hostname instead of the parent zone, and falling back to<worker-name>.example.comundervite dev,vitest-pool-workers, andgetPlatformProxyTwo related issues affected the
CF-Workerheader on outbound subrequests in local development:- Under
@cloudflare/vite-plugin,@cloudflare/vitest-pool-workers, andgetPlatformProxy, the header fell back to<worker-name>.example.comeven whenrouteswere configured, becauseunstable_getMiniflareWorkerOptionsand the equivalentgetPlatformProxyworker-options path did not propagate azonevalue to Miniflare. This broke local development against services that reject unknownCF-Workerhosts (for example, Apple WeatherKit returns403 Forbidden). - Across the above paths and
wrangler dev --local, when a route used thezone_namefield (for example{ pattern: "foo.example.com/*", zone_name: "example.com" }), the header was set to the pattern's hostname (foo.example.com) rather than the zone name (example.com). Production setsCF-Workerto the zone name that owns the Worker, so this was inconsistent with deployed behaviour.
Both bugs are fixed: the new
unstable_getMiniflareWorkerOptions/getPlatformProxypath now propagates azonederived from the first configured route, and all four local-dev paths now prefer a route's explicitzone_nameover the pattern hostname when computing that zone. Whenzone_nameisn't set, the existing best-effort behaviour is preserved — forwrangler devthis meansdev.hostis still honoured as a local override and the pattern hostname is used as a final fallback. Resolving the parent zone forzone_id-only,custom_domain, or plain-string routes would require an API lookup, so locally we still approximate it with the pattern hostname.Note:
dev.hostis intentionally not consulted by theunstable_getMiniflareWorkerOptions/getPlatformProxypaths — thedevconfig block is specific towrangler dev. - Under
-
Updated dependencies [
fa1f61f,2679e05,7e40d98,adc9221,735852d,d803737,c7eab7f,e04e180,59cd880,62abf97,e8c2031,e349fe0,da0fa8c,a5c9365]:
0.16.7
Patch Changes
-
#13961
2cb658cThanks @threepointone! - Preserve same-stub RPC call order for wrapped Worker and Durable Object entrypointsPreviously, dynamically wrapped RPC methods could resolve and invoke out of order when many calls were fired without awaiting each individual call. This now queues method resolution per wrapper instance so calls begin in the order they were received.
-
Updated dependencies [
aac7ca0,b25dc0d,ae047ee,a4f22bc,f78d435,aac7ca0,c5c9e20,ebf4b24,b27eb18,895baf5,7bcdf45]:
0.16.6
Patch Changes
-
#13833
0e4a830Thanks @thegeekasteroid! - Filter benigndisconnected: WebSocket peer disconnectedworkerd stderr noise during test runs.The
ignoreMessagesarray in the pool already filters several benign workerd disconnect messages (e.g.disconnected: WebSocket was aborted). On recent workerd versions, tests that exercise the WebSocket API also surfacedisconnected: WebSocket peer disconnectedwarnings during normal teardown. These are not user-actionable and obscure real test failures. Add the message to the existing filter alongside the otherdisconnected:entries. -
Updated dependencies [
19ed49a,3ff0a50,bf688f7,2e72c83,802eaf4,506aa02,8f5cdb1,be8a98c]:
0.16.5
Patch Changes
- Updated dependencies [
d4794a8,58b4403,4352f87,a9e6741,da664d5,bdc398c,f781a2b,1420f10,c8be316]:
0.16.4
Patch Changes
0.16.3
Patch Changes
0.16.2
Patch Changes
0.16.1
Patch Changes
- Updated dependencies [
2284f20,332f527,039bada,18e833d,b6cea17,1a54ac5,53e846a,f3fed88,beff19c,af42fed,1a54ac5]:
0.16.0
Minor Changes
-
#13810
2b8c0ccThanks @jamesopstad! - Stabilize thesecretsconfiguration propertyThe
secretsproperty in the Wrangler config file is no longer experimental and will no longer emit an experimental warning when used. Required secrets are validated during local development and deploy, and used as the source of truth for type generation.{ "secrets": { "required": ["API_KEY", "DB_PASSWORD"] } }
Patch Changes
-
#12974
1127114Thanks @ask-bonk! - Rewrite self-referencing service bindings tokCurrentWorkerbefore renaming the runner workerWhen a wrangler config has a service binding to itself (e.g.
services: [{ binding: "SELF", service: "my-worker" }]where the worker is named"my-worker"), the binding's literal name pointed to a worker that no longer existed once vitest-pool-workers renamed the runner tovitest-pool-workers-runner-<project>. The self-reference is now rewritten to the miniflarekCurrentWorkersymbol, which resolves at request time relative to the referer worker and so survives the rename. Previously this rewrite lived in wrangler'sunstable_getMiniflareWorkerOptions, but it's only needed for vitest-pool-workers' rename — other consumers (getPlatformProxy,@cloudflare/vite-plugin) preserve the original worker name and so don't need it. -
Updated dependencies [
e07825a,58899d8,3020214,0099265,25f5ef2,bb27219,194d75e,12fb5db,18b9d5b,9f532f7,1127114,3ceadef,2b8c0cc,1a5cc86]:
0.15.2
Patch Changes
- Updated dependencies [
22e1a61,00523c8,b5ac54b,e653edf,e1eff94,1c4d850,6d28037,9a1f014,e539008,0bf64a7,0827815,b04eedf,6457fb3,c07d0cb,e539008]:
0.15.1
Patch Changes
- Updated dependencies [
ea943ff,21b87b2,62e9f2a,9eb9e69,2dc6175,0a5db08,033d6ec,ae8eae3,f2e2241,4f6ed93,ed2f4ec,ef24ff2,92bb8a5,6d27479,f2e2241,118027d,fcc491a,e6c437a,e867ac2]:
0.15.0
Minor Changes
-
#13623
b156b2eThanks @penalosa! - Addreset()andabortAllDurableObjects()helpers tocloudflare:testThe
reset()helper deletes all data from attached bindings, and resets all Durable Object instances. This is useful for resetting state between test blocks.The
abortAllDurableObjects()helper resets all Durable Object instances without deleting persisted data.import { reset } from "cloudflare:test"; import { afterEach } from "vitest"; afterEach(async () => { await reset(); });
Patch Changes
- Updated dependencies [
5a2968a,5680287,3494842,7d728fb,df9319d,d5e3c57,3ceeec3,7567ef7,2831b54,7fc50c1,377715d]:
0.14.9
Patch Changes
0.14.8
Patch Changes
-
#13548
1aee990Thanks @emily-shen! - Update warning message when attempting to access exports not defined on the main workerPreviously this referred to the
SELFworker, which is now a deprecated API in the Vitest integration. -
#13607
d5d0446Thanks @petebacondarwin! - fix: Restore workflow binding before async cleanup inWorkflowIntrospectorHandle.dispose()Previously,
dispose()awaited all instance abort operations before restoring the originalenvbinding. On slower CI environments (especially Windows), this left a window where the next test could see a stale proxy, causing "Trying to mock step multiple times" errors or failed introspection. The binding is now restored synchronously before the async instance cleanup begins. -
#13007
2c3258dThanks @sheplu! - Reduce default log verbosity fromVERBOSEtoINFOThe pool logger was previously hardcoded to
VERBOSE, causing noisy debug messages on every test run (e.g.[vpw:debug] Adding compatibility flag...). Only informational, warning, and error messages are now printed by default.For debugging, set
NODE_DEBUG=vitest-pool-workersto restore the detailed output. -
Updated dependencies [
05f4443,4a9ba90,d8c895a,b35617b,7dc0433,8ca78bb,b6e1351,d8314c6,b35617b,7f50300,4fda685,be5e6a0,e456952,59eec63,50bf819,cc1413a,d0a9d1c,4eb1da9,8ca78bb,266c418,6d887db,5716d69]:
0.14.7
Patch Changes
- Updated dependencies [
854d66c,6f63eaa,aef9825,eaaa728,58292f6,5e5bbc1,d5ff5a4,07a918c,89c7829,60565dd,6cbcdeb,90aee27]:
0.14.6
Patch Changes
- Updated dependencies [
9b2b6ba]:
0.14.5
Patch Changes
0.14.4
Patch Changes
- Updated dependencies [
5338bb6,79fd529,28bc2be,4fd138b,bafb96b,c50cb5b,2589395,525a46b,5eff8c1,1313275]:
0.14.3
Patch Changes
0.14.2
Patch Changes
-
#13095
65e6684Thanks @penalosa! - Reject V8 coverage provider with a clear error messageV8 native code coverage (
@vitest/coverage-v8) requiresnode:inspectorto collect profiling data from V8's runtime. workerd only providesnode:inspectoras a non-functional stub, so V8 coverage would silently fail or crash with a confusingNo such module "node:inspector"error.The pool now detects this configuration early — during Vite plugin setup, before Vitest tries to load the coverage provider — and throws a clear error directing users to use Istanbul coverage instead, which works by instrumenting source code at build time and runs on any JavaScript runtime.
-
Updated dependencies [
a3e3b57,7d318e1,fa6d84f,96ee5d4,7d318e1,7a60d4b,78cbe37,6fa5dfd]:
0.14.1
Patch Changes
-
#13131
65acf66Thanks @dario-piotrowicz! - Use miniflare'shandleStructuredLogsoption instead ofhandleRuntimeStdiofor processing workerd outputPreviously,
vitest-pool-workersmanually processed raw stdout/stderr streams from the workerd runtime viahandleRuntimeStdio, with its own filtering of known noisy messages (e.g. LLVM symbolizer warnings). This switches to miniflare'shandleStructuredLogsoption, which parses workerd's structured JSON log output and automatically filters known unhelpful messages. This aligns with how bothwranglerandvite-plugin-cloudflarehandle workerd logs. -
Updated dependencies [
9c4035b,5d29055,fb67a18,d5bffde,ab44870,48d83ca,b2f53ea,b9b7e9d,14e72eb,4dc94fd,b2f53ea,d5bffde,48d83ca]:
0.14.0
Minor Changes
-
#12858
f05f2daThanks @repository! - AdddisableRetryDelays()toWorkflowInstanceModifierto skip retry backoff delays in testsWhen testing Workflows with retry configurations, the backoff delays between retry attempts of a failing
step.do()caused real wall-clock waiting (e.g., 35 seconds for 3 retries with 5-second exponential backoff), even when step results were fully mocked. The newdisableRetryDelays()method eliminates these delays while preserving retry behavior — all attempts still execute, just without waiting between them.
Patch Changes
-
#13091
6d58f0fThanks @penalosa! - Use today's date for the RTTI compat date query instead of a hardcoded"2023-12-01", so newly added Node.js builtin modules are recognized by the module fallback service. -
#13070
cdb9c88Thanks @penalosa! - SuppressCODE_MOVED for unknown code blocklog spam from workerdThese are internal workerd diagnostic messages not relevant to application developers. Miniflare's structured log handler already filters them, but
vitest-pool-workersuses a customhandleRuntimeStdiothat bypasses that pipeline. This adds the pattern to the pool's own ignore list. -
#13069
6d0e329Thanks @penalosa! - fix: suppressoutputGateBrokenstderr noise when testing Workflows -
#13075
b8df076Thanks @penalosa! - Support@voidzero-dev/vite-plus-testas an alternative tovitestUsers running tests via Vite+ (
@voidzero-dev/vite-plus-test) with the recommended pnpm overrides no longer hit spurious version warnings orDisallowed operation called within global scopeerrors. -
Updated dependencies [
ffbc268,9eff028,ed20a9b,f214760,746858a,9aad27f,1fc5518,b539dc7,9282493,a532eea,cd0e971,d4c6158,2565b1d]:
0.13.5
Patch Changes
-
#13077
11c77b7Thanks @penalosa! - fix:runInDurableObjectnow correctly returns redirect responses (3xx) from Durable Object callbacks instead of throwing "Expected callback for X" errors -
#13056
8384743Thanks @penalosa! - fix: Support dynamicimport()inside entrypoint and Durable Object handlersPreviously, calling
exports.default.fetch()orSELF.fetch()on a worker whose handler used a dynamicimport()would hang and fail with "Cannot perform I/O on behalf of a different Durable Object". This happened because the module runner's transport — which communicates over a WebSocket owned by the runner Durable Object — was invoked from a different DO context.The fix patches the module runner's transport via the
onModuleRunnerhook so that allinvoke()calls are routed through the runner DO's I/O context, regardless of where theimport()originates. -
#13074
4618c05Thanks @penalosa! - fix: only apply module fallback extension probing forrequire(), notimportThe module fallback service previously tried adding
.js,.mjs,.cjs, and.jsonsuffixes to extensionless specifiers unconditionally. Per the Node.js spec, this extension-probing behaviour is specific to CommonJSrequire(). ESMimportstatements must include explicit file extensions.Extension-less TypeScript
importspecifiers continue to work correctly — they are resolved by Vite's resolver rather than the fallback's extension loop. -
#13073
baec845Thanks @penalosa! - AddadminSecretsStore()tocloudflare:testfor seeding secrets in testsSecrets store bindings only expose a read-only
.get()method, so there was previously no way to seed secret values from within a test. The newadminSecretsStore()helper returns Miniflare's admin API for a secrets store binding, giving tests full control over create, update, and delete operations.import { adminSecretsStore } from "cloudflare:test"; import { env } from "cloudflare:workers"; const admin = adminSecretsStore(env.MY_SECRET); await admin.create("test-value"); const value = await env.MY_SECRET.get(); // "test-value" -
#13083
cfd513fThanks @penalosa! - Add a 30-second timeout towaitUntilpromise draining to prevent hanging testsPreviously, if a
ctx.waitUntil()promise never resolved, the test suite would hang indefinitely after the test file finished. Now, anywaitUntilpromises that haven't settled within 30 seconds are abandoned with a warning, allowing the test suite to continue. This aligns with the productionwaitUntillimit. -
Updated dependencies [
eeaa473,9fcdfca,bc24ec8,1faff35,0b4c21a,535582d,992f9a3,f4ea4ac,91b7f73,f6cdab2,53ed15a,ce65246,7a5be20,6b50bfa,0386553,9c5ebf5,53ed15a,53ed15a]:
0.13.4
Patch Changes
-
#12999
f9728fdThanks @hiendv! - chore: update some tests and fixtures to Vitest 4 / vpw 0.13.x -
Updated dependencies [
593c4db,b8f3309,451dae3,5aaaab2,5aaaab2,f8516dd,9c9fe30,379f2a2,c2e9163,6a6449e,9a1cf29,875da60]:
0.13.3
Patch Changes
-
#12881
8729f3dThanks @pombosilva! - Workflows testing utilwaitForStatusnow supports waiting for "terminated" and "paused" states. -
Updated dependencies [
782df44,3c988e2,62545c9,cb71403,71ab981,3a1c149,7c3c6c6,ce48b77,8729f3d]:
0.13.2
Patch Changes
0.13.1
Patch Changes
0.13.0
Minor Changes
-
#11632
a6ddbdbThanks @penalosa! - Support Vitest 4 in@cloudflare/vitest-pool-workers.This a breaking change to the
@cloudflare/vitest-pool-workersintegration 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-workersas we move towards a v1 release of the package.We've made a codemod to make the migration easier, which will make the required changes to your config file:
npx jscodeshift -t node_modules/@cloudflare/vitest-pool-workers/dist/codemods/vitest-v3-to-v4.mjs vitest.config.tsOr, without installing the package first:
npx jscodeshift -t https://unpkg.com/@cloudflare/vitest-pool-workers/dist/codemods/vitest-v3-to-v4.mjs --parser=ts vitest.config.ts-
Config API:
defineWorkersProjectanddefineWorkersConfigfrom@cloudflare/vitest-pool-workers/confighave been replaced with acloudflareTest()Vite plugin exported from@cloudflare/vitest-pool-workers. Thetest.poolOptions.workersoptions are now passed directly tocloudflareTest():Before:
import { defineWorkersProject } from "@cloudflare/vitest-pool-workers/config"; export default defineWorkersProject({ test: { poolOptions: { workers: { wrangler: { configPath: "./wrangler.jsonc" }, }, }, }, });After:
import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; import { defineConfig } from "vitest/config"; export default defineConfig({ plugins: [ cloudflareTest({ wrangler: { configPath: "./wrangler.jsonc" }, }), ], }); -
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 ofimport { env, exports } from "cloudflare:workers".exports.default.fetch()has the same behaviour asSELF.fetch(), except that it doesn't expose Assets. To test your assets, write an integration test usingstartDevWorker() -
import { fetchMock } from "cloudflare:test": This has been removed. Instead, mockglobalThis.fetchor use ecosystem libraries like MSW (recommended). -
Vitest peer dependency:
@cloudflare/vitest-pool-workersnow requiresvitest@^4.1.0.
-
Patch Changes
- Updated dependencies [
f7de0fd,ff543e3,8e89e85,e63539d,8d1e130,6ee18e1,ecc7f79,1dda1c8,4bb61b9]:
0.12.21
Patch Changes
-
#12790
5451a7fThanks @petebacondarwin! - Bump devalue to ^5.6.3 to address security vulnerabilitiesDevalue had denial of service and prototype pollution vulnerabilities. This is a bundled dependency.
-
Updated dependencies [
5451a7f,5451a7f,82cc2a8,3c67c2a,d645594,211d75d,6ed249b,9f93b54,de65c58,cb14820,a7c87d1,b8c33f5,e4d9510]:
0.12.20
Patch Changes
- Updated dependencies [
ec2459e]:
0.12.19
Patch Changes
-
#12682
b5b91c9Thanks @hiendv! - Fix resource leak where remote proxy sessions were not disposed during pool shutdown, causing vitest processes to hang. -
Updated dependencies [
6a8aa5f,d672e2e,35b2c56,5f7aaf2,209b396,23a365a,596b8a0,00e729e,0769056,150ef7b,bf9cb3d]:
0.12.18
Patch Changes
0.12.17
Patch Changes
0.12.16
Patch Changes
0.12.15
Patch Changes
-
#12602
58a4020Thanks @anonrig! - Optimize filesystem operations by using Node.js's throwIfNoEntry: false optionThis reduces the number of system calls made when checking for file existence by avoiding the overhead of throwing and catching errors for missing paths. This is an internal performance optimization with no user-visible behavioral changes.
-
Updated dependencies [
e93dc01,c2ed7c2,d920811,896734d,ebdbe52,58a4020,6f6cd94]:
0.12.14
Patch Changes
- Updated dependencies [
f239077,aaa7200,2f19a40,8723684,e2a6600,527e4f5,aa82c2b,0b17117,ca58062]:
0.12.13
Patch Changes
- Updated dependencies [
5a868a0,caf9b11,c58e81b,33a9a8f,8077c14,caf9b11,7d2355e,936187d,7ea69af,5cc7158,caf9b11,43c462a,c4c86f8,7d2355e,c9d0f9d,5cc7158,5cc7158,c9d0f9d]:
0.12.12
Patch Changes
-
#11771
4b6fd36Thanks @avenceslau! - Fix Durable Object storage causing SQLITE_CANTOPEN errors on repeated test runsWhen running
vitestmultiple times in watch mode, Durable Object storage would fail withSQLITE_CANTOPENerrors. This happened because the storage reset function was deleting directories that workerd still had file handles to.The fix preserves directory structure during storage reset, deleting only files while keeping directories intact. This allows workerd to maintain valid handles to SQLite database directories across test runs.
-
Updated dependencies [
ad817dd,b900c5a,f7fa326,734792a,7aaa2a5,cc5ac22,62a8d48,84252b7,e5efa5d,d06ad09,10a1c4a,be9745f,d7b492c,122791d,8809411,1a9eddd,41e18aa]:
0.12.11
Patch Changes
- Updated dependencies [
5d56487,2d90127,2acb277,c8dda16,e02b5f5,8ba1d11,555b32a,d636d6a,bf8df0c,e02b5f5,988dea9,1f1c3ce,62635a0,fd902aa,961705c,355c6da,bfd17cd,3388c84,ce9dc01,21ac7ab,937425c]:
0.12.10
Patch Changes
- Updated dependencies [
ee9b81f,63f1adb,ba13de9,447daa3,fe3af35,bd4bb98,dab4bc9,83adb2c,18c0784]:
0.12.9
Patch Changes
- Updated dependencies [
964a39d,253a85d,ce736b9,0c9625a,47944d1,4c4d5a5,b05b919,0aaf080,b981db5,a113c0d,fdd7a9f,a5fca2c,1bd1488,f7aa8c7]:
0.12.8
Patch Changes
0.12.7
Patch Changes
-
#12056
6d5f69fThanks @edmundhung! - fix: allow Vite query parameters like?rawon.sqlfile importsImporting
.sqlfiles with Vite query parameters (e.g.,import sql from "./query.sql?raw") would fail with "No such module" errors in vitest-pool-workers 0.12.x. Both import styles now work:import sql from "./query.sql?raw"(Vite handles the?rawtransform)import sql from "./query.sql"(loaded as Text module)
-
#11917
7b40cebThanks @ksawaneh! - Fix CommonJSrequire()of.jsonfiles in the module fallback service (avoidsSyntaxError: Unexpected token ':'). -
#11897
bbd8a5eThanks @dario-piotrowicz! - Bundle thezoddependency to reduce supply chain attack surfaceIn order to prevent possible npm vulnerability attacks, the team's policy is to bundle dependencies in our packages where possible. This helps ensure that only trusted code runs on the user's system, even if compromised packages are later published to npm.
This change bundles
zod(a pure JavaScript validation library with no native dependencies) into miniflare and @cloudflare/vitest-pool-workers.Other dependencies remain external for technical reasons:
sharp: Native binary with platform-specific buildsundici: Dynamically required at runtime in worker threadsws: Has optional native bindings for performanceworkerd: Native binary (Cloudflare's JavaScript runtime)@cspotcode/source-map-support: Uses require.cache manipulation at runtimeyouch: Dynamically required for lazy loading
-
Updated dependencies [
a0a9ef6,ad4666c,014e7aa,e414f05,77e82d2,f08ef21,0641e6c,eacedba,05714f8,e8b2ef5,bbd8a5e]:
0.12.6
Patch Changes
0.12.5
Patch Changes
-
#11967
202c59eThanks @emily-shen! - chore: update undiciThe following dependency versions have been updated:
Dependency From To undici 7.14.0 7.18.2 -
Updated dependencies [
75386b1,8e4a0e5,133bf95,93d8d78,69ff962,22727c2,fa39a73,4ac7c82,69ff962,029531a,d58fbd1,202c59e,133bf95,25e2c60,69ff962]:
0.12.4
Patch Changes
-
#11898
c17e971Thanks @petebacondarwin! - Bundle more third-party dependencies to reduce supply chain riskPreviously, several small utility packages were listed as runtime dependencies and installed separately. These are now bundled directly into the published packages, reducing the number of external dependencies users need to trust.
Bundled dependencies:
- miniflare:
acorn,acorn-walk,exit-hook,glob-to-regexp,stoppable - kv-asset-handler:
mime - vite-plugin-cloudflare:
@remix-run/node-fetch-server,defu,get-port,picocolors,tinyglobby - vitest-pool-workers:
birpc,devalue,get-port,semver
- miniflare:
-
Updated dependencies [
e78186d,fe4faa3,4714ca1,c17e971,695b043]:
0.12.3
Patch Changes
- Updated dependencies [
99b1f32]:
0.12.2
Patch Changes
- Updated dependencies [
b0e54b2,ed60c4f,faa5753,e574ef3,b6148ed,ab3859c,0eb973d,ad65efa,fc96e5f,43d5363,0f8d69d]:
0.12.1
Patch Changes
0.12.0
Minor Changes
-
#11648
eac5cf7Thanks @pombosilva! - Add Workflows test handlers in vitest-pool-workers to get the Workflow instance output and error:getOutput(): Returns the output of the successfully completed Workflow instance.getError(): Returns the error information of the errored Workflow instance.
Example:
// First wait for the workflow instance to complete: await expect( instance.waitForStatus({ status: "complete" }) ).resolves.not.toThrow(); // Then, get its output const output = await instance.getOutput(); // Or for errored workflow instances, get their error: await expect( instance.waitForStatus({ status: "errored" }) ).resolves.not.toThrow(); const error = await instance.getError();
Patch Changes
-
#11681
1223663Thanks @ascorbic! - Fix vitest-pool-workers hanging when the default inspector port (9229) is already in use. When debugging is enabled and the default port is unavailable, the pool now automatically finds the next available port. If a user explicitly specifies an inspector port that is unavailable, an error is thrown with a clear message. -
Updated dependencies [
02fbd22,b993d95,f612b46,77078ef,2510723,65d1850,1615fce,b2769bf,554a4df,9f6dd71,8eede3f,d123ad0,9e360f6,5121b23,82e7e90,6a05b1c,fc95831,b0dbf1a,4688f59,69979a3,c54f8da,df1f9c9,d059f69,eac5cf7,b827893]:
0.11.1
Patch Changes
0.11.0
Minor Changes
-
#11533
8d9003eThanks @petebacondarwin! - Add support for ctx.exportsIt is now possible to access
ctx.exportsproperties for themain(SELF) worker.- Integration tests: in the
SELFworker thectx.exportsobject now contains the expected stubs to the exported entry-points. - Unit tests: the object returned from
createExecutionContext()hasexportsproperty that exposes the exports of theSELFworker.
Due to the dynamic nature of Vitest the integration relies upon guessing what the exports of the
mainWorker are by statically analyzing the Worker source using esbuild. In cases where it is not possible to infer the exports (for example, a wildcard re-export of a virtual module) it is possible to declare these in the vitest-pool-workers config via theadditionalExportssetting. - Integration tests: in the
Patch Changes
- Updated dependencies [
ed42010,5d085fb,b75b710,1e9be12,6b28de1,6c590a0,12a63ef,4201472,7d8d4a6,95d81e1,6c590a0]:
0.10.15
Patch Changes
- Updated dependencies [
c15e99e,31c162a,bd5f087,c6dd86f,235d325,b17797c,b17797c,41103f5,ea6fbec,bb47e20,991760d]:
0.10.14
Patch Changes
- Updated dependencies [
af54c63,9988cc9,ce295bf,45480b1,9514c9a,94c67e8,ac861f8,79d30d4,56e78c8,f550b62]:
0.10.13
Patch Changes
0.10.12
Patch Changes
- Updated dependencies [
2b4813b,abe49d8,b154de2,f29e699,5ee3780,6e63b57,71ab562,76f0540,2342d2f,5e937c1,9a1de61,6b38532,e4ddbc2,2aec2b4,695fa25,504e258,5a873bb,d25f7e2,1cfae2d,e7b690b,1d685cb,edf896d,2b4813b,c47ad11,a977701,9eaa9e2]:
0.10.11
Patch Changes
0.10.10
Patch Changes
0.10.9
Patch Changes
0.10.8
Patch Changes
-
Updated dependencies [
c5c4ee5,d0041e2,827d017,7035804,a352c7f,8e99766,d0d3fe6,d014fa7,92afbba,65b4afe,da8442f,15b8460,09cb720,793e2b4,8e99766,9cbf126,2011b6a,dd1e560]:
0.10.7
Patch Changes
0.10.6
Patch Changes
- Updated dependencies [
5286309,2d16610,dd7d584,4259256,63defa2,5cf8a39,70d3d4a,38396ed,8abc789,cdcecfc,e85f965,88aa707]:
0.10.5
Patch Changes
- Updated dependencies [
240ebeb,05440a1,1ae020d,53b0fce,c3ed531,305d7bf,b55a3c7,c3ed531,5d7c4c2,c3ed531]:
0.10.4
Patch Changes
0.10.3
Patch Changes
0.10.2
Patch Changes
0.10.1
Patch Changes
0.10.0
Minor Changes
- #11047
0ff1964Thanks @petebacondarwin! - Infer latest locally available compatibility date if none is provided in the test configuration
Patch Changes
-
#10919
ca6c010Thanks @Caio-Nogueira! - migrate workflow to use a wrapped binding -
#11047
0ff1964Thanks @petebacondarwin! - ensure that vitest specific nodejs polyfills override native modules -
#10741
2f57345Thanks @penalosa! - Remove obsolete--x-remote-bindingsflag -
Updated dependencies [
4bd4c29,31e1330,1a8088a,ca6c010,2f57345]:
0.9.14
Patch Changes
- Updated dependencies [
5124818,d4b4c90,6643bd4,1a2bbf8,36d7054,0ee1a68,8211bc9,3bb034f,43503c7,dd5f769,a6de9db,d39c8b5,7d0417b,8211bc9]:
0.9.13
Patch Changes
0.9.12
Patch Changes
0.9.11
Patch Changes
0.9.10
Patch Changes
0.9.9
Patch Changes
- Updated dependencies [
4c06766,21a0bef,d3aee31,c8d5282,59e8ef0,79a6b7d,7a4d0da,bffd2a9,62656bd,886e577,7f2386e,8d7f32e,f9d37db,835d6f7,79a6b7d]:
0.9.8
Patch Changes
- Updated dependencies [
ff82d80,7a6381c,6ff41a6,0c208e1,2432022,325d22e,8d07576,0a554f9,6244a9e,d09cab3]:
0.9.7
Patch Changes
- Updated dependencies [
b455281]:
0.9.6
Patch Changes
- Updated dependencies [
a57149f]:
0.9.5
Patch Changes
0.9.4
Patch Changes
- Updated dependencies [
555a6da,262393a,3ec1f65,a434352,328e687,97a72cc,b4a4311,dc1d0d6,acd48ed,55a10a3]:
0.9.3
Patch Changes
- Updated dependencies [
b59e3e1,a4e2439,1cc258e,f76da43,b30263e,b30263e,769ffb1,6caf938,88132bc]:
0.9.2
Patch Changes
0.9.1
Patch Changes
0.9.0
Minor Changes
- #10604
135e066Thanks @penalosa! - Enable Remote Bindings without the need for theremoteBindings: trueproperty
Patch Changes
-
#10494
e2b838fThanks @pombosilva! - Add Workflows test support to thecloudflare:testmodule.The
cloudflare:testmodule has two new APIs:introspectWorkflowInstanceintrospectWorkflowwhich allow changing the behavior of one or multiple Workflow instances created during tests.
-
Updated dependencies [
0837a8d,da24079,ffa2600,135e066,e2b838f,30f558e,d8860ac,336a75d,51553ef]:
0.8.71
Patch Changes
0.8.70
Patch Changes
- Updated dependencies [
6e8dd80,4cb3370,7211609,818ce22,5d69df4,5d69df4,c22acc6,cc47b51,c0fad5f,c6a39f5]:
0.8.69
Patch Changes
-
#10471
38bdb78Thanks @clintonsteiner! - chore: bumpdevalueversion to 5.3.2 -
Updated dependencies [
22c8ae6,3c15bbb,dc81221,38bdb78,4492eb0]:
0.8.68
Patch Changes
0.8.67
Patch Changes
0.8.66
Patch Changes
0.8.65
Patch Changes
0.8.64
Patch Changes
- Updated dependencies [
76a6701,d54d8b7,979984b,80e964c,a5a1426,ae0c806,0c04da9,b524a6f,eb32a3a,4288a61]:
0.8.63
Patch Changes
- Updated dependencies [
5020694]:
0.8.62
Patch Changes
- Updated dependencies [
e7cae16,3b6ab8a,c58a05c,42aafa3,70bd966,d391076,422ae22,1479fd0,80960b9,05c5b28,5d5ecd5,e3d9703,bd8223d,e7cae16,d481901,9aad334,28494f4,8cf47f9]:
0.8.61
Patch Changes
-
#10162
5bd0a19Thanks @emily-shen! - fix: stop containers breaking vitest-pool-workersTesting interactions with containers is still currently unsupported.
-
#10130
773cca3Thanks @dario-piotrowicz! - fix the potentially specified environment not being taken into account for remote bindings -
Updated dependencies [
773cca3,773cca3,2e8eb24,93c4c26,48853a6,2e8eb24]:
0.8.60
Patch Changes
- Updated dependencies [
b4d1373,631f26d,d6ecd05,b4d1373,360004d,e82aa19,dae1377,8ba7736,1655bec,354a001,5c3b83f,502a8e0,07c8611]:
0.8.59
Patch Changes
0.8.58
Patch Changes
-
#10033
f467415Thanks @pombosilva! - Make vitest-pool-workers not break when a Workflow binding script_name matches its Worker name -
Updated dependencies [
82a5b2e,f8f7352,2df1d06,f8a80a8,dbdbb8c,687655f,755a249]:
0.8.57
Patch Changes
- Updated dependencies [
c5b291d,3d4f946,7245101,823cba8,19794bf,154acf7,19794bf,7fb0bfd,059a39e]:
0.8.56
Patch Changes
0.8.55
Patch Changes
0.8.54
Patch Changes
-
Updated dependencies [
ac08e68,4ba9f25,17b1e5a,3bb69fa,274a826,77d1cb2,d6a1b9b,e2672c5,a5d7b35,5b0fc9e,bf4c9ab,14ce577,f73da0d]:
0.8.53
Patch Changes
0.8.52
Patch Changes
- Updated dependencies [
80cc834]:
0.8.51
Patch Changes
0.8.50
Patch Changes
- Updated dependencies [
1b3a2b7,dbfa4ef,ba69586,1a75f85,395f36d,6f344bf,fc29c31,45497ab,a447d67,7c55f9e,49c85c5,0bb619a,a1181bf,a727db3,1358034,1a58bc3,7e3aa1b]:
0.8.49
Patch Changes
0.8.48
Patch Changes
-
#9533
0a5bb5aThanks @petebacondarwin! - fix: ensure that thesourcemap-codeclibrary has been transformed correctly to be imported in workerd during Vitest runsPrior to this the inline snapshot tests were failing because they use the
magic-stringlibrary, which in turn relies upon thesourcemap-codeclibrary.This resulted in errors that look like:
Error running worker: SyntaxError: The requested module '@jridgewell/sourcemap-codec' does not provide an export named 'encode'
0.8.47
Patch Changes
0.8.46
Patch Changes
0.8.45
Patch Changes
0.8.44
Patch Changes
0.8.43
Patch Changes
0.8.42
Patch Changes
0.8.41
Patch Changes
-
#9586
d1d34feThanks @penalosa! - Remove the Mixed Mode naming in favour of "remote bindings"/"remote proxy"
0.8.40
Patch Changes
0.8.39
Patch Changes
-
#9595
9793e5bThanks @vicb! - Addtype: modulein package.json -
#9473
fae8c02Thanks @dario-piotrowicz! - add experimental support for mixed mode -
#9536
3b61c41Thanks @dario-piotrowicz! - performance improvement: restart a mixed mode session only if the worker's remote bindings have changed -
Updated dependencies [
3b61c41,bd528d5,2177fb4,1d3293f,04f9164,36113c2,49f5ac7,cf33417,521eeb9,02e2c1e,02e2c1e,3b61c41,e16fcc7,c117904,fae8c02]:
0.8.38
Patch Changes
-
#9439
8d648e7Thanks @edmundhung! - Add support for Vitest 3.2.x -
Updated dependencies [
1914b87,931f467,95eb47d,80b8bd9,95eb47d,9e4cd16,92305af,0b2ba45]:
0.8.37
Patch Changes
-
#9454
9c30aecThanks @Enchan1207! - fix test filtering by pattern that contains non-ascii characters. -
Updated dependencies [
4ab5a40,485cd08,66edd2f,d1a1787,e3b3ef5,1f84092]:
0.8.36
Patch Changes
- Updated dependencies [
db2cdc6]:
0.8.35
Patch Changes
0.8.34
Patch Changes
0.8.33
Patch Changes
-
#9331
3c770ecThanks @petebacondarwin! - fix the Vitest integration to support Workers that want Node.js compatibility is only v1 in productionIt does this by adding the
nodejs_compat_v2flag (if missing) and removingno_nodejs_compat_v2flag (if found).This does mean that the Vitest tests are running with a slightly different environment to production, but this has always been the case in other ways.
-
#9350
68a9008Thanks @penalosa! - Don't crash Vitest when started with a non-existent tail consumer -
Updated dependencies [
34c71ce,f7c82a4,7ddd865,6479fc5,410d985,e5ae13a,6c03bde,c2678d1,34c71ce,cc7fae4]:
0.8.32
Patch Changes
- Updated dependencies [
7344344]:
0.8.31
Patch Changes
-
#9227
ab8dab1Thanks @petebacondarwin! - allow miniflare assets options to override wrangler assets options -
Updated dependencies [
2fe6219,66d975e,5ab035d,02d40ed,2ef31a9,db5ea8f,f2a16f1,3b8f7f1,16de0d5,b87b472]:
0.8.30
Patch Changes
0.8.29
Patch Changes
0.8.28
Patch Changes
- Updated dependencies [
6b42c28,37af035,ceeb375,53ba97d,349cffc,02f0699,91d0c40,362cb0b,f6f1a18,415520e,63a6504,2cc8197,6b42c28,f17ee08]:
0.8.27
Patch Changes
- Updated dependencies [
d0d62e6]:
0.8.26
Patch Changes
0.8.25
Patch Changes
0.8.24
Patch Changes
0.8.23
Patch Changes
0.8.22
Patch Changes
- Updated dependencies [
2c50115]:
0.8.21
Patch Changes
0.8.20
Patch Changes
0.8.19
Patch Changes
0.8.18
Patch Changes
0.8.17
Patch Changes
0.8.16
Patch Changes
-
#8196
fd8c0c4Thanks @edmundhung! - feat: pre-bundle chai with vite instead of esbuild -
Updated dependencies [
c912b99,f5413c5,f2802f9,d2b44a2,4cc036d,84ecfe9]:
0.8.15
Patch Changes
0.8.14
Patch Changes
- Updated dependencies [
d454ad9]:- miniflare@4.20250408.0
- wrangler@4.9.1
0.8.13
Patch Changes
-
#8832
3d825daThanks @LuisDuarte1! - Make vitest-pool-workers not hang when console.* is used in a Workflow -
Updated dependencies [
afd93b9,930ebb2,09464a6,62df08a]:- miniflare@4.20250405.1
- wrangler@4.9.0
0.8.12
Patch Changes
-
#7260
30f7317Thanks @xtian! - Support Yarn.storedirectory -
#8208
9a3d43cThanks @LuisDuarte1! - Make vitest-pool-workers not crash when a workflow is defined -
Updated dependencies [
4e69fb6,93267cf,ec7e621,75b454c,d4c1171]:- wrangler@4.8.0
- miniflare@4.20250405.0
0.8.11
Patch Changes
- Updated dependencies [
e0efb6f,2650fd3,196f51d,0a401d0]:- miniflare@4.20250404.0
- wrangler@4.7.2
0.8.10
Patch Changes
- Updated dependencies [
7427004,007f322,199caa4,80ef13c,55b336f,245cfbd]:- wrangler@4.7.1
- miniflare@4.20250321.2
0.8.9
Patch Changes
0.8.8
Patch Changes
-
#8624
665ebd8Thanks @emily-shen! - fix: Add usage charge warning when Vectorize and AI bindings are used in VitestVectorize and AI bindings can now be used with Vitest. However, because they have no local simulators, they will access your account and incur usage charges, even in testing. Therefore we recommend mocking any usage of these bindings when testing.
-
Updated dependencies [
ecbab5d,24c2c8f]:- wrangler@4.6.0
0.8.7
Patch Changes
-
#8666
f29f018Thanks @penalosa! - RemoveNodeJSCompatModule. This was never fully supported, and never worked for deploying Workers from Wrangler. -
Updated dependencies [
cad99dc,f29f018]:- miniflare@4.20250321.1
- wrangler@4.5.1
0.8.6
Patch Changes
0.8.5
Patch Changes
- Updated dependencies [
7682675,9c844f7,d8c0495,e4b76e8]:- miniflare@4.20250321.0
- wrangler@4.4.1
0.8.4
Patch Changes
-
#8597
5d78760Thanks @CarmenPopoviciu! - feat: Graduate experimental RPC support for Workers with assets in local dev -
Updated dependencies [
d8f1c49,b7d6b7d,4a5f270,5f151fc,5d78760,0d1240b,c0d0cd0,1c94eee]:- miniflare@4.20250320.0
- wrangler@4.4.0
0.8.3
Patch Changes
- Updated dependencies [
9adbd50,dae7bd4,383dc0a,c4fa349,8278db5,86ab0ca,a25f060,62d5471,2a43cdc,5ae12a9,29015e5]:- miniflare@4.20250319.0
- wrangler@4.3.0
0.8.2
Patch Changes
- Updated dependencies [
14680b9,fd9dff8,ff26dc2,05973bb]:- wrangler@4.2.0
- miniflare@4.20250317.1
0.8.1
Patch Changes
-
#8362
1d6c6e7Thanks @ns476! - Add support for Images binding -
Updated dependencies [
b8fd1b1,4978e5b,5ae180e,74b0c73,931b53d,edf169d,1b2aa91]:- wrangler@4.1.0
- miniflare@4.20250317.0
0.8.0
Minor Changes
-
#7334
869ec7bThanks @threepointone! - chore: update esbuildThis patch updates esbuild from 0.17.19 to 0.24.2. That's a big bump! Lots has gone into esbuild since May '23. All the details are available at https://github.com/evanw/esbuild/blob/main/CHANGELOG.md / https://github.com/evanw/esbuild/blob/main/CHANGELOG-2023.md.
-
We now support all modern JavasScript/TypeScript features suported by esbuild (as of December 2024). New additions include standard decorators, auto-accessors, and the
usingsyntax. -
0.18 introduced wider support for configuration specified via
tsconfig.jsonhttps://github.com/evanw/esbuild/issues/3019. After observing the (lack of) any actual broken code over the last year for this release, we feel comfortable releasing this without considering it a breaking change. -
0.19.3 introduced support for import attributes
import stuff from './stuff.json' with { type: 'json' }While we don't currently expose the esbuild configuration for developers to add their own plugins to customise how modules with import attributes are bundled, we may introduce new "types" ourselves in the future.
-
0.19.0 introduced support for wildcard imports. Specifics here (https://github.com/evanw/esbuild/blob/main/CHANGELOG-2023.md#0190). tl;dr -
-
These 2 patterns will bundle all files that match the glob pattern into a single file.
const json1 = await import("./data/" + kind + ".json");const json2 = await import(`./data/${kind}.json`); -
This pattern will NOT bundle any matching patterns:
const path = "./data/" + kind + ".js"; const json2 = await import(path);You can use
find_additional_modulesto bundle any additional modules that are not referenced in the code but are required by the project.
Now, this MAY be a breaking change for some. Specifically, if you were previously using the pattern (that will now include all files matching the glob pattern in the bundle), BUT
find_additional_moduleswas NOT configured to include some files, those files would now be included in the bundle. For example, consider this code:// src/index.js export default { async fetch() { const url = new URL(request.url); const name = url.pathname; const value = (await import("." + name)).default; return new Response(value); }, };Imagine if in that folder, you had these 3 files:
// src/one.js export default "one";// src/two.js export default "two";// src/hidden/secret.js export default "do not share this secret";And your
wrangler.tomlwas:name = "my-worker" main = "src/index.jsBefore this update:
- A request to anything but
http://localhost:8787/would error. For example, a request tohttp://localhost:8787/one.jswould error with No such module "one.js". - Let's configure
wrangler.tomlto include all.jsfiles in thesrcfolder:
name = "my-worker" main = "src/index.js find_additional_modules = true rules = [ { type = "ESModule", globs = ["*.js"]} ]Now, a request to
http://localhost:8787/one.jswould return the contents ofsrc/one.js, but a request tohttp://localhost:8787/hidden/secret.jswould error with No such module "hidden/secret.js". To include this file, you could expand therulesarray to be:rules = [ { type = "ESModule", globs = ["**/*.js"]} ]Then, a request to
http://localhost:8787/hidden/secret.jswill return the contents ofsrc/hidden/secret.js.After this update:
- Let's put the wrangler.toml back to its original configuration:
name = "my-worker" main = "src/index.js-
Now, a request to
http://localhost:8787/one.jswill return the contents ofsrc/one.js, but a request tohttp://localhost:8787/hidden/secret.jswill ALSO return the contents ofsrc/hidden/secret.js. THIS MAY NOT BE WHAT YOU WANT. You can "fix" this in 2 ways:- Remove the inline wildcard import:
// src/index.js export default { async fetch() { const name = new URL(request.url).pathname; const moduleName = "./" + name; const value = (await import(moduleName)).default; return new Response(value); }, };Now, no extra modules are included in the bundle, and a request to
http://localhost:8787/hidden/secret.jswill throw an error. You can use thefind_additional_modulesfeature to include it again. 2. Don't use the wildcard import pattern:// src/index.js import one from "./one.js"; import two from "./two.js"; export default { async fetch() { const name = new URL(request.url).pathname; switch (name) { case "/one.js": return new Response(one); case "/two.js": return new Response(two); default: return new Response("Not found", { status: 404 }); } }, };Further, there may be some files that aren't modules (js/ts/wasm/text/binary/etc) that are in the folder being included (For example, a
photo.jpgfile). This pattern will now attempt to include them in the bundle, and throw an error. It will look like this:[ERROR] No loader is configured for ".png" files: src/photo.jpgTo fix this, simply move the offending file to a different folder.
In general, we DO NOT recommend using the wildcard import pattern. If done wrong, it can leak files into your bundle that you don't want, or make your worker slightly slower to start. If you must use it (either with a wildcard import pattern or with
find_additional_modules) you must be diligent to check that your worker is working as expected and that you are not leaking files into your bundle that you don't want. You can configure eslint to disallow dynamic imports like this:// eslint.config.js export default [ { rules: { "no-restricted-syntax": [ "error", { selector: "ImportExpression[argument.type!='Literal']", message: "Dynamic imports with non-literal arguments are not allowed.", }, ], }, }, ];
-
-
Patch Changes
- Updated dependencies [
869ec7b,869ec7b,869ec7b,869ec7b,869ec7b,869ec7b,869ec7b,869ec7b,869ec7b,869ec7b,869ec7b,869ec7b,869ec7b,869ec7b,869ec7b,869ec7b,869ec7b]:- wrangler@4.0.0
- miniflare@4.20250310.0
0.7.8
Patch Changes
0.7.7
Patch Changes
- Updated dependencies [
7b6b0c2]:
0.7.6
Patch Changes
-
#8338
2d40989Thanks @GregBrimble! - feat: Upload _headers and _redirects if present with Workers Assets as part ofwrangler deployandwrangler versions upload. -
#8288
cf14e17Thanks @CarmenPopoviciu! - feat: Add assets Proxy Worker skeleton in miniflareThis commit implements a very basic Proxy Worker skeleton, and wires it in the "pipeline" miniflare creates for assets. This Worker will be incrementally worked on, but for now, the current implementation will forward all incoming requests to the Router Worker, thus leaving the current assets behaviour in local dev, the same.
This is an experimental feature available under the
--x-assets-rpcflag:wrangler dev --x-assets-rpc. -
Updated dependencies [
2d40989,da568e5,cf14e17,af9a57a,fbba583,bca1fb5,79c7810]:
0.7.5
Patch Changes
-
#8173
a9c0159Thanks @edmundhung! - improve error message with isolated storage -
#8199
60d2bc6Thanks @edmundhung! - Added step-through debugging support with Vitest.To start debugging, run Vitest with the following command and attach a debugger to port 9229:
vitest --inspect=9229 --no-file-parallelismFor more details, check out our Vitest Debugging guide.
0.7.4
Patch Changes
-
#8254
2b92a65Thanks @edmundhung! - fix: responses fromfetchMockshould have immutable headers
0.7.3
Patch Changes
-
#8182
085a37aThanks @edmundhung! - fix mock modules not re-evaluated in watch mode
0.7.2
Patch Changes
- Updated dependencies [
eb46f98]:
0.7.1
Patch Changes
-
#7084
82a8937Thanks @penalosa! - Support scoped names (e.g.@scoped/durable-objects) when usingrunInDurableObject() -
#8179
b10483cThanks @edmundhung! - fix: support running in directories that contain spaces
0.7.0
Minor Changes
- #7923
aaa9ccaThanks @penalosa! - Support Vitest v3. While this drops testing for Vitest v2, we expect Vitest v2 will continue to work as well.
Patch Changes
0.6.16
Patch Changes
- Updated dependencies [
28b1dc7]:
0.6.15
Patch Changes
- Updated dependencies [
3fb801f,fff677e,3fb801f,542c6ea,3fb801f,4db1fb5,542c6ea,1bc60d7,1aa2a91,35710e5]:
0.6.14
Patch Changes
-
#7810
ac4f30bThanks @edmundhung! - Added Vite dependency pre-bundling support. If you encounter module resolution issues—such as:Error: Cannot use require() to import an ES ModuleorError: No such module—you can now bundle these dependencies using the deps.optimizer option:import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; export default defineWorkersConfig({ test: { deps: { optimizer: { ssr: { enabled: true, include: ["your-package-name"], }, }, }, poolOptions: { workers: { // ... }, }, }, });Fixed #6591, #6581, #6405.
-
Updated dependencies [
a025ad2]:
0.6.13
Patch Changes
- Updated dependencies [
b1966df,c80dbd8,1f80d69,88514c8,9d08af8,6abe69c,0c0374c,b2dca9a,6abe69c,c412a31,60310cd,71fd250]:
0.6.12
Patch Changes
- Updated dependencies [
59c7c8e]:
0.6.11
Patch Changes
- Updated dependencies [
444a630]:
0.6.10
Patch Changes
0.6.9
Patch Changes
-
#7773
aa3ee63Thanks @emily-shen! - fix: respectrun_worker_firstwhen testing worker with assets -
Updated dependencies [
d758215,34f9797,f57bc4e,cf4f47a,38db4ed,de6fa18,bc4d6c8]:
0.6.8
Patch Changes
0.6.7
Patch Changes
0.6.6
Patch Changes
0.6.5
Patch Changes
0.6.4
Patch Changes
- Updated dependencies [
16a9460]:
0.6.3
Patch Changes
- Updated dependencies [
a1ff045]:
0.6.2
Patch Changes
0.6.1
Patch Changes
0.6.0
Minor Changes
- #7388
78c1649Thanks @andyjessop! - chore: add nodejs_compat by default in Vitest Pool Workers
Patch Changes
- Updated dependencies [
ff4e77e,2c76887,6439347,e771fe9,7c8ae1c,78bdec5,45d1d1e,e4716cc,773bda8,9d2740a,f3c2f69]:
0.5.41
Patch Changes
-
#7668
94f650eThanks @romeupalos! - fix: Add support interception of URLs with repeated key/name in its query params.e.g.,
https://example.com/foo/bar?a=1&a=2 -
Updated dependencies [
cac7fa6,d8fb032,b4e0af1,6c2f173,755a27c,8abb43f]:
0.5.40
Patch Changes
0.5.39
Patch Changes
0.5.38
Patch Changes
0.5.37
Patch Changes
0.5.36
Patch Changes
- Updated dependencies [
e0b98fd]:
0.5.35
Patch Changes
0.5.34
Patch Changes
- Updated dependencies [
415e5b5,8f25ebe,21a9e24,b40d0ab,f2045be,9ede45b,f5b9cd5,9435af0,20a0f17,f4ae6ee,14a7bc6,073293f,5e69799,8c873ed]:
0.5.33
Patch Changes
-
#7032
a18ed4eThanks @Codex-! - Add support for AbortSignal to fetch-mock -
Updated dependencies [
24c752e,ac87395,a3f56d1,80a83bb,6ecc74e,4cd8b46,22a4055,11338d0,98d2725,5928e8c,b3d2e7d]:
0.5.32
Patch Changes
0.5.31
Patch Changes
- Updated dependencies [
31729ee]:
0.5.30
Patch Changes
0.5.29
Patch Changes
-
#7278
6508ea2Thanks @andyjessop! - fix: ensures Vitest Pool Workers doesn't error when using nodejs_compat_v2 flag -
Updated dependencies [
b6cbfbd,edec415,941d411,e2e6912,09e6e90,b4a0e74]:
0.5.28
Patch Changes
0.5.27
Patch Changes
- Updated dependencies [
b499b74]:
0.5.26
Patch Changes
0.5.25
Patch Changes
0.5.24
Patch Changes
0.5.23
Patch Changes
- Updated dependencies [
68a2a84,0111edb,a33a133,15ef013,924ec18,8ca4b32,656a444,038fdd9,bd66d51,bd66d51,bd66d51]:
0.5.22
Patch Changes
- Updated dependencies [
760e43f,cef32c8,4aa35c5,3f1d79c,1de309b,e7ea600,a2afcf1,b219296,a90980c,5ef6231,80e5bc6]:
0.5.21
Patch Changes
- Updated dependencies [
809193e,9bf51d6,1f6ff8b,244aa57,e44f496,e1b93dc,48152d6,045787b,127615a,a8ca700,6131ef5,6b97353,f9d5fdb,c794935]:
0.5.20
Patch Changes
0.5.19
Patch Changes
0.5.18
Patch Changes
0.5.17
Patch Changes
0.5.16
Patch Changes
- Updated dependencies [
1320f20]:
0.5.15
Patch Changes
-
#6835
5c50949Thanks @emily-shen! - feature: enable asset routing in the vitest integration for Workers + static assetsIntegration tests (using the SELF binding) in Workers + assets projects will now return static assets if present on that path. Previously all requests went to the user worker regardless of whether static assets would have been served in production.
Unit style tests intentionally do not return static assets.
-
Updated dependencies [
d696850,5c50949,dc92af2,82180a7,54924a4,30b7328]:
0.5.14
Patch Changes
0.5.13
Patch Changes
0.5.12
Patch Changes
- Updated dependencies [
5bfb75d]:
0.5.11
Patch Changes
- Updated dependencies [
7ede181]:
0.5.10
Patch Changes
0.5.9
Patch Changes
0.5.8
Patch Changes
0.5.7
Patch Changes
-
#6725
92730bbThanks @penalosa! - fix: SQLite Durable Objects cannot be tested with vitest-pool-workers -
Updated dependencies [
ecd82e8,2840b9f,61dd93a,7655505,9649dbc,3e75612]:
0.5.6
Patch Changes
0.5.5
Patch Changes
0.5.4
Patch Changes
0.5.3
Patch Changes
0.5.2
Patch Changes
- Updated dependencies []:
0.5.1
Patch Changes
- Updated dependencies []:
0.5.0
Minor Changes
-
#6232
f3c0400Thanks @penalosa! - feat: Support Vitest v2.0.xThis drops support for Vitest@1, due to the issues described in workers-sdk#6071
Patch Changes
-
#6700
d6c1dd2Thanks @petebacondarwin! - fix: minor performance improvement to the url polyfill used by the vitest integration -
Updated dependencies [
f30c61f,2507304,b27b741,d68e8c9,0737e0f,0a9e90a,aa603ab]:
0.4.31
Patch Changes
-
#6673
3f5b934Thanks @dependabot! - fix: Theworkerdprovidednode:urlmodule doesn't support everything Vitest needs. As a short-term fix, inject thenode:urlpolyfill into the worker bundle. -
Updated dependencies [
831f892,88c40be,3f5b934,59a0072,2174127,6523db2,4107f57,8527675,648cfdd,7bbed63,33cc0ec,48eeff4,67711c2,8dcd456]:
0.4.30
Patch Changes
0.4.29
Patch Changes
-
#6633
1a4b4baThanks @andyjessop! - Ensures console methods are bound to their instance in Vitest Pool Worker tests
0.4.28
Patch Changes
0.4.27
Patch Changes
- Updated dependencies [
da48a70,0a76d7e,c2460c4,72ea742,f097cb7,a7e1bfe,0d83428,3bd833c,72ea742,3bd833c,f4c8cea]:
0.4.26
Patch Changes
0.4.25
Patch Changes
0.4.24
Patch Changes
0.4.23
Patch Changes
0.4.22
Patch Changes
0.4.21
Patch Changes
-
#6455
b4483ddThanks @petebacondarwin! - fix: ensure that directory imports in commonjs modules get resolved to their index fileFixes #6406
0.4.20
Patch Changes
0.4.19
Patch Changes
- Updated dependencies [
cba2e25]:
0.4.18
Patch Changes
0.4.17
Patch Changes
-
#6362
35289e3Thanks @petebacondarwin! - fix: ensure that mocked fetch responses have a valid URL propertyFixes #6350
-
Updated dependencies [
31aa15c,a9021aa,7588800,cfbdede,dc576c8,44ad2c7,13549c3,64f34e8]:
0.4.16
Patch Changes
0.4.15
Patch Changes
0.4.14
Patch Changes
0.4.13
Patch Changes
0.4.12
Patch Changes
- Updated dependencies [
0d32448,25afcb2,d497e1e,4f524f2,eb201a3,8bbd824,db11a0f,e4abed3,fa1016c]:
0.4.11
Patch Changes
0.4.10
Patch Changes
0.4.9
Patch Changes
0.4.8
Patch Changes
-
#6180
b994604Thanks @Skye-31! - Fix: pass env to getBindings to support reading.dev.vars.{environment}https://github.com/cloudflare/workers-sdk/pull/5612 added support for selecting the environment of config used, but it missed passing it to the code that reads
.dev.vars.{environment}Closes #5641
-
Updated dependencies [
42a7930,35689ea,e048958,7951815,4cdad9b,7ed675e,b994604,d03b102,02dda3d,1568c25,4072114,9466531,9272ef5]:
0.4.7
Patch Changes
0.4.6
Patch Changes
-
#6050
a0c3327Thanks @threepointone! - chore: Normalize more depsThis is the last of the patches that normalize dependencies across the codebase. In this batch:
ws,vitest,zod,rimraf,@types/rimraf,ava,source-map,glob,cookie,@types/cookie,@microsoft/api-extractor,@types/mime,@types/yargs,devtools-protocol,@vitest/ui,execa,strip-ansiThis patch also sorts dependencies in every
package.json -
#6029
f5ad1d3Thanks @threepointone! - chore: Normalize some dependencies in workers-sdkThis is the first of a few expected patches that normalize dependency versions, This normalizes
undici,concurrently,@types/node,react,react-dom,@types/react,@types/react-dom,eslint,typescript. There are no functional code changes (but there are a couple of typecheck fixes). -
#6079
2e531b4Thanks @CarmenPopoviciu! - fix: definedefineWorkersConfigusing overload signaturesThe type definition of
defineWorkersConfigdoesn't work withmergeConfigofvitest/configbecause of type mismatch. This function should be an overload function likedefineConfig -
Updated dependencies [
dc597a3,15aff8f,b4c0233,a0c3327,f5ad1d3,c643a81,31cd51f,db66101,374bc44,267761b,84e6aeb]:
0.4.5
Patch Changes
-
#6007
335e6e7Thanks @Skye-31! - fix: improverunInDurableObjecttype#5975 updated the type for
runInDurableObjectto infer the stub's type correctly for RPC methods, however it used the wrongDurableObjectstype. This PR fixes the type used to properly support RPC methods.
0.4.4
Patch Changes
- Updated dependencies [
e6a3d24]:
0.4.3
Patch Changes
- Updated dependencies [
f1f1834]:
0.4.2
Patch Changes
- Updated dependencies [
1e68fe5,e144f63,35b1a2f,21573f4,ab95473,bac79fb,6f83641,1cc52f1,e648825]:
0.4.1
Patch Changes
0.4.0
Minor Changes
- #5916
e42f320Thanks @petebacondarwin! - feature: add support for JSRPC
Patch Changes
0.3.0
Minor Changes
- #5900
5bf0a6bThanks @petebacondarwin! - feature: add support for testing Pages Functions
Patch Changes
-
#5904
c36fb59Thanks @petebacondarwin! - fix: automatically re-runSELFtests withoutimport <main>By injecting a side-effect only import into tests when there is a
mainfield specified we can get Vitest to "know" when the SELF Worker has been modified and re-run tests automatically. -
#5911
8cb0ee7Thanks @petebacondarwin! - fix: ensureconsole.log()s displayed inSELFintegration tests -
Updated dependencies [
53f22a0,57daae0,a905f31,64ccdd6,4458a9e]:
0.2.12
Patch Changes
0.2.11
Patch Changes
-
#5838
609debdThanks @petebacondarwin! - fix: update undici to the latest version to avoid a potential vulnerability -
Updated dependencies [
7e97ba8,609debd,63f7acb,2869e03,86a6e09,df2daf2]:
0.2.10
Patch Changes
0.2.9
Patch Changes
-
#5458
f520a71Thanks @Cherry! - fix: loosen the peer dependency version on vitest to support versions ranging from 1.3.0 to 1.5.0 -
Updated dependencies []:
0.2.8
Patch Changes
0.2.7
Patch Changes
- Updated dependencies [
19cac82]:
0.2.6
Patch Changes
0.2.5
Patch Changes
-
#5733
995199fThanks @penalosa! - fix: Build all packages before publishing -
Updated dependencies []:
0.2.4
Patch Changes
0.2.3
Patch Changes
0.2.2
Patch Changes
-
#5652
ccb9d3dThanks @petebacondarwin! - chore: re-release due to broken build -
Updated dependencies [
ccb9d3d]:
0.2.1
Patch Changes
0.2.0
Minor Changes
-
#5612
8f470d9Thanks @Skye-31! - Feat: Support specifying an environment for your worker when running tests. This allows your tests to pick up bindings & variables that are scoped to specific environments.For example:
import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; export default defineWorkersConfig({ test: { poolOptions: { workers: { wrangler: { configPath: "./wrangler.toml", environment: "production", }, }, }, }, });
Patch Changes
-
#5589
92bc055Thanks @Skye-31! - fix: Support importing ES modules from libraries that do not correctly provide"type"="module"not use.mjsextensionsThe toucan-js library has an entry point of
"module": "dist/index.esm.js". This file does not use the standard.mjsextension, nor does it specify"type"="module", so the resolution and loading algorithm fails to identify this file as an ES Module, defaulting to CommonJS, breaking Vitest. Fixes #5588 -
Updated dependencies [
9a46e03,c9f081a,fbe1c9c,22f5841,c9f081a]:
0.1.19
Patch Changes
0.1.18
Patch Changes
0.1.17
Patch Changes
0.1.16
Patch Changes
- Updated dependencies [
9f15ce1]:
0.1.15
Patch Changes
- Updated dependencies [
7734f80]:
0.1.14
Patch Changes
0.1.13
Patch Changes
0.1.12
Patch Changes
0.1.11
Patch Changes
0.1.10
Patch Changes
0.1.9
Patch Changes
- Updated dependencies [
b7a6d9d]:
0.1.8
Patch Changes
- Updated dependencies [
daac6a2,9343714,dc0c1dc,7115568,c90dd6b,b341614,976adec,3e5a932,fbdca7d,47b325a]:
0.1.7
Patch Changes
0.1.6
Patch Changes
0.1.5
Patch Changes
0.1.4
Patch Changes
0.1.3
Patch Changes
-
#5261
4618fb0Thanks @mrbbot! - fix: link migration guide whenenvironment: "miniflare"is specified in Vitest configuration -
Updated dependencies [
133a190,0a86050,e1f2576,1720f0a,a676f55,8f79981]:
0.1.2
Patch Changes
- Updated dependencies [
a0768bc]:
0.1.1
Patch Changes
- Updated dependencies [
2e50d51]:
0.1.0
Minor Changes
-
#5241
ca891e7Thanks @mrbbot! - feature: implement Workers Vitest integrationIntroducing the new Workers Vitest integration! The
@cloudflare/vitest-pool-workerspackage allows you to write unit and integration tests using Vitest that run inside the Workers runtime. Refer to the documentation and examples for more information.