-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Wrangler v4 migration guide #18726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrangler v4 migration guide #18726
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 files reviewed, 1 total issue(s) found.
src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx
Outdated
Show resolved
Hide resolved
Deploying cloudflare-docs with
|
| Latest commit: |
1439676
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://49174f61.cloudflare-docs-7ou.pages.dev |
| Branch Preview URL: | https://wrangler-v4-migration.cloudflare-docs-7ou.pages.dev |
|
|
||
| * **Commands default to local mode**: All commands now run in local mode by default, requiring a `--remote` flag for API queries, | ||
|
|
||
| * **Changes to KV command output formats**: `wrangler kv list` now outputs data in a format compatible with `wrangler kv bulk delete.` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove this
| * **Updated Node.js Support Policy:** | ||
| 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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be slightly reworded to make it clear it refers to the versions of Node you can run Wrangler in rather than the version of Node that Wrangler supports (which to me potentially implies that it'd work in a Worker)?
src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
Co-authored-by: Somhairle MacLeòid <[email protected]>
Co-authored-by: Somhairle MacLeòid <[email protected]>
1439676 to
1dca406
Compare
|
Howdy and thanks for contributing to our repo. The Cloudflare team reviews new, external PRs within two (2) weeks. If it's been two weeks or longer without any movement, please tag the PR Assignees in a comment. We review internal PRs within 1 week. If it's something urgent or has been sitting without a comment, start a thread in the Developer Docs space internally. PR Change SummaryAdded a migration guide for transitioning from Wrangler v3 to v4, detailing significant changes and necessary steps for users.
Modified Files
Added Files
How can I customize these reviews?Check out the Hyperlint AI Reviewer docs for more information on how to customize the review. If you just want to ignore it on this PR, you can add the Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add What is Hyperlint?Hyperlint is an AI agent that helps you write, edit, and maintain your documentation. Learn more about the Hyperlint AI reviewer and the checks that we can run on your documentation. |
|
Preview URL: https://346dce1d.preview.developers.cloudflare.com Files with changes (up to 15)
|
| ### Workers Sites | ||
|
|
||
| Usage of [Workers Sites](/workers/wrangler/configuration/#workers-sites) is deprecated. Instead, we recommend migrating to [Workers Static Assets](/workers/static-assets/). Support for using Workers Sites with Wrangler will be removed in a future version of Wrangler. | ||
|
|
||
| ### Service environments | ||
|
|
||
| Usage of [Service Environments](https://blog.cloudflare.com/introducing-worker-services/#services-have-environments), enabled via the `legacy_env` property in Wrangler config, is deprecated. Instead, we recommend migrating to [Wrangler Environments](/workers/wrangler/configuration/#environments). Support for using Service Environments with Wrangler will be removed in a future version of Wrangler. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just thought I'd add these here so that we have somewhere to point to when we say they're deprecated. Both of these have been deprecated for a long time.
src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: lrapoport-cf <[email protected]>
| - Control the types that Wrangler generates for `vars` bindings. | ||
| - If `true`, (the default) Wrangler generates literal and union types for bindings (e.g. `myEnv: 'my dev variable' | 'my prod variable'`). | ||
| - If `false`, Wrangler generates generic types (e.g. `myEnv: string`). This is useful when variables change frequently, especially when working across multiple environments. | ||
| - If `true`, (the default) Wrangler generates literal and union types for bindings (e.g. `myVar: 'my dev variable' | 'my prod variable'`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identified issues
- Vale Style Guide - (cloudflare.LatinTerms-warning) Use 'for example' instead of 'e.g.', but consider rewriting the sentence.
Proposed fix
| - If `true`, (the default) Wrangler generates literal and union types for bindings (e.g. `myVar: 'my dev variable' | 'my prod variable'`). | |
| - If `true`, (the default) Wrangler generates literal and union types for bindings (for example, `myVar: 'my dev variable' | 'my prod variable'`). |
I replaced 'e.g.' with 'for example' as it was not within a code reference or backticks, complying with the style guide.
| - If `true`, (the default) Wrangler generates literal and union types for bindings (e.g. `myEnv: 'my dev variable' | 'my prod variable'`). | ||
| - If `false`, Wrangler generates generic types (e.g. `myEnv: string`). This is useful when variables change frequently, especially when working across multiple environments. | ||
| - If `true`, (the default) Wrangler generates literal and union types for bindings (e.g. `myVar: 'my dev variable' | 'my prod variable'`). | ||
| - If `false`, Wrangler generates generic types (e.g. `myVar: string`). This is useful when variables change frequently, especially when working across multiple environments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identified issues
- Vale Style Guide - (cloudflare.LatinTerms-warning) Use 'for example' instead of 'e.g.', but consider rewriting the sentence.
Proposed fix
| - If `false`, Wrangler generates generic types (e.g. `myVar: string`). This is useful when variables change frequently, especially when working across multiple environments. | |
| - If `false`, Wrangler generates generic types (for example, `myVar: string`). This is useful when variables change frequently, especially when working across multiple environments. |
I replaced 'e.g.' with 'for example' to comply with the style guide. The change was straightforward as 'e.g.' was not within any restricted formatting.
| - Control the types that Wrangler generates for `vars` bindings. | ||
| - If `true`, (the default) Wrangler generates literal and union types for bindings (e.g. `myEnv: 'my dev variable' | 'my prod variable'`). | ||
| - If `false`, Wrangler generates generic types (e.g. `myEnv: string`). This is useful when variables change frequently, especially when working across multiple environments. | ||
| - If `true`, (the default) Wrangler generates literal and union types for bindings (e.g. `myVar: 'my dev variable' | 'my prod variable'`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identified issues
- Vale Style Guide - (cloudflare.LatinTerms-warning) Use 'for example' instead of 'e.g.', but consider rewriting the sentence.
Proposed fix
| - If `true`, (the default) Wrangler generates literal and union types for bindings (e.g. `myVar: 'my dev variable' | 'my prod variable'`). | |
| - If `true`, (the default) Wrangler generates literal and union types for bindings (for example, `myVar: 'my dev variable' | 'my prod variable'`). |
I replaced 'e.g.' with 'for example' as it was not within a code reference or backticks, complying with the style guide.
| - If `true`, (the default) Wrangler generates literal and union types for bindings (e.g. `myEnv: 'my dev variable' | 'my prod variable'`). | ||
| - If `false`, Wrangler generates generic types (e.g. `myEnv: string`). This is useful when variables change frequently, especially when working across multiple environments. | ||
| - If `true`, (the default) Wrangler generates literal and union types for bindings (e.g. `myVar: 'my dev variable' | 'my prod variable'`). | ||
| - If `false`, Wrangler generates generic types (e.g. `myVar: string`). This is useful when variables change frequently, especially when working across multiple environments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identified issues
- Vale Style Guide - (cloudflare.LatinTerms-warning) Use 'for example' instead of 'e.g.', but consider rewriting the sentence.
Proposed fix
| - If `false`, Wrangler generates generic types (e.g. `myVar: string`). This is useful when variables change frequently, especially when working across multiple environments. | |
| - If `false`, Wrangler generates generic types (for example, `myVar: string`). This is useful when variables change frequently, especially when working across multiple environments. |
I replaced 'e.g.' with 'for example' to comply with the style guide. The change was straightforward as 'e.g.' was not within any restricted formatting.
* adds migration guide draft for Wrangler v4 * Fixes typos and reorders migration docs to start with v4 * Update src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> * Update src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx Co-authored-by: Somhairle MacLeòid <[email protected]> * Update src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx Co-authored-by: Somhairle MacLeòid <[email protected]> * update `wrangler types` runtime type gen instructions * Remove @types/node known issue * WIP * more docs * typo * Add changelog * Apply suggestions from code review Co-authored-by: lrapoport-cf <[email protected]> Co-authored-by: emily-shen <[email protected]> * more removed deprecations * Apply suggestions from code review Co-authored-by: lrapoport-cf <[email protected]> * Update src/content/changelog/workers/2025-03-13-wrangler-v4.mdx --------- Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> Co-authored-by: Somhairle MacLeòid <[email protected]> Co-authored-by: emily-shen <[email protected]> Co-authored-by: lrapoport-cf <[email protected]>
* adds migration guide draft for Wrangler v4 * Fixes typos and reorders migration docs to start with v4 * Update src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> * Update src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx Co-authored-by: Somhairle MacLeòid <[email protected]> * Update src/content/docs/workers/wrangler/migration/update-v3-to-v4.mdx Co-authored-by: Somhairle MacLeòid <[email protected]> * update `wrangler types` runtime type gen instructions * Remove @types/node known issue * WIP * more docs * typo * Add changelog * Apply suggestions from code review Co-authored-by: lrapoport-cf <[email protected]> Co-authored-by: emily-shen <[email protected]> * more removed deprecations * Apply suggestions from code review Co-authored-by: lrapoport-cf <[email protected]> * Update src/content/changelog/workers/2025-03-13-wrangler-v4.mdx --------- Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> Co-authored-by: Somhairle MacLeòid <[email protected]> Co-authored-by: emily-shen <[email protected]> Co-authored-by: lrapoport-cf <[email protected]>
Summary
This PR adds a migration guide for moving from Wrangler v3 to Wrangler v4 and updates the Wrangler docs to reflect Wrangler v4