Patch Changes
-
#1110
515a52f
Thanks @rozenmd! - fix: print instructions even if installPackages fails to fetch npm packages -
#1051
7e2e97b
Thanks @rozenmd! - feat: add support for using wrangler behind a proxyConfigures the undici library (the library wrangler uses for
fetch
) to send all requests via a proxy selected from the first non-empty environment variable from "https_proxy", "HTTPS_PROXY", "http_proxy" and "HTTP_PROXY". -
#1089
de59ee7
Thanks @rozenmd! - fix: batch package manager installs so folks only have to wait onceWhen running
wrangler init
, we install packages as folks confirm their options.
This disrupts the "flow", particularly on slower internet connections.To avoid this disruption, we now only install packages once we're done asking questions.
Closes #1036
-
#1073
6bb2564
Thanks @caass! - Add a better message when a user doesn't have a Chromium-based browser.Certain functionality we use in wrangler depends on a Chromium-based browser. Previously, we would throw a somewhat arcane error that was hard (or impossible) to understand without knowing what we needed. While ideally all of our functionality would work across all major browsers, as a stopgap measure we can at least inform the user what the actual issue is.
Additionally, add support for Brave as a Chromium-based browser.
-
#1079
fb0dec4
Thanks @caass! - Print the bindings a worker has access to duringdev
andpublish
It can be helpful for a user to know exactly what resources a worker will have access to and where they can access them, so we now log the bindings available to a worker during
wrangler dev
andwrangler publish
. -
#1097
c73a3c4
Thanks @petebacondarwin! - fix: ensure all line endings are normalized before parsing as TOMLOnly the last line-ending was being normalized not all of them.
Fixes #1094
-
#1111
1eaefeb
Thanks @JacobMGEvans! - Git defaultmain
branchpolish: Default branch when choosing to initialize a git repository will now be
main
.
This is inline with current common industry ethical practices.
See: -
#1058
1a59efe
Thanks @threepointone! - refactor: detect missing[migrations]
during config validationThis does a small refactor -
- During publish, we were checking whether
[migrations]
were defined in the presence of[durable_objects]
, and warning if not. This moves it into the config validation step, which means it'll check for all commands (but notablydev
) - It moves the code to determine current migration tag/migrations to upload into a helper. We'll be reusing this soon when we upload migrations to
dev
.
- During publish, we were checking whether
-
#1090
85fbfe8
Thanks @petebacondarwin! - refactor: remove use ofany
This "quick-win" refactors some of the code to avoid the use of
any
where possible.
Usingany
can cause type-checking to be disabled across the code in unexpectedly wide-impact ways.There is one other use of
any
not touched here because it is fixed by #1088 separately. -
#1088
d63d790
Thanks @petebacondarwin! - fix: ensure that the proxy server shuts down to preventwrangler dev
from hangingWhen running
wrangler dev
we create a proxy to the actual remote Worker.
After creating a connection to this proxy by a browser request the proxy did not shutdown.
Now we use aHttpTerminator
helper library to force the proxy to close open connections and shutdown correctly.Fixes #958
-
#1099
175737f
Thanks @petebacondarwin! - fix: delegatewrangler build
towrangler publish
Since
wrangler publish --dry-run --outdir=dist
is basically the same result
as what Wrangler 1 did withwrangler build
let's run that for the user if
they try to runwrangler build
. -
#1081
8070763
Thanks @rozenmd! - fix: friendlier error for when a subdomain hasn't been configured in dev mode -
#1123
15e5c12
Thanks @timabb031! - chore: updated new worker ts template with env/ctx parameters and added Env interface -
#1080
4a09c1b
Thanks @caass! - Improve messaging when bulk deleting or uploading KV PairsCloses #555
-
#1000
5a8e8d5
Thanks @JacobMGEvans! -pages dev <dir>
&wrangler pages functions build
will have a--node-compat
flag powered by @esbuild-plugins/node-globals-polyfill (which in itself is powered by rollup-plugin-node-polyfills). The only difference inpages
will be it does not check thewrangler.toml
so thenode_compat = true
will not enable it forwrangler pages
functionality.resolves #890
-
#1028
b7a9ce6
Thanks @GregBrimble! - feat: Use new bulk upload API for 'wrangler pages publish'This raises the file limit back up to 20k for a deployment.