You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
When using Sandbox SDK preview URLs, WebSocket requests using the vite-hmr protocol could be dropped before they reached the worker, causing HMR to fail. The plugin now forwards Sandbox WebSocket traffic and preserves the original request origin/host so worker proxy logic receives the correct URL.
This a breaking change to the @cloudflare/vitest-pool-workers integration 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-workers as 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:
Config API:defineWorkersProject and defineWorkersConfig from @cloudflare/vitest-pool-workers/config have been replaced with a cloudflareTest() Vite plugin exported from @cloudflare/vitest-pool-workers. The test.poolOptions.workers options are now passed directly to cloudflareTest():
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 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()
The --cipher, --log-file, --escape-char, --config-file, --pkcs11, --identity-file, --mac-spec, --option, and --tag flags are now deprecated. These flags expose OpenSSH-specific options that are tied to the current implementation. A future release will replace the underlying SSH transport, at which point these flags will be removed. They still function for now.
#12815e63539d Thanks @NuroDev! - Support disabling persistence in unstable_startWorker() and unstable_dev()
You can now disable persistence entirely by setting persist: false in the dev options:
Astro 6+ generates its own wrangler configuration on build, so autoconfig now detects the Astro version and skips creating a wrangler.jsonc file for projects using Astro 6 or later. This prevents conflicts between the autoconfig-generated config and Astro's built-in config generation.
The --hostname, --ipv4, and --ipv6 flags on wrangler vpc service create and wrangler vpc service update now validate input before sending requests to the API. Previously, invalid values were accepted by the CLI and only rejected by the API with opaque error messages. Now users get clear, actionable error messages for common mistakes like passing a URL instead of a hostname, using an IP address in the --hostname flag, or providing malformed IP addresses.
Previously, only a top-level env.d.ts was created, which meant server files didn't receive Cloudflare types. Now the CLI generates separate app/env.d.ts and server/env.d.ts files, both importing from a shared _cloudflare/env.d.ts to avoid duplication.
This ensures Cloudflare types are available in both app and server directories.
The following dependency versions have been updated:
Dependency
From
To
workerd
1.20260310.1
1.20260312.1
#12864ecc7f79 Thanks @NuroDev! - Fix local explorer route matching to be more precise
Previously, the route matching used startsWith("/cdn-cgi/explorer") which would incorrectly match paths like /cdn-cgi/explorerfoo or /cdn-cgi/explorereeeeee, causing unexpected behavior. The route matching has been improved to only match:
/cdn-cgi/explorer (exact match)
/cdn-cgi/explorer/ and any sub-paths (e.g., /cdn-cgi/explorer/api/*)
Paths that merely start with /cdn-cgi/explorer but aren't actually the explorer (like /cdn-cgi/explorerfoo) will now correctly fall through to the user worker.
#127751dda1c8 Thanks @fhanau! - Add support for worker connect handler in miniflare
Replace the Cloudflare Pages deployment with a Workers + static assets deployment.
In production (wrangler.jsonc), this is an assets-only Worker with no code entry point — the playground-preview-worker handles all routing and proxying in front of it.
For local development, a separate config (wrangler.dev.jsonc) adds a Worker entry point (src/worker.ts) that replicates the proxying behavior of the production playground-preview-worker. It proxies /playground/api/* requests to the testing playground-preview-worker, and for the /playground route it fetches an auth cookie from the testing endpoint, transforms it for local use (stripping SameSite/Secure directives and replacing the testing origin with localhost), and injects it into the response so the preview iframe can authenticate.
The playground-preview-worker referer allowlist is updated to also accept requests from *.workers-playground.workers.dev (in addition to the existing *.workers-playground.pages.dev).
Replace the Cloudflare Pages deployment with a Workers + static assets deployment.
In production (wrangler.jsonc), this is an assets-only Worker with no code entry point — the playground-preview-worker handles all routing and proxying in front of it.
For local development, a separate config (wrangler.dev.jsonc) adds a Worker entry point (src/worker.ts) that replicates the proxying behavior of the production playground-preview-worker. It proxies /playground/api/* requests to the testing playground-preview-worker, and for the /playground route it fetches an auth cookie from the testing endpoint, transforms it for local use (stripping SameSite/Secure directives and replacing the testing origin with localhost), and injects it into the response so the preview iframe can authenticate.
The playground-preview-worker referer allowlist is updated to also accept requests from *.workers-playground.workers.dev (in addition to the existing *.workers-playground.pages.dev).
The changeset only has a title with no body paragraph:
Add support for worker connect handler in miniflare
The README requires a body: "One or more paragraphs explaining the reason for the change and anything notable about the approach." There is no explanation of what a "worker connect handler" is, why support was added, or how users can take advantage of it.
Possible incorrect version type
Adding support for a new handler type ("worker connect handler") looks like a new feature, which the README classifies as minor. It is currently marked patch. Please confirm whether this is a new capability or purely a bug fix / internal fix, and bump to minor if it exposes new functionality to users.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@cloudflare/vite-plugin@1.28.0
Minor Changes
#12855
c2b76bcThanks @jamesopstad! - Support local explorer/cdn-cgi/routesThe local explorer UI can now be accessed at
/cdn-cgi/explorer.Patch Changes
#12834
64edac7Thanks @jamesopstad! - Warn when theassetsfield is provided for auxiliary WorkersAuxiliary Workers do not support static assets. Previously, the
assetsfield was silently ignored but we now warn if it is used.#12794
b980af6Thanks @aron-cf! - Fix Sandbox SDK preview URL WebSocket routingWhen using Sandbox SDK preview URLs, WebSocket requests using the
vite-hmrprotocol could be dropped before they reached the worker, causing HMR to fail. The plugin now forwards Sandbox WebSocket traffic and preserves the original request origin/host so worker proxy logic receives the correct URL.Updated dependencies [
f7de0fd,ff543e3,8e89e85,e63539d,8d1e130,6ee18e1,ecc7f79,1dda1c8,4bb61b9]:@cloudflare/vitest-pool-workers@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:
Or, without installing the package first:
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:
After:
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-isolateimport { 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
f7de0fd,ff543e3,8e89e85,e63539d,8d1e130,6ee18e1,ecc7f79,1dda1c8,4bb61b9]:wrangler@4.73.0
Minor Changes
#12853
ff543e3Thanks @gpanders! - Deprecate SSH passthrough flags inwrangler containers sshThe
--cipher,--log-file,--escape-char,--config-file,--pkcs11,--identity-file,--mac-spec,--option, and--tagflags are now deprecated. These flags expose OpenSSH-specific options that are tied to the current implementation. A future release will replace the underlying SSH transport, at which point these flags will be removed. They still function for now.#12815
e63539dThanks @NuroDev! - Support disabling persistence inunstable_startWorker()andunstable_dev()You can now disable persistence entirely by setting
persist: falsein thedevoptions:Or when using
unstable_startWorker():This is useful for testing scenarios where you want to ensure a clean state on each run without any persisted data from previous runs.
Patch Changes
#12861
f7de0fdThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
#12734
8e89e85Thanks @flostellbrink! - Add back support for wrangler d1 exports with multiple tables.Example:
#12807
8d1e130Thanks @MaxwellCalkin! - fix:vectorizecommands now output valid jsonThis fixes:
wrangler vectorize createwrangler vectorize infowrangler vectorize insertwrangler vectorize upsertwrangler vectorize listwrangler vectorize list-vectorswrangler vectorize list-metadata-indexAlso,
wrangler vectorize create --jsonnow also includes thecreated_at,modified_onanddescriptionfields.#12856
6ee18e1Thanks @dario-piotrowicz! - Fix autoconfig for Astro v6 projects to skip wrangler config generationAstro 6+ generates its own wrangler configuration on build, so autoconfig now detects the Astro version and skips creating a
wrangler.jsoncfile for projects using Astro 6 or later. This prevents conflicts between the autoconfig-generated config and Astro's built-in config generation.#12700
4bb61b9Thanks @RiscadoA! - Add client-side validation for VPC service host flagsThe
--hostname,--ipv4, and--ipv6flags onwrangler vpc service createandwrangler vpc service updatenow validate input before sending requests to the API. Previously, invalid values were accepted by the CLI and only rejected by the API with opaque error messages. Now users get clear, actionable error messages for common mistakes like passing a URL instead of a hostname, using an IP address in the--hostnameflag, or providing malformed IP addresses.Updated dependencies [
f7de0fd,ecc7f79,1dda1c8]:create-cloudflare@2.64.7
Patch Changes
#12805
9e78285Thanks @dependabot! - Update dependencies of "create-cloudflare"The following dependency versions have been updated:
#12806
56986b9Thanks @dependabot! - Update dependencies of "create-cloudflare"The following dependency versions have been updated:
#12512
01f252dThanks @thebeyondr! - Fix C3 success summary dashboard link to point to Workers service production viewThe "Dash:" URL now includes
/productionso it opens the correct Workers & Pages service view in the Cloudflare dashboard.#12820
556bce0Thanks @dario-piotrowicz! - Generateapp/env.d.tsandserver/env.d.tsfor Nuxt applicationsPreviously, only a top-level
env.d.tswas created, which meant server files didn't receive Cloudflare types. Now the CLI generates separateapp/env.d.tsandserver/env.d.tsfiles, both importing from a shared_cloudflare/env.d.tsto avoid duplication.This ensures Cloudflare types are available in both app and server directories.
miniflare@4.20260312.0
Patch Changes
#12861
f7de0fdThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
#12864
ecc7f79Thanks @NuroDev! - Fix local explorer route matching to be more precisePreviously, the route matching used
startsWith("/cdn-cgi/explorer")which would incorrectly match paths like/cdn-cgi/explorerfooor/cdn-cgi/explorereeeeee, causing unexpected behavior. The route matching has been improved to only match:/cdn-cgi/explorer(exact match)/cdn-cgi/explorer/and any sub-paths (e.g.,/cdn-cgi/explorer/api/*)Paths that merely start with
/cdn-cgi/explorerbut aren't actually the explorer (like/cdn-cgi/explorerfoo) will now correctly fall through to the user worker.#12775
1dda1c8Thanks @fhanau! - Add support for worker connect handler in miniflare@cloudflare/pages-shared@0.13.114
Patch Changes
f7de0fd,ecc7f79,1dda1c8]:@cloudflare/containers-shared@0.11.0
Minor Changes
#12857
3f09bb2Thanks @gabivlj! - Update theproxy-everythingimage used for containers local devThe egress interceptor image now supports HTTPS and ingress over HTTP CONNECT in workerd.
@cloudflare/local-explorer-ui@0.8.1
Patch Changes
ecc7f79Thanks @NuroDev! - Fix local explorer's sidebar header link to point to the correct/cdn-cgi/explorer/path rather than/.@cloudflare/playground-preview-worker@0.3.1
Patch Changes
#12655
a31ee0bThanks @petebacondarwin! - Migrate workers-playground from Cloudflare Pages to Cloudflare WorkersReplace the Cloudflare Pages deployment with a Workers + static assets deployment.
In production (
wrangler.jsonc), this is an assets-only Worker with no code entry point — theplayground-preview-workerhandles all routing and proxying in front of it.For local development, a separate config (
wrangler.dev.jsonc) adds a Worker entry point (src/worker.ts) that replicates the proxying behavior of the productionplayground-preview-worker. It proxies/playground/api/*requests to the testingplayground-preview-worker, and for the/playgroundroute it fetches an auth cookie from the testing endpoint, transforms it for local use (strippingSameSite/Securedirectives and replacing the testing origin withlocalhost), and injects it into the response so the preview iframe can authenticate.The
playground-preview-workerreferer allowlist is updated to also accept requests from*.workers-playground.workers.dev(in addition to the existing*.workers-playground.pages.dev).@cloudflare/workers-playground@0.4.1
Patch Changes
#12655
a31ee0bThanks @petebacondarwin! - Migrate workers-playground from Cloudflare Pages to Cloudflare WorkersReplace the Cloudflare Pages deployment with a Workers + static assets deployment.
In production (
wrangler.jsonc), this is an assets-only Worker with no code entry point — theplayground-preview-workerhandles all routing and proxying in front of it.For local development, a separate config (
wrangler.dev.jsonc) adds a Worker entry point (src/worker.ts) that replicates the proxying behavior of the productionplayground-preview-worker. It proxies/playground/api/*requests to the testingplayground-preview-worker, and for the/playgroundroute it fetches an auth cookie from the testing endpoint, transforms it for local use (strippingSameSite/Securedirectives and replacing the testing origin withlocalhost), and injects it into the response so the preview iframe can authenticate.The
playground-preview-workerreferer allowlist is updated to also accept requests from*.workers-playground.workers.dev(in addition to the existing*.workers-playground.pages.dev).