wrangler@4.156.0
Summary
Minor Changes #16532 25802bc Thanks @simonha9 ! - Allow the experimental wrangler d1 insights command to run across every D1 database in the account The database name is now optional. With no name, the command returns the top queries across every D1 database in the account, and each result gains a databaseId field. Patch Changes #16369 ec0bea4 Thanks @MattieTK ! - Stop autoconfig in non-interactive runs when a project root holds both static files and a Pages functions directory When a project without a detected framework has a functions directory, autoconfig asks whether it is a Cloudflare Pages project. Non-interactive runs (CI and coding agents) assume it is not and continue as a static site. When the static files are in the project root, that deploys the root as static assets, and the Pages Functions (the project's API routes) are not deployed. In that case autoconfig now stops with an error explaining that Pages Functions cannot be migrated automatically yet. For Pages Functions it suggests moving the static files into a subdirectory and deploying with wrangler pages deploy , or migrating the Functions to a Worker; for a functions directory that is not Pages Functions, it suggests moving the static files into a subdirectory or adding a configuration file. Projects whose static files are already in a subdirectory, projects detected as Pages or with a detected framework, and interactive runs where the user answers the prompt are unaffected. #16367 b4653b4 Thanks @MattieTK ! - Write a protective .assetsignore when autoconfig uses the project root as the static assets directory Autoconfig is meant to write an .assetsignore when the project root itself is the assets directory, so that local files are not uploaded as public assets. The check compared the detected output directory, which is relative ( "." ), with the absolute project path, so it never matched and no .assetsignore was written. A static project with an index.html at its root (for example after wrangler setup or a zero-config wrangler deploy ) then uploaded files such as .env , .dev.vars , .git and node_modules as public assets. The check now resolves the assets directory that the generated configuration uses and compares it with the project root, so frameworks that set their own build output directory (such as Nuxt or SvelteKit) do not get an unused root .assetsignore . The generated .assetsignore also covers what a Cloudflare Pages upload skips, alongside the existing .wrangler , .dev.vars* and .env* entries: /_worker.js , /_routes.json and /functions at the root (so nested paths such as blog/functions/index.html are still uploaded), node_modules , .git and .DS_Store at any depth, and .npmrc . If an existing .assetsignore only lists a narrower pattern such as .env , .env* is added so that files like .env.production are skipped too. When the project root of an assets-only project contains a Pages functions directory or _worker.js , autoconfig now warns that it will not be deployed, since it is excluded from the assets and not run as server code. #16532 25802bc Thanks @simonha9 ! - Fail the experimental wrangler d1 insights command with an actionable error when the GraphQL Analytics API rejects the request Previously the command printed an empty [] . Rate limit errors now say how long to wait before retrying, and authorization errors name the "Account Analytics: Read" permission the API token needs. #16013 8b64bec Thanks @swalker326 ! - Fix Durable Object self-references in tests and container validation Durable Object bindings that explicitly name the Worker itself now resolve to the test runner in @cloudflare/vitest-plugin , for both cloudflare.config.ts and Wrangler configuration files. Named Wrangler environments use their effective Worker name, keeping bindings to the base Worker external. Container validation also accepts these self-references, using the effective deployment name to distinguish local and external bindings. Explicit binding targets remain intact during configuration conversion, so deploying with --name or a CI name override preserves the intended Durable Object target. Updated dependencies [ 15fbaed , d8899ac ]: miniflare@5.20261023.3-beta
Lotu Radar provides attributed news summaries and links to the original publisher. Full reporting and copyright remain with the source.