Change8

wrangler@4.57.0

Breaking Changes
📦 cloudflare-workersView on GitHub →
2 breaking8 features🐛 4 fixes🔧 9 symbols

Summary

This release introduces several quality-of-life improvements, including a new command to retrieve auth tokens, automatic type generation during local development, and enhanced autoconfiguration support for frameworks like Waku and Vike. It also removes the deprecated `observability.logging` field for containers.

⚠️ Breaking Changes

  • The deprecated containers `observability.logging` field has been dropped from configuration. Users relying on this field must remove it from their `wrangler.toml`.
  • The `wrangler r2 bucket catalog snapshot-expiration enable` command now sends corrected field names to the Cloudflare API. If you were relying on the old, incorrect field names being accepted by the API (which resulted in a 422 error), you must update your usage or expectations. The CLI options `--older-than-days` and `--retain-last` now map to `max_snapshot_age` (as duration string, e.g., "30d") and `min_snapshots_to_keep` respectively.

Migration Steps

  1. If you were using the deprecated `observability.logging` field in your container configuration, remove it from `wrangler.toml`.
  2. If you rely on `wrangler deploy` for open-next projects without autoconfig, ensure you are not accidentally relying on implicit delegation; if you need autoconfig behavior, use `--x-autoconfig`.

✨ New Features

  • Added `wrangler auth token` command to retrieve the current authentication credentials, optionally with structured JSON output using `--json`.
  • Added support for configuring SSH trusted user CA keys in Wrangler via `[[containers.trusted_user_ca_keys]]` in `wrangler.toml`.
  • Added type generation support to `wrangler dev` via the `--types` flag or setting `dev.generate_types: true` in `wrangler.toml`.
  • Added hidden CLI flags (`--no-completion-message`, `--no-install-wrangler`) to `wrangler setup` for suppressing output/installation.
  • Added analytics properties to secret management commands (`wrangler secret put`, `wrangler secret bulk`, etc.) for usage insights.
  • Added default `Text` module rule for `.sql` files, enabling direct importing without extra configuration.
  • Added autoconfiguration support for Waku.
  • Added autoconfiguration support for Vike.

🐛 Bug Fixes

  • Fixed autoconfig handling for Next.js apps using CJS config files (`next.config.cjs`) or incompatible Next.js versions by using dynamic imports and forced installation.
  • Updated `wrangler deploy` to delegate to `opennextjs-cloudflare deploy` only when the `--x-autoconfig` flag is explicitly used, resolving issues where delegation occurred unintentionally.
  • Fixed R2 Data Catalog snapshot-expiration API field names sent by `wrangler r2 bucket catalog snapshot-expiration enable` command (mapping CLI options to correct API fields: `--older-than-days` -> `max_snapshot_age`, `--retain-last` -> `min_snapshots_to_keep`).
  • Display a warning when authentication errors occur and the `account_id` in Wrangler configuration does not match any authenticated accounts, aiding in configuration issue diagnosis.

🔧 Affected Symbols

wrangler auth tokenwrangler setupwrangler devwrangler secret putwrangler secret bulkwrangler r2 bucket catalog snapshot-expiration enablewrangler deploycontainers.trusted_user_ca_keysobservability.logging