github cloudflare/workers-sdk wrangler@4.131.0

latest release: @cloudflare/cli-shared-helpers@0.1.29
4 hours ago

Minor Changes

  • #15480 36aed7f Thanks @skepticfx! - Add Durable Object-managed Containers to top-level container configuration

    Wrangler now accepts scheduling_policy: "durable_object" in the top-level containers array and creates its namespace-backed application after the Worker upload resolves the Durable Object namespace ID. The namespace ID is also the application ID, so repeated deploys idempotently ensure the same application without name-based lookup, modification, or a Containers rollout.

    Durable Object-managed entries accept class_name, scheduling_policy, an optional name, and an optional named images map. Scheduler-only fields are rejected. Each image provides either a local dockerfile or a digest-pinned managed-registry image. Wrangler builds or resolves each image, waits while Cloudflare prepares it for the Containers runtime, and uploads the resulting references with the Worker version for access through ctx.container.images and env.EXPERIMENTAL_CLOUDFLARE_CONTAINER_IMAGES. Local development support for these entries is deferred to a follow-up.

    Existing scheduler-backed entries and Durable Object migrations continue to work unchanged.

    With --containers-rollout=none, existing Workers retain their deployed Container metadata and image binding even when local containers is omitted or empty; local scheduler edits are also ignored. The upload stops if the deployed versions cannot be recovered. Existing Workers for Platforms dispatch scripts reject this flag before upload because their API does not expose enough metadata to preserve Container associations safely. First deployments can still skip Container preparation and rollout. Without this flag, removing managed Containers, including by omitting containers entirely, clears the experimental image binding even with keep_vars.

    versions deploy validates the selected versions before changing traffic and creates their Durable Object-managed applications only after deployment succeeds. Both deploy and versions deploy report partial completion if application creation fails afterward, with instructions to retry the same command.

    EXPERIMENTAL_CLOUDFLARE_CONTAINER_IMAGES is a temporary, reserved Wrangler binding until native Container image metadata is available. Its class keys identify managed applications during versions deploy, including classes with empty image maps. User configuration cannot declare a binding with this name; existing versions that already use it are treated as Container configuration.

  • #15493 493e635 Thanks @GregBrimble! - Remove wrangler preview settings commands

    The private-beta wrangler preview settings and wrangler preview settings update commands are no longer available.

Patch Changes

  • #15411 0b43395 Thanks @xgame92! - Fail wrangler versions upload early when a Worker has a pending Durable Object migration

    Wrangler now directs users to run wrangler deploy to apply the migration instead of sending a version upload request that the API will reject.

  • #15518 9d75006 Thanks @taylorlee! - Detect named-only module Worker entrypoints correctly

    Wrangler now distinguishes named-only module Workers from legacy Service Workers that happen to have named exports. A default export identifies a module Worker; otherwise, legacy addEventListener registration identifies Service Worker format.

  • #15581 b605aa6 Thanks @MattieTK! - Correct Pages-to-Workers delegation analytics for forced and ineligible commands

    The legacy forced result counted every agent-driven Pages command using --force, including commands that could never have been delegated. Wrangler now emits eligible_forced only when --force prevents an otherwise eligible delegation, and records other agent commands as ineligible with a bounded reason and whether force was used.

  • #15432 f45b596 Thanks @razethion! - Prevent delayed internal errors from fetch-only remote bindings

    Fetch-only remote bindings such as D1 and R2 previously opened an unused WebSocket RPC session. RPC sessions are now created only when an RPC method is called.

  • #15585 f69f95a Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"

    The following dependency versions have been updated:

    Dependency From To
    @cloudflare/workers-types ^5.20260908.1 ^5.20260910.1
    workerd 1.20260908.1 1.20260910.1
  • #15554 bff525d Thanks @XiaoZ-0218! - Add the missing transferred_classes migration to the config schema

    DurableObjectMigration described new_classes, new_sqlite_classes, renamed_classes and deleted_classes, but not transferred_classes. normalizeAndValidateConfig has always validated that key, and the deploy path forwards it to the API along with the rest of the step, so Transfer migrations worked — but config-schema.json is generated from the type, so an editor resolving $schema reported a valid, documented migration as an unknown key.

    Adding the field to the type puts it in the generated schema. No runtime change.

  • #15584 96688b3 Thanks @Svector-anu! - Bump shell-quote to 1.9.0+ to pick up two disclosed advisories

    shell-quote@1.8.1 is affected by a ReDoS in parse() (CVE-2026-13311 / GHSA-395f-4hp3-45gv — an unauthenticated attacker who can feed a string into parse() can block the event loop for tens of seconds with plain space-separated input, no shell metacharacters required) and by an object-token escaping bug in quote() (CVE-2026-9277 / GHSA-w7jw-789q-3m8p), both fixed upstream in 1.9.0. Wrangler's parse() wrapper (src/utils/shell-quote.ts) is reachable from pages dev/init command-line parsing, so the ReDoS applies; the quote() call site only ever passes string arguments, so the object-token issue was not reachable here, but there is no reason to stay on a vulnerable range once a patch exists.

  • #15563 ed5797a Thanks @Bortlesboat! - Encode filenames in Pages HTML redirects

    Fix wrangler pages dev returning a 502 response when redirecting HTML paths containing Unicode characters. Keep reserved characters in filenames encoded in the redirect destination and preserve the request query string.

  • #14889 128235a Thanks @chinesepowered! - Fix wrangler types --strict-vars=false emitting invalid TypeScript for an empty array var

    A var whose value was an empty array produced ()[], which is a syntax error. Because this lands in the generated worker-configuration.d.ts, it did not just break that one line — the whole file failed to parse, so no binding types resolved at all. An empty array now generates unknown[].

  • #15494 f8aea7e Thanks @GregBrimble! - Use previews_base_config for Preview configuration

    Preview commands now read the Worker Previews Base configuration from the previews_base_config API field.

  • #15569 24ef86b Thanks @RealBhupesh! - Fix wrangler workflows instances describe crashing on dynamic retry delays

    The Workflows API serializes function retry delays as "[dynamic]". The describe command previously parsed that as a duration, produced an Invalid Date, and threw RangeError: Invalid time value before printing remaining steps. It now renders unknown (dynamic delay) and also tolerates attempts whose end timestamp is missing.

  • Updated dependencies [f45b596, f69f95a, a549e58, dbb3ff4, fea3cd0, 6bd7b6c, 15cd6e1, be1caec, dbc9506]:

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.