Packages

@cloudflare/vitest-pool-workers

0.23.0 · 7 Oct 2026MIT1.8M / weekRepositoryHomepagenpmAtom feed

Deprecated by its maintainers: @cloudflare/vitest-pool-workers has been renamed to @cloudflare/vitest-plugin. This package will not receive future updates.What to use instead

322 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 0.23.x · latest line
  2. 0.23.0

    7 Oct 2026
  3. 0.22.x
  4. 0.22.0

    18 Aug 2026
    • Mocking requests with MSW in Worker tests now requires MSW >= 2.14

      @cloudflare/vitest-pool-workers previously shipped internal shims to make MSW work inside the workerd runtime. MSW 2.14 added that support natively, so those shims have been removed.

      If you mock requests with MSW in your Worker tests, make sure you're on MSW >= 2.14; older versions will no longer intercept requests. You can keep using setupServer() from msw/node, or adopt the official @msw/cloudflare integration via setupNetwork(). See the updated request-mocking example fixture for the recommended pattern.

    • Honor access.dev when running Workers with @cloudflare/vitest-pool-workers, so ctx.access.getIdentity() returns the configured identity just as it does with wrangler dev.

    • Fix module resolution for relative require() inside CJS deps when the project path contains spaces

      When a project lives under a directory with a space in its name, externalized CommonJS dependencies that use relative require() calls (e.g. require("./lib/impl.js")) would fail with "No such module" because workerd preserves URL encoding in the module name. Encoded module paths are now handled deterministically before CommonJS resolution without altering literal percent sequences.

  5. 0.21.x
  6. 0.21.3

    13 Aug 2026
  7. 0.21.2

    12 Aug 2026
    • Widen WorkerPoolOptionsContext.inject type to avoid ProvidedContext mismatch

      Previously, calling inject() inside cloudflareTest() pool options could fail with a type error when your project's ProvidedContext augmentation wasn't visible to the pool plugin. The inject parameter now accepts any string key and is generic (inject<T>(key)), defaulting to unknown when no type argument is provided. This lets you opt in to concrete types (e.g. inject<number>("port")) while avoiding the cross-copy ProvidedContext mismatch that occurred when pnpm resolved separate virtual-store instances of vitest.

    • Ignore a nodejs_compat compatibility flag that the compatibility date already enables

      workerd rejects a compatibility flag that its compatibility date enables by default, so a Worker configured with both a compatibility date of 2026-08-04 or later and nodejs_compat failed to start locally with "The compatibility flag nodejs_compat became the default as of 2026-08-04 so does not need to be specified anymore".

      The redundant nodejs_compat and nodejs_compat_v2 flags are now dropped when starting the runtime, which has no effect on the resulting Worker because the compatibility date enables both anyway. no_nodejs_compat and no_nodejs_compat_v2 still switch Node.js compatibility off, and a flag specified alongside its own opt-out is left alone so that workerd still reports those as contradictory.

    • Detect Node.js compatibility from the compatibility date, now that nodejs_compat is enabled by default

      As of compatibility date 2026-08-04, workerd enables the nodejs_compat and nodejs_compat_v2 compatibility flags by default. Previously these tools only treated Node.js compatibility as enabled when one of those flags was listed explicitly, so a Worker on a compatibility date of 2026-08-04 or later without the flag would get Node.js APIs from the runtime but no Node.js polyfills from the bundler, and process.env could be substituted with an empty object at build time. They now resolve these flags the same way workerd does, and honour no_nodejs_compat to opt out.

      To keep Node.js compatibility switched off on a newer compatibility date, specify both no_nodejs_compat and no_nodejs_compat_v2, since each flag has its own default.

      @cloudflare/vitest-pool-workers needs nodejs_compat_v2 for its own test runner, so it continues to override a project that opts out of it. On a compatibility date that enables the flag anyway, it now drops the opt-out rather than adding the flag back, which workerd would reject — previously this stopped such a project from running any tests at all.

      wrangler types also no longer attributes its @types/node suggestion to "the nodejs_compat flag", which it can now make for Workers that do not set the flag at all.

  8. 0.21.1

    11 Aug 2026
    • Report built-in modules that a Worker's compatibility settings don't provide as module errors, instead of crashing workerd

      Previously, a Worker whose module graph statically reached a compatibility-gated built-in that wasn't enabled — for example import "node:child_process" without nodejs_compat — took down the runtime with *** Received signal #11: Segmentation fault before any test ran. Vitest reported only Worker exited unexpectedly, naming neither the module nor the file that imported it, which made the cause very hard to find. The import didn't even have to be called; being reachable from the entrypoint was enough.

      The module fallback service answered these specifiers with a redirect to the modules root, but workerd already resolves node:/cloudflare:/workerd: specifiers there, so the redirect pointed back at the module workerd was in the middle of resolving and it recursed until the stack overflowed. Such a specifier only reaches the fallback service when workerd's own registry has already missed, so it's now reported as not found: workerd raises No such module "node:child_process", matching what wrangler dev does for the same Worker. The accompanying pool error names the module and points at compatibility flags rather than suggesting you bundle it, which can't help for a module built into the runtime.

  9. 0.21.0

    10 Aug 2026
    • Update the Workers Vitest pool for Miniflare's config-based options

      The Workers Vitest pool now converts the Miniflare options it creates for test sessions to Miniflare's config-based workers shape.

      For the most part, users should not expect to notice any changes.

  10. 0.20.x
  11. 0.20.1 – 0.20.33 releases that only update dependencieswrangler 4.120.0miniflare 5.20260801.1-alphaundici 7.29.0Show each
  12. 0.20.0

    31 Jul 2026
    • breaking

      Remove several options from the miniflare override options

      The following options have been removed from the miniflare override options, as they were not intended to be exposed, were not functional, or have been superseded by other options:

      Additionally, cache has been deprecated and renamed to cacheAPI, but cache remains functional.

    • Preserve the deprecated Miniflare cache option

      Vitest configurations using cache continue to work after the internal Miniflare v5 upgrade. The option is translated to cacheAPI; new configurations should use cacheAPI directly.

    • Stop enabling Miniflare's removed unsafeStickyBlobs option

      The pool no longer sets the unsafeStickyBlobs Miniflare option, which has been removed. This option was only needed for the Durable Object isolated storage feature that was dropped in 0.13.0, so there is no change in behaviour.

  13. 0.19.x
  14. 0.19.1

    30 Jul 2026

    Only updates dependencies:miniflare 4.20260730.0wrangler 4.116.0

  15. 0.19.0

    28 Jul 2026
    • Add a verbose option to cloudflareTest() and cloudflarePool() configuration

      Set verbose: false to suppress verbose workerd runtime logs, such as caught Durable Object RPC errors. The option defaults to true to preserve existing output.

    • Ignore workerd's disconnected: peer disconnected without gracefully ending TLS session exception logs

      When tests make real fetch() calls to external TLS endpoints, servers and load balancers routinely close idle keepalive connections without sending a TLS close_notify. No request fails — the connection is idle — but workerd logs a kj/compat/tls.c++ exception with a full stack trace each time, flooding otherwise green test runs. This is the TLS sibling of the disconnected: ... messages already in the ignore list, so filter it the same way.

  16. 0.18.x
  17. 0.18.8

    23 Jul 2026
    • Prevent worker disposal errors from failing otherwise successful test runs

      Errors raised while disposing test Workers are now logged for diagnostics rather than overriding the test result. Set NODE_DEBUG=vitest-pool-workers to view these errors.

  18. 0.18.7

    21 Jul 2026

    Reading the note…

  19. 0.18.6

    17 Jul 2026

    Reading the note…

  20. 0.18.5

    15 Jul 2026

    Reading the note…

  21. 0.18.4

    9 Jul 2026

    Reading the note…

  22. 0.18.3

    9 Jul 2026

    Reading the note…

  23. 0.18.2

    7 Jul 2026

    Reading the note…

  24. 0.18.1

    7 Jul 2026

    Reading the note…

  25. 0.18.0

    2 Jul 2026

    Reading the note…

  26. 0.17.x
  27. 0.17.0

    30 Jun 2026

    Reading the note…

  28. 0.16.x
  29. 0.16.20

    25 Jun 2026

    Reading the note…

  30. 0.16.19

    23 Jun 2026

    Reading the note…

  31. 0.16.18

    19 Jun 2026

    Reading the note…

  32. 0.16.17

    18 Jun 2026

    Reading the note…

  33. 0.16.16

    16 Jun 2026

    Reading the note…

  34. 0.16.15

    11 Jun 2026

    Reading the note…

  35. 0.16.14

    9 Jun 2026

    Reading the note…

  36. 0.16.13

    4 Jun 2026

    Reading the note…

  37. 0.16.12

    2 Jun 2026

    Reading the note…

  38. 0.16.11

    1 Jun 2026

    Reading the note…

  39. 0.16.10

    26 May 2026

    Reading the note…

  40. 0.16.9

    22 May 2026

    Reading the note…

  41. 0.16.8

    21 May 2026

    Reading the note…

  42. 0.16.7

    19 May 2026

    Reading the note…

  43. 0.16.6

    15 May 2026

    Reading the note…

  44. 0.16.5

    14 May 2026

    Reading the note…

  45. 0.16.4

    12 May 2026

    Reading the note…

  46. 0.16.3

    7 May 2026

    Reading the note…

  47. 0.16.2

    7 May 2026

    Reading the note…

  48. 0.16.1

    7 May 2026

    Reading the note…

  49. 0.16.0

    5 May 2026

    Reading the note…

  50. 0.15.x
  51. 0.15.2

    30 Apr 2026

    Reading the note…

  52. 0.15.1

    28 Apr 2026

    Reading the note…

  53. 0.15.0

    24 Apr 2026

    Reading the note…

  54. 0.14.x
  55. 0.14.9

    21 Apr 2026

    Reading the note…

  56. 0.14.8

    20 Apr 2026

    Reading the note…

  57. 0.14.7

    15 Apr 2026

    Reading the note…

  58. 0.14.6

    13 Apr 2026

    Reading the note…