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
[email protected]
Patch Changes
#1018
cd2c42f
Thanks @threepointone! - fix: strip leading*
/*.
from routes when deducing a host fordev
When given routes, we use the host name from the route to deduce a zone id to pass along with the host to set with dev
session
. Route patterns can include leading*
/*.
, which we don't account for when deducing said zone id, resulting in subtle errors for the session. This fix strips those leading characters as appropriate.Fixes bug: leading
*
/*/.
in routes causes bugs inwrangler dev
#1002#1044
7a191a2
Thanks @JacobMGEvans! - fix: trim trailing whitespace from the secrets before uploadingresolves 🐛 BUG: the value read from stdin should be trimmed #993
#1052
233eef2
Thanks @petebacondarwin! - fix: display the correct help information when a subcommand is invalidPreviously, when an invalid subcommand was used, such as
wrangler r2 foo
,the help that was displayed showed the top-level commands prefixed by the command in used.
E.g.
Now the correct command help is displayed:
wrangler r2
📦 Interact with an R2 store
Commands:
wrangler r2 bucket Manage R2 buckets
Flags:
-c, --config Path to .toml configuration file [string]
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
And in your worker, you can call it like so:
Fixes #1026
#1045
8eeef9a
Thanks @jrf0110! - fix: Incorrect extension extraction from file paths.Our extension extraction logic was taking into account folder names, which can include periods. The logic would incorrectly identify a file path of .well-known/foo as having the extension of well-known/foo when in reality it should be an empty string.
#1039
95852c3
Thanks @threepointone! - fix: don't fetch migrations when in--dry-run
modeFixes bug:
wrangler publish --dry-run
fetches migrations for durable objects #1038#1033
ffce3e3
Thanks @petebacondarwin! - fix:wrangler init
should not crash if Git is not available on WindowsWe check for the presence of Git by trying to run
git --version
.On non-Windows we get an Error with
code
set to "ENOENT".One Windows we get a different error:
Since we don't really care what the error is, now we just assume that Git
is not available if an error is thrown.
Fixes
wrangler init
throws an error ifgit
is not available #1022#982
6791703
Thanks @matthewdavidrodgers! - feature: add support for publishing to Custom DomainsWith the release of Custom Domains for workers, users can publish directly to a custom domain on a route, rather than creating a dummy DNS record first and manually pointing the worker over - this adds the same support to wrangler.
Users declare routes as normal, but to indicate that a route should be treated as a custom domain, a user simply uses the object format in the toml file, but with a new key: custom_domain (i.e.
routes = [{ pattern = "api.example.com", custom_domain = true }]
)When wrangler sees a route like this, it peels them off from the rest of the routes and publishes them separately, using the /domains api. This api is very defensive, erroring eagerly if there are conflicts in existing Custom Domains or managed DNS records. In the case of conflicts, wrangler prompts for confirmation, and then retries with parameters to indicate overriding is allowed.
#1019
5816eba
Thanks @threepointone! - feat: bind a durable object by environmentFor durable objects, instead of just
{ name, class_name, script_name}
, this lets you bind by environment as well, like so{ name, class_name, script_name, environment }
.Fixes feat: bind to an external script's durable object by environment #996
#1057
608dcd9
Thanks @petebacondarwin! - fix: pages "command" can consist of multiple wordsOn Windows, the following command
wrangler pages dev -- foo bar
would errorsaying that
bar
was not a known argument. This is becausefoo
andbar
arepassed to Yargs as separate arguments.
A workaround is to put the command in quotes:
wrangler pages dev -- "foo bar"
.But this fix makes the
command
argument variadic, which also solves the problem.Fixes #965
#1027
3545e41
Thanks @rozenmd! - feat: trying to use node builtins should recommend you enable node_compat in wrangler.toml#1024
110f340
Thanks @threepointone! - polish: validate payload forkv:bulk put
on client sideThis adds client side validation for the paylod for
kv:bulk put
, importantly ensuring we're uploading only string key/value pairs (as well as validation for the other fields).Fixes kv:bulk only accepts string values #571
#1037
963e9e0
Thanks @rozenmd! - fix: don't attempt to login during a --dryRun[email protected]
Patch Changes
53033f3
Thanks @threepointone! - Bumping wranglerjs-compat-webpack-plugin to do a release