Repository navigation
wrangler@2.9.0
Minor Changes
-
#2629
151733e5Thanks @mrbbot! - Prefer theworkerdexportscondition when bundling.This can be used to build isomorphic libraries that have different implementations depending on the JavaScript runtime they're running in.
When bundling, Wrangler will try to load theworkerdkey.
This is the standard key for the Cloudflare Workers runtime.
Learn more about the conditionalexportsfield here.
Patch Changes
-
#2409
89d78c0aThanks @penalosa! - Wrangler now supports an--experimental-json-configflag which will read your configuration from awrangler.jsonfile, rather thanwrangler.toml. The format of this file is exactly the same as thewrangler.tomlconfiguration file, except that the syntax isJSONC(JSON with comments) rather thanTOML. This is experimental, and is not recommended for production use. -
#2623
04d8a312Thanks @dario-piotrowicz! - fix d1 directory not being created when running thewrangler d1 executecommand with the--yes/-yflag -
#2608
70daffebThanks @dario-piotrowicz! - fix: Add support for D1 databases when bundling an_worker.jsonwrangler pages publish -
#2597
416babf0Thanks @petebacondarwin! - fix: do not crash in wrangler dev when passing a request object to fetchThis reverts and fixes the changes in #1769
which does not support creating requests from requests whose bodies have already been consumed.Fixes #2562
-
#2622
9778b33eThanks @rozenmd! - fix: implementd1 list --jsonwith clean output for piping into other commandsBefore:
rozenmd@cflaptop test % npx wrangler d1 list -------------------- 🚧 D1 is currently in open alpha and is not recommended for production data and traffic 🚧 Please report any bugs to https://github.com/cloudflare/wrangler2/issues/new/choose 🚧 To request features, visit https://community.cloudflare.com/c/developers/d1 🚧 To give feedback, visit https://discord.gg/cloudflaredev -------------------- ┌──────────────────────────────┬─────────────────┐ │ uuid │ name │ ├──────────────────────────────┼─────────────────┤ │ xxxxxx-xxxx-xxxx-xxxx-xxxxxx │ test │ ├──────────────────────────────┼─────────────────┤ │ xxxxxx-xxxx-xxxx-xxxx-xxxxxx │ test2 │ ├──────────────────────────────┼─────────────────┤ │ xxxxxx-xxxx-xxxx-xxxx-xxxxxx │ test3 │ └──────────────────────────────┴─────────────────┘
After:
rozenmd@cflaptop test % npx wrangler d1 list --json [ { "uuid": "xxxxxx-xxxx-xxxx-xxxx-xxxxxx", "name": "test" }, { "uuid": "xxxxxx-xxxx-xxxx-xxxx-xxxxxx", "name": "test2" }, { "uuid": "xxxxxx-xxxx-xxxx-xxxx-xxxxxx", "name": "test3" }, ]
-
#2631
6b3fe5efThanks @thibmeu! - Fixwrangler publish --dry-runto not require authentication when using Queues -
#2627
6f0f2ba6Thanks @rozenmd! - fix: implementd1 execute --jsonwith clean output for piping into other commandsBefore:
rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from customers" ▲ [WARNING] Processing wrangler.toml configuration: - D1 Bindings are currently in alpha to allow the API to evolve before general availability. Please report any issues to https://github.com/cloudflare/wrangler2/issues/new/choose Note: Run this command with the environment variable NO_D1_WARNING=true to hide this message For example: `export NO_D1_WARNING=true && wrangler <YOUR COMMAND HERE>` -------------------- 🚧 D1 is currently in open alpha and is not recommended for production data and traffic 🚧 Please report any bugs to <https://github.com/cloudflare/wrangler2/issues/new/choose> 🚧 To request features, visit <https://community.cloudflare.com/c/developers/d1> 🚧 To give feedback, visit <https://discord.gg/cloudflaredev> -------------------- 🌀 Mapping SQL input into an array of statements 🌀 Parsing 1 statements 🌀 Executing on test (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx): 🚣 Executed 1 command in 11.846710999961942ms ┌────────────┬─────────────────────┬───────────────────┐ │ CustomerID │ CompanyName │ ContactName │ ├────────────┼─────────────────────┼───────────────────┤ │ 1 │ Alfreds Futterkiste │ Maria Anders │ ├────────────┼─────────────────────┼───────────────────┤ │ 4 │ Around the Horn │ Thomas Hardy │ ├────────────┼─────────────────────┼───────────────────┤ │ 11 │ Bs Beverages │ Victoria Ashworth │ ├────────────┼─────────────────────┼───────────────────┤ │ 13 │ Bs Beverages │ Random Name │ └────────────┴─────────────────────┴───────────────────┘
After:
rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from customers" --json [ { "results": [ { "CustomerID": 1, "CompanyName": "Alfreds Futterkiste", "ContactName": "Maria Anders" }, { "CustomerID": 4, "CompanyName": "Around the Horn", "ContactName": "Thomas Hardy" }, { "CustomerID": 11, "CompanyName": "Bs Beverages", "ContactName": "Victoria Ashworth" }, { "CustomerID": 13, "CompanyName": "Bs Beverages", "ContactName": "Random Name" } ], "success": true, "meta": { "duration": 1.662519000004977, "last_row_id": null, "changes": null, "served_by": "primary-xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.db3", "internal_stats": null } } ]