@cloudflare/workers-utils@0.3.0
Breaking Changes📦 cloudflare-workersView on GitHub →
⚠ 1 breaking✨ 2 features🔧 2 symbols
Summary
This release introduces support for the `CLOUDFLARE_ENV` environment variable for environment selection and adds a new entry-point to `workers-utils`. It also tightens environment consistency checks during deployment to prevent accidental cross-environment uploads.
⚠️ Breaking Changes
- If you use `wrangler versions upload` and previously relied on environment selection solely through the build process (e.g., via `@cloudflare/vite-plugin`), you might now encounter an error if the environment specified via the `--env` command line argument does not match the environment used during the build. Ensure that `CLOUDFLARE_ENV` used during build matches the `--env` flag during upload, or remove the `--env` flag if the build environment is correct.
Migration Steps
- If you use environment selection during build and deployment, ensure consistency between the `CLOUDFLARE_ENV` variable set during build and the `--env` flag used with Wrangler commands like `versions upload` to avoid deployment mismatches.
✨ New Features
- Added a new `test-helpers` entry-point to the `workers-utils` package.
- Introduced support for the `CLOUDFLARE_ENV` environment variable to select the active environment for commands like `wrangler versions upload`. This variable is primarily used by `@cloudflare/vite-plugin` for selecting the build environment.
🔧 Affected Symbols
wrangler@cloudflare/vite-plugin