diff --git a/.changeset/access-service-token-support.md b/.changeset/access-service-token-support.md deleted file mode 100644 index bca4c0f64d..0000000000 --- a/.changeset/access-service-token-support.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -"wrangler": minor ---- - -Add support for Cloudflare Access Service Token authentication via environment variables - -When running `wrangler dev` with remote bindings behind a Cloudflare Access-protected domain, Wrangler previously required `cloudflared access login` which opens a browser for interactive authentication. This does not work in CI/CD environments. - -You can now set the `CLOUDFLARE_ACCESS_CLIENT_ID` and `CLOUDFLARE_ACCESS_CLIENT_SECRET` environment variables to authenticate using an Access Service Token instead: - -```sh -export CLOUDFLARE_ACCESS_CLIENT_ID=".access" -export CLOUDFLARE_ACCESS_CLIENT_SECRET="" -wrangler dev -``` - -Additionally, when running in a non-interactive environment (CI) without these credentials, Wrangler now throws a clear, actionable error instead of hanging on `cloudflared access login`. diff --git a/.changeset/ai-search-bindings.md b/.changeset/ai-search-bindings.md deleted file mode 100644 index c10e20de08..0000000000 --- a/.changeset/ai-search-bindings.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -"wrangler": minor -"miniflare": minor -"@cloudflare/workers-utils": minor ---- - -feat: Add `ai_search_namespaces` and `ai_search` binding types - -Two new binding types for AI Search: - -- `ai_search_namespaces`: Namespace binding — `namespace` is required and auto-provisioned at deploy time if it doesn't exist (like R2 buckets) -- `ai_search`: Single instance binding bound directly to a pre-existing instance in the default namespace - -Both are remote-only in local dev. diff --git a/.changeset/angular-autoconfig-spa-support.md b/.changeset/angular-autoconfig-spa-support.md deleted file mode 100644 index 0494369a81..0000000000 --- a/.changeset/angular-autoconfig-spa-support.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"wrangler": patch ---- - -fix: Angular auto-config now correctly handles projects without SSR configured - -Previously, running `wrangler deploy` (or `wrangler setup`) on a plain Angular SPA (created with `ng new` without `--ssr`) would crash with `Cannot set properties of undefined (setting 'experimentalPlatform')`, because the auto-config code unconditionally assumed SSR was configured. - -Angular projects without SSR are now treated as assets-only deployments: no `wrangler.jsonc` `main` entry is generated, `angular.json` is not modified, no `src/server.ts` is created, and no extra dependencies are installed. diff --git a/.changeset/brave-planes-dance.md b/.changeset/brave-planes-dance.md deleted file mode 100644 index 717d5a6434..0000000000 --- a/.changeset/brave-planes-dance.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"miniflare": patch ---- - -Move internal proxy endpoint to reserved `/cdn-cgi/` path - -The internal HTTP endpoint used by `getPlatformProxy` has been moved to a reserved path. This is an internal change with no impact on the `getPlatformProxy` API. diff --git a/.changeset/dry-run-asset-validation.md b/.changeset/dry-run-asset-validation.md deleted file mode 100644 index 92f526418b..0000000000 --- a/.changeset/dry-run-asset-validation.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"wrangler": patch ---- - -Fix `wrangler deploy --dry-run` skipping asset build-artifact validation checks - -Previously, `--dry-run` skipped the entire asset sync step, which meant it also skipped validation that runs during asset manifest building. This included the check that errors when a `_worker.js` file or directory would be uploaded as a public static asset (which can expose private server-side code), as well as the per-file size limit check. - -With this fix, `--dry-run` now runs `buildAssetManifest` against the asset directory when assets are configured, performing the same file-system validation as a real deploy without uploading anything or making any API calls. diff --git a/.changeset/fix-do-redirect-response.md b/.changeset/fix-do-redirect-response.md deleted file mode 100644 index f46a4743df..0000000000 --- a/.changeset/fix-do-redirect-response.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@cloudflare/vitest-pool-workers": patch ---- - -fix: `runInDurableObject` now correctly returns redirect responses (3xx) from Durable Object callbacks instead of throwing "Expected callback for X" errors diff --git a/.changeset/fix-dynamic-import-cross-do.md b/.changeset/fix-dynamic-import-cross-do.md deleted file mode 100644 index f35a187c6a..0000000000 --- a/.changeset/fix-dynamic-import-cross-do.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@cloudflare/vitest-pool-workers": patch ---- - -fix: Support dynamic `import()` inside entrypoint and Durable Object handlers - -Previously, calling `exports.default.fetch()` or `SELF.fetch()` on a worker whose handler used a dynamic `import()` would hang and fail with "Cannot perform I/O on behalf of a different Durable Object". This happened because the module runner's transport — which communicates over a WebSocket owned by the runner Durable Object — was invoked from a different DO context. - -The fix patches the module runner's transport via the `onModuleRunner` hook so that all `invoke()` calls are routed through the runner DO's I/O context, regardless of where the `import()` originates. diff --git a/.changeset/fix-type-generation-multi-worker-env.md b/.changeset/fix-type-generation-multi-worker-env.md deleted file mode 100644 index 39a1a8decb..0000000000 --- a/.changeset/fix-type-generation-multi-worker-env.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"wrangler": patch ---- - -fix: resolve secondary worker types when environment overrides the worker name in multi-worker type generation - -When running `wrangler types` with multiple `-c` config flags and the secondary worker has named environments that override the worker name (e.g. a worker named `do-worker` with env `staging` whose effective name becomes `do-worker-staging`), service bindings and Durable Object bindings in the primary worker that reference `do-worker-staging` now correctly resolve to the typed entry point instead of falling back to an unresolved comment type such as `DurableObjectNamespace /* MyClass from do-worker-staging */`. - -The fix extends the secondary entries map to also register environment-specific worker names, so that lookups by the env-qualified name (e.g. `do-worker-staging`) resolve to the same source file as the base worker name. diff --git a/.changeset/fix-undici-401-body-source.md b/.changeset/fix-undici-401-body-source.md deleted file mode 100644 index fecbd6a752..0000000000 --- a/.changeset/fix-undici-401-body-source.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"wrangler": patch ---- - -fix: patch undici to prevent fetch() throwing on 401 responses with a request body - -Fetching with a request body (string, JSON, FormData, etc.) to an endpoint that returns a 401 would throw `TypeError: fetch failed` with cause `expected non-null body source`. This affected `Unstable_DevWorker.fetch()` and any other use of undici's fetch in wrangler. - -The root cause is `isTraversableNavigable()` in undici returning `true` unconditionally, causing the 401 credential-retry logic to run in Node.js where it should never apply (there is no browser UI to prompt for credentials). This is tracked upstream in [nodejs/undici#4910](https://github.com/nodejs/undici/issues/4910). Until an upstream fix is released, we apply a patch to undici that returns `false` from `isTraversableNavigable()`. diff --git a/.changeset/fix-wasm-double-extension-glob.md b/.changeset/fix-wasm-double-extension-glob.md deleted file mode 100644 index 76cbcb0eec..0000000000 --- a/.changeset/fix-wasm-double-extension-glob.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"miniflare": patch ---- - -fix: glob patterns for module rules no longer match double-extension filenames like `foo.wasm.js` - -Previously, the `globsToRegExps` helper compiled glob patterns without a trailing `$` anchor. This caused patterns like `**/*.wasm` to match any path containing `.wasm` as a substring — including filenames such as `foo.wasm.js` or `main.wasm.test.ts`. - -When using `@cloudflare/vitest-pool-workers` with a `wrangler.configPath`, Wrangler's default `CompiledWasm` module rule (`**/*.wasm`) was silently applied to test files whose names contained `.wasm`, causing them to be loaded as WebAssembly binaries instead of JavaScript and failing at runtime. - -The fix restores the `$` end anchor in the compiled regex so that `**/*.wasm` only matches paths that literally end in `.wasm`, while the leading `^` remains absent to allow matching anywhere within an absolute path. diff --git a/.changeset/fix-windows-docker-console-windows.md b/.changeset/fix-windows-docker-console-windows.md deleted file mode 100644 index 31efdeba17..0000000000 --- a/.changeset/fix-windows-docker-console-windows.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": patch ---- - -fix: prevent Docker container builds from spawning console windows on Windows - -On Windows, `detached: true` in `child_process.spawn()` gives each child process its own visible console window, causing many windows to flash open during `wrangler deploy` with `[[containers]]`. The `detached` option is now only set on non-Windows platforms (where it is needed for process group cleanup), and `windowsHide: true` is added to further suppress console windows on Windows. diff --git a/.changeset/four-planes-attend.md b/.changeset/four-planes-attend.md deleted file mode 100644 index f1f6013d2c..0000000000 --- a/.changeset/four-planes-attend.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": patch ---- - -Fix source phase imports in bundled and non-bundled Workers - -Wrangler now preserves `import source` syntax when it runs esbuild, including module format detection and bundled deploy output. This fixes both `--no-bundle` and bundled deployments for Workers that import WebAssembly using source phase imports. diff --git a/.changeset/hyperdrive-vpc-service-support.md b/.changeset/hyperdrive-vpc-service-support.md deleted file mode 100644 index 3380599ead..0000000000 --- a/.changeset/hyperdrive-vpc-service-support.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"wrangler": minor ---- - -Add Workers VPC service support for Hyperdrive origins - -Hyperdrive configs can now connect to databases through Workers VPC services using the `--service-id` option: - -```bash -wrangler hyperdrive create my-config --service-id --database mydb --user myuser --password mypassword -``` - -This enables Hyperdrive to connect to databases hosted in private networks that are accessible through Workers VPC TCP services. diff --git a/.changeset/improve-unresolved-module-error.md b/.changeset/improve-unresolved-module-error.md deleted file mode 100644 index e76a77dd4e..0000000000 --- a/.changeset/improve-unresolved-module-error.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -"wrangler": patch ---- - -Improve error message when modules cannot be resolved during bundling - -When a module cannot be resolved during bundling, Wrangler now suggests using the `alias` configuration option to substitute it with an alternative implementation. This replaces esbuild's default suggestion to "mark the path as external", which is not a supported option in Wrangler. - -For example, if you try to import a module that doesn't exist: - -```js -import foo from "some-missing-module"; -``` - -Wrangler will now suggest: - -``` -To fix this, you can add an entry to "alias" in your Wrangler configuration -to substitute "some-missing-module" with an alternative implementation. -See https://developers.cloudflare.com/workers/wrangler/configuration/#bundling-issues -``` - -This provides actionable guidance for resolving import errors. diff --git a/.changeset/ninety-queens-count.md b/.changeset/ninety-queens-count.md deleted file mode 100644 index b1232535e4..0000000000 --- a/.changeset/ninety-queens-count.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@cloudflare/vite-plugin": patch ---- - -Fix `Cannot perform I/O on behalf of a different request` errors for deferred dynamic imports - -Concurrent requests that loaded the same dynamic import were previously sharing the same promise to resolve it in a Worker context. We now ensure that all imports execute within a Durable Object's IoContext before the result is returned to the Worker. diff --git a/.changeset/plenty-paws-rest.md b/.changeset/plenty-paws-rest.md deleted file mode 100644 index 5f87684041..0000000000 --- a/.changeset/plenty-paws-rest.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@cloudflare/containers-shared": patch -"wrangler": patch ---- - -add library-push flag to containers registries credentials - -This flag is not available for public use. diff --git a/.changeset/short-toes-dig.md b/.changeset/short-toes-dig.md deleted file mode 100644 index 0595ff2340..0000000000 --- a/.changeset/short-toes-dig.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": minor ---- - -Add interactive data catalog validation to R2 object and lifecycle commands. - -When performing R2 operations that could affect data catalog state (object put, object delete, lifecycle add, lifecycle set), Wrangler now validates with the API and prompts users for confirmation if a conflict is detected. For bulk put operations, Wrangler prompts upfront before starting the batch. Users can bypass prompts with `--force` (`-y`). In non-interactive/CI environments, the operation proceeds automatically. diff --git a/.changeset/stream-binding-local-mode.md b/.changeset/stream-binding-local-mode.md deleted file mode 100644 index 1f800be9f4..0000000000 --- a/.changeset/stream-binding-local-mode.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -"miniflare": minor -"wrangler": minor ---- - -Add local mode support for Stream bindings - -Miniflare and `wrangler dev` now support using [Cloudflare Stream](https://developers.cloudflare.com/stream/) bindings locally. - -Supported operations: - -- `upload()` — upload video via URL -- `video(id).details()`, `.update()`, `.delete()`, `.generateToken()` -- `videos.list()` -- `captions.generate()`, `.list()`, `.delete()` -- `downloads.generate()`, `.get()`, `.delete()` -- `watermarks.generate()`, `.list()`, `.get()`, `.delete()` - -The following are not yet supported in local mode and will throw: - -- `createDirectUpload()` -- Caption upload via `File` -- Watermark generation via `File` - -Data is persisted across restarts by default. You must set `streamPersist: false` in Miniflare options to disable persistence. diff --git a/.changeset/validate-queue-consumer-type.md b/.changeset/validate-queue-consumer-type.md deleted file mode 100644 index 95c41d91df..0000000000 --- a/.changeset/validate-queue-consumer-type.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"wrangler": patch -"@cloudflare/workers-utils": patch ---- - -Validate that queue consumers in wrangler config only use the "worker" type - -Previously, non-worker consumer types (e.g. `http_pull`) could be specified in the `queues.consumers` config. Now, wrangler will error if a consumer `type` other than `"worker"` is specified in the config file. - -To configure non-worker consumer types, use the `wrangler queues consumer` CLI commands instead (e.g. `wrangler queues consumer http-pull add`). diff --git a/.changeset/vitest-pool-workers-esm-import-fallback.md b/.changeset/vitest-pool-workers-esm-import-fallback.md deleted file mode 100644 index ffa426fff8..0000000000 --- a/.changeset/vitest-pool-workers-esm-import-fallback.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@cloudflare/vitest-pool-workers": patch ---- - -fix: only apply module fallback extension probing for `require()`, not `import` - -The module fallback service previously tried adding `.js`, `.mjs`, `.cjs`, and `.json` suffixes to extensionless specifiers unconditionally. Per the Node.js spec, this extension-probing behaviour is specific to CommonJS `require()`. ESM `import` statements must include explicit file extensions. - -Extension-less TypeScript `import` specifiers continue to work correctly — they are resolved by Vite's resolver rather than the fallback's extension loop. diff --git a/.changeset/vitest-pool-workers-secrets-store-persist.md b/.changeset/vitest-pool-workers-secrets-store-persist.md deleted file mode 100644 index 26d44bb4fe..0000000000 --- a/.changeset/vitest-pool-workers-secrets-store-persist.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -"@cloudflare/vitest-pool-workers": patch ---- - -Add `adminSecretsStore()` to `cloudflare:test` for seeding secrets in tests - -Secrets store bindings only expose a read-only `.get()` method, so there was previously no way to seed secret values from within a test. The new `adminSecretsStore()` helper returns Miniflare's admin API for a secrets store binding, giving tests full control over create, update, and delete operations. - -```ts -import { adminSecretsStore } from "cloudflare:test"; -import { env } from "cloudflare:workers"; - -const admin = adminSecretsStore(env.MY_SECRET); -await admin.create("test-value"); - -const value = await env.MY_SECRET.get(); // "test-value" -``` diff --git a/.changeset/vitest-pool-workers-waituntil-timeout.md b/.changeset/vitest-pool-workers-waituntil-timeout.md deleted file mode 100644 index 01ad48f2fa..0000000000 --- a/.changeset/vitest-pool-workers-waituntil-timeout.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@cloudflare/vitest-pool-workers": patch ---- - -Add a 30-second timeout to `waitUntil` promise draining to prevent hanging tests - -Previously, if a `ctx.waitUntil()` promise never resolved, the test suite would hang indefinitely after the test file finished. Now, any `waitUntil` promises that haven't settled within 30 seconds are abandoned with a warning, allowing the test suite to continue. This aligns with the [production `waitUntil` limit](https://developers.cloudflare.com/workers/platform/limits/#duration). diff --git a/.changeset/vpc-cert-verification-mode.md b/.changeset/vpc-cert-verification-mode.md deleted file mode 100644 index dc0784f721..0000000000 --- a/.changeset/vpc-cert-verification-mode.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -"wrangler": minor ---- - -Add `--cert-verification-mode` option to `wrangler vpc service create` and `wrangler vpc service update` - -You can now configure the TLS certificate verification mode when creating or updating a VPC connectivity service. This controls how the connection to the origin server verifies TLS certificates. - -Available modes: - -- `verify_full` (default) -- verify certificate chain and hostname -- `verify_ca` -- verify certificate chain only, skip hostname check -- `disabled` -- do not verify the server certificate at all - -```sh -wrangler vpc service create my-service --type tcp --tcp-port 5432 --ipv4 10.0.0.1 --tunnel-id --cert-verification-mode verify_ca -``` - -This applies to both TCP and HTTP VPC service types. When omitted, the default `verify_full` behavior is used. diff --git a/.changeset/vpc-tcp-service-support.md b/.changeset/vpc-tcp-service-support.md deleted file mode 100644 index 7d160bf1a3..0000000000 --- a/.changeset/vpc-tcp-service-support.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"wrangler": minor ---- - -Add TCP service type support for Workers VPC - -You can now create TCP services in Workers VPC using the `--type tcp` option: - -```bash -wrangler vpc service create my-db --type tcp --tcp-port 5432 --ipv4 10.0.0.1 --tunnel-id -``` - -This enables exposing TCP-based services like PostgreSQL, MySQL, and other database servers through Workers VPC. diff --git a/.changeset/yellow-falcons-cheat.md b/.changeset/yellow-falcons-cheat.md deleted file mode 100644 index fa1616c116..0000000000 --- a/.changeset/yellow-falcons-cheat.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"create-cloudflare": minor ---- - -Update dependencies in Python workers templates - -The `workers-runtime-sdk` library is added as a dev dependency and the `webtypy` is removed as a dependency. diff --git a/packages/containers-shared/CHANGELOG.md b/packages/containers-shared/CHANGELOG.md index c52bb004f9..d404655792 100644 --- a/packages/containers-shared/CHANGELOG.md +++ b/packages/containers-shared/CHANGELOG.md @@ -1,5 +1,13 @@ # @cloudflare/containers-shared +## 0.13.1 + +### Patch Changes + +- [#13049](https://github.com/cloudflare/workers-sdk/pull/13049) [`7a5be20`](https://github.com/cloudflare/workers-sdk/commit/7a5be2078800426a9ef1f8520ef72a99d9847c16) Thanks [@nikitassharma](https://github.com/nikitassharma)! - add library-push flag to containers registries credentials + + This flag is not available for public use. + ## 0.13.0 ### Minor Changes diff --git a/packages/containers-shared/package.json b/packages/containers-shared/package.json index 298fe760d1..3cb48145d0 100644 --- a/packages/containers-shared/package.json +++ b/packages/containers-shared/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/containers-shared", - "version": "0.13.0", + "version": "0.13.1", "private": true, "description": "Package that contains shared container functionality for Cloudflare Workers SDK.", "homepage": "https://github.com/cloudflare/workers-sdk/tree/main/packages/containers-shared#readme", diff --git a/packages/create-cloudflare/CHANGELOG.md b/packages/create-cloudflare/CHANGELOG.md index 6b314c8e4e..4f4e24420e 100644 --- a/packages/create-cloudflare/CHANGELOG.md +++ b/packages/create-cloudflare/CHANGELOG.md @@ -1,5 +1,13 @@ # create-cloudflare +## 2.66.0 + +### Minor Changes + +- [#12964](https://github.com/cloudflare/workers-sdk/pull/12964) [`e0831c6`](https://github.com/cloudflare/workers-sdk/commit/e0831c6ead822c7a03f10d87ce44e8c4d0f05ef2) Thanks [@ryanking13](https://github.com/ryanking13)! - Update dependencies in Python workers templates + + The `workers-runtime-sdk` library is added as a dev dependency and the `webtypy` is removed as a dependency. + ## 2.65.0 ### Minor Changes diff --git a/packages/create-cloudflare/package.json b/packages/create-cloudflare/package.json index 82458befda..6d9da4bdb2 100644 --- a/packages/create-cloudflare/package.json +++ b/packages/create-cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "create-cloudflare", - "version": "2.65.0", + "version": "2.66.0", "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 a956242622..7ea9ef21cc 100644 --- a/packages/miniflare/CHANGELOG.md +++ b/packages/miniflare/CHANGELOG.md @@ -1,5 +1,53 @@ # miniflare +## 4.20260317.3 + +### Minor Changes + +- [#13027](https://github.com/cloudflare/workers-sdk/pull/13027) [`9fcdfca`](https://github.com/cloudflare/workers-sdk/commit/9fcdfca775d3d412abe7547d0833414599bab221) Thanks [@G4brym](https://github.com/G4brym)! - feat: Add `ai_search_namespaces` and `ai_search` binding types + + Two new binding types for AI Search: + + - `ai_search_namespaces`: Namespace binding — `namespace` is required and auto-provisioned at deploy time if it doesn't exist (like R2 buckets) + - `ai_search`: Single instance binding bound directly to a pre-existing instance in the default namespace + + Both are remote-only in local dev. + +- [#13030](https://github.com/cloudflare/workers-sdk/pull/13030) [`0386553`](https://github.com/cloudflare/workers-sdk/commit/0386553d80ad10717f5294e8a5979af703cbcbf8) Thanks [@natewong1313](https://github.com/natewong1313)! - Add local mode support for Stream bindings + + Miniflare and `wrangler dev` now support using [Cloudflare Stream](https://developers.cloudflare.com/stream/) bindings locally. + + Supported operations: + + - `upload()` — upload video via URL + - `video(id).details()`, `.update()`, `.delete()`, `.generateToken()` + - `videos.list()` + - `captions.generate()`, `.list()`, `.delete()` + - `downloads.generate()`, `.get()`, `.delete()` + - `watermarks.generate()`, `.list()`, `.get()`, `.delete()` + + The following are not yet supported in local mode and will throw: + + - `createDirectUpload()` + - Caption upload via `File` + - Watermark generation via `File` + + Data is persisted across restarts by default. You must set `streamPersist: false` in Miniflare options to disable persistence. + +### Patch Changes + +- [#12686](https://github.com/cloudflare/workers-sdk/pull/12686) [`1faff35`](https://github.com/cloudflare/workers-sdk/commit/1faff35e9c84e40af882d15f7515c625d6f5ac95) Thanks [@edmundhung](https://github.com/edmundhung)! - Move internal proxy endpoint to reserved `/cdn-cgi/` path + + The internal HTTP endpoint used by `getPlatformProxy` has been moved to a reserved path. This is an internal change with no impact on the `getPlatformProxy` API. + +- [#13080](https://github.com/cloudflare/workers-sdk/pull/13080) [`f4ea4ac`](https://github.com/cloudflare/workers-sdk/commit/f4ea4accad70d6a55b648c610cfc806e5be36477) Thanks [@penalosa](https://github.com/penalosa)! - fix: glob patterns for module rules no longer match double-extension filenames like `foo.wasm.js` + + Previously, the `globsToRegExps` helper compiled glob patterns without a trailing `$` anchor. This caused patterns like `**/*.wasm` to match any path containing `.wasm` as a substring — including filenames such as `foo.wasm.js` or `main.wasm.test.ts`. + + When using `@cloudflare/vitest-pool-workers` with a `wrangler.configPath`, Wrangler's default `CompiledWasm` module rule (`**/*.wasm`) was silently applied to test files whose names contained `.wasm`, causing them to be loaded as WebAssembly binaries instead of JavaScript and failing at runtime. + + The fix restores the `$` end anchor in the compiled regex so that `**/*.wasm` only matches paths that literally end in `.wasm`, while the leading `^` remains absent to allow matching anywhere within an absolute path. + ## 4.20260317.2 ### Patch Changes diff --git a/packages/miniflare/package.json b/packages/miniflare/package.json index 3db014db92..b3eddb084b 100644 --- a/packages/miniflare/package.json +++ b/packages/miniflare/package.json @@ -1,6 +1,6 @@ { "name": "miniflare", - "version": "4.20260317.2", + "version": "4.20260317.3", "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 20ed837f61..014eb4f517 100644 --- a/packages/pages-shared/CHANGELOG.md +++ b/packages/pages-shared/CHANGELOG.md @@ -1,5 +1,12 @@ # @cloudflare/pages-shared +## 0.13.119 + +### Patch Changes + +- Updated dependencies [[`9fcdfca`](https://github.com/cloudflare/workers-sdk/commit/9fcdfca775d3d412abe7547d0833414599bab221), [`1faff35`](https://github.com/cloudflare/workers-sdk/commit/1faff35e9c84e40af882d15f7515c625d6f5ac95), [`f4ea4ac`](https://github.com/cloudflare/workers-sdk/commit/f4ea4accad70d6a55b648c610cfc806e5be36477), [`0386553`](https://github.com/cloudflare/workers-sdk/commit/0386553d80ad10717f5294e8a5979af703cbcbf8)]: + - miniflare@4.20260317.3 + ## 0.13.118 ### Patch Changes diff --git a/packages/pages-shared/package.json b/packages/pages-shared/package.json index d6d0b3e60f..142ed9ea21 100644 --- a/packages/pages-shared/package.json +++ b/packages/pages-shared/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/pages-shared", - "version": "0.13.118", + "version": "0.13.119", "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 1cfafb6be0..d26f3ff12c 100644 --- a/packages/vite-plugin-cloudflare/CHANGELOG.md +++ b/packages/vite-plugin-cloudflare/CHANGELOG.md @@ -1,5 +1,17 @@ # @cloudflare/vite-plugin +## 1.30.2 + +### Patch Changes + +- [#12953](https://github.com/cloudflare/workers-sdk/pull/12953) [`80b093e`](https://github.com/cloudflare/workers-sdk/commit/80b093eed2229a272b5aae0c34dc5c076c3d21e5) Thanks [@jamesopstad](https://github.com/jamesopstad)! - Fix `Cannot perform I/O on behalf of a different request` errors for deferred dynamic imports + + Concurrent requests that loaded the same dynamic import were previously sharing the same promise to resolve it in a Worker context. We now ensure that all imports execute within a Durable Object's IoContext before the result is returned to the Worker. + +- Updated dependencies [[`eeaa473`](https://github.com/cloudflare/workers-sdk/commit/eeaa47353c822b0e96fd892f2e3f957dba52715b), [`9fcdfca`](https://github.com/cloudflare/workers-sdk/commit/9fcdfca775d3d412abe7547d0833414599bab221), [`bc24ec8`](https://github.com/cloudflare/workers-sdk/commit/bc24ec81b9ed341dd165b7690f8602f6d738de0c), [`1faff35`](https://github.com/cloudflare/workers-sdk/commit/1faff35e9c84e40af882d15f7515c625d6f5ac95), [`0b4c21a`](https://github.com/cloudflare/workers-sdk/commit/0b4c21a3bf765f4c389c669dc44c8243f6889347), [`535582d`](https://github.com/cloudflare/workers-sdk/commit/535582d581613a3068a934ba0179d2cfde863359), [`992f9a3`](https://github.com/cloudflare/workers-sdk/commit/992f9a3ea15d14599faa573b8d49ee4d7f9e338a), [`f4ea4ac`](https://github.com/cloudflare/workers-sdk/commit/f4ea4accad70d6a55b648c610cfc806e5be36477), [`91b7f73`](https://github.com/cloudflare/workers-sdk/commit/91b7f73e3554e72d539ccd4034faaab1fb60b470), [`f6cdab2`](https://github.com/cloudflare/workers-sdk/commit/f6cdab206cff65e5db62998512676036edde6841), [`53ed15a`](https://github.com/cloudflare/workers-sdk/commit/53ed15afcd9680fc8f0236eacd054d3c34ac73e5), [`ce65246`](https://github.com/cloudflare/workers-sdk/commit/ce65246010eaa0ea3c4c0c74e228f6597cf4332c), [`7a5be20`](https://github.com/cloudflare/workers-sdk/commit/7a5be2078800426a9ef1f8520ef72a99d9847c16), [`6b50bfa`](https://github.com/cloudflare/workers-sdk/commit/6b50bfa58de4716ffb7125e0ec28a68e40b22ce1), [`0386553`](https://github.com/cloudflare/workers-sdk/commit/0386553d80ad10717f5294e8a5979af703cbcbf8), [`9c5ebf5`](https://github.com/cloudflare/workers-sdk/commit/9c5ebf56291199eeaec43513732fd3fa7fbd502d), [`53ed15a`](https://github.com/cloudflare/workers-sdk/commit/53ed15afcd9680fc8f0236eacd054d3c34ac73e5), [`53ed15a`](https://github.com/cloudflare/workers-sdk/commit/53ed15afcd9680fc8f0236eacd054d3c34ac73e5)]: + - wrangler@4.78.0 + - miniflare@4.20260317.3 + ## 1.30.1 ### Patch Changes diff --git a/packages/vite-plugin-cloudflare/package.json b/packages/vite-plugin-cloudflare/package.json index c6fcf4c6af..ccd07e7098 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.30.1", + "version": "1.30.2", "description": "Cloudflare plugin for Vite", "keywords": [ "cloudflare", diff --git a/packages/vitest-pool-workers/CHANGELOG.md b/packages/vitest-pool-workers/CHANGELOG.md index d103edd5c4..0c3b84f49e 100644 --- a/packages/vitest-pool-workers/CHANGELOG.md +++ b/packages/vitest-pool-workers/CHANGELOG.md @@ -1,5 +1,45 @@ # @cloudflare/vitest-pool-workers +## 0.13.5 + +### Patch Changes + +- [#13077](https://github.com/cloudflare/workers-sdk/pull/13077) [`11c77b7`](https://github.com/cloudflare/workers-sdk/commit/11c77b7e19340eec4c3cf34fd4c758bc2ac54fa0) Thanks [@penalosa](https://github.com/penalosa)! - fix: `runInDurableObject` now correctly returns redirect responses (3xx) from Durable Object callbacks instead of throwing "Expected callback for X" errors + +- [#13056](https://github.com/cloudflare/workers-sdk/pull/13056) [`8384743`](https://github.com/cloudflare/workers-sdk/commit/8384743fc2613a2cfb3ed8f936a74104dcc22b0b) Thanks [@penalosa](https://github.com/penalosa)! - fix: Support dynamic `import()` inside entrypoint and Durable Object handlers + + Previously, calling `exports.default.fetch()` or `SELF.fetch()` on a worker whose handler used a dynamic `import()` would hang and fail with "Cannot perform I/O on behalf of a different Durable Object". This happened because the module runner's transport — which communicates over a WebSocket owned by the runner Durable Object — was invoked from a different DO context. + + The fix patches the module runner's transport via the `onModuleRunner` hook so that all `invoke()` calls are routed through the runner DO's I/O context, regardless of where the `import()` originates. + +- [#13074](https://github.com/cloudflare/workers-sdk/pull/13074) [`4618c05`](https://github.com/cloudflare/workers-sdk/commit/4618c058493a65e74495e14a4b653b05d52689bf) Thanks [@penalosa](https://github.com/penalosa)! - fix: only apply module fallback extension probing for `require()`, not `import` + + The module fallback service previously tried adding `.js`, `.mjs`, `.cjs`, and `.json` suffixes to extensionless specifiers unconditionally. Per the Node.js spec, this extension-probing behaviour is specific to CommonJS `require()`. ESM `import` statements must include explicit file extensions. + + Extension-less TypeScript `import` specifiers continue to work correctly — they are resolved by Vite's resolver rather than the fallback's extension loop. + +- [#13073](https://github.com/cloudflare/workers-sdk/pull/13073) [`baec845`](https://github.com/cloudflare/workers-sdk/commit/baec845dbf60e6edc6be480e43bd1a701469d29d) Thanks [@penalosa](https://github.com/penalosa)! - Add `adminSecretsStore()` to `cloudflare:test` for seeding secrets in tests + + Secrets store bindings only expose a read-only `.get()` method, so there was previously no way to seed secret values from within a test. The new `adminSecretsStore()` helper returns Miniflare's admin API for a secrets store binding, giving tests full control over create, update, and delete operations. + + ```ts + import { adminSecretsStore } from "cloudflare:test"; + import { env } from "cloudflare:workers"; + + const admin = adminSecretsStore(env.MY_SECRET); + await admin.create("test-value"); + + const value = await env.MY_SECRET.get(); // "test-value" + ``` + +- [#13083](https://github.com/cloudflare/workers-sdk/pull/13083) [`cfd513f`](https://github.com/cloudflare/workers-sdk/commit/cfd513fb5910e990c24f7fde64a56d5b425bd095) Thanks [@penalosa](https://github.com/penalosa)! - Add a 30-second timeout to `waitUntil` promise draining to prevent hanging tests + + Previously, if a `ctx.waitUntil()` promise never resolved, the test suite would hang indefinitely after the test file finished. Now, any `waitUntil` promises that haven't settled within 30 seconds are abandoned with a warning, allowing the test suite to continue. This aligns with the [production `waitUntil` limit](https://developers.cloudflare.com/workers/platform/limits/#duration). + +- Updated dependencies [[`eeaa473`](https://github.com/cloudflare/workers-sdk/commit/eeaa47353c822b0e96fd892f2e3f957dba52715b), [`9fcdfca`](https://github.com/cloudflare/workers-sdk/commit/9fcdfca775d3d412abe7547d0833414599bab221), [`bc24ec8`](https://github.com/cloudflare/workers-sdk/commit/bc24ec81b9ed341dd165b7690f8602f6d738de0c), [`1faff35`](https://github.com/cloudflare/workers-sdk/commit/1faff35e9c84e40af882d15f7515c625d6f5ac95), [`0b4c21a`](https://github.com/cloudflare/workers-sdk/commit/0b4c21a3bf765f4c389c669dc44c8243f6889347), [`535582d`](https://github.com/cloudflare/workers-sdk/commit/535582d581613a3068a934ba0179d2cfde863359), [`992f9a3`](https://github.com/cloudflare/workers-sdk/commit/992f9a3ea15d14599faa573b8d49ee4d7f9e338a), [`f4ea4ac`](https://github.com/cloudflare/workers-sdk/commit/f4ea4accad70d6a55b648c610cfc806e5be36477), [`91b7f73`](https://github.com/cloudflare/workers-sdk/commit/91b7f73e3554e72d539ccd4034faaab1fb60b470), [`f6cdab2`](https://github.com/cloudflare/workers-sdk/commit/f6cdab206cff65e5db62998512676036edde6841), [`53ed15a`](https://github.com/cloudflare/workers-sdk/commit/53ed15afcd9680fc8f0236eacd054d3c34ac73e5), [`ce65246`](https://github.com/cloudflare/workers-sdk/commit/ce65246010eaa0ea3c4c0c74e228f6597cf4332c), [`7a5be20`](https://github.com/cloudflare/workers-sdk/commit/7a5be2078800426a9ef1f8520ef72a99d9847c16), [`6b50bfa`](https://github.com/cloudflare/workers-sdk/commit/6b50bfa58de4716ffb7125e0ec28a68e40b22ce1), [`0386553`](https://github.com/cloudflare/workers-sdk/commit/0386553d80ad10717f5294e8a5979af703cbcbf8), [`9c5ebf5`](https://github.com/cloudflare/workers-sdk/commit/9c5ebf56291199eeaec43513732fd3fa7fbd502d), [`53ed15a`](https://github.com/cloudflare/workers-sdk/commit/53ed15afcd9680fc8f0236eacd054d3c34ac73e5), [`53ed15a`](https://github.com/cloudflare/workers-sdk/commit/53ed15afcd9680fc8f0236eacd054d3c34ac73e5)]: + - wrangler@4.78.0 + - miniflare@4.20260317.3 + ## 0.13.4 ### Patch Changes diff --git a/packages/vitest-pool-workers/package.json b/packages/vitest-pool-workers/package.json index e752bb7edc..3889048020 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.4", + "version": "0.13.5", "description": "Workers Vitest integration for writing Vitest unit and integration tests that run inside the Workers runtime", "keywords": [ "cloudflare", diff --git a/packages/workers-utils/CHANGELOG.md b/packages/workers-utils/CHANGELOG.md index f14c4b90f1..50560cf528 100644 --- a/packages/workers-utils/CHANGELOG.md +++ b/packages/workers-utils/CHANGELOG.md @@ -1,5 +1,26 @@ # @cloudflare/workers-utils +## 0.14.0 + +### Minor Changes + +- [#13027](https://github.com/cloudflare/workers-sdk/pull/13027) [`9fcdfca`](https://github.com/cloudflare/workers-sdk/commit/9fcdfca775d3d412abe7547d0833414599bab221) Thanks [@G4brym](https://github.com/G4brym)! - feat: Add `ai_search_namespaces` and `ai_search` binding types + + Two new binding types for AI Search: + + - `ai_search_namespaces`: Namespace binding — `namespace` is required and auto-provisioned at deploy time if it doesn't exist (like R2 buckets) + - `ai_search`: Single instance binding bound directly to a pre-existing instance in the default namespace + + Both are remote-only in local dev. + +### Patch Changes + +- [#13018](https://github.com/cloudflare/workers-sdk/pull/13018) [`9c5ebf5`](https://github.com/cloudflare/workers-sdk/commit/9c5ebf56291199eeaec43513732fd3fa7fbd502d) Thanks [@tgarg-cf](https://github.com/tgarg-cf)! - Validate that queue consumers in wrangler config only use the "worker" type + + Previously, non-worker consumer types (e.g. `http_pull`) could be specified in the `queues.consumers` config. Now, wrangler will error if a consumer `type` other than `"worker"` is specified in the config file. + + To configure non-worker consumer types, use the `wrangler queues consumer` CLI commands instead (e.g. `wrangler queues consumer http-pull add`). + ## 0.13.0 ### Minor Changes diff --git a/packages/workers-utils/package.json b/packages/workers-utils/package.json index af2992bad0..4155ef0638 100644 --- a/packages/workers-utils/package.json +++ b/packages/workers-utils/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/workers-utils", - "version": "0.13.0", + "version": "0.14.0", "private": true, "description": "Utility package for common Worker operations", "homepage": "https://github.com/cloudflare/workers-sdk#readme", diff --git a/packages/wrangler/CHANGELOG.md b/packages/wrangler/CHANGELOG.md index 9aa93370e2..bbcf61389f 100644 --- a/packages/wrangler/CHANGELOG.md +++ b/packages/wrangler/CHANGELOG.md @@ -1,5 +1,160 @@ # wrangler +## 4.78.0 + +### Minor Changes + +- [#13031](https://github.com/cloudflare/workers-sdk/pull/13031) [`eeaa473`](https://github.com/cloudflare/workers-sdk/commit/eeaa47353c822b0e96fd892f2e3f957dba52715b) Thanks [@WalshyDev](https://github.com/WalshyDev)! - Add support for Cloudflare Access Service Token authentication via environment variables + + When running `wrangler dev` with remote bindings behind a Cloudflare Access-protected domain, Wrangler previously required `cloudflared access login` which opens a browser for interactive authentication. This does not work in CI/CD environments. + + You can now set the `CLOUDFLARE_ACCESS_CLIENT_ID` and `CLOUDFLARE_ACCESS_CLIENT_SECRET` environment variables to authenticate using an Access Service Token instead: + + ```sh + export CLOUDFLARE_ACCESS_CLIENT_ID=".access" + export CLOUDFLARE_ACCESS_CLIENT_SECRET="" + wrangler dev + ``` + + Additionally, when running in a non-interactive environment (CI) without these credentials, Wrangler now throws a clear, actionable error instead of hanging on `cloudflared access login`. + +- [#13027](https://github.com/cloudflare/workers-sdk/pull/13027) [`9fcdfca`](https://github.com/cloudflare/workers-sdk/commit/9fcdfca775d3d412abe7547d0833414599bab221) Thanks [@G4brym](https://github.com/G4brym)! - feat: Add `ai_search_namespaces` and `ai_search` binding types + + Two new binding types for AI Search: + + - `ai_search_namespaces`: Namespace binding — `namespace` is required and auto-provisioned at deploy time if it doesn't exist (like R2 buckets) + - `ai_search`: Single instance binding bound directly to a pre-existing instance in the default namespace + + Both are remote-only in local dev. + +- [#12874](https://github.com/cloudflare/workers-sdk/pull/12874) [`53ed15a`](https://github.com/cloudflare/workers-sdk/commit/53ed15afcd9680fc8f0236eacd054d3c34ac73e5) Thanks [@xortive](https://github.com/xortive)! - Add Workers VPC service support for Hyperdrive origins + + Hyperdrive configs can now connect to databases through Workers VPC services using the `--service-id` option: + + ```bash + wrangler hyperdrive create my-config --service-id --database mydb --user myuser --password mypassword + ``` + + This enables Hyperdrive to connect to databases hosted in private networks that are accessible through Workers VPC TCP services. + +- [#12852](https://github.com/cloudflare/workers-sdk/pull/12852) [`6b50bfa`](https://github.com/cloudflare/workers-sdk/commit/6b50bfa58de4716ffb7125e0ec28a68e40b22ce1) Thanks [@Carolx715](https://github.com/Carolx715)! - Add interactive data catalog validation to R2 object and lifecycle commands. + + When performing R2 operations that could affect data catalog state (object put, object delete, lifecycle add, lifecycle set), Wrangler now validates with the API and prompts users for confirmation if a conflict is detected. For bulk put operations, Wrangler prompts upfront before starting the batch. Users can bypass prompts with `--force` (`-y`). In non-interactive/CI environments, the operation proceeds automatically. + +- [#13030](https://github.com/cloudflare/workers-sdk/pull/13030) [`0386553`](https://github.com/cloudflare/workers-sdk/commit/0386553d80ad10717f5294e8a5979af703cbcbf8) Thanks [@natewong1313](https://github.com/natewong1313)! - Add local mode support for Stream bindings + + Miniflare and `wrangler dev` now support using [Cloudflare Stream](https://developers.cloudflare.com/stream/) bindings locally. + + Supported operations: + + - `upload()` — upload video via URL + - `video(id).details()`, `.update()`, `.delete()`, `.generateToken()` + - `videos.list()` + - `captions.generate()`, `.list()`, `.delete()` + - `downloads.generate()`, `.get()`, `.delete()` + - `watermarks.generate()`, `.list()`, `.get()`, `.delete()` + + The following are not yet supported in local mode and will throw: + + - `createDirectUpload()` + - Caption upload via `File` + - Watermark generation via `File` + + Data is persisted across restarts by default. You must set `streamPersist: false` in Miniflare options to disable persistence. + +- [#12874](https://github.com/cloudflare/workers-sdk/pull/12874) [`53ed15a`](https://github.com/cloudflare/workers-sdk/commit/53ed15afcd9680fc8f0236eacd054d3c34ac73e5) Thanks [@xortive](https://github.com/xortive)! - Add `--cert-verification-mode` option to `wrangler vpc service create` and `wrangler vpc service update` + + You can now configure the TLS certificate verification mode when creating or updating a VPC connectivity service. This controls how the connection to the origin server verifies TLS certificates. + + Available modes: + + - `verify_full` (default) -- verify certificate chain and hostname + - `verify_ca` -- verify certificate chain only, skip hostname check + - `disabled` -- do not verify the server certificate at all + + ```sh + wrangler vpc service create my-service --type tcp --tcp-port 5432 --ipv4 10.0.0.1 --tunnel-id --cert-verification-mode verify_ca + ``` + + This applies to both TCP and HTTP VPC service types. When omitted, the default `verify_full` behavior is used. + +- [#12874](https://github.com/cloudflare/workers-sdk/pull/12874) [`53ed15a`](https://github.com/cloudflare/workers-sdk/commit/53ed15afcd9680fc8f0236eacd054d3c34ac73e5) Thanks [@xortive](https://github.com/xortive)! - Add TCP service type support for Workers VPC + + You can now create TCP services in Workers VPC using the `--type tcp` option: + + ```bash + wrangler vpc service create my-db --type tcp --tcp-port 5432 --ipv4 10.0.0.1 --tunnel-id + ``` + + This enables exposing TCP-based services like PostgreSQL, MySQL, and other database servers through Workers VPC. + +### Patch Changes + +- [#13039](https://github.com/cloudflare/workers-sdk/pull/13039) [`bc24ec8`](https://github.com/cloudflare/workers-sdk/commit/bc24ec81b9ed341dd165b7690f8602f6d738de0c) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix: Angular auto-config now correctly handles projects without SSR configured + + Previously, running `wrangler deploy` (or `wrangler setup`) on a plain Angular SPA (created with `ng new` without `--ssr`) would crash with `Cannot set properties of undefined (setting 'experimentalPlatform')`, because the auto-config code unconditionally assumed SSR was configured. + + Angular projects without SSR are now treated as assets-only deployments: no `wrangler.jsonc` `main` entry is generated, `angular.json` is not modified, no `src/server.ts` is created, and no extra dependencies are installed. + +- [#13036](https://github.com/cloudflare/workers-sdk/pull/13036) [`0b4c21a`](https://github.com/cloudflare/workers-sdk/commit/0b4c21a3bf765f4c389c669dc44c8243f6889347) Thanks [@pbrowne011](https://github.com/pbrowne011)! - Fix `wrangler deploy --dry-run` skipping asset build-artifact validation checks + + Previously, `--dry-run` skipped the entire asset sync step, which meant it also skipped validation that runs during asset manifest building. This included the check that errors when a `_worker.js` file or directory would be uploaded as a public static asset (which can expose private server-side code), as well as the per-file size limit check. + + With this fix, `--dry-run` now runs `buildAssetManifest` against the asset directory when assets are configured, performing the same file-system validation as a real deploy without uploading anything or making any API calls. + +- [#13061](https://github.com/cloudflare/workers-sdk/pull/13061) [`535582d`](https://github.com/cloudflare/workers-sdk/commit/535582d581613a3068a934ba0179d2cfde863359) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix: resolve secondary worker types when environment overrides the worker name in multi-worker type generation + + When running `wrangler types` with multiple `-c` config flags and the secondary worker has named environments that override the worker name (e.g. a worker named `do-worker` with env `staging` whose effective name becomes `do-worker-staging`), service bindings and Durable Object bindings in the primary worker that reference `do-worker-staging` now correctly resolve to the typed entry point instead of falling back to an unresolved comment type such as `DurableObjectNamespace /* MyClass from do-worker-staging */`. + + The fix extends the secondary entries map to also register environment-specific worker names, so that lookups by the env-qualified name (e.g. `do-worker-staging`) resolve to the same source file as the base worker name. + +- [#13058](https://github.com/cloudflare/workers-sdk/pull/13058) [`992f9a3`](https://github.com/cloudflare/workers-sdk/commit/992f9a3ea15d14599faa573b8d49ee4d7f9e338a) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix: patch undici to prevent fetch() throwing on 401 responses with a request body + + Fetching with a request body (string, JSON, FormData, etc.) to an endpoint that returns a 401 would throw `TypeError: fetch failed` with cause `expected non-null body source`. This affected `Unstable_DevWorker.fetch()` and any other use of undici's fetch in wrangler. + + The root cause is `isTraversableNavigable()` in undici returning `true` unconditionally, causing the 401 credential-retry logic to run in Node.js where it should never apply (there is no browser UI to prompt for credentials). This is tracked upstream in [nodejs/undici#4910](https://github.com/nodejs/undici/issues/4910). Until an upstream fix is released, we apply a patch to undici that returns `false` from `isTraversableNavigable()`. + +- [#13017](https://github.com/cloudflare/workers-sdk/pull/13017) [`91b7f73`](https://github.com/cloudflare/workers-sdk/commit/91b7f73e3554e72d539ccd4034faaab1fb60b470) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix: prevent Docker container builds from spawning console windows on Windows + + On Windows, `detached: true` in `child_process.spawn()` gives each child process its own visible console window, causing many windows to flash open during `wrangler deploy` with `[[containers]]`. The `detached` option is now only set on non-Windows platforms (where it is needed for process group cleanup), and `windowsHide: true` is added to further suppress console windows on Windows. + +- [#12996](https://github.com/cloudflare/workers-sdk/pull/12996) [`f6cdab2`](https://github.com/cloudflare/workers-sdk/commit/f6cdab206cff65e5db62998512676036edde6841) Thanks [@guybedford](https://github.com/guybedford)! - Fix source phase imports in bundled and non-bundled Workers + + Wrangler now preserves `import source` syntax when it runs esbuild, including module format detection and bundled deploy output. This fixes both `--no-bundle` and bundled deployments for Workers that import WebAssembly using source phase imports. + +- [#12931](https://github.com/cloudflare/workers-sdk/pull/12931) [`ce65246`](https://github.com/cloudflare/workers-sdk/commit/ce65246010eaa0ea3c4c0c74e228f6597cf4332c) Thanks [@dario-piotrowicz](https://github.com/dario-piotrowicz)! - Improve error message when modules cannot be resolved during bundling + + When a module cannot be resolved during bundling, Wrangler now suggests using the `alias` configuration option to substitute it with an alternative implementation. This replaces esbuild's default suggestion to "mark the path as external", which is not a supported option in Wrangler. + + For example, if you try to import a module that doesn't exist: + + ```js + import foo from "some-missing-module"; + ``` + + Wrangler will now suggest: + + ``` + To fix this, you can add an entry to "alias" in your Wrangler configuration + to substitute "some-missing-module" with an alternative implementation. + See https://developers.cloudflare.com/workers/wrangler/configuration/#bundling-issues + ``` + + This provides actionable guidance for resolving import errors. + +- [#13049](https://github.com/cloudflare/workers-sdk/pull/13049) [`7a5be20`](https://github.com/cloudflare/workers-sdk/commit/7a5be2078800426a9ef1f8520ef72a99d9847c16) Thanks [@nikitassharma](https://github.com/nikitassharma)! - add library-push flag to containers registries credentials + + This flag is not available for public use. + +- [#13018](https://github.com/cloudflare/workers-sdk/pull/13018) [`9c5ebf5`](https://github.com/cloudflare/workers-sdk/commit/9c5ebf56291199eeaec43513732fd3fa7fbd502d) Thanks [@tgarg-cf](https://github.com/tgarg-cf)! - Validate that queue consumers in wrangler config only use the "worker" type + + Previously, non-worker consumer types (e.g. `http_pull`) could be specified in the `queues.consumers` config. Now, wrangler will error if a consumer `type` other than `"worker"` is specified in the config file. + + To configure non-worker consumer types, use the `wrangler queues consumer` CLI commands instead (e.g. `wrangler queues consumer http-pull add`). + +- Updated dependencies [[`9fcdfca`](https://github.com/cloudflare/workers-sdk/commit/9fcdfca775d3d412abe7547d0833414599bab221), [`1faff35`](https://github.com/cloudflare/workers-sdk/commit/1faff35e9c84e40af882d15f7515c625d6f5ac95), [`f4ea4ac`](https://github.com/cloudflare/workers-sdk/commit/f4ea4accad70d6a55b648c610cfc806e5be36477), [`0386553`](https://github.com/cloudflare/workers-sdk/commit/0386553d80ad10717f5294e8a5979af703cbcbf8)]: + - miniflare@4.20260317.3 + ## 4.77.0 ### Minor Changes diff --git a/packages/wrangler/package.json b/packages/wrangler/package.json index a5d526d21d..ddefce4273 100644 --- a/packages/wrangler/package.json +++ b/packages/wrangler/package.json @@ -1,6 +1,6 @@ { "name": "wrangler", - "version": "4.77.0", + "version": "4.78.0", "description": "Command-line interface for all things Cloudflare Workers", "keywords": [ "assembly",