Releases: cloudflare/wrangler-legacy
v1.14.0
-
Features
-
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 innode_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
-
-
Fixes
-
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
-
-
Maintenance
-
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 #1765
-
Update release.yml - xortive, pull/1783
thanks @rajatsharma for spotting this :)
-
v1.13.0
1.13.0
-
Features
-
Fixes
-
Maintenance
v1.12.3
βοΈ 1.12.2
βοΈ 1.12.2
-
Fixes
-
Fix issue which caused
wrangler publish
to nuke sites - ObsidianMinor, issue/1625 pull/1631 pull/1635Y'all, we messed up and applied the wrong fix. The change which caused this problem was this.
-
v1.12.1
-
Fixes
-
Revert "allow site to be configured by environment - nataliescottdavidson, issue/1625 pull/1626
previous pr caused an issue.
-
β° 1.12.0
-
Features
-
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/1522wrangler 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
-
-
Fixes
- Handle leading slashes in KV keys - koeninger, issue/1560 pull/1559
-
Maintenance
-
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.
-
-
Docs
π 1.11.0
-
Features
-
New configuration method with
wrangler login
- jspspike, pull/1471wrangler 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 runwrangler 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/1085When 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 likerequest.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/1512When 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 withwrangler dev
onexample.com
, and your Worker issued a redirect fromhttps://example.com/oldurl
tohttps://example.com/newurl
, that's what would be in theLocation
header. This meant that whatever client you were using would then issue their second request to the public Internet rather than thewrangler dev
server running on your local machine. With this release, theLocation
header would now be rewritten tohttp://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 defaultwrangler.toml
configuration file path - luanraithz, issue/1064 pull/1350All 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
, andtail
. -
wrangler dev
configuration options for HTTP protocol - jspspike, issue/1204 pull/1485wrangler dev
now takes two additional configuration flags:--upstream-protocol
and--local-protocol
. Both of these take a value of eitherhttp
orhttps
.--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 tohttps
.--local-protocol
determines what protocolwrangler dev
listens for and defaults tohttp
. Ifhttps
is chosen, a self-signed certificate will be auto-generated for the dev server. -
wrangler dev
can be configured inwrangler.toml
- jspspike, issue/1282 pull/1477Any flag taken by
wrangler dev
(except--host
) can now be configured in the[dev]
section of yourwrangler.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/1465When a
preview_id
is needed, the error message directs the user to add it to theirwrangler.toml
. -
Prevent
wrangler preview
andwrangler dev
for a Workers Site if there is no authenticated user - jspspike, issue/1138 pull/1447
-
-
Fixes
-
Fix
wrangler route
commands that take an--env
flag - jspspike, issue/1216 pull/1448Before, 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 andwrangler 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
-
-
Maintenance
-
Workers Unlimited is now Workers Bundled - EverlastingBugstopper, issue/1466 pull/1467
-
Replace
assert
with==
in tests withassert_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
-
π v1.11.0-rc.1
What's changed?
Release Candidate 1 adds wrangler login
, a new way to easily authenticate wrangler using your Cloudflare username and password. Just type wrangler login
, follow the login process, and you'll be authenticated. Release Candidate 1 also adds extra features to wrangler dev
. You can now change the protocol of the local server wrangler dev
creates and how those requests are forwarded with the --local-protocol
and --upstream-protocol
arguments. For example, this is what it would look like if you wanted the local server to use https:
$ wrangler dev --local-protocol=https
π JavaScript project found. Skipping unnecessary build!
π watching "./"
π Listening on https://127.0.0.1:8787
π Generated certificate is not verified, browsers will give a warning and curl will require `--insecure`
[2020-08-13 12:03:39] GET worker.ftc.workers.dev/ HTTP/1.1 200 OK
Finally the arguments for wrangler dev
can now be set in your wrangler.toml
under the [dev]
section. All arguments other than host are valid.
name = "worker"
type = "javascript"
account_id = "acountidslkfdjskldfjslkdjfls"
workers_dev = true
route = ""
zone_id = "zoneidjalsdkfjlskd324svadvdf"
[dev]
ip="127.0.0.1"
port=8787
local_protocol="http"
upstream_protocol="https"
Installation
npm i @cloudflare/wrangler@beta -g
Creating a project
The documentation below assumes you have some familiarity with Wrangler and are already developing Workers. If this is not the case that is OK, come back after you've read through our Quickstart and have gotten up and running with Wrangler.
Testing the new wrangler dev
If you're already familiar with wrangler dev
, you'll know that it spins up a development server that you can use to test the functionality of your Worker. With this release, wrangler dev
will now connect directly to an instance of the Cloudflare Workers runtime running on the same servers that your code runs on in production. This will enable you to use the Cache API and should eliminate any inconsistency between responses from wrangler dev
and your production worker.
Behavior Changes
wrangler dev
will now treat the worker you're developing like it would when you runwrangler publish
. This means you will need to specifyworkers_dev
orzone_id
androute
in your project's configuration file before usingwrangler dev
.- For workers running on your own domain, your development worker will only run on the
routes
specified in your configuration file. Lets say that in production you have a worker running onexample.com/*
and you want to start development of a new worker with a routeexample.com/test
. In this scenario, when you runwrangler dev
, and thencurl 127.0.0.1:8787
you will get a response from the worker currently running in production at the routeexample.com/*
. If you want to test your preview worker, you will need tocurl 127.0.0.1:8787/test
. In this scenario, the request host in the Workers runtime would be https://example.com - For workers running on workers.dev, the request host will be https://projectname.yoursubdomain.workers.dev
- You can now test your Worker's caching behavior with the Cache API
- You can now test your Worker with
event.request.cf
(no longerundefined
) - The
--host
flag is now only used when you are not an authenticated Cloudflare user
Feedback
We'd like to know if you notice any different behavior between requests made to a wrangler dev
instance, and requests made after you publish your Worker. We want your experience with wrangler dev
to match what you see in production. If you'd like to provide feedback on wrangler dev
, you can comment on this issue or file a new one! Just make sure to prefix your issue title with [dev]
.
π€ 1.11.0-rc.0
This beta release is now out of date. If you previously installed this release, you should reinstall with npm i -g @cloudflare/wrangler@beta
and see what's changed in the latest release.
πΉ 1.10.3
-
Features
-
wrangler dev
listens on IPv4 by default - EverlastingBugstopper, issue/1198 pull/1405Before,
wrangler dev
would listen on[::1]:8787
by default, and call itlocalhost
in the terminal output. This was confusing for developers whoselocalhost
resolves to IPv4 and not IPv6. Now,wrangler dev
will listen on127.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/1395When you create a new project with
wrangler generate
, it directs you to the Cloudflare Dashboard to find youraccount_id
andzone_id
. However, this flow only worked if you had your own domain. Developers who only useworkers.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.
-
-
Fixes
-
Allow creation of preview namespaces when a namespace already exists in
wrangler.toml
- EverlastingBugstopper, pull/1414When 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/1413Before,
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
inwrangler.toml
. Unfortunately, the-
was not consistent with other fields such aszone_id
andaccount_id
, so the decision was made to allow bothkv-namespaces
andkv_namespaces
. When this change was introduced, it worked with top levelkv_namespaces
entries, but not in environments. This is now fixed! You can now usekv_namespaces
everywhere you can usekv-namespaces
.
-
-
Maintenance
-
Add link to testing docs in CONTRIBUTING.md - luanraithz, pull/1416
-
Remove unused
Krate::install
code - EverlastingBugstopper, [issue/247] pull/1410When we introduced our own version checking for Wrangler we stopped using
Krate::install
. This PR just removes that unused code.
-