π» 1.5.0
-
Features
-
Deprecate
wrangler publish --release
- EverlastingBugstopper, issue/538 pull/751wrangler publish --release
is now simply an alias ofwrangler publish
. This is related to the introduction of environments made in 1.3.1 and is intended to reduce confusion surrounding deploy targets. Previously,wrangler publish --release
would deploy to a route on your own domain, andwrangler publish
would deploy to your workers.dev subdomain. This was a confusing API, and we now require individual environments to have eitherworkers_dev = true
or both aroute
andzone_id
in each section ofwrangler.toml
. This makes it very clear where your Workers code is being deployed. If you're not usingwrangler publish --release
but you addedworkers_dev = false
to the top level of yourwrangler.toml
because Wrangler warned you to - you can now safely remove it! If you are usingwrangler publish --release
, know that it is functionally the same aswrangler publish
. If you want to deploy to workers.dev and also a route on your own domain, you will need to set up multiple environments. -
Deprecate
private
field inwrangler.toml
- stevenfranks, issue/782 pull/782In a related note, the
private
field no longer functions inwrangler.toml
. The original intent behind this field was to allow "publishing" without "activating". Unfortunately this led to a lot of undefined behavior if the value was switched fromtrue
tofalse
in between awrangler publish
command and awrangler publish --release
command and vice versa. With the removal ofwrangler publish --release
, we are also removing theprivate
field. If yourwrangler.toml
files contain a value for private, you can remove it! -
Include/exclude static assets in a Workers Sites project - gabbifish, issue/716 pull/760
Your
wrangler.toml
has two new optional fields:include
andexclude
. These fields give you more granular control over what files are uploaded to Workers KV. This behavior mirrors Cargo's include/exclude functionality. Further documentation for this feature is available here. -
A more robust
wrangler generate
- EverlastingBugstopper, issue/315 pull/759wrangler generate
is now much smarter aboutwrangler.toml
files. Previously,wrangler generate
would simply create the same configuration for every project, and it would ignore anywrangler.toml
that was committed to the template. This means much less guesswork when usingwrangler generate
with existing Workers projects. -
Add the ability to check if you've already registered a workers.dev subdomain - gusvargas, issue/701 pull/747
You can now run
wrangler subdomain
without any arguments to see if you have registered a workers.dev subdomain.$ wrangler subdomain π foo.workers.dev
-
Add
--verbose
flag towrangler publish
andwrangler preview
- gabbifish, issue/657 pull/790You can now run
wrangler publish --verbose
andwrangler preview --verbose
on a Workers Sites project to view all of the files that are being uploaded to Workers KV.$ wrangler publish --verbose π Using namespace for Workers Site "__example-workers_sites_assets" π Preparing to upload updated files... π Preparing ./public/favicon.ico π Preparing ./public/index.html π Preparing ./public/404.html π Preparing ./public/img/404-wrangler-ferris.gif π Preparing ./public/img/200-wrangler-ferris.gif β¨ Success β¨ Built successfully, built project size is 11 KiB. β¨ Successfully published your script to https://test.example.workers.dev
-
Disallow
node_modules
as a bucket for Workers Sites - gabbifish, issue/723 pull/792node_modules
is no longer allowed to be a bucket for Workers Sites. It is notoriously very large and if it were specified as a bucket it would probably be a very expensive mistake. -
Allow installs to utilize Wrangler binaries via a caching proxy instead of Github directly - gabbifish, [pull/797]
To avoid dependency on one external service, Github, we enabled a cache proxy (using Workers!) for installations of Wrangler.
-
Provide a better error message when using an unverified email address - ashleygwilliams, issue/320 pull/795
The Cloudflare API refuses to play nice with unverified email addresses (we don't like spam!), and now when this happens, Wrangler gives an actionable error message.
-
-
Fixes
-
Fix Rust live preview - gabbifish, issue/618 pull/699
If you use Wrangler to develop Rust Workers, you may have noticed that live preview (
wrangler preview --watch
) was not working with your project. Not to worry though, we cracked down on this bug with an (oxidized) iron fist! Wrangler now has cross-platform support for live previewing Rust Workers. -
Minimize timeout errors for bulk uploads - gabbifish, issue/746 pull/757
Sometimes Wrangler would make API calls to Workers KV that would timeout if there were too many files. We've increased the amount of time Wrangler will wait around for the API operations to complete.
-
Print readable error message when external commands fail - EverlastingBugstopper, pull/799
Wrangler depends on a few external applications, and sometimes the calls to them fail! When this happens, Wrangler would tell you the command it tried to run, but it included a bunch of quotes. This change removes those quotes so the command is easily readable and can be copy/pasted.
-
Disallow
wrangler generate --site
with a template argument - EverlastingBugstopper, issue/776 pull/789In Wrangler 1.4.0, we introduced Workers Sites, which included the ability to run
wrangler generate --site
which would use our site template behind the scenes. Confusingly, you could also pass a template to this command:wrangler generate my-site https://github.com/example/worker-site --site
, which would not behave as expected. This specific usage will now correctly output an error.
-
-
Maintenance
-
Begin refactoring test suite - ashleymichal, pull/787
We're constantly shipping features in Wrangler, and with more features comes a larger codebase. As a codebase expands, it goes through some growing pains. This release includes some improvements to the internal organization of Wrangler's codebase, and is intended to make our lives and our contributors' lives easier moving forward.
-
Moved all "fixture" helper functions to "utils" module to share between build/preview tests
-
Removed "metadata_wasm.json" from
simple_rust
fixture -
Extracted all module declrations in
main.rs
tolib.rs
to allow tests to import withuse wrangler::foo
-
Split
target/mod.rs
into one file per struct -
Cleaned up KV Namespace mod system
-
Use
log::info!
instead ofinfo!
inmain.rs
-
-
Refactor GlobalUser to be passed as a reference consistently - gabbifish, pull/749
-
Remove internal link from CONTRIBUTING.md - adaptive, pull/784
-
Fix some Clippy warnings - EverlastingBugstopper, pull/793
-
Clean up leftover directories created by tests - ashleymichal, pull/785
-
Refactor subdomain module - EverlastingBugstopper, issue/758 pull/764
-
Fix README markdown misrender - dottorblaster, pull/763
-
Remove duplicate Environments subheader from README - bradyjoslin, pull/766
-
Change Crate author to the Workers Developer Experience team - ashleygwilliams, pull/752
-