Wrangler Changelog
2023-09-28
3.10.1
#4041
6b1c327d
Thanks @elithrar! - Fixed a bug in Vectorize that send preset configurations with the wrong key. This was patched on the server-side to work around this for users in the meantime.#4054
f8c52b93
Thanks @mrbbot! - fix: allowwrangler pages dev
sessions to be reloadedPreviously,
wrangler pages dev
attempted to send messages on a closed IPC channel when sources changed, resulting in anERR_IPC_CHANNEL_CLOSED
error. This change ensures the channel stays open until the user exitswrangler pages dev
.
2023-09-26
3.10.0
#4013
3cd72862
Thanks @elithrar! - Adds wrangler support for Vectorize, Cloudflare’s new vector database, withwrangler vectorize
. Visit the developer documentation (https://developers.cloudflare.com/vectorize/) to learn more and create your first vector database withwrangler vectorize create my-first-index
.#3999
ee6f3458
Thanks @OilyLime! - Adds support for Hyperdrive, viawrangler hyperdrive
.#4034
bde9d64a
Thanks @ndisidore! - Adds Vectorize support uploading batches of newline delimited json (ndjson) vectors from a source file. Load a dataset withvectorize insert my-index --file vectors.ndjson
#4028
d5389731
Thanks @JacobMGEvans! - fix: Bulk Secret Draft WorkerFixes the issue of a upload of a Secret when a Worker doesn’t exist yet, the draft worker is created and the secret is uploaded to it.
Fixes https://github.com/cloudflare/wrangler-action/issues/162
2023-09-25
3.9.1
#3992
35564741
Thanks @edevil! - Add AI binding that will be used to interact with the AI project.Example
wrangler.toml
name = "ai-worker" main = "src/index.ts" [ai] binding = "AI"
Example script:
import Ai from "@cloudflare/ai" export default { async fetch(request: Request, env: Env): Promise<Response> { const ai = new Ai(env.AI); const story = await ai.run({ model: 'llama-2', input: { prompt: 'Tell me a story about the future of the Cloudflare dev platform' } }); return new Response(JSON.stringify(story)); }, }; export interface Env { AI: any; }
#4006
bc8c147a
Thanks @rozenmd! - fix: remove warning around using D1’s binding, and clean up the epilogue when running D1 commands#4027
9e466599
Thanks @jspspike! - Add WebGPU support through miniflare update#3986
00247a8d
Thanks @edevil! - Added AI related CLI commands
2023-09-20
3.9.0
#3951
e0850ad1
Thanks @mrbbot! - feat: add support for breakpoint debugging towrangler dev
’s--remote
and--no-bundle
modesPreviously, breakpoint debugging using Wrangler’s DevTools was only supported in local mode, when using Wrangler’s built-in bundler. This change extends that to remote development, and
--no-bundle
.When using
--remote
and--no-bundle
together, uncaught errors will now be source-mapped when logged too.#3951
e0850ad1
Thanks @mrbbot! - feat: add support for Visual Studio Code’s built-in breakpoint debuggerWrangler now supports breakpoint debugging with Visual Studio Code’s debugger. Create a
.vscode/launch.json
file with the following contents…{"configurations": [{"name": "Wrangler","type": "node","request": "attach","port": 9229,"cwd": "/","resolveSourceMapLocations": null,"attachExistingChildren": false,"autoAttachChildProcesses": false}]}…then run
wrangler dev
, and launch the configuration.#3954
bc88f0ec
Thanks @dario-piotrowicz! - updatewrangler pages dev
D1 and DO descriptions#3928
95b24b1e
Thanks @JacobMGEvans! - Colorize Deployed Bundle Size Most bundlers, and other tooling that give you size outputs will colorize their the text to indicate if the value is within certain ranges. The current range values are: red 100% - 90% yellow 89% - 70% green <70%resolves #1312
2023-09-13
3.8.0
#3775
3af30879
Thanks @bthwaites! - R2 Jurisdictional Restrictions guarantee objects in a bucket are stored within a specific jurisdiction. Wrangler now allows you to interact with buckets in a defined jurisdiction.Wrangler R2 operations now support a
-J
flag that allows the user to specify a jurisdiction. When passing the-J
flag, you will only be able to interact with R2 resources within that jurisdiction.# List all of the buckets in the EU jurisdictionwrangler r2 bucket list -J eu# Downloads the object 'myfile.txt' from the bucket 'mybucket' in EU jurisdictionwrangler r2 object get mybucket/myfile.txt -J euTo access R2 buckets that belong to a jurisdiction from Workers, you will need to specify the jurisdiction as well as the bucket name as part of your bindings in your
wrangler.toml
:[[r2_buckets]]bindings = [{ binding = "MY_BUCKET", bucket_name = "<YOUR_BUCKET_NAME>", jurisdiction = "<JURISDICTION>" }]#3901
a986f19f
Thanks @DaniFoldi! - Only require preview_id and preview_bucket_name in remote dev mode#3912
0ba58841
Thanks @jspspike! - Ignore cached account id whenCLOUDFLARE_ACCOUNT_ID
is specified
2023-09-05
3.7.0
#3772
a3b3765d
Thanks @jspspike! - Bump esbuild version to 0.17.19. Breaking changes to esbuild are documented here#3895
40f56562
Thanks @mrbbot! - chore: bumpminiflare
to3.20230904.0
#3774
ae2d5cb5
Thanks @mrbbot! - feat: support breakpoint debugging in local modewrangler dev
now supports breakpoint debugging in local mode! Pressd
to open DevTools and set breakpoints.
2023-08-28
2.20.1
- #3820
546c2319
Thanks @GregBrimble! - fix: Preventwrangler pages dev
from serving asset files outside of the build output directory
2023-08-24
3.6.0
#3727
a5e7c0be
Thanks @echen67! - Warn user when the last deployment was via the API#3762
18dc7b54
Thanks @GregBrimble! - feat: Add internalwrangler pages project validate [directory]
command which validates an asset directory#3758
0adccc71
Thanks @jahands! - fix: Retry deployment errors in wrangler pages publishThis will improve reliability when deploying to Cloudflare Pages
2023-08-15
3.5.1
#3752
8f5ed7fe
Thanks @DaniFoldi! - Changed the binding type of WfP Dispatch Namespaces toDispatchNamespace
#3765
e17d3096
Thanks @RamIdeas! - bump miniflare version to 3.20230814.1
2023-08-08
3.5.0
#3703
e600f029
Thanks @jspspike! - Added –local option for r2 commands to interact with local persisted r2 objects#3704
8e231afd
Thanks @JacobMGEvans! - secret:bulk exit 1 on failure Previouslysecret"bulk
would only log an error on failure of any of the upload requests. Now when ‘secret:bulk’ has an upload request fail it throws an Error which sends anprocess.exit(1)
at the root.catch()
signal. This will enable error handling in programmatic uses ofsecret:bulk
.#3684
ff8603b6
Thanks @jspspike! - Added –local option for kv commands to interact with local persisted kv entries#3595
c302bec6
Thanks @geelen! - Removing the D1 shim from the build process, in preparation for the Open Beta. D1 can now be used with –no-bundle enabled.#3707
6de3c5ec
Thanks @dario-piotrowicz! - Added handling of .mjs files to be picked up by inside the Pages _worker.js directory (currently only .js files are)#3693
8f257126
Thanks @RamIdeas! - Bump the version of miniflare to 3.20230801.0
2023-07-27
3.4.0
#3649
e2234bbc
Thanks @JacobMGEvans! - Feature: ‘stdin’ support for ‘secret:bulk’ Added functionality that allows for files and strings to be piped in, or other means of standard input. This will allow for a broader variety of use cases and improved DX. This implementation is also fully backward compatible with the previous input method of file path to JSON.# Example of piping in a file> cat ./my-file.json | wrangler secret:bulk# Example of piping in a string> echo '{"key":"value"}' | wrangler secret:bulk# Example of redirecting input from a file> wrangler secret:bulk < ./my-file.json#3675
f753f3af
Thanks @1000hz! - chore: upgrademiniflare
to3.20230724.0
#3610
bfbe49d0
Thanks @Skye-31! - Wrangler Capnp CompilationThis PR replaces logfwdr’s
schema
property with a newunsafe.capnp
object. This object accepts either acompiled_schema
property, or abase_path
and array ofsource_schemas
to get Wrangler to compile the capnp schema for you.#3579
d4450b0a
Thanks @rozenmd! - fix: remove –experimental-backend fromwrangler d1 migrations apply
This PR removes the need to pass a
--experimental-backend
flag when running migrations against an experimental D1 db.Closes #3596
#3623
99baf58b
Thanks @RamIdeas! - when runningwrangler init -y ...
, the-y
flag is now passed to npx when delegating to C3#3668
99032c1e
Thanks @rozenmd! - chore: make D1’s experimental backend the defaultThis PR makes D1’s experimental backend turned on by default.
#3579
d4450b0a
Thanks @rozenmd! - feat: implement time travel for experimental d1 dbsThis PR adds two commands under
wrangler d1 time-travel
:Use Time Travel to restore, fork or copy a database at a specific point-in-time. Commands: wrangler d1 time-travel info <database> Retrieve information about a database at a specific point-in-time using Time Travel. Options: --timestamp accepts a Unix (seconds from epoch) or RFC3339 timestamp (e.g. 2023-07-13T08:46:42.228Z) to retrieve a bookmark for [string] --json return output as clean JSON [boolean] [default: false] wrangler d1 time-travel restore <database> Restore a database back to a specific point-in-time. Options: --bookmark Bookmark to use for time travel [string] --timestamp accepts a Unix (seconds from epoch) or RFC3339 timestamp (e.g. 2023-07-13T08:46:42.228Z) to retrieve a bookmark for [string] --json return output as clean JSON [boolean] [default: false]
Closes #3577
#3592
89cd086b
Thanks @penalosa! - fix: Only log dev registry connection errors once#3384
ccc19d57
Thanks @Peter-Sparksuite! - feature: add wrangler deploy option: –old-asset-ttl [seconds]wrangler deploy
immediately deletes assets that are no longer current, which has a side-effect for existing progressive web app users of seeing 404 errors as the app tries to access assets that no longer exist.This new feature:
- does not change the default behavior of immediately deleting no-longer needed assets.
- allows users to opt-in to expiring newly obsoleted assets after the provided number of seconds hence, so that current users will have a time buffer before seeing 404 errors.
- is similar in concept to what was introduced in Wrangler 1.x with https://github.com/cloudflare/wrangler-legacy/pull/2221.
- is careful to avoid extension of existing expiration targets on already expiring old assets, which may have contributed to unexpectedly large KV storage accumulations (perhaps why, in Wrangler 1.x, the reversion https://github.com/cloudflare/wrangler-legacy/pull/2228 happened).
- no breaking changes for users relying on the default behavior, but some output changes exist when the new option is used, to indicate the change in behavior.
#3678
17780b27
Thanks @1000hz! - Refined the type ofCfVars
fromRecord<string, unknown>
toRecord<string, string | Json>
2023-07-18
3.3.0
#3628
e72a5794
Thanks @mrbbot! - chore: upgrademiniflare
to3.20230717.0
#3587
30f114af
Thanks @mrbbot! - fix: keep configuration watcher aliveEnsure
wrangler dev
watches thewrangler.toml
file and reloads the server whenever configuration (e.g. KV namespaces, compatibility dates, etc) changes.#3588
64631d8b
Thanks @penalosa! - fix: Preserve email handlers when applying middleware to user workers.
2023-07-11
3.2.0
#3583
78ddb8de
Thanks @penalosa! - Upgrade Miniflare (and henceworkerd
) tov3.20230710.0
.#3426
5a74cb55
Thanks @matthewdavidrodgers! - Prefer non-force deletes unless a Worker is a dependency of another.If a Worker is used as a service binding, a durable object namespace, an outbounds for a dynamic dispatch namespace, or a tail consumer, then deleting that Worker will break those existing ones that depend upon it. Deleting with ?force=true allows you to delete anyway, which is currently the default in Wrangler.
Force deletes are not often necessary, however, and using it as the default has unfortunate consequences in the API. To avoid them, we check if any of those conditions exist, and present the information to the user. If they explicitly acknowledge they’re ok with breaking their other Workers, fine, we let them do it. Otherwise, we’ll always use the much safer non-force deletes. We also add a “–force” flag to the delete command to skip the checks and confirmation and proceed with ?force=true
#3585
e33bb44a
Thanks @mrbbot! - fix: register middleware once for module workersEnsure middleware is only registered on the first request when using module workers. This should prevent stack overflows and slowdowns when making large number of requests to
wrangler dev
with infrequent reloads.#3547
e16d0272
Thanks @jspspike! - Fixed issue with wrangler dev not finding imported files. Previously when wrangler dev would automatically reload on any file changes, it would fail to find any imported files.
2023-07-06
3.1.2
#3529
bcdc1fe5
Thanks @jspspike! - Support https in wrangler dev local mode#3541
09f317d4
Thanks @GregBrimble! - chore: Bump [email protected]#3497
c5f3bf45
Thanks @evanderkoogh! - Refactor dev-only checkedFetch check from a method substitution to a JavaScript Proxy to be able to support Proxied global fetch function.#3403
8d1521e9
Thanks @Cherry! - fix: wrangler generate will now work cross-device. This is very common on Windows install that use C:/ for the OS and another drive for user files.