Wrangler Changelog
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-22
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 publish This 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 Compilation This PR replaces logfwdr’sschema
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 default This PR makes D1’s experimental backend turned on by default. -
#3579
d4450b0a
Thanks @rozenmd! - feat: implement time travel for experimental d1 dbs This PR adds two commands underwrangler 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
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
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 alive Ensurewrangler 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 workers Ensure 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 towrangler 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. - You can now also connect directly to databases over TCP from a Worker, starting with PostgreSQL. Support for PostgreSQL is based on the popular
pg
driver, and allows you to connect to any PostgreSQL instance over TLS from a Worker directly. - The R2 Migrator (Super Slurper), which automates the process of migrating from existing object storage providers to R2, is now Generally Available.
2023-07-06
3.1.2
-
#3529
bcdc1fe5
Thanks @jspspike! - Support https in wrangler dev local mode -
#3541
09f317d4
Thanks @GregBrimble! - chore: Bump miniflare@3.0.2 -
#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.
2023-06-20
3.1.1
-
#3498
fddffdf0
Thanks @GregBrimble! - fix: Preventwrangler pages dev
from serving asset files outside of the build output directory -
#3431
68ba49a8
Thanks @Cherry! - fix: allow context.data to be overriden in Pages Functions -
#3414
6b1870ad
Thanks @rozenmd! - fix: in D1, lift error.cause into the error message Prior to this PR, folks had to console.log theerror.cause
property to understand why their D1 operations were failing. With this PR,error.cause
will continue to work, but we’ll also lift the cause into the error message. -
#3483
a9349a89
Thanks @petebacondarwin! - fix: ensure that the script name is passed through to C3 fromwrangler init
-
#3359
5eef992f
Thanks @RamIdeas! -wrangler init ... -y
now delegates to C3 without prompts (respects the-y
flag) -
#3434
4beac418
Thanks @rozenmd! - fix: add the number of read queries and write queries in the last 24 hours to thed1 info
command -
#3454
a2194043
Thanks @mrbbot! - chore: upgrademiniflare
to3.0.1
This version ensures root CA certificates are trusted on Windows. It also loads extra certificates from theNODE_EXTRA_CA_CERTS
environment variable, allowingwrangler dev
to be used with Cloudflare WARP enabled. -
#3485
e8df68ee
Thanks @GregBrimble! - feat: Allow setting a D1 database ID when usingwrangler pages dev
by providing an optional=<ID>
suffix to the argument like--d1 BINDING_NAME=database-id
2023-06-06
3.1.0
-
#3293
4a88db32
Thanks @petebacondarwin! - feat: addwrangler pages project delete
command -
#3399
d8a9995b
Thanks @Skye-31! - Fix: wrangler pages dev –script-path argument when using a proxy command instead of directory mode Fixes a regression in wrangler@3.x, wherewrangler pages dev --script-path=<my script path> -- <proxy command>
would start throwing esbuild errors. -
#3311
116d3fd9
Thanks @Maximo-Guk! - Fix: Avoid unnecessary rebuilding pages functions in wrangler pages dev -
#3314
d5a230f1
Thanks @elithrar! - Fixedwrangler d1 migrations
to use--experimental-backend
and not--experimentalBackend
so that it is consistent withwrangler d1 create
. -
#3373
55703e52
Thanks @rozenmd! - fix: wrangler rollback shouldn’t print its warning in the global menu -
#3124
2956c31d
Thanks @verokarhu! - fix: failed d1 migrations not treated as errors This PR teaches wrangler to return a non-success exit code when a set of migrations fails. It also cleans upwrangler d1 migrations apply
output significantly, to only log information relevant to migrations. -
#3390
b5b46b4a
Thanks @shahsimpson! - Prevents uploads with both cron triggers and smart placement enabled -
#3358
27b5aec5
Thanks @rozenmd! - This PR implements a trimmer that removes BEGIN TRANSACTION/COMMIT from SQL files sent to the API (since the D1 API already wraps SQL in a transaction for users). -
#3324
ed9fbf79
Thanks @rozenmd! - addd1 info
command for people to check DB sizeThis PR adds a
d1 info <NAME>
command for getting information about a D1 database, including the current database size and state.Usage:
> npx wrangler d1 info northwind ┌───────────────────┬──────────────────────────────────────┐ │ │ d5b1d127-xxxx-xxxx-xxxx-cbc69f0a9e06 │ ├───────────────────┼──────────────────────────────────────┤ │ name │ northwind │ ├───────────────────┼──────────────────────────────────────┤ │ version │ beta │ ├───────────────────┼──────────────────────────────────────┤ │ num_tables │ 13 │ ├───────────────────┼──────────────────────────────────────┤ │ file_size │ 33.1 MB │ ├───────────────────┼──────────────────────────────────────┤ │ running_in_region │ WEUR │ └───────────────────┴──────────────────────────────────────┘ > npx wrangler d1 info northwind --json { "uuid": "d5b1d127-xxxx-xxxx-xxxx-cbc69f0a9e06", "name": "northwind", "version": "beta", "num_tables": 13, "file_size": 33067008, "running_in_region": "WEUR" }
-
#3317
3dae2585
Thanks @jculvey! - Add the--compatibility-flags
and--compatibility-date
options to thepages project create
command
2023-05-22
3.0.1
2023-05-17
3.0.0
-
#3197
3b3fadfa
Thanks @mrbbot! - feature: renamewrangler publish
towrangler deploy
This ensures consistency with other messaging, documentation and our dashboard, which all refer to deployments. This also avoids confusion with the similar but very differentnpm publish
command.wrangler publish
will remain a deprecated alias for now, but will be removed in the next major version of Wrangler. -
#3197
bac9b5de
Thanks @mrbbot! - feature: enable local development with Miniflare 3 andworkerd
by defaultwrangler dev
now runs fully-locally by default, using the open-source Cloudflare Workers runtimeworkerd
. To restore the previous behaviour of running on a remote machine with access to production data, use the new--remote
flag. The--local
and--experimental-local
flags have been deprecated, as this behaviour is now the default, and will be removed in the next major version. -
#3197
02a672ed
Thanks @mrbbot! - feature: enable persistent storage in local mode by default Wrangler will now persist local KV, R2, D1, Cache and Durable Object data in the.wrangler
folder, by default, between reloads. This persistence directory can be customised with the--persist-to
flag. The--persist
flag has been removed, as this is now the default behaviour. -
#3197
dc755fdc
Thanks @mrbbot! - feature: remove delegation to locally installed versions Previously, if Wrangler was installed globally and locally within a project, running the global Wrangler would instead invoke the local version. This behaviour was contrary to most other JavaScript CLI tools and has now been removed. We recommend you usenpx wrangler
instead, which will invoke the local version if installed, or install globally if not. -
#3197
24e1607a
Thanks @mrbbot! - chore: remove unused files from published package Specifically, thesrc
andminiflare-config-stubs
directories have been removed. -
#3200
f1b8a1cc
Thanks @matthewdavidrodgers! - Support outbounds for dispatch_namespace bindings -
#3197
b7c590b5
Thanks @mrbbot! - feature: warn when a new major version is available -
#3197
e1e5d782
Thanks @mrbbot! - feature: add warning when trying to usewrangler dev
inside a WebContainer -
#3230
41fc45c2
Thanks @matthewdavidrodgers! - Support tail_consumers in script upload -
#3157
4d7781f7
Thanks @edevil! - [wrangler] feat: Support for Constellation bindings Added support for a new type of safe bindings called “Constellation” that allows interacting with uploaded models in the context of these projects.[[constellation]]binding = 'AI'project_id = '9d478427-dea6-4988-9b16-f6f8888d974c' -
#3135
cc2adc2e
Thanks @edevil! - [wrangler] feat: Support for Browser Workers These bindings allow one to use puppeteer to control a browser in a worker script. -
#3150
7512d4cc
Thanks @mrbbot! - chore: upgrademiniflare
to2.14.0
-
#3175
561b962f
Thanks @GregBrimble! - fix:_worker.js/
directory support for dynamically imported chunks inwrangler pages dev
-
#3186
3050ce7f
Thanks @petebacondarwin! - fix: ensure pages _routes.json emulation in dev command handles .s and *s -
#3048
6ccc4fa6
Thanks @oustn! - Fix: fix local registry server closed Closes #1920. Sometimes start the local dev server will kill the devRegistry server so that the devRegistry server can’t be used. We can listen the devRegistry server close event and reset server tonull
. When registerWorker is called, we can check if the server isnull
and start a new server. -
#3001
f9722873
Thanks @rozenmd! - fix: make it possible to create a D1 database backed by the experimental backend, and maked1 execute
’s batch size configurable With this PR, users will be able to runwrangler d1 create <NAME> --experimental-backend
to create new D1 dbs that use an experimental backend. You can also runwrangler d1 migrations apply <NAME> experimental-backend
to run migrations against an experimental database. On top of that, bothwrangler d1 migrations apply <NAME>
andwrangler d1 execute <NAME>
now have a configurablebatch-size
flag, as the experimental backend can handle more than 10000 statements at a time. -
#3153
1b67a405
Thanks @edevil! - [wrangler] fix: constellation command help Changedname
toprojectName
in some Constellation commands that interacted with projects. Also added the possibility to specify a model description when uploading it. -
#3214
ce04aac0
Thanks @jspspike! - Add message for whenwrangler tail
exits sampling mode -
#3168
88ff9d7d
Thanks @rozenmd! - feat: (alpha) - make it possible to give D1 a hint on where it should create the database -
#3175
561b962f
Thanks @GregBrimble! - fix:_worker.js/
directory support for D1 bindings