Change8

wrangler@4.66.0

📦 cloudflare-workersView on GitHub →
4 features🐛 4 fixes🔧 5 symbols

Summary

This release introduces enhanced cache directory detection for better package manager compatibility and adds `--tag`/`--message` support to `wrangler deploy`. Several bugs related to local AI Search bindings and Vite autoconfig parsing were also resolved.

✨ New Features

  • Added support for `--tag` and `--message` flags on `wrangler deploy`, mirroring behavior of `wrangler versions upload`.
  • Wrangler now uses smart cache directory detection via the `WRANGLER_CACHE_DIR` environment variable or by checking common locations, improving compatibility with Yarn PnP and pnpm.
  • The `nodejs_compat` flag is now always included during autoconfiguration to ensure Node.js compatibility features are enabled by default.
  • Wrangler autoconfig setup now supports function-based Vite configurations (e.g., `defineConfig(() => ({...}))`) when adding the Cloudflare Vite plugin.

🐛 Bug Fixes

  • Fixed an issue where AI Search bindings failed during local development (`wrangler dev`) with an RPC stub error.
  • Fixed port availability checking logic in `memoizeGetPort` to correctly probe the requested host when the host changes, preventing bind failures.
  • Fixed an issue where autoconfig creating a new `.assetsignore` file added unnecessary leading empty lines.
  • Improved the error message when port binding fails due to sandbox or security policy restrictions during `wrangler dev`, providing clearer context than a generic permission error.

Affected Symbols