-
Features
-
Deprecate
wrangler publish --release- EverlastingBugstopper, issue/538 pull/751wrangler publish --releaseis 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 --releasewould deploy to a route on your own domain, andwrangler publishwould deploy to your workers.dev subdomain. This was a confusing API, and we now require individual environments to have eitherworkers_dev = trueor both arouteandzone_idin each section ofwrangler.toml. This makes it very clear where your Workers code is being deployed. If you're not usingwrangler publish --releasebut you addedworkers_dev = falseto the top level of yourwrangler.tomlbecause 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
privatefield inwrangler.toml- stevenfranks, issue/782 pull/782In a related note, the
privatefield 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 fromtruetofalsein between awrangler publishcommand and awrangler publish --releasecommand and vice versa. With the removal ofwrangler publish --release, we are also removing theprivatefield. If yourwrangler.tomlfiles 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.tomlhas two new optional fields:includeandexclude. 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 generateis now much smarter aboutwrangler.tomlfiles. Previously,wrangler generatewould simply create the same configuration for every project, and it would ignore anywrangler.tomlthat was committed to the template. This means much less guesswork when usingwrangler generatewith 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 subdomainwithout any arguments to see if you have registered a workers.dev subdomain.$ wrangler subdomain 💁 foo.workers.dev
-
Add
--verboseflag towrangler publishandwrangler preview- gabbifish, issue/657 pull/790You can now run
wrangler publish --verboseandwrangler preview --verboseon 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_modulesas a bucket for Workers Sites - gabbifish, issue/723 pull/792node_modulesis 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 --sitewith a template argument - EverlastingBugstopper, issue/776 pull/789In Wrangler 1.4.0, we introduced Workers Sites, which included the ability to run
wrangler generate --sitewhich 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_rustfixture -
Extracted all module declrations in
main.rstolib.rsto allow tests to import withuse wrangler::foo -
Split
target/mod.rsinto 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
-