Skip to content
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 #7334

Open
wants to merge 32 commits into
base: main
Choose a base branch
from
Open

Wrangler v4 #7334

wants to merge 32 commits into from

Conversation

penalosa
Copy link
Contributor

@penalosa penalosa commented Nov 25, 2024

Wrangler v4 is coming! We’re releasing this release candidate now as a way for you to check the upcoming version works with your projects. More detailed migration guides & documentation will be coming over the next few months as we prepare to roll this out, but a TLDR of the breaking changes to expect are:

  • Node v18 is now the minimum Node version
  • Wrangler now uses esbuild v0.24.2
  • wrangler r2 and wrangler kv are --local by default
  • All deprecated commands & config have been removed

To try it out, install and use wrangler@next.

Let us know what you think! We'd love to hear any feedback, either as comments on this PR or in the #wrangler channel on Discord.

@penalosa penalosa requested a review from a team as a code owner November 25, 2024 16:26
Copy link

changeset-bot bot commented Nov 25, 2024

🦋 Changeset detected

Latest commit: 4bfaf5c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
wrangler Major
miniflare Major
@cloudflare/vitest-pool-workers Minor
@cloudflare/pages-shared Patch
@cloudflare/vite-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@penalosa penalosa added skip-pr-description-validation Skip validation of the required PR description format e2e Run wrangler e2e tests on a PR labels Nov 25, 2024
Copy link
Contributor

github-actions bot commented Nov 25, 2024

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13565472531/npm-package-wrangler-7334

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/7334/npm-package-wrangler-7334

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13565472531/npm-package-wrangler-7334 dev path/to/script.js
Additional artifacts:

cloudflare-workers-bindings-extension:

wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13565472531/npm-package-cloudflare-workers-bindings-extension-7334 -O ./cloudflare-workers-bindings-extension.0.0.0-vfefbf4f75.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-vfefbf4f75.vsix

create-cloudflare:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13565472531/npm-package-create-cloudflare-7334 --no-auto-update

@cloudflare/kv-asset-handler:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13565472531/npm-package-cloudflare-kv-asset-handler-7334

miniflare:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13565472531/npm-package-miniflare-7334

@cloudflare/pages-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13565472531/npm-package-cloudflare-pages-shared-7334

@cloudflare/unenv-preset:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13565472531/npm-package-cloudflare-unenv-preset-7334

@cloudflare/vite-plugin:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13565472531/npm-package-cloudflare-vite-plugin-7334

@cloudflare/vitest-pool-workers:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13565472531/npm-package-cloudflare-vitest-pool-workers-7334

@cloudflare/workers-editor-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13565472531/npm-package-cloudflare-workers-editor-shared-7334

@cloudflare/workers-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13565472531/npm-package-cloudflare-workers-shared-7334

@cloudflare/workflows-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13565472531/npm-package-cloudflare-workflows-shared-7334

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.111.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20250214.1
workerd 1.20250214.0 1.20250214.0
workerd --version 1.20250214.0 2025-02-14

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

@penalosa penalosa added the breaking change Change that will result in breaking existing behavior label Nov 29, 2024
@penalosa penalosa requested a review from a team as a code owner November 29, 2024 15:47
@penalosa penalosa requested a review from a team as a code owner December 2, 2024 12:26
@penalosa penalosa requested a review from a team as a code owner December 2, 2024 16:12
@rozenmd rozenmd requested a review from a team as a code owner December 10, 2024 22:09
@CarmenPopoviciu CarmenPopoviciu added the v4 wrangler version 4 label Dec 17, 2024
@dario-piotrowicz dario-piotrowicz linked an issue Jan 13, 2025 that may be closed by this pull request
@pmiguel pmiguel force-pushed the next branch 2 times, most recently from 86a4971 to b35265a Compare January 14, 2025 11:55
@penalosa penalosa requested a review from a team as a code owner February 18, 2025 18:08
@penalosa penalosa requested a review from a team as a code owner February 19, 2025 11:55
Copy link
Contributor

@emily-shen emily-shen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can we add a pre-requisites section to the wrangler readme that mentions this

Copy link
Contributor

@emily-shen emily-shen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the node app pages dev script in its package.json still uses the --node-compat flag

@penalosa
Copy link
Contributor Author

Remaining test failures should be resolved by cloudflare/next-on-pages#940

penalosa and others added 20 commits February 26, 2025 15:37
* chore: remove alpha support from `wrangler d1 migrations apply`

* chore: remove `wrangler d1 backups`

* chore: fixup tests

* chore: fixup tests

* chore: fixup tests

* chore: remove --batch-size
* Remove wrangler version

* Remove generate & strip down init

* Add changesets

* Remove deprecated --format & config

* Add changeset

* remove commands

* Fix tests

* Remove .only()

* Remove legacy assets

* clarify legacy assets -> sites naming
esbuild 0.24.2 variable naming changes
* feat(wrangler): Drop worker prefix when creating KV namespaces

* Remove crypto polyfill

---------

Co-authored-by: Samuel Macleod <smacleod@cloudflare.com>
@penalosa
Copy link
Contributor Author

After discussion with @petebacondarwin, we've decided to use the https://github.com/cloudflare/workers-sdk/actions/workflows/hotfix-release.yml action to publish versioned RCs for this branch. We'll:

  • bump the versions of Wrangler & Miniflare to 4.x.x-rc.0
  • Run a hotfix release against this branch using the v4-rc tag

That will result in a published RC for Wrangler of 4.0.0-rc.0, and Miniflare of 4.20250214.0-rc.0, both tagged with v4-rc. The next tag will continue to point to the head of this branch for the bleeding edge of v4 changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Change that will result in breaking existing behavior c3-e2e e2e Run wrangler e2e tests on a PR skip-pr-description-validation Skip validation of the required PR description format v4 wrangler version 4
Projects
Status: Other
Development

Successfully merging this pull request may close these issues.

🐛 BUG: this handling in static blocks results in undefined
7 participants