Wrangler Changelog
2024-07-26
3.67.1
#6312
67c611aThanks @emily-shen! - feat: add CLI flag and config key for experimental Workers + AssetsThis change adds a new experimental CLI flag (
--experimental-assets) and configuration key (experimental_assets) for the new Workers + Assets work.The new flag and configuration key are for the time being “inactive”, in the sense that no behaviour is attached to them yet. This will follow up in future work.
Updated dependencies [
b3c3cb8]:
2024-07-25
3.67.0
#4545
e5afae0Thanks @G4brym! - Remove experimental/beta constellation commands and binding, please migrate to Workers AI, learn more here https://developers.cloudflare.com/workers-ai/. This is not deemed a major version bump for Wrangler since these commands were never generally available.#6322
373248eThanks @IRCody! - Add cloudchamber scope to existing scopes instead of replacing them.When using any cloudchamber command the cloudchamber scope will now be added to the existing scopes instead of replacing them.
#6276
a432a13Thanks @CarmenPopoviciu! - feat: Add support forwrangler.jsoncThis commit adds support for
wrangler.jsoncconfig file for Workers. This feature is available behind the--experimental-json-configflag (just likewrangler.json).To use the new configuration file, add a
wrangler.jsoncfile to your Worker project and runwrangler dev --experimental-json-configorwrangler deploy --experimental-json-config.Please note that this work does NOT add
wrangler.jsonorwrangler.jsoncsupport for Pages projects!#6168
1ee41ffThanks @IRCody! - feature: Add list and remove subcommands to cloudchamber registries command.#6331
e6ada07Thanks @threepointone! - fix: only warn about miniflare feature support (ai, vectorize, cron) onceWe have some warnings in local mode dev when trying to use ai bindings / vectorize / cron, but they are printed every time the worker is started. This PR changes the warning to only be printed once per worker start.
2024-07-23
3.66.0
#6295
ebc85c3Thanks @andyjessop! - feat: introduce an experimental flag forwrangler typesto dynamically generate runtime types according to the user’s project configuration.#6272
084d39eThanks @emily-shen! - fix: addlegacy-assetsconfig and flag as alias of currentassetsbehavior- The existing behavior of the
assetsconfig key/flag will change on August 15th. legacy-assetswill preserve current functionality.
- The existing behavior of the
#6203
5462eadThanks @geelen! - fix: Updating to match new D1 import/export API format#6315
3fd94e7Thanks @penalosa! - chore: Add RayID towrangler loginerror message displayed when a user hits a bot challenge page
2024-07-19
3.65.1
#6267
957d668Thanks @WalshyDev! - chore: add total module size to the logged table, this makes it much easier to see the total size of all modules combined.#6244
e7c06d7Thanks @gabivlj! - fix: wrangler cloudchamber json errors are properly formattedUpdated dependencies [
779c713]:
2024-07-16
3.65.0
#6194
25afcb2Thanks @zebp! - chore: Add duration and sourcemap size to upload metrics eventWrangler will now send the duration and the total size of any sourcemaps uploaded with your Worker to Cloudflare if you have metrics enabled.
#6259
eb201a3Thanks @ottomated! - chore: Add types to DurableObjectNamespace type generation. For example:interface Env {OBJECT: DurableObjectNamespace<import("./src/index").MyDurableObject>;}#6245
e4abed3Thanks @OilyLime! - feature: Add support for Hyperdrive over Access configs#6255
d497e1eThanks @rozenmd! - fix: teach wrangler init –from-dash about d1 bindingsThis PR teaches
wrangler init --from-dashabout D1 bindings, so they aren’t incorrectly added to the wrangler.toml as unsafe bindings.#6258
4f524f2Thanks @dom96! - feature: Add warning about deploying Python with requirements.txtThis expands on the warning shown for all Python Workers to include a message about deploying Python Workers with a requirements.txt not being supported.
#6249
8bbd824Thanks @petebacondarwin! - chore: Update config-schema.json for the wrangler.toml#5955
db11a0fThanks @harugon! - fix: correctly escape newlines inconstructTypefunction for multiline stringsThis fix ensures that multiline strings are correctly handled by the
constructTypefunction. Newlines are now properly escaped to prevent invalid JavaScript code generation when using thewrangler typescommand. This improves robustness and prevents errors related to multiline string handling in environment variables and other configuration settings.#6263
fa1016cThanks @petebacondarwin! - fix: use cli script-name arg when deploying a worker with queue consumersUpdated dependencies [
0d32448]:
2024-07-11
3.64.0
#4925
7d4a4d0Thanks @dom96! - feature: whoami, logout and login commands mention the CLOUDFLARE_API_TOKEN env var nowIt is easy to get confused when trying to logout while the CLOUDFLARE_API_TOKEN env var is set. The logout command normally prints out a message which states that the user is not logged in. This change rectifes this to explicitly call out that the CLOUDFLARE_API_TOKEN is set and requests that the user unsets it to logout.
#5032
75f7928Thanks @dbenCF! - Adding client side error handling for R2 when the user tries to create a bucket with an invalid name. The purpose of this addition is to provide the user with more context when encountering this error.#4398
4b1e5bcThanks @mattpocock! - fix: update tsconfig for Workers generated by wrangler init
2024-07-04
3.63.1
#6192
b879ce4Thanks @petebacondarwin! - fix: do not report D1 user errors to Sentry#6150
d993409Thanks @CarmenPopoviciu! - fix: Fixpages devwatch mode [_worker.js]The watch mode in
pages devfor Advanced Mode projects is currently partially broken, as it only watches for changes in the “_worker.js” file, but not for changes in any of its imported dependencies. This means that given the following “_worker.js” fileimport { graham } from "./graham-the-dog"; export default { fetch(request, env) { return new Response(graham) } }pages devwill reload for any changes in the_worker.jsfile itself, but not for any changes ingraham-the-dog.js, which is its dependency.Similarly,
pages devwill not reload for any changes in non-JS module imports, such as wasm/html/binary module imports.This commit fixes all the aforementioned issues.
2024-07-03
3.63.0
#6167
e048958Thanks @threepointone! - feature: alias modules in the workerSometimes, users want to replace modules with other modules. This commonly happens inside a third party dependency itself. As an example, a user might have imported
node-fetch, which will probably never work in workerd. You can use the alias config to replace any of these imports with a module of your choice.Let’s say you make a
fetch-nolyfill.jsexport default fetch; // all this does is export the standard fetch function`You can then configure
wrangler.tomllike so:# ...[alias]"node-fetch": "./fetch-nolyfill"So any calls to
import fetch from 'node-fetch';will simply use our nolyfilled version.You can also pass aliases in the cli (for both
devanddeploy). Like:npx wrangler dev --alias node-fetch:./fetch-nolyfill#6073
7ed675eThanks @geelen! - Added D1 export support for local databases#6149
35689eaThanks @RamIdeas! - refactor: React-free hotkeys implementation, behind the--x-dev-envflag#6022
7951815Thanks @CarmenPopoviciu! - fix: Fixpages devwatch mode [Functions]The watch mode in
pages devfor Pages Functions projects is currently partially broken, as it only watches for file system changes in the “/functions” directory, but not for changes in any of the Functions’ dependencies. This means that given a Pages Functionmath-is-fun.ts, defined as follows:import { ADD } from "../math/add"; export async function onRequest() { return new Response(`${ADD} is fun!`); }pages devwill reload for any changes inmath-is-fun.tsitself, but not for any changes inmath/add.ts, which is its dependency.Similarly,
pages devwill not reload for any changes in non-JS module imports, such as wasm/html/binary module imports.This commit fixes all these things, plus adds some extra polish to the
pages devwatch mode experience.#6164
4cdad9bThanks @threepointone! - fix: use account id for listing zonesFixes https://github.com/cloudflare/workers-sdk/issues/4944
Trying to fetch
/zonesfails when it spans more than 500 zones. The fix to use an account id when doing so. This patch passes the account id to the zones call, threading it through all the functions that require it.#6180
b994604Thanks @Skye-31! - Fix: pass env to getBindings to support reading.dev.vars.{environment}https://github.com/cloudflare/workers-sdk/pull/5612 added support for selecting the environment of config used, but it missed passing it to the code that reads
.dev.vars.{environment}Closes #5641
#6124
d03b102Thanks @RamIdeas! - feat:urlandinspectorUrlproperties have been exposed on the worker object returned bynew unstable_DevEnv().startWorker(options)#6147
02dda3dThanks @penalosa! - refactor: React free dev registry#6127
1568c25Thanks @DaniFoldi! - fix: Bump ws dependency#6140
4072114Thanks @petebacondarwin! - fix: add extra error logging to auth response errors#6160
9466531Thanks @sm-bean! - fix: removes unnecessary wrangler tail warning against resetting durable object#6142
9272ef5Thanks @dario-piotrowicz! - fix: improve thegetPlatformProxyconfigPathoption ts-doc comment to clarify its behavior