wrangler@4.65.0
📦 cloudflare-workersView on GitHub →
✨ 3 features🐛 5 fixes🔧 7 symbols
Summary
This release enhances local development parity by injecting Cloudflare Pages environment variables into `wrangler pages dev` and improves CLI usability with JSON output for `wrangler whoami`. Several bug fixes address package manager detection in autoconfig and proxy handling for localhost requests.
Migration Steps
- When deleting a KV namespace, you can now use `wrangler kv namespace delete my-namespace` instead of relying solely on ID or binding flags.
- If you rely on parsing text output from `wrangler whoami` in scripts, update scripts to use `wrangler whoami --json` and parse the resulting JSON structure.
✨ New Features
- Add CF_PAGES environment variables to `wrangler pages dev` to improve dev/prod parity, setting CF_PAGES="1", CF_PAGES_BRANCH (current git branch or "local"), CF_PAGES_COMMIT_SHA (current git SHA or placeholder), and CF_PAGES_URL (simulated preview URL).
- Allow deleting a KV namespace by providing its name as a positional argument to `wrangler kv namespace delete <name>`.
- Add `--json` flag to `wrangler whoami` for machine-readable output containing authentication status, auth type, email, accounts, and token permissions.
🐛 Bug Fixes
- Fix `wrangler setup` to correctly detect and use the project's package manager based on lockfiles or package.json field, resolving issues in pnpm/yarn workspace projects.
- Fix spurious config diffs when comparing local and remote Worker configurations by reordering remote binding arrays (like kv_namespaces) to match the local config's order before comparison.
- Fix remote proxy sessions' logs not being silenced when the wrangler log level is set to "none".
- Fix `wrangler deploy --x-autoconfig` failing for pnpm-based Next.js projects by changing the OpenNext autoconfig command override from scoped package name (`@opennextjs/cloudflare`) to unscoped binary name (`opennextjs-cloudflare`).
- Stop proxying localhost requests when `HTTP_PROXY` or `HTTPS_PROXY` environment variables are set by switching to undici's `EnvHttpProxyAgent`, which respects a default `NO_PROXY` list including `localhost,127.0.0.1,::1`.