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

Update vitest 2.0.5 → 2.1.8 (minor) #15372

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

depfu[bot]
Copy link
Contributor

@depfu depfu bot commented Dec 11, 2024

Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ vitest (2.0.5 → 2.1.8) · Repo

Release Notes

2.1.8

   🐞 Bug Fixes

    View changes on GitHub

2.1.7

   🐞 Bug Fixes

  • Revert support for Vite 6  -  by @sheremet-va (fbe5c)
    • This introduced some breaking changes (#6992). We will enable support for it later. In the meantime, you can still use pnpm.overrides or yarn resolutions to override the vite version in the vitest package - the APIs are compatible.
    View changes on GitHub

2.1.6

🚀 Features

  • Support Vite 6
    View changes on GitHub

2.1.5

   🐞 Bug Fixes

   🏎 Performance

    View changes on GitHub

2.1.4

   🚀 Features

This patch release includes a non-breaking feature for the experimental Browser Mode that doesn't follow SemVer. If you want to avoid picking up releases like this, make sure to pin the Vitest version in your package.json. See npm's documentation about semver for more information.

   🐞 Bug Fixes

   🏎 Performance

    View changes on GitHub

2.1.3

   🐞 Bug Fixes

   🏎 Performance

    View changes on GitHub

2.1.2

   🐞 Bug Fixes

    View changes on GitHub

2.1.1

   🐞 Bug Fixes

    View changes on GitHub

2.1.0

This release makes another big change to the Browser Mode by introducing locators API:

test('renders blog posts', async () => {
  const screen = page.render(<Blog />)

await expect.element(screen.getByRole('heading', { name: 'Blog' })).toBeInTheDocument()

const [firstPost] = screen.getByRole('listitem').all()

await firstPost.getByRole('button', { name: 'Delete' }).click()

expect(screen.getByRole('listitem').all()).toHaveLength(3)
})

You can use either vitest-browser-vue, vitest-browser-svelte or vitest-browser-react to render components and make assertions using locators. Locators are also available on the page object from @vitest/browser/context.

Potential Breaking Change

  • workspace:
    • Correctly resolve workspace globs and file paths  -  by @sheremet-va in #6316 (afdcb)
    • This changes how the custom glob pattern in the workspace config is treated. Any file matching the glob is considered a Vitest config file. Any folder matching the glob pattern is treated as a workspace project and is subject to the regular config resolution (single vitest.config.ts or vite.config.ts inside the folder)
    • For example, projects/* will match anything inside the projects folder. If it's a folder, we try to find the config inside that folder (if there is none, it is still treated as a project with the default config). If it's a file, it will be treated as a Vitest config. projects/**/* previously would assume that you only wanted to have folders as projects, but now it will match every single file insideprojects.
    • This change doesn't affect non-glob usage.

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu bot requested a review from a team as a code owner December 11, 2024 17:13
@depfu depfu bot added the depfu label Dec 11, 2024
@depfu depfu bot force-pushed the depfu/update/pnpm/vitest-2.1.8 branch from 6df6e2e to b7f78fe Compare December 12, 2024 12:56
@depfu depfu bot force-pushed the depfu/update/pnpm/vitest-2.1.8 branch from b7f78fe to 31cc1f0 Compare December 19, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants