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

add support for vitest v0.34.1 #573

Closed
morgan-massamba opened this issue Aug 2, 2023 · 3 comments · Fixed by #260
Closed

add support for vitest v0.34.1 #573

morgan-massamba opened this issue Aug 2, 2023 · 3 comments · Fixed by #260

Comments

@morgan-massamba
Copy link

morgan-massamba commented Aug 2, 2023

Hello, is it possible to add support for the last release of vitest v0.34.1 ?
When I try to update i got this :

╰─ npm i      
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: nuxt-app@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/vitest
npm ERR!   dev vitest@"^0.34.1" from the root project
npm ERR!   peer vitest@">=0.34.0" from @vitest/[email protected]
npm ERR!   node_modules/@vitest/browser
npm ERR!     peerOptional @vitest/browser@"*" from [email protected]
npm ERR!   1 more (@vitest/ui)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer vitest@"^0.24.5 || ^0.26.0 || ^0.27.0 || ^0.28.0 || ^0.29.0 || ^0.30.0 || ^0.33.0" from [email protected]
npm ERR! node_modules/nuxt-vitest
npm ERR!   dev nuxt-vitest@"^0.10.2" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
@EvgenyWas
Copy link

Hello,
I also faced incompatibility between vitest ^0.34.0 and nuxt-vitest 0.10.2. My tests throw the following error:
nuxt-vitest error

I think it's because "Since 0.34.0 Vitest requires transformMode option on environment object. It should be equal to ssr or web. This value determines how plugins will transform source code. If it's set to ssr, plugin hooks will receive ssr: true when transforming or resolving files. Otherwise, ssr is set to false.".
I needed to downgrade my vitest to 0.33.0 version to solve this problem.

@mathiasrando
Copy link

Vitest 0.34.5 adds support for timers and e.g. vi.waitUntil so it would be very nice to be able to upgrade. Is this currently a priority?

@nathanchase
Copy link

nathanchase commented Nov 1, 2023

Vitest ^0.34.0 is required also for handling deps.optimizer config in Vitest:
https://vitest.dev/config/#deps-optimizer
vuetifyjs/vuetify#18396

Any more thoughts on getting nuxt-vitest to support the latest vitest version?

@danielroe danielroe transferred this issue from danielroe/nuxt-vitest Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants