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

⬆️ upgrade vitest, @vitest/browser #365

Merged
merged 8 commits into from
Nov 28, 2023
Merged

⬆️ upgrade vitest, @vitest/browser #365

merged 8 commits into from
Nov 28, 2023

Conversation

vvmnnnkv
Copy link
Contributor

Fixes #267

inference package used to substitute "process.env" with process.env contents in vitest.config.ts (using define), this is broken in more recent version of vitest: vitest-dev/vitest#3900.

So the solution is to use import.meta.env. But since it passes through only vars with "VITE_" prefix, envPrefix is needed include vars starting with HF_ and VCR_ .

Additionally, moved expect.closeTo() to a separate file, it can be removed with update to vitest 1.0.

@vvmnnnkv vvmnnnkv requested review from coyotte508 and a team November 26, 2023 15:31
@coyotte508
Copy link
Member

Thanks 🤯

package.json Outdated Show resolved Hide resolved
@vvmnnnkv vvmnnnkv requested a review from a team November 26, 2023 23:49
@coyotte508
Copy link
Member

If the demo app of widgets still works with vite 5 (pnpm --filter widgets dev), good for me!

@vvmnnnkv vvmnnnkv requested review from a team November 27, 2023 13:26
@vvmnnnkv
Copy link
Contributor Author

If the demo app of widgets still works with vite 5 (pnpm --filter widgets dev), good for me!

@coyotte508, it does! :-)
How about moving typescript to common package.json as well?

@coyotte508
Copy link
Member

coyotte508 commented Nov 27, 2023

Sure!

(if you can solve the TS problem, otherwise let's do it in another PR :) )

@vvmnnnkv
Copy link
Contributor Author

Back to vite 4 for widgets, there's no official vite 5 support in sveltekit yet

@vvmnnnkv
Copy link
Contributor Author

@vvmnnnkv vvmnnnkv merged commit d30133b into main Nov 28, 2023
2 checks passed
@vvmnnnkv vvmnnnkv deleted the update-vitest branch November 28, 2023 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade vitest & @vitest/browser
2 participants