wrangler@4.59.3
📦 cloudflare-workersView on GitHub →
🐛 8 fixes🔧 5 symbols
Summary
This patch release fixes several bugs related to login configuration, error reporting, redirect validation, and configuration file naming. It also improves user experience by providing clearer error messages and optimizing account selection prompts.
Migration Steps
- When running `wrangler delete`, use the worker name as a positional argument: `wrangler delete my-worker`. The old `--name` flag is still accepted for backwards compatibility, but the positional argument is now `name` instead of `script`.
🐛 Bug Fixes
- Fixed `wrangler login` when using custom `callback-host`/`callback-port` by ensuring the OAuth API always uses `localhost:8976` as the redirect_uri, requiring users to map external ports to 8976 if running in environments like Docker.
- Improved telemetry error reporting for `wrangler init` when delegating to C3 by including C3 execution output in Sentry reports.
- Added helpful messages for file not found errors (`ENOENT`) displayed to users, showing the missing file path and common causes, instead of reporting to Sentry.
- Fixed a false positive infinite loop detection in redirect validation that incorrectly flagged exact path redirects (e.g., `/ /index.html 200`) as loops, allowing valid configurations where `html_handling` is set to "none".
- Fixed `configFileName` returning the wrong filename (`wrangler.json`) when using `.jsonc` configuration files (e.g., `wrangler.jsonc`).
- Included version components (`wranglerMajorVersion`, `wranglerMinorVersion`, `wranglerPatchVersion`) in command event metrics (`wrangler command started`, `wrangler command completed`, `wrangler command errored`).
- Improved error message when creating a duplicate KV namespace, providing a user-friendly message instead of a generic API error, and suggesting listing existing namespaces.
- Cached the chosen account in memory to prevent repeated account selection prompts during a single command execution when running Wrangler via `npx` without an existing cache directory.