Releases: cloudflare/wrangler-legacy
v1.17.0
v1.17.0
-
Features
-
feat: integrate beta support for Durable Objects - xortive, pull/1812, pull/1824, pull/1856
-
feat: capture panics and generate error report - nilslice, pull/1888
This PR adds support for wrangler error reporting. Currently, all panics are caught and a report is generated, then written to disk.
wrangler report
orwrangler report --log <file-name.log>
will upload the corresponding error report to Cloudflare
-
-
Fixes
-
fix: clarify error messages around durable objects beta - nilslice, pull/1921
Disambiguates error message described in #1859, adds more clarity around other places where Durable Object usage in beta may conflict with
wrangler
functionality. -
Fix filtering by extension for js assets - rubenamorim, pull/1722
Fixes #1719
-
fix: use latest cloudflare api client, resolving wrangler whoami issue - nilslice, pull/1920
Updates
cloudflare-rs
crate to cloudflare/cloudflare-rs@ae936d4, which should fix #1914. -
Handle String panic payloads when generating reports - ObsidianMinor, pull/1934
Standard panics will only produce &str and String, but we were only handling &str, so this adds handling for String.
-
-
Maintenance
-
chore: tokio ecosystem update - nataliescottdavidson, pull/1886
Update tokio ecosystem crates including hyper, rustls, openssl and necessary API changes
Rewrite get_tunnel_url to use tokio-retry -
failure --> anyhow - caass, pull/1881
Follow up to #1880
Switch from deprecated
failure
toanyhow
. read this -
further reduce complexity of main - nilslice, pull/1937
In many ways, thanks to @ObsidianMinor's work on #1932, we can split up the cli code further and keep a simple
main.rs
. -
rebases & updates durable-objects-rc branch - nilslice, pull/1919
-
Reduce cognitive complexity in main - ObsidianMinor, pull/1932
This replaces our massive clap App with a much simpler Cli struct that
has all the same information in an easier to understand and modify
format (types). -
Updated cloudflared download link - arunesh90, pull/1900
The commit included with this PR updates the download link for cloudflared, as the previous link is no longer current and is now a redirect to https://developers.cloudflare.com/cloudflare-one/connections/connect-apps
-
Upgrade to GitHub-native Dependabot - dependabot, pull/1887
-
🍏 v1.16.1
It's Apple M1 time! This release provides support for M1 (Apple Silicon) devices through the use of the x86_64 binary which will be run using Apple's Rosetta 2 instruction set translator. This is also true for the various binary dependencies of wrangler
, such as: wasm-pack
, cargo-generate
. If not installed, these will be built from source automatically.
To install wrangler
and use it on M1 (Apple Silicon) devices, follow the same instructions for other architectures found here: https://developers.cloudflare.com/workers/cli-wrangler/install-update#install
As always, please report issues if you encounter any!
-
Features
-
Add
wasm_modules
config field for bundling arbitrary WebAssembly modules. - losfair, pull/1803Currently it seems that wrangler only supports WebAssembly modules included from a
rust
orwebpack
project.This pull request enables the inclusion of arbitrary WebAssembly modules through a
wasm_modules
config field.
-
-
Fixes
-
fix: use x86_64 arch for pre-built downloads on M1 devices - nilslice, pull/1876
This PR forces the use of a pre-built x86_64 binary on a aarch64/arm64 Apple system. For M1 devices specifically, it will fix
wrangler generate
, andwrangler build
fortype = "rust"
wrangler projects.There is another semi-related
... truncated -
chore: include @cloudflare/binary-install directly as source - nilslice, pull/1877
This PR inlines the
@cloudflare/binary-install
dependency as a quickfix for #1811, in which usage reports indicated that the module occasionally failed to install.I tested this by running
npm i && node run-wrangler.js
on both `npm
... truncated -
Stop assuming KV values are UTF8 text - koeninger, pull/1878
Implementation of kv:key get is calling text() on the result of the api call, so it's replacing non-utf8 values with ef bf bd, the unicode REPLACEMENT CHAR. KV values can be arbitrary bytes, we shouldn't assume they're UTF8 text, so this p
... truncated
-
🔧 v1.16.0
https://developers.cloudflare.com/workers/cli-wrangler/configuration#build
-
Features
-
Custom Builds and Modules - xortive, caass, pull/1855
Custom Builds and Modules has finally landed in a main release!
There's too many new features to write about in a changelog, so here's a
link to the docs. -
add
--format
option, including defaultjson
and newpretty
- caass, pull/1851You can now pass
--format pretty
towrangler tail
to get pretty printed logs!
--format json
is also available, and gives you the existing JSON-formatted logs.
-
-
Fixes
-
Revert "Print line and column numbers for exception thrown (#1645)" - Electroid, pull/1835
This reverts commit 74a89f7.
Closes #1826
This commit is causing
wrangler dev
to not show uncaught exceptions. Revertingchrome-devtools-rs
was also necessary.We have a fix in progress to fix the underlying issue and re-introduce line and column numbers.
-
Don't generate
usage_model = ""
by default - xortive, issues/1850Generating
usage_model = ""
by default was violating the toml spec, which broke
wrangler init --site
asusage_model
came after[site]
.
-
v1.16.0-durable-objects-rc.0
Changelog
- Custom Builds - Custom Builds have been stabilized as part of 1.16.0. As part of this, we changed the configuration format to reduce confusion about what fields apply when using
"service-worker"
vs"modules"
, and to reduce confusion about how we use the"main"
and"module"
keys inpackage.json
. The new[build]
section is documented here
Installation
npm (recommended)
npm install -g @cloudflare/wrangler@beta
from source
git clone https://github.com/cloudflare/wrangler.git
cd wrangler
git checkout durable-objects-rc
cargo install --path . --debug
Overview
Howdy y'all, we just published candidate release 0 for Durable Objects! This is a continuation of the Custom Builds RC, but renamed to the Durable Objects RC as custom builds have been stabilized.
Durable Objects
Wrangler now supports Durable Objects! We've introduced a new configuration section [durable_objects]
that allows you to configure which Durable Objects your project can call into using bindings.
Because Durable Objects are written using modules, you must use custom builds for Durable Objects projects. Templates are provided below.
Accessing Durable Objects
To access Durable Objects, you must configure a binding in wrangler.toml
with the class name and script name
whose objects you wish to access using the binding. The script name can be omitted when creating a binding
for a class in the same script.
[durable_objects]
# In rc.1, `bindings` was called `classes`. We'll accept that in rc.2, but in rc.3 and later it will be an error.
bindings = [
# NOTE: inline tables in TOML must be on a single line
{ name = "COUNTER", class_name = "Counter" }, # Binding to the Counter class in the same script
{ name = "CHAT_ROOM", class_name = "ChatRoom", script_name = "chatroom" } # Binding to the ChatRoom class in a different script
]
The [durable_objects]
section has 1 subsection:
bindings
- An array of tables, each table can contain the below fieldsname
- Required, The binding name to use within your workerclass_name
- Required, The class name you wish to bind to.script_name
- Optional, Defaults to the current project's script.
Preparing Durable Objects Classes
When you export a new Durable Objects Class from your script, you must tell the Workers platform about it
before you can create and access Durable Objects associated with that class and script. You can read more about exporting
a new class in the docs.
This process is called a "migration", and is currently performed via extra options on wrangler publish
.
To allow creation of Durable Objects associated with an exported class, you'd use --new-class
:
wrangler publish --new-class Counter
If you want to rename a Durable Object Class that has already been created, you'd use --rename-class
:
WARNING: Make sure to update any bindings to point to the new class name as well!
wrangler publish --rename-class Counter CounterNew
If you want to transfer the Durable Objects associated with a Class in another script to a new Class in this script, you'd use --transfer-class
:
WARNING: Make sure to update any bindings to the new script name and class name as well!
wrangler publish --transfer-class counter-script ClassNameInOldScript ClassNameInThisScript
If you want to delete the Durable Objects associated with an exported class, you'd use --delete-class
:
WARNING: This will delete all Durable Objects (and their data) associated with the deleted Durable Objects Class!
wrangler publish --delete-class Counter
These are basic examples -- you can use multiple of these options in a single wrangler publish
call, one Durable Objects Class per option.
The following example adds 2 new classes (Counter and ChatRoom) and deletes the OldDeprecatedCode class
wrangler publish --new-class Counter --new-class ChatRoom --delete-class OldDeprecatedCode
Durable Objects Templates
We've made 2 templates so you can try out Durable Objects in wrangler:
One uses Rollup to bundle a Worker written using ES Modules, while the other uses Webpack to bundle a worker written as CommonJS modules.
wrangler generate <worker-name> https://github.com/cloudflare/durable-objects-rollup-esm
wrangler generate <worker-name> https://github.com/cloudflare/durable-objects-webpack-commonjs
🐛 v1.15.1
1.15.1
-
Features
- Add config option to switch usage model to unbound - ObsidianMinor, pull/1837
-
Fixes
-
fix: remove unused import of WasmMainTemplatePlugin - jasikpark, pull/1802
This should improve #1721. #1721 (comment)
-
Hot fix for error message helper not working - Electroid, pull/1847
The JSON is pretty printed, which means it contains a space.
-
Revert "Print line and column numbers for exception thrown (#1645)" - Electroid, pull/1835
This reverts commit 74a89f7.
Closes #1826
This commit is causing
wrangler dev
to not show uncaught exceptions. Revertingchrome-devtools-rs
was also necessary.
-
v1.15.0-custom-builds-rc.2
This beta release is now out of date, it has been replaced by v1.16.0-durable-objects-rc.0
v1.15.0-custom-builds-rc.1
This beta release is now out of date, it has been replaced by v1.15.0-custom-builds-rc.2
v1.15.0-custom-builds-rc.0
This beta release is now out of date, it has been replaced by v1.15.0-custom-builds-rc.1
v1.15.0
-
Fixes
-
fix: remove unused import of WasmMainTemplatePlugin - jasikpark, pull/1802
This should improve #1721. #1721 (comment)
-
Revert pull/1748 - xortive, pull/1804
pull/1748 turned out to interact poorly with workers-sites projects, causing
npm install
to not be run, breaking the build.We're going to revert this change. Folks already depending on it should use custom builds (pull/1677) once it makes it into a release candidate.
We incremented the minor version number instead of making a patch release, as this change is more significant than a simple bugfix.
-
v1.14.1
1.14.1
-
Fixes
-
revert default install location change - xortive, pull/1798
In 1.14.0, we changed the default install location from
~/.wrangler
tonode_modules
,
to allownpx wrangler
to use the pinned version in a project's dependencies. It seems that
this is causing issues, so we're rolling it back in favor of having folks who want this behavior,
to specify a the install location in theconfig
section of package.json. We'll document this soon.
-
1.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
[email protected] 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
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 :)
-