diff --git a/.changeset/bump-undici.md b/.changeset/bump-undici.md deleted file mode 100644 index 3c96965c3f..0000000000 --- a/.changeset/bump-undici.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"wrangler": patch -"miniflare": patch ---- - -Bump undici from 7.18.2 to 7.24.4 diff --git a/.changeset/c3-frameworks-update-11639.md b/.changeset/c3-frameworks-update-11639.md deleted file mode 100644 index 0349a9d33a..0000000000 --- a/.changeset/c3-frameworks-update-11639.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"create-cloudflare": patch ---- - -Update dependencies of "create-cloudflare" - -The following dependency versions have been updated: - -| Dependency | From | To | -| --------------- | ------ | ------ | -| create-next-app | 15.5.6 | 16.1.6 | diff --git a/.changeset/c3-frameworks-update-12905.md b/.changeset/c3-frameworks-update-12905.md deleted file mode 100644 index 34aff98588..0000000000 --- a/.changeset/c3-frameworks-update-12905.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"create-cloudflare": patch ---- - -Update dependencies of "create-cloudflare" - -The following dependency versions have been updated: - -| Dependency | From | To | -| ---------- | ------ | ------ | -| nuxi | 3.33.1 | 3.34.0 | diff --git a/.changeset/c3-frameworks-update-12907.md b/.changeset/c3-frameworks-update-12907.md deleted file mode 100644 index 9d7bf39e27..0000000000 --- a/.changeset/c3-frameworks-update-12907.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"create-cloudflare": patch ---- - -Update dependencies of "create-cloudflare" - -The following dependency versions have been updated: - -| Dependency | From | To | -| ------------ | ------ | ----- | -| create-astro | 4.13.2 | 5.0.0 | diff --git a/.changeset/c3-frameworks-update-12908.md b/.changeset/c3-frameworks-update-12908.md deleted file mode 100644 index c7e06ab287..0000000000 --- a/.changeset/c3-frameworks-update-12908.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"create-cloudflare": patch ---- - -Update dependencies of "create-cloudflare" - -The following dependency versions have been updated: - -| Dependency | From | To | -| --------------- | ------ | ------ | -| @angular/create | 21.2.1 | 21.2.2 | diff --git a/.changeset/c3-frameworks-update-12909.md b/.changeset/c3-frameworks-update-12909.md deleted file mode 100644 index 756dd07bd6..0000000000 --- a/.changeset/c3-frameworks-update-12909.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"create-cloudflare": patch ---- - -Update dependencies of "create-cloudflare" - -The following dependency versions have been updated: - -| Dependency | From | To | -| ----------- | ------ | ------ | -| create-qwik | 1.19.1 | 1.19.2 | diff --git a/.changeset/dependabot-update-12875.md b/.changeset/dependabot-update-12875.md deleted file mode 100644 index 82ce2f928a..0000000000 --- a/.changeset/dependabot-update-12875.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"miniflare": patch -"wrangler": patch ---- - -Update dependencies of "miniflare", "wrangler" - -The following dependency versions have been updated: - -| Dependency | From | To | -| ---------- | ------------ | ------------ | -| workerd | 1.20260312.1 | 1.20260316.1 | diff --git a/.changeset/dependabot-update-12935.md b/.changeset/dependabot-update-12935.md deleted file mode 100644 index 201562443b..0000000000 --- a/.changeset/dependabot-update-12935.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"miniflare": patch -"wrangler": patch ---- - -Update dependencies of "miniflare", "wrangler" - -The following dependency versions have been updated: - -| Dependency | From | To | -| ---------- | ------------ | ------------ | -| workerd | 1.20260316.1 | 1.20260317.1 | diff --git a/.changeset/kind-beers-occur.md b/.changeset/kind-beers-occur.md deleted file mode 100644 index 175251c645..0000000000 --- a/.changeset/kind-beers-occur.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@cloudflare/vite-plugin": patch ---- - -Select the appropriate `vite/module-runner` implementation during dev based on the user's Vite version - -The plugin now builds against Vite 8 and ships two bundled copies of `vite/module-runner`: one from Vite 8 and one from Vite 7.1.12 (the last version before a breaking change to the module runner in Vite 7.2.0). At dev server startup, the correct implementation is selected based on the user's installed Vite version. This is Vite 8's module runner for users on Vite >= 7.2.0, and the legacy module runner for users on older versions. diff --git a/.changeset/migrate-devtools-to-workers-assets.md b/.changeset/migrate-devtools-to-workers-assets.md deleted file mode 100644 index c91d4c68d7..0000000000 --- a/.changeset/migrate-devtools-to-workers-assets.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@cloudflare/chrome-devtools-patches": patch -"wrangler": patch -"miniflare": patch ---- - -Migrate chrome-devtools-patches deployment from Cloudflare Pages to Workers + Assets - -The DevTools frontend is now deployed as a Cloudflare Workers + Assets project instead of a Cloudflare Pages project. This uses `wrangler deploy` for production deployments and `wrangler versions upload` for PR preview deployments. - -The inspector proxy origin allowlists in both wrangler and miniflare have been updated to accept connections from the new `workers.dev` domain patterns, while retaining the legacy `pages.dev` patterns for backward compatibility. diff --git a/.changeset/open-apples-heal.md b/.changeset/open-apples-heal.md deleted file mode 100644 index e808b18e44..0000000000 --- a/.changeset/open-apples-heal.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": patch ---- - -Fix execution freezing on `debugger` statements when DevTools is not attached - -Previously, `wrangler` always sent `Debugger.enable` to the runtime on connection, even when DevTools wasn't open. This caused scripts to freeze on `debugger` statements. Now `Debugger.enable` is only sent when DevTools is actually attached, and `Debugger.disable` is sent when DevTools disconnects to stop the runtime from performing debugging work. diff --git a/.changeset/quick-items-shine.md b/.changeset/quick-items-shine.md deleted file mode 100644 index e20138c25a..0000000000 --- a/.changeset/quick-items-shine.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": patch ---- - -Simplify description of --json option - -Remove extraneous adjectives in the description of the `--json` option. diff --git a/.changeset/tunnel-commands.md b/.changeset/tunnel-commands.md deleted file mode 100644 index f4e7f9baf2..0000000000 --- a/.changeset/tunnel-commands.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -"wrangler": minor ---- - -feat: add `wrangler tunnel` commands for managing Cloudflare Tunnels - -Adds a new set of commands for managing remotely-managed Cloudflare Tunnels directly from Wrangler: - -- `wrangler tunnel create ` - Create a new Cloudflare Tunnel -- `wrangler tunnel list` - List all tunnels in your account -- `wrangler tunnel info ` - Display details about a specific tunnel -- `wrangler tunnel delete ` - Delete a tunnel (with confirmation) -- `wrangler tunnel run ` - Run a tunnel using cloudflared -- `wrangler tunnel quick-start ` - Start a temporary tunnel (Try Cloudflare) - -The `run` and `quick-start` commands automatically download and manage the cloudflared binary, caching it in `~/.wrangler/cloudflared/`. Users are prompted before downloading and warned if their PATH-installed cloudflared is outdated. You can override the binary location with the `CLOUDFLARED_PATH` environment variable. - -All commands are marked as experimental. diff --git a/.changeset/warm-mirrors-allow.md b/.changeset/warm-mirrors-allow.md deleted file mode 100644 index f77c28c4a2..0000000000 --- a/.changeset/warm-mirrors-allow.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": patch ---- - -Reject cross-drive module paths in Pages Functions routing - -On Windows, module paths using a different drive letter could be parsed in a way that bypassed the project-root check. These paths are now parsed correctly and rejected when they resolve outside the project. diff --git a/packages/chrome-devtools-patches/CHANGELOG.md b/packages/chrome-devtools-patches/CHANGELOG.md index 7b4ae27ce6..2dfddb4852 100644 --- a/packages/chrome-devtools-patches/CHANGELOG.md +++ b/packages/chrome-devtools-patches/CHANGELOG.md @@ -1,5 +1,15 @@ # @cloudflare/chrome-devtools-patches +## 0.1.5 + +### Patch Changes + +- [#12928](https://github.com/cloudflare/workers-sdk/pull/12928) [`81ee98e`](https://github.com/cloudflare/workers-sdk/commit/81ee98e6a0c6be879757289ef6e34e1559d6ee2a) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - Migrate chrome-devtools-patches deployment from Cloudflare Pages to Workers + Assets + + The DevTools frontend is now deployed as a Cloudflare Workers + Assets project instead of a Cloudflare Pages project. This uses `wrangler deploy` for production deployments and `wrangler versions upload` for PR preview deployments. + + The inspector proxy origin allowlists in both wrangler and miniflare have been updated to accept connections from the new `workers.dev` domain patterns, while retaining the legacy `pages.dev` patterns for backward compatibility. + ## 0.1.4 ### Patch Changes @@ -29,7 +39,6 @@ ### Minor Changes - [#7137](https://github.com/cloudflare/workers-sdk/pull/7137) [`1b195bd`](https://github.com/cloudflare/workers-sdk/commit/1b195bd09aef282a8a205d341579cdb7e3755d89) Thanks [@andyjessop](https://github.com/andyjessop)! - feat: update devtools patches for release - - rebases patches on top of latest devtools head - removes CPU profiling tab - adds performance tab diff --git a/packages/chrome-devtools-patches/package.json b/packages/chrome-devtools-patches/package.json index 192bf18cd8..ee54c86795 100644 --- a/packages/chrome-devtools-patches/package.json +++ b/packages/chrome-devtools-patches/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/chrome-devtools-patches", - "version": "0.1.4", + "version": "0.1.5", "private": true, "description": "Chrome Devtools hosted for easy use with Workers tooling and applications (Wrangler, Playground, Quick Editor).", "homepage": "https://github.com/cloudflare/workers-sdk#readme", diff --git a/packages/create-cloudflare/CHANGELOG.md b/packages/create-cloudflare/CHANGELOG.md index eb523a3c6d..5f50db78ce 100644 --- a/packages/create-cloudflare/CHANGELOG.md +++ b/packages/create-cloudflare/CHANGELOG.md @@ -1,5 +1,49 @@ # create-cloudflare +## 2.64.9 + +### Patch Changes + +- [#11639](https://github.com/cloudflare/workers-sdk/pull/11639) [`e9f5f30`](https://github.com/cloudflare/workers-sdk/commit/e9f5f30d536e89d0f182e336a0abc0e246bdc615) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update dependencies of "create-cloudflare" + + The following dependency versions have been updated: + + | Dependency | From | To | + | --------------- | ------ | ------ | + | create-next-app | 15.5.6 | 16.1.6 | + +- [#12905](https://github.com/cloudflare/workers-sdk/pull/12905) [`e7ef325`](https://github.com/cloudflare/workers-sdk/commit/e7ef325cd069e55116d35f1fea572a87cb919dab) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update dependencies of "create-cloudflare" + + The following dependency versions have been updated: + + | Dependency | From | To | + | ---------- | ------ | ------ | + | nuxi | 3.33.1 | 3.34.0 | + +- [#12907](https://github.com/cloudflare/workers-sdk/pull/12907) [`92402f6`](https://github.com/cloudflare/workers-sdk/commit/92402f677a9640a08cd7bff4b0d1bb301c52b030) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update dependencies of "create-cloudflare" + + The following dependency versions have been updated: + + | Dependency | From | To | + | ------------ | ------ | ----- | + | create-astro | 4.13.2 | 5.0.0 | + +- [#12908](https://github.com/cloudflare/workers-sdk/pull/12908) [`eadb0fd`](https://github.com/cloudflare/workers-sdk/commit/eadb0fdc56db7984253dd725c4178c83dd70d948) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update dependencies of "create-cloudflare" + + The following dependency versions have been updated: + + | Dependency | From | To | + | --------------- | ------ | ------ | + | @angular/create | 21.2.1 | 21.2.2 | + +- [#12909](https://github.com/cloudflare/workers-sdk/pull/12909) [`75fa04b`](https://github.com/cloudflare/workers-sdk/commit/75fa04bf029a730513a58c1c1b26f33e93227137) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update dependencies of "create-cloudflare" + + The following dependency versions have been updated: + + | Dependency | From | To | + | ----------- | ------ | ------ | + | create-qwik | 1.19.1 | 1.19.2 | + ## 2.64.8 ### Patch Changes @@ -261,7 +305,6 @@ New Workers projects created via `create-cloudflare` now include an `AGENTS.md` file that provides AI coding agents with retrieval-led guidance for Cloudflare APIs. This helps agents avoid using outdated knowledge from their training data and instead consult current documentation. The file includes: - - Links to Cloudflare documentation and MCP servers - Essential wrangler commands (`dev`, `deploy`, `types`) - Pointers to product-specific documentation for limits and APIs @@ -640,7 +683,6 @@ - [#11520](https://github.com/cloudflare/workers-sdk/pull/11520) [`85ec269`](https://github.com/cloudflare/workers-sdk/commit/85ec26985a05b2cc5e0dd3c4904f5b96b9e2de80) Thanks [@vicb](https://github.com/vicb)! - Add placeholder substitution in wrangler config files. When c3 updates the config file: - - The value `""` is replaced with the worker name. - The value `""` is replaced with the latest worked compatibility date. @@ -1115,7 +1157,6 @@ - [#10766](https://github.com/cloudflare/workers-sdk/pull/10766) [`bd5b720`](https://github.com/cloudflare/workers-sdk/commit/bd5b720c44f8bc04ac153154c1f8b8a291af7139) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - Do not override any `.env` settings in `.gitignore` files Previously we only looked for `.env*` in the `gitignore` but now we cover more cases such as: - - `.env` - `.env\*` - `.env.` @@ -2431,7 +2472,6 @@ | @angular/create | 19.1.5 | 19.1.6 | - [#7854](https://github.com/cloudflare/workers-sdk/pull/7854) [`bff209d`](https://github.com/cloudflare/workers-sdk/commit/bff209d853ae081ec692c41a080071956bf4ae2d) Thanks [@beratbayram](https://github.com/beratbayram)! - Update the Next.js template - - Removed top-level `await` in `next.config.ts` as it is not allowed there and not required. - Improved `setupDevPlatform()` comment @@ -2564,7 +2604,6 @@ | nuxi | 3.17.2 | 3.20.0 | - [#7743](https://github.com/cloudflare/workers-sdk/pull/7743) [`5955dac`](https://github.com/cloudflare/workers-sdk/commit/5955dac5ef2c6a0b6eea6dc28d11491966c07c2b) Thanks [@vicb](https://github.com/vicb)! - Update the Next.js experimental template - - Use create-next-app@^14.2.23 - Rename wrangler types output to cloudflare-env.d.ts @@ -3786,7 +3825,6 @@ - [#5675](https://github.com/cloudflare/workers-sdk/pull/5675) [`235c439`](https://github.com/cloudflare/workers-sdk/commit/235c4398268322b6c0c13060bc3da91f52b4b066) Thanks [@jculvey](https://github.com/jculvey)! - feat: Improvements to `hono` template. The `hono` template has been updated as follows: - - Bumps `create-hono` to `0.7.0` - Automatically installs dependencies and specifies the detected package manager to avoid interactive prompts - Adds a `wrangler.toml` file with commented out examples of all available bindings to match other templates. @@ -3937,7 +3975,6 @@ ### Patch Changes - [#5218](https://github.com/cloudflare/workers-sdk/pull/5218) [`0c535e7`](https://github.com/cloudflare/workers-sdk/commit/0c535e7236cbfc4bf856889454298bb434e48650) Thanks [@jculvey](https://github.com/jculvey)! - refactor: Refactor C3 internal helpers. Includes a few small changes: - - Drops `--save` from internal `pnpm` and `npm` install invocations - Switches to `git branch --show-current` for detecting current branch @@ -4151,7 +4188,6 @@ - [#4754](https://github.com/cloudflare/workers-sdk/pull/4754) [`06f85613`](https://github.com/cloudflare/workers-sdk/commit/06f85613228066ccb323c2818b443e9460b02c94) Thanks [@jculvey](https://github.com/jculvey)! - Adds C3 support for external templates hosted in git repositories via the `--template ` option. The source may be specified as any of the following: - - `user/repo` - `git@github.com:user/repo` - `https://github.com/user/repo` @@ -4164,7 +4200,6 @@ See the `degit` [docs](https://github.com/Rich-Harris/degit) for more details. At a minimum, templates must contain the following: - - `package.json` - `wrangler.toml` - `src/` containing a worker script referenced from `wrangler.toml` @@ -4365,7 +4400,6 @@ * [#4530](https://github.com/cloudflare/workers-sdk/pull/4530) [`774b16c9`](https://github.com/cloudflare/workers-sdk/commit/774b16c9138bbe7e7d42a8a27048755191010167) Thanks [@dependabot](https://github.com/apps/dependabot)! - C3: Bumped `@angular/create` from `17.0.3` to `17.0.5` - [#4481](https://github.com/cloudflare/workers-sdk/pull/4481) [`18a4dd92`](https://github.com/cloudflare/workers-sdk/commit/18a4dd92456f955ccbb35567a88475beafda01c0) Thanks [@jculvey](https://github.com/jculvey)! - Minor improvements when using the `--existing-script scriptName` flag: - - Format the type as "Pre-existing Worker (from Dashboard)" - Defaults the project name to `scriptName` @@ -4634,7 +4668,6 @@ (such arguments will be completely ignored by C3) * [#3822](https://github.com/cloudflare/workers-sdk/pull/3822) [`3db34519`](https://github.com/cloudflare/workers-sdk/commit/3db3451988988c0af82023cc53975bbaef14ac8a) Thanks [@dario-piotrowicz](https://github.com/dario-piotrowicz)! - update the frameworks' cli versions used in C3 - - `@angular/cli` from 16.1.x to 16.2.0 - `create-next-app` from 13.4.2 to 13.4.19 - `create-remix` from 1.16.0 to 1.19.3 diff --git a/packages/create-cloudflare/package.json b/packages/create-cloudflare/package.json index f9ade2a1e0..a1f8b2d18c 100644 --- a/packages/create-cloudflare/package.json +++ b/packages/create-cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "create-cloudflare", - "version": "2.64.8", + "version": "2.64.9", "description": "A CLI for creating and deploying new applications to Cloudflare.", "keywords": [ "cloudflare", diff --git a/packages/miniflare/CHANGELOG.md b/packages/miniflare/CHANGELOG.md index 4b375a17a9..14f7938d68 100644 --- a/packages/miniflare/CHANGELOG.md +++ b/packages/miniflare/CHANGELOG.md @@ -1,5 +1,33 @@ # miniflare +## 4.20260317.0 + +### Patch Changes + +- [#12927](https://github.com/cloudflare/workers-sdk/pull/12927) [`c9b3184`](https://github.com/cloudflare/workers-sdk/commit/c9b31840631585418b8926e8228db486b619b4c7) Thanks [@penalosa](https://github.com/penalosa)! - Bump undici from 7.18.2 to 7.24.4 + +- [#12875](https://github.com/cloudflare/workers-sdk/pull/12875) [`13df6c7`](https://github.com/cloudflare/workers-sdk/commit/13df6c75be49ac32fc1c57e2e24523e86ced2115) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update dependencies of "miniflare", "wrangler" + + The following dependency versions have been updated: + + | Dependency | From | To | + | ---------- | ------------ | ------------ | + | workerd | 1.20260312.1 | 1.20260316.1 | + +- [#12935](https://github.com/cloudflare/workers-sdk/pull/12935) [`df0d112`](https://github.com/cloudflare/workers-sdk/commit/df0d1120a856bd65553bf92b4bc6380c15e81cc7) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update dependencies of "miniflare", "wrangler" + + The following dependency versions have been updated: + + | Dependency | From | To | + | ---------- | ------------ | ------------ | + | workerd | 1.20260316.1 | 1.20260317.1 | + +- [#12928](https://github.com/cloudflare/workers-sdk/pull/12928) [`81ee98e`](https://github.com/cloudflare/workers-sdk/commit/81ee98e6a0c6be879757289ef6e34e1559d6ee2a) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - Migrate chrome-devtools-patches deployment from Cloudflare Pages to Workers + Assets + + The DevTools frontend is now deployed as a Cloudflare Workers + Assets project instead of a Cloudflare Pages project. This uses `wrangler deploy` for production deployments and `wrangler versions upload` for PR preview deployments. + + The inspector proxy origin allowlists in both wrangler and miniflare have been updated to accept connections from the new `workers.dev` domain patterns, while retaining the legacy `pages.dev` patterns for backward compatibility. + ## 4.20260312.1 ### Patch Changes @@ -25,7 +53,6 @@ - [#12864](https://github.com/cloudflare/workers-sdk/pull/12864) [`ecc7f79`](https://github.com/cloudflare/workers-sdk/commit/ecc7f792f950fc786ff40fa140bd8907bd26ff31) Thanks [@NuroDev](https://github.com/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/*`) @@ -263,7 +290,6 @@ - [#12466](https://github.com/cloudflare/workers-sdk/pull/12466) [`caf9b11`](https://github.com/cloudflare/workers-sdk/commit/caf9b114391d7708b38e8d37bca6dae6f2b4927e) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - Add `MINIFLARE_CACHE_DIR` environment variable and smart cache directory detection Miniflare now intelligently detects where to store its cf.json cache file: - 1. Use `MINIFLARE_CACHE_DIR` env var if set 2. Use existing cache directory if found (`node_modules/.mf` or `.wrangler/cache`) 3. Create cache in `node_modules/.mf` if `node_modules` exists @@ -304,7 +330,6 @@ - [#12469](https://github.com/cloudflare/workers-sdk/pull/12469) [`2d90127`](https://github.com/cloudflare/workers-sdk/commit/2d90127f47dbcacf377842b3452d00a68a7abdc9) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - Add environment variables to control cf.json fetching behavior You can now use environment variables to control how Miniflare handles the `Request.cf` object caching: - - `CLOUDFLARE_CF_FETCH_ENABLED` - Set to "false" to disable fetching entirely and use fallback data. No `node_modules/.mf/cf.json` file will be created. Defaults to "true". - `CLOUDFLARE_CF_FETCH_PATH` - Set to a custom path to use a different location for caching the cf.json file instead of the default `node_modules/.mf/cf.json`. @@ -361,7 +386,6 @@ - [#12267](https://github.com/cloudflare/workers-sdk/pull/12267) [`83adb2c`](https://github.com/cloudflare/workers-sdk/commit/83adb2cb7f909857d79208474b78cdb7ac4e0638) Thanks [@NuroDev](https://github.com/NuroDev)! - Implement local D1 API for experimental/WIP local resource explorer The following APIs have been implemented: - - `GET /d1/database` - Returns a list of D1 databases. - `POST /d1/database/{database_id}/raw` - Returns the query result rows as arrays rather than objects. @@ -513,7 +537,6 @@ into miniflare and @cloudflare/vitest-pool-workers. Other dependencies remain external for technical reasons: - - `sharp`: Native binary with platform-specific builds - `undici`: Dynamically required at runtime in worker threads - `ws`: Has optional native bindings for performance @@ -627,7 +650,6 @@ 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` @@ -686,7 +708,6 @@ ### Minor Changes - [#11648](https://github.com/cloudflare/workers-sdk/pull/11648) [`eac5cf7`](https://github.com/cloudflare/workers-sdk/commit/eac5cf74db6d1b0865f5dc3a744ff28e695d53ca) Thanks [@pombosilva](https://github.com/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. @@ -1614,7 +1635,6 @@ - [#9313](https://github.com/cloudflare/workers-sdk/pull/9313) [`92719a5`](https://github.com/cloudflare/workers-sdk/commit/92719a535bf6bae9d660a05d5c8f8823004929c5) Thanks [@edmundhung](https://github.com/edmundhung)! - feat: add Dev Registry support This change introduces two new options to support cross-process service bindings, durable objects and tail consumers via a file-system based registry, with backward compatibility to Wrangler’s implementation: - - **`unsafeDevRegistryPath`** (`string`): Filesystem path to the Dev Registry directory. - **`unsafeDevRegistryDurableObjectProxy`** (`boolean`): When enabled, exposes internal Durable Objects to other local dev sessions and allows Workers to connect to external Durable Objects. @@ -1636,7 +1656,6 @@ - [#9440](https://github.com/cloudflare/workers-sdk/pull/9440) [`8c7ce77`](https://github.com/cloudflare/workers-sdk/commit/8c7ce7728ccc467aa19b60c8f32c90e6f06442d1) Thanks [@penalosa](https://github.com/penalosa)! - Preserve original error messages - [#9390](https://github.com/cloudflare/workers-sdk/pull/9390) [`80e75f4`](https://github.com/cloudflare/workers-sdk/commit/80e75f4a67b4e4b7a1bc92e0a93659e5d6f141dc) Thanks [@penalosa](https://github.com/penalosa)! - Support additional Mixed Mode resources in Wrangler: - - AI - Browser - Images @@ -2653,7 +2672,6 @@ - [#6058](https://github.com/cloudflare/workers-sdk/pull/6058) [`31cd51f`](https://github.com/cloudflare/workers-sdk/commit/31cd51f251050b0d6db97857a8d1d5427c855d99) Thanks [@threepointone](https://github.com/threepointone)! - chore: Quieter builds This patch cleans up warnings we were seeing when doing a full build. Specifically: - - fixtures/remix-pages-app had a bunch of warnings about impending features that it should be upgraded to, so I did that. (tbh this one needs a full upgrade of packages, but we'll get to that later when we're upgrading across the codebase) - updated `@microsoft/api-extractor` so it didn't complain that it didn't match the `typescript` version (that we'd recently upgraded) - it also silenced a bunch of warnings when exporting types from `wrangler`. We'll need to fix those, but we'll do that when we work on unstable_dev etc. @@ -3023,7 +3041,6 @@ - [#5191](https://github.com/cloudflare/workers-sdk/pull/5191) [`27fb22b`](https://github.com/cloudflare/workers-sdk/commit/27fb22b7c6b224aecc852915d9fee600d9d86efc) Thanks [@mrbbot](https://github.com/mrbbot)! - fix: ensure redirect responses handled correctly with `dispatchFetch()` Previously, if your Worker returned a redirect response, calling `dispatchFetch(url)` would send another request to the original `url` rather than the redirect. This change ensures redirects are followed correctly. - - If your Worker returns a relative redirect or an absolute redirect with the same origin as the original `url`, the request will be sent to the Worker. - If your Worker instead returns an absolute redirect with a different origin, the request will be sent to the Internet. - If a redirected request to a different origin returns an absolute redirect with the same origin as the original `url`, the request will also be sent to the Worker. diff --git a/packages/miniflare/package.json b/packages/miniflare/package.json index 7a90ecfa74..0831ff4bc8 100644 --- a/packages/miniflare/package.json +++ b/packages/miniflare/package.json @@ -1,6 +1,6 @@ { "name": "miniflare", - "version": "4.20260312.1", + "version": "4.20260317.0", "description": "Fun, full-featured, fully-local simulator for Cloudflare Workers", "keywords": [ "cloudflare", diff --git a/packages/pages-shared/CHANGELOG.md b/packages/pages-shared/CHANGELOG.md index d04e9b30ec..931f3ba694 100644 --- a/packages/pages-shared/CHANGELOG.md +++ b/packages/pages-shared/CHANGELOG.md @@ -1,5 +1,12 @@ # @cloudflare/pages-shared +## 0.13.116 + +### Patch Changes + +- Updated dependencies [[`c9b3184`](https://github.com/cloudflare/workers-sdk/commit/c9b31840631585418b8926e8228db486b619b4c7), [`13df6c7`](https://github.com/cloudflare/workers-sdk/commit/13df6c75be49ac32fc1c57e2e24523e86ced2115), [`df0d112`](https://github.com/cloudflare/workers-sdk/commit/df0d1120a856bd65553bf92b4bc6380c15e81cc7), [`81ee98e`](https://github.com/cloudflare/workers-sdk/commit/81ee98e6a0c6be879757289ef6e34e1559d6ee2a)]: + - miniflare@4.20260317.0 + ## 0.13.115 ### Patch Changes @@ -438,7 +445,6 @@ ### Patch Changes - [#9817](https://github.com/cloudflare/workers-sdk/pull/9817) [`6a0d990`](https://github.com/cloudflare/workers-sdk/commit/6a0d99066ef0633fb28d8ab3989ce943a02ec514) Thanks [@GregBrimble](https://github.com/GregBrimble)! - Add `x-cf-pages-analytics` header when Web Analytics token is injected - - Emit `x-cf-pages-analytics: 1` header when analytics script is added to HTML responses - Add comprehensive tests covering HTML with/without body, non-HTML responses, and missing analytics config - Header indicates when analytics injection is attempted regardless of HTMLRewriter success @@ -1153,7 +1159,6 @@ ### Patch Changes - [#4797](https://github.com/cloudflare/workers-sdk/pull/4797) [`007ba93`](https://github.com/cloudflare/workers-sdk/commit/007ba9397be9a2914254d0b59e0695df1a518b52) Thanks [@jahands](https://github.com/jahands)! - refactor: Store asset key instead of body in preservation cache - - Add HTTP method to cache key to prevent returning null bodies in cached GET requests that follow a HEAD request - Only write unchanged assets to preservation cache every 24-36 hours instead of on every request diff --git a/packages/pages-shared/package.json b/packages/pages-shared/package.json index 42a3b19a4e..aa7f953f28 100644 --- a/packages/pages-shared/package.json +++ b/packages/pages-shared/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/pages-shared", - "version": "0.13.115", + "version": "0.13.116", "repository": { "type": "git", "url": "https://github.com/cloudflare/workers-sdk.git", diff --git a/packages/vite-plugin-cloudflare/CHANGELOG.md b/packages/vite-plugin-cloudflare/CHANGELOG.md index 446a742d24..20ce960697 100644 --- a/packages/vite-plugin-cloudflare/CHANGELOG.md +++ b/packages/vite-plugin-cloudflare/CHANGELOG.md @@ -1,5 +1,17 @@ # @cloudflare/vite-plugin +## 1.29.1 + +### Patch Changes + +- [#12936](https://github.com/cloudflare/workers-sdk/pull/12936) [`cff91ff`](https://github.com/cloudflare/workers-sdk/commit/cff91ff4bbbfcc2b59eb9b0d26b5ae8188823197) Thanks [@jamesopstad](https://github.com/jamesopstad)! - Select the appropriate `vite/module-runner` implementation during dev based on the user's Vite version + + The plugin now builds against Vite 8 and ships two bundled copies of `vite/module-runner`: one from Vite 8 and one from Vite 7.1.12 (the last version before a breaking change to the module runner in Vite 7.2.0). At dev server startup, the correct implementation is selected based on the user's installed Vite version. This is Vite 8's module runner for users on Vite >= 7.2.0, and the legacy module runner for users on older versions. + +- Updated dependencies [[`c9b3184`](https://github.com/cloudflare/workers-sdk/commit/c9b31840631585418b8926e8228db486b619b4c7), [`13df6c7`](https://github.com/cloudflare/workers-sdk/commit/13df6c75be49ac32fc1c57e2e24523e86ced2115), [`df0d112`](https://github.com/cloudflare/workers-sdk/commit/df0d1120a856bd65553bf92b4bc6380c15e81cc7), [`81ee98e`](https://github.com/cloudflare/workers-sdk/commit/81ee98e6a0c6be879757289ef6e34e1559d6ee2a), [`c600ce0`](https://github.com/cloudflare/workers-sdk/commit/c600ce0a45ad334a5a961cf7774758860581d9d2), [`f509d13`](https://github.com/cloudflare/workers-sdk/commit/f509d13b97a832a28ed6bc568c7bcf6fc7d4a4ff), [`3b81fc6`](https://github.com/cloudflare/workers-sdk/commit/3b81fc6a75857d5c158824f17d9316adc55878fc), [`0a7fef9`](https://github.com/cloudflare/workers-sdk/commit/0a7fef9ee924b6d0817a69be9d893dc8a40c9a19)]: + - wrangler@4.75.0 + - miniflare@4.20260317.0 + ## 1.29.0 ### Minor Changes @@ -320,7 +332,6 @@ 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` @@ -1024,7 +1035,6 @@ Wrangler and Vite will continue to load `.env` files in order to configure themselves as a tool. Further details: - - In `vite build` the local vars will be computed and stored in a `.dev.vars` file next to the compiled Worker code, so that `vite preview` can use them. - The `wrangler types` command will similarly read the `.env` files (if no `.dev.vars` files) in order to generate the `Env` interface. - If the `CLOUDFLARE_LOAD_DEV_VARS_FROM_DOT_ENV` environment variable is `"false"` then local dev variables will not be loaded from `.env` files. @@ -1277,7 +1287,6 @@ Assets that are imported in the entry Worker are now automatically moved to the client build output. This enables importing assets in your Worker and accessing them via the [assets binding](https://developers.cloudflare.com/workers/static-assets/binding/#binding). See [Static Asset Handling](https://vite.dev/guide/assets) to find out about all the ways you can import assets in Vite. Additionally, a broader range of build scenarios are now supported. These are: - - Assets only build with client entry/entries - Assets only build with no client entry/entries that includes `public` directory assets - Worker(s) + assets build with client entry/entries diff --git a/packages/vite-plugin-cloudflare/package.json b/packages/vite-plugin-cloudflare/package.json index 5e6c296006..86164beacc 100644 --- a/packages/vite-plugin-cloudflare/package.json +++ b/packages/vite-plugin-cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/vite-plugin", - "version": "1.29.0", + "version": "1.29.1", "description": "Cloudflare plugin for Vite", "keywords": [ "cloudflare", diff --git a/packages/vitest-pool-workers/CHANGELOG.md b/packages/vitest-pool-workers/CHANGELOG.md index d077b3d31c..69643d043f 100644 --- a/packages/vitest-pool-workers/CHANGELOG.md +++ b/packages/vitest-pool-workers/CHANGELOG.md @@ -1,5 +1,13 @@ # @cloudflare/vitest-pool-workers +## 0.13.2 + +### Patch Changes + +- Updated dependencies [[`c9b3184`](https://github.com/cloudflare/workers-sdk/commit/c9b31840631585418b8926e8228db486b619b4c7), [`13df6c7`](https://github.com/cloudflare/workers-sdk/commit/13df6c75be49ac32fc1c57e2e24523e86ced2115), [`df0d112`](https://github.com/cloudflare/workers-sdk/commit/df0d1120a856bd65553bf92b4bc6380c15e81cc7), [`81ee98e`](https://github.com/cloudflare/workers-sdk/commit/81ee98e6a0c6be879757289ef6e34e1559d6ee2a), [`c600ce0`](https://github.com/cloudflare/workers-sdk/commit/c600ce0a45ad334a5a961cf7774758860581d9d2), [`f509d13`](https://github.com/cloudflare/workers-sdk/commit/f509d13b97a832a28ed6bc568c7bcf6fc7d4a4ff), [`3b81fc6`](https://github.com/cloudflare/workers-sdk/commit/3b81fc6a75857d5c158824f17d9316adc55878fc), [`0a7fef9`](https://github.com/cloudflare/workers-sdk/commit/0a7fef9ee924b6d0817a69be9d893dc8a40c9a19)]: + - wrangler@4.75.0 + - miniflare@4.20260317.0 + ## 0.13.1 ### Patch Changes @@ -208,7 +216,6 @@ - [#12056](https://github.com/cloudflare/workers-sdk/pull/12056) [`6d5f69f`](https://github.com/cloudflare/workers-sdk/commit/6d5f69fa0c86eed05875603ac31a9f32a4a2bfbd) Thanks [@edmundhung](https://github.com/edmundhung)! - fix: allow Vite query parameters like `?raw` on `.sql` file imports Importing `.sql` files 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 `?raw` transform) - `import sql from "./query.sql"` (loaded as Text module) @@ -224,7 +231,6 @@ into miniflare and @cloudflare/vitest-pool-workers. Other dependencies remain external for technical reasons: - - `sharp`: Native binary with platform-specific builds - `undici`: Dynamically required at runtime in worker threads - `ws`: Has optional native bindings for performance @@ -273,7 +279,6 @@ 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` @@ -311,7 +316,6 @@ ### Minor Changes - [#11648](https://github.com/cloudflare/workers-sdk/pull/11648) [`eac5cf7`](https://github.com/cloudflare/workers-sdk/commit/eac5cf74db6d1b0865f5dc3a744ff28e695d53ca) Thanks [@pombosilva](https://github.com/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. @@ -356,7 +360,6 @@ - [#11533](https://github.com/cloudflare/workers-sdk/pull/11533) [`8d9003e`](https://github.com/cloudflare/workers-sdk/commit/8d9003e144156f32aef03aba71b18c7e5c5b202d) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - Add support for ctx.exports It is now possible to access `ctx.exports` properties for the `main` (`SELF`) worker. - - Integration tests: in the `SELF` worker the `ctx.exports` object now contains the expected stubs to the exported entry-points. - Unit tests: the object returned from `createExecutionContext()` has `exports` property that exposes the exports of the `SELF` worker. @@ -624,7 +627,6 @@ - [#10494](https://github.com/cloudflare/workers-sdk/pull/10494) [`e2b838f`](https://github.com/cloudflare/workers-sdk/commit/e2b838ff56572d581661143d56f2485d7bcf1e0e) Thanks [@pombosilva](https://github.com/pombosilva)! - Add Workflows test support to the `cloudflare:test` module. The `cloudflare:test` module has two new APIs: - - `introspectWorkflowInstance` - `introspectWorkflow` which allow changing the behavior of one or multiple Workflow instances created during tests. @@ -1257,7 +1259,6 @@ - [#7334](https://github.com/cloudflare/workers-sdk/pull/7334) [`869ec7b`](https://github.com/cloudflare/workers-sdk/commit/869ec7b916487ec43b958a27bdfea13588c5685f) Thanks [@threepointone](https://github.com/threepointone)! - chore: update esbuild This 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 `using` syntax. - 0.18 introduced wider support for configuration specified via `tsconfig.json` https://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 @@ -1269,7 +1270,6 @@ 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. ```js @@ -1326,7 +1326,6 @@ ``` Before this update: - 1. A request to anything but `http://localhost:8787/` would error. For example, a request to `http://localhost:8787/one.js` would error with _No such module "one.js"._ 2. Let's configure `wrangler.toml` to include all `.js` files in the `src` folder: @@ -1351,7 +1350,6 @@ Then, a request to `http://localhost:8787/hidden/secret.js` will return the contents of `src/hidden/secret.js`. After this update: - - Let's put the wrangler.toml back to its original configuration: ```toml @@ -1360,7 +1358,6 @@ ``` - Now, a request to `http://localhost:8787/one.js` will return the contents of `src/one.js`, but a request to `http://localhost:8787/hidden/secret.js` will ALSO return the contents of `src/hidden/secret.js`. THIS MAY NOT BE WHAT YOU WANT. You can "fix" this in 2 ways: - 1. Remove the inline wildcard import: ```js @@ -1376,7 +1373,6 @@ ``` Now, no extra modules are included in the bundle, and a request to `http://localhost:8787/hidden/secret.js` will throw an error. You can use the `find_additional_modules` feature to include it again. - 2. Don't use the wildcard import pattern: ```js diff --git a/packages/vitest-pool-workers/package.json b/packages/vitest-pool-workers/package.json index 43535aa490..e0e00f285b 100644 --- a/packages/vitest-pool-workers/package.json +++ b/packages/vitest-pool-workers/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/vitest-pool-workers", - "version": "0.13.1", + "version": "0.13.2", "description": "Workers Vitest integration for writing Vitest unit and integration tests that run inside the Workers runtime", "keywords": [ "cloudflare", diff --git a/packages/wrangler/CHANGELOG.md b/packages/wrangler/CHANGELOG.md index a5394cc5cb..f515b2f146 100644 --- a/packages/wrangler/CHANGELOG.md +++ b/packages/wrangler/CHANGELOG.md @@ -1,5 +1,64 @@ # wrangler +## 4.75.0 + +### Minor Changes + +- [#12492](https://github.com/cloudflare/workers-sdk/pull/12492) [`3b81fc6`](https://github.com/cloudflare/workers-sdk/commit/3b81fc6a75857d5c158824f17d9316adc55878fc) Thanks [@thomasgauvin](https://github.com/thomasgauvin)! - feat: add `wrangler tunnel` commands for managing Cloudflare Tunnels + + Adds a new set of commands for managing remotely-managed Cloudflare Tunnels directly from Wrangler: + - `wrangler tunnel create ` - Create a new Cloudflare Tunnel + - `wrangler tunnel list` - List all tunnels in your account + - `wrangler tunnel info ` - Display details about a specific tunnel + - `wrangler tunnel delete ` - Delete a tunnel (with confirmation) + - `wrangler tunnel run ` - Run a tunnel using cloudflared + - `wrangler tunnel quick-start ` - Start a temporary tunnel (Try Cloudflare) + + The `run` and `quick-start` commands automatically download and manage the cloudflared binary, caching it in `~/.wrangler/cloudflared/`. Users are prompted before downloading and warned if their PATH-installed cloudflared is outdated. You can override the binary location with the `CLOUDFLARED_PATH` environment variable. + + All commands are marked as experimental. + +### Patch Changes + +- [#12927](https://github.com/cloudflare/workers-sdk/pull/12927) [`c9b3184`](https://github.com/cloudflare/workers-sdk/commit/c9b31840631585418b8926e8228db486b619b4c7) Thanks [@penalosa](https://github.com/penalosa)! - Bump undici from 7.18.2 to 7.24.4 + +- [#12875](https://github.com/cloudflare/workers-sdk/pull/12875) [`13df6c7`](https://github.com/cloudflare/workers-sdk/commit/13df6c75be49ac32fc1c57e2e24523e86ced2115) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update dependencies of "miniflare", "wrangler" + + The following dependency versions have been updated: + + | Dependency | From | To | + | ---------- | ------------ | ------------ | + | workerd | 1.20260312.1 | 1.20260316.1 | + +- [#12935](https://github.com/cloudflare/workers-sdk/pull/12935) [`df0d112`](https://github.com/cloudflare/workers-sdk/commit/df0d1120a856bd65553bf92b4bc6380c15e81cc7) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update dependencies of "miniflare", "wrangler" + + The following dependency versions have been updated: + + | Dependency | From | To | + | ---------- | ------------ | ------------ | + | workerd | 1.20260316.1 | 1.20260317.1 | + +- [#12928](https://github.com/cloudflare/workers-sdk/pull/12928) [`81ee98e`](https://github.com/cloudflare/workers-sdk/commit/81ee98e6a0c6be879757289ef6e34e1559d6ee2a) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - Migrate chrome-devtools-patches deployment from Cloudflare Pages to Workers + Assets + + The DevTools frontend is now deployed as a Cloudflare Workers + Assets project instead of a Cloudflare Pages project. This uses `wrangler deploy` for production deployments and `wrangler versions upload` for PR preview deployments. + + The inspector proxy origin allowlists in both wrangler and miniflare have been updated to accept connections from the new `workers.dev` domain patterns, while retaining the legacy `pages.dev` patterns for backward compatibility. + +- [#12835](https://github.com/cloudflare/workers-sdk/pull/12835) [`c600ce0`](https://github.com/cloudflare/workers-sdk/commit/c600ce0a45ad334a5a961cf7774758860581d9d2) Thanks [@dario-piotrowicz](https://github.com/dario-piotrowicz)! - Fix execution freezing on `debugger` statements when DevTools is not attached + + Previously, `wrangler` always sent `Debugger.enable` to the runtime on connection, even when DevTools wasn't open. This caused scripts to freeze on `debugger` statements. Now `Debugger.enable` is only sent when DevTools is actually attached, and `Debugger.disable` is sent when DevTools disconnects to stop the runtime from performing debugging work. + +- [#12894](https://github.com/cloudflare/workers-sdk/pull/12894) [`f509d13`](https://github.com/cloudflare/workers-sdk/commit/f509d13b97a832a28ed6bc568c7bcf6fc7d4a4ff) Thanks [@gpanders](https://github.com/gpanders)! - Simplify description of --json option + + Remove extraneous adjectives in the description of the `--json` option. + +- [#11888](https://github.com/cloudflare/workers-sdk/pull/11888) [`0a7fef9`](https://github.com/cloudflare/workers-sdk/commit/0a7fef9ee924b6d0817a69be9d893dc8a40c9a19) Thanks [@staticpayload](https://github.com/staticpayload)! - Reject cross-drive module paths in Pages Functions routing + + On Windows, module paths using a different drive letter could be parsed in a way that bypassed the project-root check. These paths are now parsed correctly and rejected when they resolve outside the project. + +- Updated dependencies [[`c9b3184`](https://github.com/cloudflare/workers-sdk/commit/c9b31840631585418b8926e8228db486b619b4c7), [`13df6c7`](https://github.com/cloudflare/workers-sdk/commit/13df6c75be49ac32fc1c57e2e24523e86ced2115), [`df0d112`](https://github.com/cloudflare/workers-sdk/commit/df0d1120a856bd65553bf92b4bc6380c15e81cc7), [`81ee98e`](https://github.com/cloudflare/workers-sdk/commit/81ee98e6a0c6be879757289ef6e34e1559d6ee2a)]: + - miniflare@4.20260317.0 + ## 4.74.0 ### Minor Changes @@ -99,7 +158,6 @@ - [#12807](https://github.com/cloudflare/workers-sdk/pull/12807) [`8d1e130`](https://github.com/cloudflare/workers-sdk/commit/8d1e130bba5fa4019edab855e817a17110b360d0) Thanks [@MaxwellCalkin](https://github.com/MaxwellCalkin)! - fix: `vectorize` commands now output valid json This fixes: - - `wrangler vectorize create` - `wrangler vectorize info` - `wrangler vectorize insert` @@ -459,7 +517,6 @@ - [#12401](https://github.com/cloudflare/workers-sdk/pull/12401) [`8723684`](https://github.com/cloudflare/workers-sdk/commit/872368456bfd72cdb45dc8c82f1ab16392d6a1f8) Thanks [@jonesphillip](https://github.com/jonesphillip)! - Add validation retry loops to pipelines setup command The `wrangler pipelines setup` command now prompts users to retry when validation errors occur, instead of failing the entire setup process. This includes: - - Validation retry prompts for pipeline names, bucket names, and field names - A "simple" mode for sink configuration that uses sensible defaults - Automatic bucket creation when buckets don't exist @@ -532,7 +589,6 @@ - [#12466](https://github.com/cloudflare/workers-sdk/pull/12466) [`caf9b11`](https://github.com/cloudflare/workers-sdk/commit/caf9b114391d7708b38e8d37bca6dae6f2b4927e) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - Add `WRANGLER_CACHE_DIR` environment variable and smart cache directory detection Wrangler now intelligently detects where to store cache files: - 1. Use `WRANGLER_CACHE_DIR` env var if set 2. Use existing cache directory if found (`node_modules/.cache/wrangler` or `.wrangler/cache`) 3. Create cache in `node_modules/.cache/wrangler` if `node_modules` exists @@ -603,7 +659,6 @@ ``` This pattern is used by several official framework templates, including React Router's `node-postgres` and `node-custom-server` templates. The following `defineConfig()` patterns are now supported: - - `defineConfig({ ... })` (object literal, already worked) - `defineConfig(() => ({ ... }))` (arrow function with expression body) - `defineConfig(({ isSsrBuild }) => ({ ... }))` (arrow function with destructured params) @@ -643,7 +698,6 @@ - [#12473](https://github.com/cloudflare/workers-sdk/pull/12473) [`b900c5a`](https://github.com/cloudflare/workers-sdk/commit/b900c5adc18c12d500e0fb8c58c2295843518695) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - Add CF_PAGES environment variables to `wrangler pages dev` `wrangler pages dev` now automatically injects Pages-specific environment variables (`CF_PAGES`, `CF_PAGES_BRANCH`, `CF_PAGES_COMMIT_SHA`, `CF_PAGES_URL`) for improved dev/prod parity. This enables frameworks like SvelteKit to auto-detect the Pages environment during local development. - - `CF_PAGES` is set to `"1"` to indicate the Pages environment - `CF_PAGES_BRANCH` defaults to the current git branch (or `"local"` if not in a git repo) - `CF_PAGES_COMMIT_SHA` defaults to the current git commit SHA (or a placeholder if not in a git repo) @@ -667,7 +721,6 @@ - [#12382](https://github.com/cloudflare/workers-sdk/pull/12382) [`d7b492c`](https://github.com/cloudflare/workers-sdk/commit/d7b492c37838929d37901c628ecbdd718f5a1258) Thanks [@dario-piotrowicz](https://github.com/dario-piotrowicz)! - Add Pages detection to autoconfig flows When running the autoconfig logic (via `wrangler setup`, `wrangler deploy --x-autoconfig`, or the programmatic autoconfig API), Wrangler now detects when a project appears to be a Pages project and handles it appropriately: - - For `wrangler deploy`, it warns the user but still allows them to proceed - For `wrangler setup` and the programmatic autoconfig API, it throws a fatal error @@ -737,13 +790,11 @@ Fixes the issue of the default maximum message retention (365400 seconds) being longer than the maximum allowed retention period for free tier users (86400 seconds). Previous: - - Wrangler set a default value of 365400 seconds max message retention if the setting was not explicitly provided in the Wrangler configuration. - The maximum retention period was documented as 1209600 seconds for all queues users because it was required to be on paid tier. - Wrangler also set a default value of 0 seconds for delivery delay if the setting was not explicitly provided in the Wrangler configuration. Updated: - - Wrangler no longer sets a default value for max message retention so that the default can be applied at the API. - The maximum retention period is now documented as 86400 seconds for free tier queues and 1209600 seconds for paid tier queues - Wrangler also no longer sets a default value for delivery delay so that the default can be applied at the API. @@ -782,7 +833,6 @@ Previously, only command-based telemetry events (e.g., "wrangler command started/completed") included the full set of common properties. Ad-hoc events sent via `sendAdhocEvent` were missing important context like OS information, CI detection, and session tracking. Now, all telemetry events include the complete set of common properties: - - `amplitude_session_id` and `amplitude_event_id` for session tracking - `wranglerVersion` (and major/minor/patch variants) - `osPlatform`, `osVersion`, `nodeVersion` @@ -839,7 +889,6 @@ When running `wrangler pages deploy`, the command automatically detects git information (branch, commit hash, commit message, dirty state) from the local repository. Previously, when this detection failed, there was no way to troubleshoot the issue. Now, running with `WRANGLER_LOG=debug` will output detailed information about: - - Whether a git repository is detected - Each git command being executed and its result - The detected values (branch, commit hash, commit message, dirty status) @@ -894,7 +943,6 @@ When attempting to create a D1 database after reaching your account's limit, the CLI now shows a more helpful error message with actionable guidance instead of the raw API error. The new message includes: - - A clear explanation that the account limit has been reached - A link to D1 documentation - Commands to list and delete databases @@ -1038,11 +1086,9 @@ Add the version upload command to the output being printed by `wrangler deploy` to `WRANGLER_OUTPUT_FILE_DIRECTORY`/`WRANGLER_OUTPUT_FILE_PATH`. This complements the existing `buildCommand` and `deployCommand` fields and allows CI systems to know how to upload new versions of Workers. For example, for a standard npm project this would be: - - Version command: `npx wrangler versions upload` While for a Next.js project it would be: - - Version command: `npx @opennextjs/cloudflare upload` - [#12050](https://github.com/cloudflare/workers-sdk/pull/12050) [`b05b919`](https://github.com/cloudflare/workers-sdk/commit/b05b919b22a421a85a07fb8daccf9e22219dac53) Thanks [@NuroDev](https://github.com/NuroDev)! - Fixed Wrangler's error handling for both invalid commands with and without the `--help` flag, ensuring consistent and clear error messages. @@ -1078,13 +1124,11 @@ Add the framework id alongside the commands to build and deploy the project to the output being printed by `wrangler deploy` to `WRANGLER_OUTPUT_FILE_DIRECTORY` or `WRANGLER_OUTPUT_FILE_PATH`. For example for an npm Astro project these would be: - - Framework id: `astro` - Build command: `npm run build` - Deploy command: `npx wrangler deploy` While for a Next.js project they would instead be: - - Framework id: `next` - Build command: `npx @opennextjs/cloudflare build` - Deploy command: `npx @opennextjs/cloudflare deploy` @@ -1130,7 +1174,6 @@ - [#12153](https://github.com/cloudflare/workers-sdk/pull/12153) [`cb72c11`](https://github.com/cloudflare/workers-sdk/commit/cb72c1146fdab8af7d071ea0af0ea04c7523ee5b) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - Sanitize commands and arguments in telemetry to prevent accidentally capturing sensitive information. **Changes:** - - Renamed telemetry fields from `command`/`args` to `sanitizedCommand`/`sanitizedArgs` to distinguish from historical fields that may have contained sensitive data in older versions - Command names now come from command definitions rather than user input, preventing accidental capture of sensitive data pasted as positional arguments - Sentry breadcrumbs now use the safe command name from definitions @@ -1244,7 +1287,6 @@ - [#11893](https://github.com/cloudflare/workers-sdk/pull/11893) [`f9e8a45`](https://github.com/cloudflare/workers-sdk/commit/f9e8a452fb299e6cb1a0ff2985347bfc277deac8) Thanks [@NuroDev](https://github.com/NuroDev)! - `wrangler types` now generates per-environment TypeScript interfaces when named environments exist in your configuration. When your configuration has named environments (an `env` object), `wrangler types` now generates both: - - **Per-environment interfaces** (e.g., `StagingEnv`, `ProductionEnv`) containing only the bindings explicitly declared in each environment, plus inherited secrets - **An aggregated `Env` interface** with all bindings from all environments (top-level + named environments), where: - Bindings present in **all** environments are required @@ -1417,7 +1459,6 @@ - [#11880](https://github.com/cloudflare/workers-sdk/pull/11880) [`fe4faa3`](https://github.com/cloudflare/workers-sdk/commit/fe4faa306609514863fa770bac1dba5ff618f4be) Thanks [@penalosa](https://github.com/penalosa)! - Show helpful messages for errors outside of Wrangler's control. This prevents unnecessary Sentry reports. Errors now handled with user-friendly messages: - - Connection timeouts to Cloudflare's API (`UND_ERR_CONNECT_TIMEOUT`) - typically due to slow networks or connectivity issues - File system permission errors (`EPERM`, `EACCES`) - caused by insufficient permissions, locked files, or antivirus software - DNS resolution failures (`ENOTFOUND`) - caused by network connectivity issues or DNS configuration problems @@ -1580,7 +1621,6 @@ ``` The command returns whichever authentication method is currently configured: - - OAuth token from `wrangler login` (automatically refreshed if expired) - API token from `CLOUDFLARE_API_TOKEN` environment variable @@ -1610,7 +1650,6 @@ You can now have your worker configuration types be automatically generated when the local Wrangler development server starts. To use it you can either: - 1. Add the `--types` flag when running `wrangler dev`. 2. Update your Wrangler configuration file to add the new `dev.generate_types` boolean property. @@ -1629,14 +1668,12 @@ - [#11524](https://github.com/cloudflare/workers-sdk/pull/11524) [`b0dbf1a`](https://github.com/cloudflare/workers-sdk/commit/b0dbf1ac5c998365bb14e9a25f9a28773ba299d5) Thanks [@penalosa](https://github.com/penalosa)! - Add hidden CLI flags to `wrangler setup` for suppressing output Two new hidden flags have been added to `wrangler setup`: - - `--no-completion-message`: Suppresses the deployment details message after setup completes - `--no-install-wrangler`: Skips Wrangler installation during project setup - [#11777](https://github.com/cloudflare/workers-sdk/pull/11777) [`69979a3`](https://github.com/cloudflare/workers-sdk/commit/69979a3e0c20c8c8ec6c41253876e594ffb899f3) Thanks [@MattieTK](https://github.com/MattieTK)! - Add analytics properties to secret commands for better usage insights Secret commands (`wrangler secret put`, `wrangler secret bulk`, and their Pages/versions equivalents) now include additional analytics properties to help understand how secrets are being managed: - - `secretOperation`: Whether this is a "single" or "bulk" secret operation - `secretSource`: How the secret was provided ("interactive", "stdin", or "file") - `secretFormat`: For bulk operations, the format used ("json" or "dotenv") @@ -1669,7 +1706,6 @@ The `wrangler r2 bucket catalog snapshot-expiration enable` command was sending incorrect field names to the Cloudflare API, resulting in a 422 Unprocessable Entity error. This fix updates the API request body to use the correct field names: - - `olderThanDays` -> `max_snapshot_age` (as duration string, e.g., "30d") - `retainLast` -> `min_snapshots_to_keep` @@ -1709,7 +1745,6 @@ - [#11646](https://github.com/cloudflare/workers-sdk/pull/11646) [`472cf72`](https://github.com/cloudflare/workers-sdk/commit/472cf72a6f340e30499daa1d04bf5f17621044bf) Thanks [@vovacf201](https://github.com/vovacf201)! - feat: add R2 Data Catalog snapshot expiration commands Adds new commands to manage automatic snapshot expiration for R2 Data Catalog tables: - - `wrangler r2 bucket catalog snapshot-expiration enable` - Enable automatic snapshot expiration - `wrangler r2 bucket catalog snapshot-expiration disable` - Disable automatic snapshot expiration @@ -1841,7 +1876,6 @@ - [#10937](https://github.com/cloudflare/workers-sdk/pull/10937) [`9514c9a`](https://github.com/cloudflare/workers-sdk/commit/9514c9a0ed28fed349126384d1f646c9165be914) Thanks [@ReppCodes](https://github.com/ReppCodes)! - Add support for "targeted" placement mode with region, host, and hostname fields This change adds a new mode to `placement` configuration. You can specify one of the following fields to target specific external resources for Worker placement: - - `region`: Specify a region identifier (e.g., "aws:us-east-1") to target a region from another cloud service provider - `host`: Specify a host with (required) port (e.g., "example.com:8123") to target a TCP service - `hostname`: Specify a hostname (e.g., "example.com") to target an HTTP resource @@ -2400,7 +2434,6 @@ - [#10923](https://github.com/cloudflare/workers-sdk/pull/10923) [`2429533`](https://github.com/cloudflare/workers-sdk/commit/2429533d7c6810165761aad828462614c50a585f) Thanks [@emily-shen](https://github.com/emily-shen)! - fix: update `docker manifest inspect` to use full image registry uri when checking if the image exists remotely - [#10521](https://github.com/cloudflare/workers-sdk/pull/10521) [`88b5b7f`](https://github.com/cloudflare/workers-sdk/commit/88b5b7ff1ace3bf982d2562ad1e01e39ffce9517) Thanks [@penalosa](https://github.com/penalosa)! - Improves the Wrangler auto-provisioning feature (gated behind the experimental flag `--x-provision`) by: - - Writing back changes to the user's config file (not necessary, but can make it resilient to binding name changes) - Fixing `--dry-run`, which previously threw an error when your config file had auto provisioned resources - Improve R2 bindings display to include the `bucket_name` from the config file on upload @@ -2411,7 +2444,6 @@ ### Patch Changes - [#10881](https://github.com/cloudflare/workers-sdk/pull/10881) [`ce832d5`](https://github.com/cloudflare/workers-sdk/commit/ce832d5222f1034bd02c3bac4952c72ec99020bc) Thanks [@garvit-gupta](https://github.com/garvit-gupta)! - Add table-level compaction commands for R2 Data Catalog: - - `wrangler r2 bucket catalog compaction enable [namespace] [table]` - `wrangler r2 bucket catalog compaction disable [namespace] [table]` @@ -2791,7 +2823,6 @@ When re-deploying a Worker using `wrangler deploy`, if the configuration has been modified in the Cloudflare dashboard, the local configuration will overwrite the remote one. This can lead to unexpected results for users. To address this, currently `wrangler deploy` warns users about potential configuration overrides (without presenting them) and prompts them to confirm whether they want to proceed. The changes here improve the above flow in the following way: - - If the local changes only add new configurations (without modifying or removing existing ones), the deployment proceeds automatically without warnings or prompts, as these changes are non-destructive and safe. - If the local changes modify or remove existing configurations, `wrangler deploy` now displays a git-like diff showing the differences between the dashboard and local configurations. This allows users to review and understand the impact of their changes before confirming the deployment. @@ -3044,7 +3075,6 @@ Wrangler and Vite will continue to load `.env` files in order to configure themselves as a tool. Further details: - - In `vite build` the local vars will be computed and stored in a `.dev.vars` file next to the compiled Worker code, so that `vite preview` can use them. - The `wrangler types` command will similarly read the `.env` files (if no `.dev.vars` files) in order to generate the `Env` interface. - If the `CLOUDFLARE_LOAD_DEV_VARS_FROM_DOT_ENV` environment variable is `"false"` then local dev variables will not be loaded from `.env` files. @@ -3222,7 +3252,6 @@ - [#9825](https://github.com/cloudflare/workers-sdk/pull/9825) [`49c85c5`](https://github.com/cloudflare/workers-sdk/commit/49c85c5306b3dbfa9342baeab3b7d14d954d4ade) Thanks [@ReppCodes](https://github.com/ReppCodes)! - Add support for origin_connection_limit to Wrangler Configure connection limits to Hyperdrive via command line options: - - `--origin-connection-limit`: The (soft) maximum number of connections that Hyperdrive may establish to the origin database. - [#9064](https://github.com/cloudflare/workers-sdk/pull/9064) [`a1181bf`](https://github.com/cloudflare/workers-sdk/commit/a1181bf804e3ee4b6c2034fa3e429fd6b71f4c13) Thanks [@sdnts](https://github.com/sdnts)! - Added an `event-subscriptions` subcommand @@ -3244,7 +3273,6 @@ - [#9840](https://github.com/cloudflare/workers-sdk/pull/9840) [`7c55f9e`](https://github.com/cloudflare/workers-sdk/commit/7c55f9e1eac4fb0d53f9180a011172328296be16) Thanks [@dario-piotrowicz](https://github.com/dario-piotrowicz)! - fix: make sure that the experimental `remoteBindings` flag is properly handled in `getPlatformProxy` There are two issues related to how the experimental `remoteBindings` flag is handled in `getPlatformProxy` that are being fixed by this change: - - the `experimental_remote` configuration flag set on service bindings is incorrectly always taken into account, even if `remoteBindings` is set to `false` - the `experimental_remote` configuration flag of all the other bindings is never taken into account (effectively preventing the bindings to be used in remote mode) since the `remoteBindings` flag is not being properly propagated @@ -3488,7 +3516,6 @@ add a warning suggesting users to specify their target environment (via `-e` or `--env`) when their wrangler config file contains some environments and they are calling one of the following commands: - - wrangler deploy - wrangler versions upload - wrangler versions deploy @@ -3529,7 +3556,6 @@ - [#9507](https://github.com/cloudflare/workers-sdk/pull/9507) [`1914b87`](https://github.com/cloudflare/workers-sdk/commit/1914b87e254bb733298cb0c0e96bb0bd234acde4) Thanks [@dario-piotrowicz](https://github.com/dario-piotrowicz)! - slightly improve wrangler dev bindings loggings improve the bindings loggings by: - - removing the unnecessary (and potentially incorrect) `[connected]` suffix for remote bindings - making sure that the modes presented in the bindings logs are correctly aligned @@ -3608,7 +3634,6 @@ ### Patch Changes - [#9390](https://github.com/cloudflare/workers-sdk/pull/9390) [`80e75f4`](https://github.com/cloudflare/workers-sdk/commit/80e75f4a67b4e4b7a1bc92e0a93659e5d6f141dc) Thanks [@penalosa](https://github.com/penalosa)! - Support additional Mixed Mode resources in Wrangler: - - AI - Browser - Images @@ -3633,7 +3658,6 @@ - [#9308](https://github.com/cloudflare/workers-sdk/pull/9308) [`d3a6eb3`](https://github.com/cloudflare/workers-sdk/commit/d3a6eb30e58de2b8f12fc899a70a31518968b910) Thanks [@dario-piotrowicz](https://github.com/dario-piotrowicz)! - expose new utilities and types to aid consumers of the programmatic mixed-mode API Specifically the exports have been added: - - `Experimental_MixedModeSession`: type representing a mixed-mode session - `Experimental_ConfigBindingsOptions`: type representing config-bindings - `experimental_pickRemoteBindings`: utility for picking only the remote bindings from a record of start-worker bindings. @@ -3652,7 +3676,6 @@ Now it is possible to target Wrangler at the FedRAMP High compliance region. There are two ways to signal to Wrangler to run in this mode: - - set `"compliance_region": "fedramp_high"` in a Wrangler configuration - set `CLOUDFLARE_COMPLIANCE_REGION=fedramp_high` environment variable when running Wrangler @@ -3662,7 +3685,6 @@ It is necessary to authenticate using a Cloudflare API Token acquired from the Cloudflare FedRAMP High dashboard. Most bindings and commands are supported in this mode. - - Unsupported commands may result in API requests that are not supported - possibly 422 Unprocessable Entity responses. - Unsupported bindings may work in local dev, as there is no local validation, but will fail at Worker deployment time. @@ -3833,7 +3855,6 @@ - [#9124](https://github.com/cloudflare/workers-sdk/pull/9124) [`d0d62e6`](https://github.com/cloudflare/workers-sdk/commit/d0d62e6e4bb3ac6e0b6d9a0140a2825249f32e89) Thanks [@dario-piotrowicz](https://github.com/dario-piotrowicz)! - make that `unstable_startWorker` can correctly throw configuration errors make sure that `unstable_startWorker` can throw configuration related errors when: - - the utility is called - the worker's `setConfig` is called with the `throwErrors` argument set to `true` @@ -4024,7 +4045,6 @@ - [#8711](https://github.com/cloudflare/workers-sdk/pull/8711) [`4cc036d`](https://github.com/cloudflare/workers-sdk/commit/4cc036d46b2f5c3ceacb344882e713e7840becde) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - Add the Pages deployment id to the JSON output for `wrangler pages deployment list` - [#8244](https://github.com/cloudflare/workers-sdk/pull/8244) [`84ecfe9`](https://github.com/cloudflare/workers-sdk/commit/84ecfe9b4962d1edbe7967cfe4151f26de252a9d) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - feat: Add debug logs to capture assets upload status, specifically: - - which asset files were read from the file system - which files were successfully uploaded @@ -4076,7 +4096,6 @@ this change improves that validation error message that users see when a redirected config file contains environments, by: - - cleaning the message formatting and displaying the offending environments in a list - prompting the user to report the issue to the author @@ -4096,7 +4115,6 @@ ### Patch Changes - [#8780](https://github.com/cloudflare/workers-sdk/pull/8780) [`4e69fb6`](https://github.com/cloudflare/workers-sdk/commit/4e69fb6f05138b32500695846482dd22bb2590d9) Thanks [@cmackenzie1](https://github.com/cmackenzie1)! - - Rename `wrangler pipelines show` to `wrangler pipelines get` - - Replace `--enable-worker-binding` and `--enable-http` with `--source worker` and `--source http` (or `--source http worker` for both) - Remove `--file-template` and `--partition-template` flags from `wrangler pipelines create|update` @@ -4107,7 +4125,6 @@ add the following validation behaviors to wrangler deploy commands, that relate to redirected configs (i.e. config files specified by `.wrangler/deploy/config.json` files): - - redirected configs are supposed to be already flattened configurations without any environment (i.e. a build tool should generate redirected configs already targeting specific environments), so if wrangler encounters a redirected config with some environments defined @@ -4326,7 +4343,6 @@ - [#7334](https://github.com/cloudflare/workers-sdk/pull/7334) [`869ec7b`](https://github.com/cloudflare/workers-sdk/commit/869ec7b916487ec43b958a27bdfea13588c5685f) Thanks [@penalosa](https://github.com/penalosa)! - Remove the deprecated `--format` argument on `wrangler deploy` and `wrangler dev`. Remove deprecated config fields: - - `type` - `webpack_config` - `miniflare` @@ -4369,14 +4385,12 @@ - [#7334](https://github.com/cloudflare/workers-sdk/pull/7334) [`869ec7b`](https://github.com/cloudflare/workers-sdk/commit/869ec7b916487ec43b958a27bdfea13588c5685f) Thanks [@penalosa](https://github.com/penalosa)! - Remove the deprecated `wrangler publish` command. Instead, use `wrangler deploy`, which takes exactly the same arguments. Additionally, remove the following deprecated commands, which are no longer supported. - - `wrangler config` - `wrangler preview` - `wrangler route` - `wrangler subdomain` Remove the following deprecated command aliases: - - `wrangler secret:*`, replaced by `wrangler secret *` - `wrangler kv:*`, replaced by `wrangler kv *` @@ -4389,7 +4403,6 @@ - [#7334](https://github.com/cloudflare/workers-sdk/pull/7334) [`869ec7b`](https://github.com/cloudflare/workers-sdk/commit/869ec7b916487ec43b958a27bdfea13588c5685f) Thanks [@threepointone](https://github.com/threepointone)! - chore: update esbuild This 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 `using` syntax. - 0.18 introduced wider support for configuration specified via `tsconfig.json` https://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 @@ -4401,7 +4414,6 @@ 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. ```js @@ -4458,7 +4470,6 @@ ``` Before this update: - 1. A request to anything but `http://localhost:8787/` would error. For example, a request to `http://localhost:8787/one.js` would error with _No such module "one.js"._ 2. Let's configure `wrangler.toml` to include all `.js` files in the `src` folder: @@ -4483,7 +4494,6 @@ Then, a request to `http://localhost:8787/hidden/secret.js` will return the contents of `src/hidden/secret.js`. After this update: - - Let's put the wrangler.toml back to its original configuration: ```toml @@ -4492,7 +4502,6 @@ ``` - Now, a request to `http://localhost:8787/one.js` will return the contents of `src/one.js`, but a request to `http://localhost:8787/hidden/secret.js` will ALSO return the contents of `src/hidden/secret.js`. THIS MAY NOT BE WHAT YOU WANT. You can "fix" this in 2 ways: - 1. Remove the inline wildcard import: ```js @@ -4508,7 +4517,6 @@ ``` Now, no extra modules are included in the bundle, and a request to `http://localhost:8787/hidden/secret.js` will throw an error. You can use the `find_additional_modules` feature to include it again. - 2. Don't use the wildcard import pattern: ```js @@ -4738,7 +4746,6 @@ This can be imported into Chrome DevTools or opened directly in VSCode to view a flamegraph of your Worker's startup phase. Additionally, when a Worker deployment fails with a startup time error Wrangler will automatically generate a CPU profile for easy investigation. Advanced usage: - - `--args`: to customise the way `wrangler check startup` builds your Worker for analysis, provide the exact arguments you use when deploying your Worker with `wrangler deploy`. For instance, if you deploy your Worker with `wrangler deploy --no-bundle`, you should use `wrangler check startup --args="--no-bundle"` to profile the startup phase. - `--worker-bundle`: if you don't use Wrangler to deploy your Worker, you can use this argument to provide a Worker bundle to analyse. This should be a file path to a serialised multipart upload, with the exact same format as the API expects: https://developers.cloudflare.com/api/resources/workers/subresources/scripts/methods/update/ @@ -4912,7 +4919,6 @@ - [#7860](https://github.com/cloudflare/workers-sdk/pull/7860) [`13ab591`](https://github.com/cloudflare/workers-sdk/commit/13ab5916058e8e834f3e13fb9b5b9d9addc0f930) Thanks [@vicb](https://github.com/vicb)! - refactor(wrangler): make JSON parsing independent of Node Switch `jsonc-parser` to parse json: - - `JSON.parse()` exception messages are not stable across Node versions - While `jsonc-parser` is used, JSONC specific syntax is disabled @@ -4939,11 +4945,9 @@ This command allows users to upload a mTLS certificate/private key or certificate-authority certificate chain. For uploading mTLS certificate, run: - - `wrangler cert upload mtls-certificate --cert cert.pem --key key.pem --name MY_CERT` For uploading CA certificate chain, run: - - `wrangler cert upload certificate-authority --ca-cert server-ca.pem --name SERVER_CA` ### Patch Changes @@ -5011,7 +5015,6 @@ - [#7806](https://github.com/cloudflare/workers-sdk/pull/7806) [`d7adb50`](https://github.com/cloudflare/workers-sdk/commit/d7adb50fcc9e3c509365fed8a86df485ea9f739b) Thanks [@vicb](https://github.com/vicb)! - chore: update unenv to 2.0.0-rc.0 Pull a couple changes in node:timers - - unjs/unenv#384 fix function bindings in node:timer - unjs/unenv#385 implement active and \_unrefActive in node:timer @@ -5174,7 +5177,6 @@ ### Affected commands The commands that use this feature are: - - `wrangler deploy` - `wrangler dev` - `wrangler versions upload` @@ -5198,7 +5200,6 @@ ### Custom build tool example A common approach that a build tool might choose to implement. - - The user writes code that uses Cloudflare Workers resources, configured via a user `wrangler.toml` file. ```toml @@ -5315,7 +5316,6 @@ - [#7425](https://github.com/cloudflare/workers-sdk/pull/7425) [`8757579`](https://github.com/cloudflare/workers-sdk/commit/8757579a47d675909230a51f8e09d1611d5cadb1) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - feat: Make DX improvements in `wrangler dev --remote` Workers + Assets projects have, in certain situations, a relatively degraded `wrangler dev --remote` developer experience, as opposed to Workers proper projects. This is due to the fact that, for Workers + Assets, we need to make extra API calls to: - 1. check for asset files changes 2. upload the changed assets, if any @@ -5351,7 +5351,6 @@ Adds a Wrangler API to find and read a config file - [#7549](https://github.com/cloudflare/workers-sdk/pull/7549) [`42b9429`](https://github.com/cloudflare/workers-sdk/commit/42b942916efbd4eb8060e4d61c2e805ec78a1a89) Thanks [@penalosa](https://github.com/penalosa)! - Expand metrics collection to: - - Detect Pages & Workers CI - Filter out default args (e.g. `--x-versions`, `--x-dev-env`, and `--latest`) by only including args that were in `argv` @@ -5455,7 +5454,6 @@ - [#7431](https://github.com/cloudflare/workers-sdk/pull/7431) [`8f25ebe`](https://github.com/cloudflare/workers-sdk/commit/8f25ebe74d19237e85b6dada1eb34236add11d48) Thanks [@vicb](https://github.com/vicb)! - chore(wrangler): update unenv dependency version Pull in: - - refactor(cloudflare): reimplement module:createRequire for latest workerd (unjs/unenv#351) - refactor: use node:events instead of relative path (unjs/unenv#354) - refactor(http, cloudflare): use unenv/ imports inside node:http (unjs/unenv#363) @@ -5610,7 +5608,6 @@ - [#7173](https://github.com/cloudflare/workers-sdk/pull/7173) [`b6cbfbd`](https://github.com/cloudflare/workers-sdk/commit/b6cbfbdd10dfbb732ec12a5c69bd4a74b07de8a0) Thanks [@Ankcorn](https://github.com/Ankcorn)! - Adds [observability.logs] settings to wrangler. This setting lets developers control the settings for logs as an independent dataset enabling more dataset types in the future. The most specific setting will win if any of the datasets are not enabled. It also adds the following setting to the logs config - - `invocation_logs` - set to false to disable invocation logs. Defaults to true. ```toml @@ -6196,7 +6193,6 @@ We want wrangler to error if users are trying to deploy a Worker with assets, and routes with a path component. All Workers with assets must have either: - - custom domain routes - pattern routes which have no path component (except for the wildcard splat) "some.domain.com/\*" @@ -6489,7 +6485,6 @@ - [#6370](https://github.com/cloudflare/workers-sdk/pull/6370) [`8a3c6c0`](https://github.com/cloudflare/workers-sdk/commit/8a3c6c00105a3420e46da660bd3f317b26f1c6d4) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - feat: Create very basic Asset Server Worker and plumb it into `wrangler dev` These changes do the ground work needed in order to add Assets support for Workers in `wrangler dev`. They implement the following: - - it creates a new package called `workers-shared` that hosts the `Asset Server Worker`, and the `Router Worker`in the future - it scaffolds the `Asset Server Worker` in some very basic form, with basic configuration. Further behaviour implementation will follow in a subsequent PR - it does the ground work of plumbing ASW into Miniflare @@ -6573,7 +6568,6 @@ - [#6295](https://github.com/cloudflare/workers-sdk/pull/6295) [`ebc85c3`](https://github.com/cloudflare/workers-sdk/commit/ebc85c362a424778b7f0565217488504bd42964e) Thanks [@andyjessop](https://github.com/andyjessop)! - feat: introduce an experimental flag for `wrangler types` to dynamically generate runtime types according to the user's project configuration. - [#6272](https://github.com/cloudflare/workers-sdk/pull/6272) [`084d39e`](https://github.com/cloudflare/workers-sdk/commit/084d39e15e35471fabfb789dd280afe16a919fcf) Thanks [@emily-shen](https://github.com/emily-shen)! - fix: add `legacy-assets` config and flag as alias of current `assets` behavior - - The existing behavior of the `assets` config key/flag will change on August 15th. - `legacy-assets` will preserve current functionality. @@ -6671,7 +6665,6 @@ make sure that the same behavior is applied to the `ctx` object returned by `getPlatformProxy` - [#5569](https://github.com/cloudflare/workers-sdk/pull/5569) [`75ba960`](https://github.com/cloudflare/workers-sdk/commit/75ba9608faa9e5710fe1dc75b5852ae446696245) Thanks [@penalosa](https://github.com/penalosa)! - fix: Simplify `wrangler pages download config`: - - Don't include inheritable keys in the production override if they're equal to production - Only create a preview environment if needed, otherwise put the preview config at the top level @@ -6866,7 +6859,6 @@ - [#6058](https://github.com/cloudflare/workers-sdk/pull/6058) [`31cd51f`](https://github.com/cloudflare/workers-sdk/commit/31cd51f251050b0d6db97857a8d1d5427c855d99) Thanks [@threepointone](https://github.com/threepointone)! - chore: Quieter builds This patch cleans up warnings we were seeing when doing a full build. Specifically: - - fixtures/remix-pages-app had a bunch of warnings about impending features that it should be upgraded to, so I did that. (tbh this one needs a full upgrade of packages, but we'll get to that later when we're upgrading across the codebase) - updated `@microsoft/api-extractor` so it didn't complain that it didn't match the `typescript` version (that we'd recently upgraded) - it also silenced a bunch of warnings when exporting types from `wrangler`. We'll need to fix those, but we'll do that when we work on unstable_dev etc. @@ -7054,7 +7046,6 @@ ``` This commit ensures that we provide users with: - - the correct feedback with respect to their Pages deployment - the appropriate messaging depending on the status of their project's deployment status - the appropriate logs in case of a deployment failure @@ -7108,7 +7099,6 @@ ### Patch Changes - [#5813](https://github.com/cloudflare/workers-sdk/pull/5813) [`9627cef`](https://github.com/cloudflare/workers-sdk/commit/9627cef2f1aadb44aa677e429b6cb6af9c8ee495) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: Upload Pages project assets with more grace - - Reduces the maximum bucket size from 50 MiB to 40 MiB. - Reduces the maximum asset count from 5000 to 2000. - Allows for more retries (with increased sleep between attempts) when encountering an API gateway failure. @@ -7500,7 +7490,6 @@ - [#5258](https://github.com/cloudflare/workers-sdk/pull/5258) [`fbdca7d`](https://github.com/cloudflare/workers-sdk/commit/fbdca7d93156f9db2a1513573e45f10fac7e57d1) Thanks [@OilyLime](https://github.com/OilyLime)! - feature: URL decode components of the Hyperdrive config connection string - [#5416](https://github.com/cloudflare/workers-sdk/pull/5416) [`47b325a`](https://github.com/cloudflare/workers-sdk/commit/47b325af0df87bcf20d922ff385ae9cd21726863) Thanks [@mattdeboard](https://github.com/mattdeboard)! - fix: minor improvements to R2 notification subcommand - 1. `r2 bucket event-notification ` becomes `r2 bucket notification ` 2. Parameters to `--event-type` use `-` instead of `_` (e.g. `object_create` -> `object-create`) @@ -7936,7 +7925,6 @@ whilst also making the type compatible with workers-types - Updated dependencies [[`7723ac17`](https://github.com/cloudflare/workers-sdk/commit/7723ac17906f894afe9af2152437726ac09a6290), [`027f9719`](https://github.com/cloudflare/workers-sdk/commit/027f971975a48a564603275f3583d21e9d053229), [`027f9719`](https://github.com/cloudflare/workers-sdk/commit/027f971975a48a564603275f3583d21e9d053229), [`027f9719`](https://github.com/cloudflare/workers-sdk/commit/027f971975a48a564603275f3583d21e9d053229), [`027f9719`](https://github.com/cloudflare/workers-sdk/commit/027f971975a48a564603275f3583d21e9d053229), [`027f9719`](https://github.com/cloudflare/workers-sdk/commit/027f971975a48a564603275f3583d21e9d053229), [`027f9719`](https://github.com/cloudflare/workers-sdk/commit/027f971975a48a564603275f3583d21e9d053229)]: - - miniflare@3.20240129.3 - [#4475](https://github.com/cloudflare/workers-sdk/pull/4475) [86d94ff](https://github.com/cloudflare/workers-sdk/commit/86d94ff5acd31eee7f02bc68e0b70f792eb3e74c) Thanks [@paulrostorp](https://github.com/paulrostorp)! - feat: support custom HTTPS certificate paths in Wrangler dev commands. @@ -8520,7 +8508,6 @@ These changes were released in 3.13.0 and reverted in 3.13.1 -- we believe the changes are now more stable and ready for release again. There are no changes required for developers to opt-in. Improvements include: - - fewer 'address in use' errors upon reloads - upon config/source file changes, requests are buffered to guarantee the response is from the new version of the Worker @@ -8771,7 +8758,6 @@ * [#3960](https://github.com/cloudflare/workers-sdk/pull/3960) [`c36b78b4`](https://github.com/cloudflare/workers-sdk/commit/c36b78b4109c05f47556972e66673f64ec0baa3b) Thanks [@RamIdeas](https://github.com/RamIdeas)! - Refactoring the internals of wrangler dev servers (including `wrangler dev`, `wrangler dev --remote` and `unstable_dev()`). There are no changes required for developers to opt-in. Improvements include: - - fewer 'address in use' errors upon reloads - upon config/source file changes, requests are buffered to guarantee the response is from the new version of the Worker @@ -9146,7 +9132,6 @@ `wrangler deploy` immediately deletes assets that are no longer current, which has a side-effect for existing progressive web app users of seeing 404 errors as the app tries to access assets that no longer exist. This new feature: - - does not change the default behavior of immediately deleting no-longer needed assets. - allows users to opt-in to expiring newly obsoleted assets after the provided number of seconds hence, so that current users will have a time buffer before seeing 404 errors. - is similar in concept to what was introduced in Wrangler 1.x with https://github.com/cloudflare/wrangler-legacy/pull/2221. @@ -9435,7 +9420,6 @@ ### Minor Changes - [#3098](https://github.com/cloudflare/workers-sdk/pull/3098) [`8818f551`](https://github.com/cloudflare/workers-sdk/commit/8818f5516ca909cc941deb953b6359030a8c0301) Thanks [@mrbbot](https://github.com/mrbbot)! - fix: improve Workers Sites asset upload reliability - - Wrangler no longer buffers all assets into memory before uploading. This should prevent out-of-memory errors when publishing sites with many large files. - Wrangler now limits the number of in-flight asset upload requests to 5, fixing the `Too many bulk operations already in progress` error. - Wrangler now correctly logs upload progress. Previously, the reported percentage was per upload request group, not across all assets. @@ -9613,7 +9597,6 @@ Support send email bindings in order to send emails from a worker. There are three types of bindings: - - Unrestricted: can send email to any verified destination address. - Restricted: can only send email to the supplied destination address (which does not need to be specified when sending the email but also needs to be a @@ -9763,7 +9746,6 @@ binding = "yeee" - [#2810](https://github.com/cloudflare/workers-sdk/pull/2810) [`62784131`](https://github.com/cloudflare/workers-sdk/commit/62784131385d641c3512b09565d801a5ecd39725) Thanks [@mrbbot](https://github.com/mrbbot)! - chore: upgrade `@miniflare/tre` to [`3.0.0-next.12`](https://github.com/cloudflare/miniflare/releases/tag/v3.0.0-next.12), incorporating changes from [`3.0.0-next.11`](https://github.com/cloudflare/miniflare/releases/tag/v3.0.0-next.11) Notably, this brings the following improvements to `wrangler dev --experimental-local`: - - Adds support for Durable Objects and D1 - Fixes an issue blocking clean exits and script reloads - Bumps to `better-sqlite3@8`, allowing installation on Node 19 @@ -10203,7 +10185,6 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c * [#2479](https://github.com/cloudflare/workers-sdk/pull/2479) [`7b479b91`](https://github.com/cloudflare/workers-sdk/commit/7b479b9104266c83dda3b4e4a89ab9b919b743f0) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: bump d1js This PR bumps d1js, adding the following functionality to the d1 alpha shim: - - validates supported types - converts ArrayBuffer to array - converts typedArray to array @@ -10463,7 +10444,6 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Minor Changes - [#2107](https://github.com/cloudflare/workers-sdk/pull/2107) [`511943e9`](https://github.com/cloudflare/workers-sdk/commit/511943e9226f787aa997a325d39dc2caac05a73c) Thanks [@celso](https://github.com/celso)! - fix: D1 execute and backup commands improvements - - Better and faster handling when importing big SQL files using execute --file - Increased visibility during imports, sends output with each batch API call - Backups are now downloaded to the directory where wrangler was initiated from @@ -10596,7 +10576,6 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c Added support for the deployments command, which allows you to list the last ten deployments for a given script. The information will include: - - Version ID - Version number - Author email @@ -10793,7 +10772,6 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c We change how websockets are handled in the proxy server, fixing multiple issues of websocket behaviour, particularly to do with headers. In particular this fixes: - - the protocol passed between the client and the worker was being stripped out by wrangler - wrangler was discarding additional headesr from websocket upgrade response - websocket close code and reason was not being propagated by wrangler @@ -11041,7 +11019,6 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c - [#1781](https://github.com/cloudflare/workers-sdk/pull/1781) [`603d0b35`](https://github.com/cloudflare/workers-sdk/commit/603d0b35074e2c59484e39305e0b01121de20f15) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - feat: Publish Origin Messaging feat: warn about potential conflicts during `publish` and `init --from-dash`. - - If publishing to a worker that has been modified in the dashboard, warn that the dashboard changes will be overwritten. - When initializing from the dashboard, warn that future changes via the dashboard will not automatically appear in the local Worker config. @@ -11050,7 +11027,6 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c * [#1735](https://github.com/cloudflare/workers-sdk/pull/1735) [`de29a445`](https://github.com/cloudflare/workers-sdk/commit/de29a4459750cf229fb563bcc8191ab3ad77bf4d) Thanks [@cameron-robey](https://github.com/cameron-robey)! - feat: new internal middleware A new way of registering middleware that gets bundled and executed on the edge. - - the same middleware functions can be used for both modules workers and service workers - only requires running esbuild a fixed number of times, rather than for each middleware added @@ -11078,7 +11054,6 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c Prior to this change, `wrangler.unstable_dev()` would only support running one instance of wrangler at a time, as Ink only lets you render one instance of React. This resulted in test failures in CI. This change creates pure JS/TS versions of these React hooks: - - useEsbuild - useLocalWorker - useCustomBuild @@ -11142,7 +11117,6 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c * [#1720](https://github.com/cloudflare/workers-sdk/pull/1720) [`f638de64`](https://github.com/cloudflare/workers-sdk/commit/f638de6426619a899367ba41674179b8ca67c6ab) Thanks [@mrbbot](https://github.com/mrbbot)! - Upgrade `miniflare` to [`2.7.1`](https://github.com/cloudflare/miniflare/releases/tag/v2.7.1) incorporating changes from [`2.7.0`](https://github.com/cloudflare/miniflare/releases/tag/v2.7.0) - [#1691](https://github.com/cloudflare/workers-sdk/pull/1691) [`5b2c3ee2`](https://github.com/cloudflare/workers-sdk/commit/5b2c3ee2c5d65b25c966ca07751f544f282525b9) Thanks [@cameron-robey](https://github.com/cameron-robey)! - chore: bump undici and increase minimum node version to 16.13 - - We bump undici to version to 5.9.1 to patch some security vulnerabilities in previous versions - This requires bumping the minimum node version to >= 16.8 so we update the minimum to the LTS 16.13 @@ -11332,7 +11306,6 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c * [#1558](https://github.com/cloudflare/workers-sdk/pull/1558) [`b43a7f98`](https://github.com/cloudflare/workers-sdk/commit/b43a7f9836e8f2d969624c2c5a88adf374a1ebe3) Thanks [@rozenmd](https://github.com/rozenmd)! - chore: extract devProps parsing into own function - [#1438](https://github.com/cloudflare/workers-sdk/pull/1438) [`0a9fe918`](https://github.com/cloudflare/workers-sdk/commit/0a9fe918216264a2f6fa3f69dd596f89de7d9f56) Thanks [@caass](https://github.com/caass)! - Initial implementation of `wrangler generate` - - `wrangler generate` and `wrangler generate ` delegate to `wrangler init`. - `wrangler generate