🦚 1.9.0
-
Features
-
Wrangler Tail - ashleymichal, gabbifish, EverlastingBugstopper, pull/1182
Wrangler Tail introduces a way to view console statements and exceptions live as they occur in your Worker. Simply run
wrangler tailagainst any deployed Worker and pipe the output throughjqor to a file to stream trace events per request. -
Much faster build times for Workers Sites projects - EverlastingBugstopper, pull/1221
When you deploy a Workers Site, Wrangler generates a unique hash for each file. It does this so that your Worker does not serve stale files from Cloudflare's edge cache to end users. Unfortunately, generating these hashes took a really really long time since we were using a cryptographically strong hash. Since we're just using this hash for cache invalidation, we decided it's not necessary to use such a complicated algorithm. We switched to using xxhash and have seen noticeable speed improvements.
-
Add --url to wrangler preview - larkin-nz, issue/351 pull/1001
wrangler previewnow has the ability to open any URL! Before,wrangler previewwould always openexample.com, and you would be able to change the URL in the browser only. Now, you can usewrangler preview --url https://mysite.com/my-amazing-endpointand your preview session will get started off on the right foot. -
Print email addresses for API token users on
wrangler whoami- dhaynespls, issue/863 pull/1212Before, if you ran
wrangler whoamias an API token user, you didn't get much info. Due to some heavy lifting by folks working on the Cloudflare API, API token users with the correct permissions can now see what email address they are authenticated with when they runwrangler whoami. Nifty! -
wrangler generateauto increments default worker name - xprazak2, issue/58 pull/469When
wrangler generateis run without a name for the worker, it will find a name for the worker that does not already exist in that directory. -
Standardize colors in
stdout- EverlastingBugstopper, pull/1248Wrangler likes to print colors where appropriate, and now there is a standard module for printing different colors that is used across the codebase.
-
Suggests
wrangler initifwrangler.tomldoes not exist - ashleymichal, issue/827 pull/1239When there is no
wrangler.tomlin a directory you're trying to run Wrangler in, it doesn't know what to do. The way to fix this is to make awrangler.toml, and the way to do that is to runwrangler init.
-
-
Fixes
-
Allow kv-namespaces and kv_namespaces - EverlastingBugstopper, issue/1158 pull/1169
Most fields defined in
wrangler.tomlare one word, but some of them are two! In the past, we usually use_to separate words, but somehow we used a-forkv-namespaces. This was inconsistent and a bit confusing. Now we allow both for the sake of backwards compatibility, but in the future we'll try to stick tosnake_case. -
Typo fix in
wrangler init- jplhomer, pull/1210A successful
wrangler initexecution used to output "Succesfully" instead of "Successfully", but not anymore! -
More granular errors in
wrangler dev- EverlastingBugstopper, pull/1251In the last release we added an error message in
wrangler devfor failed uploads. Unfortunately it was a bit overeager and some information about different types of errors were lost. This behavior has been fixed!
-
-
Maintenance
-
Unify wrangler's user agent - EverlastingBugstopper, issue/731 pull/1070
Wrangler sure does send a lot of API requests! Before, about half of the API requests Wrangler sent would send them with the HTTP header
User-Agent: wrangler. Now, all requests sent by Wrangler include that User Agent. This lets the APIs we use know that the request is coming from this tool. Yay for being good netizens! -
Refactors and documentation of
wrangler dev- EverlastingBugstopper, pull/1220No behavior changes with this one, just some improvements to code layout and some extra documentation comments. Check it out if you're interested!
-