@cloudflare/wrangler
Advanced tools
Changelog
1.14.0
Display account ID's when possible - caass, pull/1786
Previously, users had to log in to their dash to view their account IDs. This PR extracts some of the code used in whoami
to log their account IDs to the terminal, instead. If for some reason that doesn't work, it'll fall back to telling them to look at the dashboard
Feature/monorepo support - thefill, pull/1748
Improvement of the detection of node_modules dir - adds bottom-up traversing to find it in parent dirs.
This should resolve some issues experienced with monorepos (e.g. with nx).
fix installer - xortive, pull/1780
binary-install@0.1.1 broke semver, this PR changes our installer to use a cloudflare-owned version of binary-install with updated dependencies to resolve the previous vulnerability warnings from the old version of axios that was being used.
This is also a feature, since we now install the wrangler
binary in node_modules
instead of ~/.wrangler
.
This means installing wrangler as a dev dependency works as expected -- npx wrangler
will run the version
in your dev dependencies, not the globally installed wrangler.
Wrangler will now also support setting the WRANGLER_INSTALL_PATH
environment variable to choose where you install the wrangler binary.
This environment variable must be set when running wrangler, as well as when installing it.
kv put with metadata - ags799, pull/1740
Closes #1734
don't panic on Client build - ags799, pull/1750
This won't fix the issue #1743 but it should give us some more context.
endlessly retry connection to devtools websocket - ags799, pull/1752
Endlessly retry connection to preview's devtools websocket on wrangler dev
. With exponential backoff.
Keeps us from panicking in issue/1510.
fix console formatting - mdycz, pull/1749
Fixes #1707
Bump futures-util from 0.3.11 to 0.3.13 - dependabot, pull/1778
Remove extra required_override call from sites ignore logic - xortive, pull/1754
remove webpack specific change - xtuc, pull/1730
We used to hook directly into webpack internals to rewrite the runtime that loads Wasm to make it point to the Worker binding instead of a network fetch.
This change removes the webpack specific change and injects a generic runtime to ... truncated
Set panic to abort in release mode - ObsidianMinor, pull/1762
This should fix cases where we spawn threads that panic and get us in an invalid state that requires us to get killed anyway.
Tweak issue templates - Electroid, pull/1776
Made minor edits to the issue templates
update binary-install to avoid vulnerable axios version - simonhaenisch, pull/1726
Fixes the security warnings when installing the wrangler npm package!
Update README.md for windows install - koeninger, pull/1779
note about https://github.com/cloudflare/wrangler-legacy/issues/1765
Update release.yml - xortive, pull/1783
thanks @rajatsharma for spotting this :)
Changelog
❗️ 1.12.2
Fix issue which caused wrangler publish
to nuke sites - ObsidianMinor, issue/1625 pull/1631 pull/1635
Y'all, we messed up and applied the wrong fix. The change which caused this problem was this.
Changelog
❗️ 1.12.1
Revert "allow site to be configured by environment - nataliescottdavidson, issue/1625 pull/1626
previous pr caused an issue.
Changelog
⏰ 1.12.0
Add support for Cron triggers - ObsidianMinor, issue/1574 pull/1592
Cron triggers are a new Cloudflare Workers feature which allow you to schedule execution times to call your workers.
Structured output for wrangler publish
- nataliescottdavidson, issue/1460 pull/1538 pull/1528 pull/1522
wrangler publish --output json
produces structured json output which can be parsed with tools such as jq.
Upload .well-known dotfiles - nataliescottdavidson, issue/980 pull/1566
Wrangler sites users requested the ability to include the .well-known folder without including all hidden files.
Print url for wrangler login - encadyma, issue/1544 pull/1611
Allow site key to be configured by environment - oliverpool, issue/1567 pull/1573
Handle leading slashes in KV keys - koeninger, issue/1560 pull/1559
Update stalebot settings - ispivey, pull/1561
Stalebot now waits 180 days to mark stale, it marks 'timed out' instead of 'wontfix', and added 'never stale' tag.
Pin Rust to 1.47 and fix clippy lints - ObsidianMinor, pull/1609
Copy edit on --host argument description - thmsdnnr, issue/1545 pull/1564
Hide stderr from browser process - jspspike, pull/1516
Wrangler login had the potential to cause random terminal output.
Changelog
🌊 1.11.0
New configuration method with wrangler login
- jspspike, pull/1471
wrangler login
allows you to authenticate Wrangler to use your Cloudflare user credentials without hunting down an API token in the Cloudflare dashboard. It's straightforward! Just run wrangler login
, enter your credentials, and you're off to the races.
wrangler dev
now runs on the same machines as your production code - EverlastingBugstopper avidal jwheels, pull/1085
When running wrangler dev
as an authenticated user, your requests will now run on the same servers that Cloudflare Workers run on in production. This means that what you see is what you get. wrangler dev
should behave exactly like production, though we still recommend deploying to a staging website before going to production in order to ensure your changes are safe. This change means you get access to things like request.cf
, the Cache API, and any Cloudflare settings you've applied in the dashboard while developing your Workers.
wrangler dev
now supports redirects` - jspspike, issue/1508 pull/1512
When an HTTP response status code is between 300 and 399, the server lets the client know that the data they're looking for isn't here anymore, and the client should issue another separate request to the endpoint denoted in the Location
header of the response. Before, if you were developing with wrangler dev
on example.com
, and your Worker issued a redirect from https://example.com/oldurl
to https://example.com/newurl
, that's what would be in the Location
header. This meant that whatever client you were using would then issue their second request to the public Internet rather than the wrangler dev
server running on your local machine. With this release, the Location
header would now be rewritten to http://127.0.0.1:8787/newurl
, preventing your client from redirecting you away from the Worker you're trying to develop.
Add --config
flag to all commmands to override the default wrangler.toml
configuration file path - luanraithz, issue/1064 pull/1350
All commands that read from a configuration file can now use a different configuration file path if the --config
flag is specified. The commands affected are: kv:namespace
, kv:key
, kv:bulk
, route
, secret
, build
, preview
, dev
, publish
, subdomain
, and tail
.
wrangler dev
configuration options for HTTP protocol - jspspike, issue/1204 pull/1485
wrangler dev
now takes two additional configuration flags: --upstream-protocol
and --local-protocol
. Both of these take a value of either http
or https
. --upstream-protocol
determines what protocol the request going to your preview worker is (previously this was only controlled with the --host
flag) - this flag defaults to https
. --local-protocol
determines what protocol wrangler dev
listens for and defaults to http
. If https
is chosen, a self-signed certificate will be auto-generated for the dev server.
wrangler dev
can be configured in wrangler.toml
- jspspike, issue/1282 pull/1477
Any flag taken by wrangler dev
(except --host
) can now be configured in the [dev]
section of your wrangler.toml
. This allows different developers on the same project to share and persist settings for their local development environment.
Check if rustc
is installed before building a Rust project - ObsidianMinor, issue/487 pull/1461
Improve preview_id
error message - EverlastingBugstopper, issue/1458 pull/1465
When a preview_id
is needed, the error message directs the user to add it to their wrangler.toml
.
Prevent wrangler preview
and wrangler dev
for a Workers Site if there is no authenticated user - jspspike, issue/1138 pull/1447
Fix wrangler route
commands that take an --env
flag - jspspike, issue/1216 pull/1448
Before, if you passed an environment to a wrangler route
command, it wouldn't work properly due to some mishandling of the arguments in the way we used our command line argument parser. This is now fixed and wrangler route
commands work as expected.
Open browser as child process - jspspike, issue/516 pull/1495
When running wrangler preview
, the browser is now opened as a child process. This fixes an issue on Linux where Wrangler would start the browser and then hang waiting for the browser to exit before it begins watching for changes.
Direct cloudflared output with wrangler tail
to /dev/null
- jspspike, issue/1432 pull/1450
Workers Unlimited is now Workers Bundled - EverlastingBugstopper, issue/1466 pull/1467
Replace assert
with ==
in tests with assert_eq
- sudheesh001, pull/1455
Various typo fixes - sudheesh001 jbampton, pull/1423 pull/1427 pull/1428 pull/1429 pull/1431 pull/1443 pull/1454
Removed unreachable code in main.rs
- luanraithz, pull/1444
Changelog
🐹 1.10.3
wrangler dev
listens on IPv4 by default - EverlastingBugstopper, issue/1198 pull/1405
Before, wrangler dev
would listen on [::1]:8787
by default, and call it localhost
in the terminal output. This was confusing for developers whose localhost
resolves to IPv4 and not IPv6. Now, wrangler dev
will listen on 127.0.0.1:8787
by default. This can be overriden by passing values via the --ip
and --port
flags.
Clarify where to find your account_id
in the dashboard - EverlastingBugstopper, issue/1364 pull/1395
When you create a new project with wrangler generate
, it directs you to the Cloudflare Dashboard to find your account_id
and zone_id
. However, this flow only worked if you had your own domain. Developers who only use workers.dev
for their Workers were directed to a page that does not exist! This message now points everyone to a page where they can find the information that they need.
Allow creation of preview namespaces when a namespace already exists in wrangler.toml
- EverlastingBugstopper, pull/1414
When we introduced KV preview namespaces, we made sure to add nice messages when creating new namespaces so people could easily add the new namespace id to their wrangler.toml in the correct place.
However, we missed a very common case where developers already have a production namespace defined in their wrangler.toml
and they want to add a preview namespace. When this is the case, we returned an error message intended to only be thrown when running either wrangler preview or wrangler dev. This is now fixed!
Allow multiple response header values in wrangler dev
- EverlastingBugstopper, issue/1412 pull/1413
Before, wrangler dev
would not properly handle response headers that have multiple values. We would iterate over all response headers coming from the Workers runtime, and "insert" them into the header map instead of appending them. This is no longer the case and response headers should now work as expected. More details on this issue can be found here.
Fix kv-namespace/kv_namespace behavior in environments - EverlastingBugstopper, issue/1408 pull/1409
When KV namespace support was initially added to Wrangler, we documented using kv-namespaces
in wrangler.toml
. Unfortunately, the -
was not consistent with other fields such as zone_id
and account_id
, so the decision was made to allow both kv-namespaces
and kv_namespaces
. When this change was introduced, it worked with top level kv_namespaces
entries, but not in environments. This is now fixed! You can now use kv_namespaces
everywhere you can use kv-namespaces
.
Add link to testing docs in CONTRIBUTING.md - luanraithz, pull/1416
Remove unused Krate::install
code - EverlastingBugstopper, [issue/247] pull/1410
When we introduced our own version checking for Wrangler we stopped using Krate::install
. This PR just removes that unused code.