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
Copy file name to clipboardExpand all lines: src/content/changelog/workers/2025-03-13-wrangler-v4.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,4 +18,4 @@ Unlike previous major versions of Wrangler, which were [foundational rewrites](h
18
18
19
19
A [detailed migration guide](/workers/wrangler/migration/update-v3-to-v4) is available and if you find a bug or hit a roadblock when upgrading to Wrangler v4, [open an issue on the `cloudflare/workers-sdk` repository on GitHub](https://github.com/cloudflare/workers-sdk/issues/new?template=bug-template.yaml).
20
20
21
-
Going forward, we'll continue supporting Wrangler v3 with bug fixes and security updates until Q1 2026, and continue supporting Wrangler v3 with critical security updates until Q1 2027, at which point it will be out of support.
21
+
Going forward, we'll continue supporting Wrangler v3 with bug fixes and security updates until Q1 2026, and with critical security updates until Q1 2027, at which point it will be out of support.
Copy file name to clipboardExpand all lines: src/content/docs/workers/languages/typescript/index.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,8 +25,8 @@ This means the correct types for your Worker depend on:
25
25
26
26
1. Your Worker's [compatibility date](/workers/configuration/compatibility-dates/).
27
27
2. Your Worker's [compatibility flags](/workers/configuration/compatibility-flags/).
28
-
3. Your Worker's bindings, which are accessed on the `env` object.
29
-
4. Any [module rules](/workers/wrangler/configuration/#inheritable-keys) you have specified in your Wrangler configuration file under `rules`.
28
+
3. Your Worker's bindings, which are defined in your [Wrangler configuration file](/workers/wrangler/configuration).
29
+
4. Any [module rules](/workers/wrangler/configuration/#bundling) you have specified in your Wrangler configuration file under `rules`.
30
30
31
31
For example, the runtime will only allow you to use the [`AsyncLocalStorage`](https://nodejs.org/api/async_context.html#class-asynclocalstorage) class if you have `compatibility_flags = ["nodejs_als"]` in your [Wrangler configuration file](/workers/wrangler/configuration/). This should be reflected in the type definitions.
32
32
@@ -50,7 +50,7 @@ You can commit your types file to git if you wish.
50
50
51
51
:::note
52
52
53
-
To ensure that your types are always up-to-date, make sure to run `wrangler types` after any changes to your config file.\*\*
53
+
To ensure that your types are always up-to-date, make sure to run `wrangler types` after any changes to your config file.
Copy file name to clipboardExpand all lines: src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,37 +11,37 @@ While many users should expect a no-op upgrade, the following sections outline t
11
11
12
12
### Summary of changes
13
13
14
-
-**Updated Node.js Support Policy:**
14
+
-**Updated Node.js support policy:**
15
15
Node.js v16, which reached End-of-Life in 2022, is no longer supported in Wrangler v4. Wrangler now follows Node.js's [official support lifecycle](https://nodejs.org/en/about/previous-releases).
16
16
17
-
-**esbuild Version Upgrade**: Wrangler v4 uses [esbuild](https://esbuild.github.io/) to bundle Worker code before deploying it, and was previously pinned to esbuild v0.17.19. Wrangler v4 uses esbuild v0.24, which could impact dynamic wildcard imports.
17
+
-**Upgraded esbuild version**: Wrangler uses [esbuild](https://esbuild.github.io/) to bundle Worker code before deploying it, and was previously pinned to esbuild v0.17.19. Wrangler v4 uses esbuild v0.24, which could impact dynamic wildcard imports.
18
18
19
19
-**Commands default to local mode**: All commands that can run in either local or remote mode now default to local, requiring a `--remote` flag for API queries.
20
20
21
-
-**Deprecated commands and configurations removed:** Legacy commands, flags, and configurations have been removed.
21
+
-**Deprecated commands and configurations removed:** Legacy commands, flags, and configurations are removed.
22
22
23
23
## Detailed Changes
24
24
25
-
### Updated Node.js Support Policy
25
+
### Updated Node.js support policy
26
26
27
27
Wrangler now supports only Node.js versions that align with [Node.js's official lifecycle](https://nodejs.org/en/about/previous-releases):
28
28
29
29
-**Supported**: Current, Active LTS, Maintenance LTS
30
30
-**No longer supported:** Node.js v16 (EOL in 2022)
31
31
32
-
Wrangler tests no longer run on v16, and users still on this version may encounter unsupported behavior. Users still using Node.js v16 must upgrade to a supported version (currently v18 or higher) to continue receiving support and compatibility with Wrangler.
32
+
Wrangler tests no longer run on v16, and users still on this version may encounter unsupported behavior. Users still using Node.js v16 must upgrade to a supported version to continue receiving support and compatibility with Wrangler.
33
33
34
-
### esbuild Version Upgrade
34
+
### Upgraded esbuild version
35
35
36
-
Wrangler v4 upgraded esbuild from **v0.17.19** to **v0.24**, bringing improvements (such as the ability to use the `using` keyword with RPC) and changes to bundling behavior:
36
+
Wrangler v4 upgrades esbuild from **v0.17.19** to **v0.24**, bringing improvements (such as the ability to use the `using` keyword with RPC) and changes to bundling behavior:
37
37
38
38
-**Dynamic imports:** Wildcard imports (for example, `import('./data/' + kind + '.json')`) now automatically include all matching files in the bundle.
39
39
40
40
Users relying on wildcard dynamic imports may see unwanted files bundled. Prior to esbuild v0.19, `import` statements with dynamic paths ( like `import('./data/' + kind + '.json')`) did not bundle all files matches the glob pattern (`*.json`) . Only files explicitly referenced or included using `find_additional_modules` were bundled. With esbuild v0.19, wildcard imports now automatically bundle all files matching the glob pattern. This could result in unwanted files being bundled, so users might want to avoid wildcard dynamic imports and use explicit imports instead.
41
41
42
42
### Commands default to local mode
43
43
44
-
All commands now run in **local mode by default.** Wrangler has many commands for accessing resources like KV and R2, but the commands were previously inconsistent in whether they run in a local or remote environment. For example, D1 defaults to querying a local datastore, and requires the `--remote` flag to query via the API. KV, on the other hand, previously defaulted to querying via the API (implicitly using the `--remote` flag) and required a `--local` flag to query a local datastore. In order to make the behavior consistent across Wrangler, each command now uses the `--local` flag by default, and will require an explicit `--remote` flag to query via the API.
44
+
All commands now run in **local mode by default.** Wrangler has many commands for accessing resources like KV and R2, but the commands were previously inconsistent in whether they ran in a local or remote environment. For example, D1 defaulted to querying a local datastore, and required the `--remote` flag to query via the API. KV, on the other hand, previously defaulted to querying via the API (implicitly using the `--remote` flag) and required a `--local` flag to query a local datastore. In order to make the behavior consistent across Wrangler, each command now uses the `--local` flag by default, and requires an explicit `--remote` flag to query via the API.
45
45
46
46
For example:
47
47
@@ -50,9 +50,9 @@ For example:
50
50
51
51
Those using `wrangler kv key` and/or `wrangler r2 object` commands to query or write to their data store will need to add the `--remote` flag in order to replicate previous behavior.
52
52
53
-
### Deprecated Commands and Configurations Removed
53
+
### Deprecated commands and configurations removed
54
54
55
-
All previously deprecated features in [Wrangler v2](https://developers.cloudflare.com/workers/wrangler/deprecations/#wrangler-v2) and in [Wrangler v3](https://developers.cloudflare.com/workers/wrangler/deprecations/#wrangler-v3)have now been removed. Additionally, the following features that were deprecated during the Wrangler v3 release have been removed:
55
+
All previously deprecated features in [Wrangler v2](https://developers.cloudflare.com/workers/wrangler/deprecations/#wrangler-v2) and in [Wrangler v3](https://developers.cloudflare.com/workers/wrangler/deprecations/#wrangler-v3)are now removed. Additionally, the following features that were deprecated during the Wrangler v3 release are also now removed:
56
56
57
57
- Legacy Assets (using `wrangler dev/deploy --legacy-assets` or the `legacy_assets` config file property). Instead, we recommend you [migrate to Workers assets](https://developers.cloudflare.com/workers/static-assets/).
58
58
- Legacy Node.js compatibility (using `wrangler dev/deploy --node-compat` or the `node_compat` config file property). Instead, use the [`nodejs_compat` compatibility flag](https://developers.cloudflare.com/workers/runtime-apis/nodejs). This includes the functionality from legacy `node_compat` polyfills and natively implemented Node.js APIs.
0 commit comments