github cloudflare/workers-sdk wrangler@4.59.3

8 hours ago

Patch Changes

  • #9396 75386b1 Thanks @gnekich! - Fix wrangler login with custom callback-host/callback-port

    The Cloudflare OAuth API always requires the redirect_uri to be localhost:8976. However, sometimes the Wrangler OAuth server needed to listen on a different host/port, for example when running from inside a container. We were previously incorrectly setting the redirect_uri to the configured callback host/port, but it needs to be up to the user to map localhost:8976 to the Wrangler OAuth server in the container.

    Example:

    You might run Wrangler inside a docker container like this: docker run -p 8989:8976 <image>, which forwards port 8976 on your host to 8989 inside the container.

    Then inside the container, run wrangler login --callback-host=0.0.0.0 --callback-port=8989

    The OAuth link still has a redirect_uri set tolocalhost:8976. For example https://dash.cloudflare.com/oauth2/auth?...&redirect_uri=http%3A%2F%2Flocalhost%3A8976%2Foauth%2Fcallback&...

    However the redirect to localhost:8976 is then forwarded to the Wrangler OAuth server inside your container, allowing the login to complete.

  • #11925 8e4a0e5 Thanks @dependabot! - chore: update dependencies of "miniflare", "wrangler"

    The following dependency versions have been updated:

    Dependency From To
    workerd 1.20260114.0 1.20260115.0
  • #11942 133bf95 Thanks @penalosa! - chore: update dependencies of "miniflare", "wrangler"

    The following dependency versions have been updated:

    Dependency From To
    workerd 1.20260115.0 1.20260116.0
  • #11922 93d8d78 Thanks @dario-piotrowicz! - Improve telemetry errors being sent to Sentry by wrangler init when it delegates to C3 by ensuring that they contain the output of the C3 execution.

  • #11940 69ff962 Thanks @penalosa! - Show helpful messages for file not found errors (ENOENT)

    When users encounter file not found errors, Wrangler now displays a helpful message with the missing file path and common causes, instead of reporting to Sentry.

  • #11904 22727c2 Thanks @danielrs! - Fix false positive infinite loop detection for exact path redirects

    Fixed an issue where the redirect validation incorrectly flagged exact path redirects like / /index.html 200 as infinite loops. This was particularly problematic when html_handling is set to "none", where such redirects are valid.

    The fix makes the validation more specific to only block wildcard patterns (like /* /index.html) that would actually cause infinite loops, while allowing exact path matches that are valid in certain configurations.

    Fixes: #11824

  • #11946 fa39a73 Thanks @MattieTK! - Fix configFileName returning wrong filename for .jsonc config files

    Previously, users with a wrangler.jsonc config file would see error messages and hints referring to wrangler.json instead of wrangler.jsonc. This was because the configFormat function collapsed both .json and .jsonc files into a single "jsonc" value, losing the distinction between them.

    Now configFormat returns "json" for .json files and "jsonc" for .jsonc files, allowing configFileName to return the correct filename for each format.

  • #11968 4ac7c82 Thanks @MattieTK! - fix: include version components in command event metrics

    Adds wranglerMajorVersion, wranglerMinorVersion, and wranglerPatchVersion to command events (wrangler command started, wrangler command completed, wrangler command errored). These properties were previously only included in adhoc events.

  • #11940 69ff962 Thanks @penalosa! - Improve error message when creating duplicate KV namespace

    When attempting to create a KV namespace with a title that already exists, Wrangler now provides a clear, user-friendly error message instead of the generic API error. The new message explains that the namespace already exists and suggests running wrangler kv namespace list to see existing namespaces with their IDs, or choosing a different namespace name.

  • #11962 029531a Thanks @dario-piotrowicz! - Cache chosen account in memory to avoid repeated prompts

    When users have multiple accounts and no node_modules directory exists for file caching, Wrangler (run via npx and equivalent commands) would prompt for account selection multiple times during a single command. Now the selected account is also stored in process memory, preventing duplicate prompts and potential issues from inconsistent account choices.

  • #11964 d58fbd1 Thanks @dario-piotrowicz! - Make name the positional argument for wrangler delete instead of script

    The script argument was meaningless for the delete command since it deletes by worker name, not by entry point path. The name argument is now accepted as a positional argument, allowing users to run wrangler delete my-worker instead of wrangler delete --name my-worker. The script argument is now hidden but still accepted for backwards compatibility.

  • #11967 202c59e Thanks @emily-shen! - chore: update undici

    The following dependency versions have been updated:

    Dependency From To
    undici 7.14.0 7.18.2
  • #11940 69ff962 Thanks @penalosa! - Improve error handling for Vite config transformations

    Replace assertions with proper error handling when transforming Vite configs. When Wrangler encounters a Vite config that uses a function or lacks a plugins array, it now provides clear, actionable error messages instead of crashing with assertion failures. The check function gracefully skips incompatible configs with debug logging.

  • Updated dependencies [8e4a0e5, 133bf95, 202c59e, 133bf95, 25e2c60]:

    • miniflare@4.20260116.0

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.