Change8

@cloudflare/vitest-pool-workers@0.11.0

📦 cloudflare-workersView on GitHub →
3 features🔧 3 symbols

Summary

This release introduces support for accessing exports via ctx.exports in SELF workers for both integration and unit testing. Dependencies including wrangler and miniflare have also been updated.

Migration Steps

  1. If static analysis by esbuild fails to infer exports (e.g., due to a wildcard re-export of a virtual module), declare these exports in the vitest-pool-workers config using the additionalExports setting.

✨ New Features

  • Added support for accessing ctx.exports properties for the main (SELF) worker.
  • Integration tests now ensure the ctx.exports object contains expected stubs for exported entry-points in the SELF worker.
  • The object returned from createExecutionContext() now includes an exports property exposing the exports of the SELF worker for unit tests.

🔧 Affected Symbols

ctx.exportscreateExecutionContext()vitest-pool-workers config (additionalExports)