Minor Changes
-
#2465
e1c2f5b9
Thanks @JacobMGEvans! - After this PR,wrangler init --yes
will generate a test for your new Worker project, using Vitest with TypeScript.
When usingwrangler init
, and choosing to create a Typescript project, you will now be asked if Wrangler should write tests for you, using Vitest.This resolves issue #2436.
-
#2333
71691421
Thanks @markjmiller! - Remove the experimental binding warning from Dispatch Namespace since it is GA.
Patch Changes
-
#2460
c2b2dfb8
Thanks @rozenmd! - fix: resolve unstable_dev flakiness in tests by awaiting the dev registry -
#2439
616f8739
Thanks @petebacondarwin! - fix(wrangler): do not login or read wrangler.toml when applying D1 migrations in local mode.When applying D1 migrations to a deployed database, it is important that we are logged in
and that we have the database ID from the wrangler.toml.
This is not needed for--local
mode where we are just writing to a local SQLite file. -
#1869
917b07b0
Thanks @petebacondarwin! - feat: enable Wrangler to target the staging API by setting WRANGLER_API_ENVIRONMENT=stagingIf you are developing Wrangler, or an internal Cloudflare feature, and during testing,
need Wrangler to target the staging API rather than production, it is now possible by
setting theWRANGLER_API_ENVIRONMENT
environment variable tostaging
.This will update all the necessary OAuth and API URLs, update the OAuth client ID, and
also (if necessary) acquire an Access token for to get through the firewall to the
staging URLs. -
#2377
32686e42
Thanks @mrbbot! - FixReferenceError
when usingwrangler dev --experimental-local
in Node 16 -
#2393
a6d24732
Thanks @mrbbot! - Remove login requirement fromwrangler dev --experimental-local
-
#2502
6b7ebc8d
Thanks @mrbbot! - Upgrademiniflare
to2.11.0
-
#2485
4c0e2309
Thanks @GregBrimble! - fix: Pages Plugin routing when mounted at the root of a projectPreviously, there was a bug which meant that Plugins mounted at the root of a Pages project were not correctly matching incoming requests. This change fixes that bug so Plugins mounted at the root should now correctly work.
-
#2479
7b479b91
Thanks @rozenmd! - fix: bump d1jsThis PR bumps d1js, adding the following functionality to the d1 alpha shim:
- validates supported types
- converts ArrayBuffer to array
- converts typedArray to array
-
#2392
7785591c
Thanks @rozenmd! - fix: improvewrangler init --from-dash
help text and error handling -
#2391
19525a4b
Thanks @mrbbot! - Always log when delegating to localwrangler
install.When a global
wrangler
command is executed in a package directory withwrangler
installed locally, the command is redirected to the localwrangler
install.
We now always log a message when this happens, so you know what's going on. -
#2468
97282459
Thanks @rozenmd! - BREAKING CHANGE: move experimental options under the experimental object for unstable_dev -
#2477
3bd1b676
Thanks @rozenmd! - fix: update NO_D1_WARNING to make it clear how to turn it off -
#2495
e93063e9
Thanks @petebacondarwin! - fix(d1): ensure that migrations support compound statementsThis fix updates the SQL statement splitting so that it does not split in the middle of compound statements.
Previously we were using a third party splitting library, but this needed fixing and was actually unnecessary for our purposes.
So a new splitter has been implemented and the library dependency removed.
Also the error handling ind1 migrations apply
has been improved to handle a wider range of error types.Fixes #2463
-
#2400
08a0b22e
Thanks @mrbbot! - Cleanly exitwrangler dev --experimental-local
when pressingx
/q
/CTRL-C
-
#2374
ecba1ede
Thanks @rozenmd! - fix: make --from-dash error output clearerThis PR makes it clearer what --from-dash wants from you.
-
#2377
32686e42
Thanks @mrbbot! - RespectFORCE_COLOR=0
environment variable to disable colored output when usingwrangler dev --local
-
#2455
d9c1d273
Thanks @rozenmd! - BREAKING CHANGE: refactor unstable_dev to use an experimental object, instead of a second options objectBefore, if you wanted to disable the experimental warning, you would run:
worker = await unstable_dev( "src/index.js", {}, { disableExperimentalWarning: true } );
After this change, you'll need to do this instead:
worker = await unstable_dev("src/index.js", { experimental: { disableExperimentalWarning: true } });