Skip to content

Commit 007aeb8

Browse files
Apply suggestions from code review
Co-authored-by: lrapoport-cf <[email protected]>
1 parent 7cd6d24 commit 007aeb8

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

src/content/changelog/workers/2025-03-13-wrangler-v4.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ Unlike previous major versions of Wrangler, which were [foundational rewrites](h
1818

1919
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).
2020

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.

src/content/docs/workers/languages/typescript/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ This means the correct types for your Worker depend on:
2525

2626
1. Your Worker's [compatibility date](/workers/configuration/compatibility-dates/).
2727
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`.
3030

3131
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.
3232

@@ -50,7 +50,7 @@ You can commit your types file to git if you wish.
5050

5151
:::note
5252

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.
5454

5555
:::
5656

src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,37 +11,37 @@ While many users should expect a no-op upgrade, the following sections outline t
1111

1212
### Summary of changes
1313

14-
- **Updated Node.js Support Policy:**
14+
- **Updated Node.js support policy:**
1515
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).
1616

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.
1818

1919
- **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.
2020

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.
2222

2323
## Detailed Changes
2424

25-
### Updated Node.js Support Policy
25+
### Updated Node.js support policy
2626

2727
Wrangler now supports only Node.js versions that align with [Node.js's official lifecycle](https://nodejs.org/en/about/previous-releases):
2828

2929
- **Supported**: Current, Active LTS, Maintenance LTS
3030
- **No longer supported:** Node.js v16 (EOL in 2022)
3131

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.
3333

34-
### esbuild Version Upgrade
34+
### Upgraded esbuild version
3535

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:
3737

3838
- **Dynamic imports:** Wildcard imports (for example, `import('./data/' + kind + '.json')`) now automatically include all matching files in the bundle.
3939

4040
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.
4141

4242
### Commands default to local mode
4343

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.
4545

4646
For example:
4747

@@ -50,9 +50,9 @@ For example:
5050

5151
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.
5252

53-
### Deprecated Commands and Configurations Removed
53+
### Deprecated commands and configurations removed
5454

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:
5656

5757
- 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/).
5858
- 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

Comments
 (0)