Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
wrangler@2.0.3
Patch Changes
#956
1caa5f7
Thanks @threepointone! - fix: don't crash duringinit
ifgit
is not installedWhen a command isn't available on a system, calling
execa()
on it throws an error, and not just a non zero exitCode. This patch fixes the flow so we don't crash the whole process when that happens on testing the presence ofgit
when callingwrangler init
.Fixes initialisation fails in environments without git #950
#970
35e780b
Thanks @GregBrimble! - fix: Fixes Pages Plugins and static asset routing.There was previously a bug where a relative pathname would be missing the leading slash which would result in routing errors.
#957
e0a0509
Thanks @JacobMGEvans! - refactor: Moving--legacy-env
out of globalThe
--legacy-env
flag was in global scope, which only certain commandsutilize the flag for functionality, and doesnt do anything for the other commands.
resolves Pull out
--legacy-env
from global flags #933#948
82165c5
Thanks @petebacondarwin! - fix: improve error message if custom build output is not foundThe message you get if Wrangler cannot find the output from the custom build is now more helpful.
It will even look around to see if there is a suitable file nearby and make suggestions about what should be put in the
main
configuration.Closes #946
#952
ae3895e
Thanks @d3lm! - feat: use host specific callback urlTo allow OAuth to work on environments such as WebContainer we have to generate a host-specific callback URL. This PR uses
@webcontainer/env
to generate such URL only for running in WebContainer. Otherwise the callback URL stays unmodified.#951
09196ec
Thanks @petebacondarwin! - fix: look for an alternate port in the dev command if the configured one is in usePreviously, we were only calling
getPort()
if the configured port was undefined.But since we were setting the default for this during validation, it was never undefined.
Fixes #949
#963
5b03eb8
Thanks @threepointone! - fix: work with Cloudflare WARPUsing wrangler with Cloudflare WARP (https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/warp/) requires using the Cloudflare certificate. This patch simply uses the certificate as NODE_EXTRA_CA_CERTS when we start wrangler.
Test plan:
wrangler dev
wrangler dev
wrangler dev
Fixes Ship with the Cloudflare Zero Trust root certifciate #953, 🐛 BUG: Better Error Message for when Wrangler Login Fails when using Cloudflare Warp #850
#964
0dfd95f
Thanks @JacobMGEvans! - fix: KV not setting correctlyThe KV has URL inputs, which in the case of
/
would get collapsed and lost.T:o handle special characters
encodeURIComponent
is implemented.resolves 🐛 BUG: KV keys that begin with slash aren't setting correctly #961