You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Use the latest JavaScript features with Wrangler CLI v4 — release candidate
3
3
description: You can now try out the v4 RC for Wrangler by installing `[email protected]`
4
4
products:
5
5
- workers
@@ -8,26 +8,26 @@ date: 2025-02-27T11:00:00Z
8
8
9
9
import { PackageManagers } from"~/components";
10
10
11
-
TLDR: Try out the Wrangler v4 RC by installing via your favourite package manager:
11
+
We've released a release candidate of the next major version of [Wrangler](/workers/wrangler/), the CLI for Cloudflare Workers — `[email protected]`. You can run the following command to install it and be one of the first to try it out:
12
12
13
13
<PackageManagerspkg="wrangler@v4-rc" />
14
14
15
-
Wrangler v3 was released in May 2023, and since then has seen amazing growth and usage—from just \~250,000 downloads a week back then to 1M+ now. It's time for the next chapter in Wrangler's journey: v4. This release will bring new features and unlock new possibilities for the developer platform. And for the vast majority of users, _no changes will be necessary to upgrade_—it'll be as simple as upgrading Wrangler.
15
+
Unlike previous major versions of Wrangler, which were foundational rewrites and rearchitectures — Version 4 of Wrangler includes a much smaller set of changes. If you use Wrangler today, your workflow is very unlikely to change. Before we release Wrangler v4 and advance past the release candidate stage, we'll share a detailed migration guide in the Workers developer docs. But for the vast majority of cases, you won't need to do anything to migrate — things will just work as they do today.
16
16
17
-
We're working on a detailed migration guide that will accompany the v4 release. In the meantime, here's a brief list of the changes to expect:
17
+
Most notably, version 4 of Wrangler updates the version of [esbuild](https://esbuild.github.io/) that Wrangler uses internally, allowing you to use modern JavaScript language features, including:
18
18
19
-
#### Changes
19
+
- the [`using` keyword from the Explicit Resourece Management standard](https://github.com/tc39/proposal-explicit-resource-management), making it easier to work with the [JavaScript-native RPC system built into Workers](/workers/runtime-apis/rpc/).
20
+
-importattributes
20
21
21
-
-**Upgraded `esbuild` version**
22
-
A long-time highly-requested feature, this will now allow the use of more modern JavaScript features in Workers, including import attributes and `using` statements
22
+
Version 4 alsointroducesthefollowingchanges:
23
23
24
-
-**`--local`by default for all commands**
25
-
All commands that access resources (for example, `wrangler kv`, `wrangler r2`, `wrangler d1`) will now access local datastores by default
Movingforward, the[active, maintenance, andcurrentversionsofNode.js](https://nodejs.org/en/about/previous-releases) will be officially supported. This means the minimum officially supported version of Node.js for Wrangler v4 will e Node.js v18 or later. This policy mirrors how many other packages and CLIs support older versions of Node.js, and ensures that as long as you are using a version of Node.js that the Node.js project itself supports, this will be supported by Wrangler as well.
0 commit comments