Skip to content

Conversation

@boimw
Copy link
Contributor

@boimw boimw commented Apr 7, 2025

Fixes #8743.

This MR adds support for Vitest 3.1.x and it fixes peer dependency with vitest, @vitest/coverage-istanbul and similar packages.


  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because: dependency update
  • Wrangler / Vite E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because:
  • Public documentation
  • Wrangler V3 Backport
    • TODO (before merge)
    • Wrangler PR:
    • Not necessary because: not a Wrangler change.

@boimw boimw requested a review from a team as a code owner April 7, 2025 08:26
@changeset-bot
Copy link

changeset-bot bot commented Apr 7, 2025

🦋 Changeset detected

Latest commit: 7469234

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

This PR includes changesets to release 1 package
Name Type
@cloudflare/vitest-pool-workers Minor

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

@boimw
Copy link
Contributor Author

boimw commented Apr 7, 2025

Hey @petebacondarwin 👋 could you please review this dependency update? 🙇‍♂️

@petebacondarwin
Copy link
Contributor

Running the tests but this PR will need a bit more: a changeset and possible updates to the version of Vitest we are using in our testing and fixtures...

@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2025

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/14359986022/npm-package-wrangler-8804

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

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

Or you can use npx with this latest build directly:

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

cloudflare-workers-bindings-extension:

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

create-cloudflare:

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

@cloudflare/kv-asset-handler:

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

miniflare:

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

@cloudflare/pages-shared:

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

@cloudflare/unenv-preset:

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

@cloudflare/vite-plugin:

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

@cloudflare/vitest-pool-workers:

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

@cloudflare/workers-editor-shared:

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

@cloudflare/workers-shared:

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

@cloudflare/workflows-shared:

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

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


[email protected] includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 4.20250408.0
workerd 1.20250408.0 1.20250408.0
workerd --version 1.20250408.0 2025-04-08

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

@edmundhung edmundhung added post-devweek vitest Relating to the Workers Vitest integration labels Apr 7, 2025
@boimw
Copy link
Contributor Author

boimw commented Apr 8, 2025

Running the tests but this PR will need a bit more: a changeset and possible updates to the version of Vitest we are using in our testing and fixtures...

Thanks @petebacondarwin

I've added changeset and updated vitest versions inside pnpm-workspace.yaml. Could you please take another look?

Copy link
Contributor

@penalosa penalosa left a comment

Choose a reason for hiding this comment

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

This looks generally good, but shouldn't update esbuild

vitest: "~3.1.1"
vite: "^5.4.14"
"ws": "8.18.0"
esbuild: "0.24.2"
Copy link
Contributor

Choose a reason for hiding this comment

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

This PR shouldn't be updating esbuild—it should be limited to Vitest

Copy link
Contributor Author

@boimw boimw Apr 8, 2025

Choose a reason for hiding this comment

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

Gotcha, I've updated esbuild due to vulnerability concern.

Anyhow, I've dropped it for now.

@github-project-automation github-project-automation bot moved this from Untriaged to In Review in workers-sdk Apr 8, 2025
@boimw
Copy link
Contributor Author

boimw commented Apr 8, 2025

Updated, thanks for the support @petebacondarwin

Back to you 🏓

@petebacondarwin
Copy link
Contributor

petebacondarwin commented Apr 8, 2025

Looks like Vitest 3.1 is formatting snapshots slightly differently?

https://github.com/cloudflare/workers-sdk/actions/runs/14331654155/job/40169757071?pr=8804#step:5:1161

I'll update and push a commit.

@petebacondarwin petebacondarwin self-assigned this Apr 8, 2025
@petebacondarwin petebacondarwin requested a review from a team as a code owner April 8, 2025 14:27
@boimw
Copy link
Contributor Author

boimw commented Apr 9, 2025

@petebacondarwin I just solved the conflicts, back to you 🏓

Copy link
Contributor

@alsuren alsuren left a comment

Choose a reason for hiding this comment

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

I assume D1 has been tagged for a code owner review because of packages/wrangler/src/tests/d1/insights.test.ts , so I'm happy to approve that bit to unblock you (assuming that tests still pass), but please wait for someone on the wrangler team to approve the rest before merging.

@boimw boimw requested a review from penalosa April 14, 2025 06:33
@github-actions
Copy link
Contributor

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/14439012554/npm-package-wrangler-8804
Prereleases for other packages:

cloudflare-workers-bindings-extension:

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

create-cloudflare:

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

@cloudflare/kv-asset-handler:

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

miniflare:

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

@cloudflare/pages-shared:

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

@cloudflare/unenv-preset:

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

@cloudflare/vite-plugin:

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

@cloudflare/vitest-pool-workers:

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

@cloudflare/workers-editor-shared:

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

@cloudflare/workers-shared:

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

@cloudflare/workflows-shared:

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

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

@emily-shen emily-shen added e2e Run wrangler + vite-plugin e2e tests on a PR c3-e2e Run c3 e2e tests on a PR labels Apr 15, 2025
@emily-shen emily-shen dismissed penalosa’s stale review April 15, 2025 22:09

requested change has been made

@emily-shen emily-shen merged commit 8a0cf56 into cloudflare:main Apr 15, 2025
81 of 102 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in workers-sdk Apr 15, 2025
@workers-devprod workers-devprod added the contribution [Holopin] Recognizes an open-source contribution, big or small label Apr 15, 2025
@holopin-bot
Copy link

holopin-bot bot commented Apr 15, 2025

Congratulations @boimw, the maintainer of this repository has issued you a holobyte! Here it is: https://holopin.io/holobyte/cm9j29xnm00470cjxsigjzyva

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c3-e2e Run c3 e2e tests on a PR contribution [Holopin] Recognizes an open-source contribution, big or small e2e Run wrangler + vite-plugin e2e tests on a PR vitest Relating to the Workers Vitest integration

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

🚀 Feature Request: [vitest-pool-workers] Support Vitest 3.1.x

7 participants