-
Notifications
You must be signed in to change notification settings - Fork 16
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 from 0.x to 1.x #278
Conversation
🦋 Changeset detectedLatest commit: 20df5a3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
…groqd into issue/325-upgrade-vitest
…ssue/325-upgrade-vitest # Conflicts: # packages/groq-builder/tsconfig.build.json
test: { | ||
typecheck: { | ||
enabled: true, | ||
checker: "tsc", | ||
allowJs: false, | ||
include: ["**.test.ts"], | ||
}, | ||
exclude: [...configDefaults.exclude], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out with v1, this config is needed in order to enable typechecking our files. Otherwise, we'd have to rename the type testing files with test-d
in the file name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means now if there's type errors we should see it fail when running tests locally, rather than on the lint and type check step in CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work, thank you so much for persevering!
Description
This upgrades our devDependency on vitest from a beta version to the official 1.x.x major release. This meant snapshots needed to be updated, and we have to modify some of the types a little bit in the PR.
Kudos to @scottrippey for helping me get past a couple of the weird TS issues encountered.
Once this is done, we should no longer be referencing a vulnerable vite server vulnerability AND will be on a more stable version of Vitest for future testing.
After this + updating Sanity to
3.15.0
, we're not pointing at the vulnerable version of4.2.1
of vite server any longer.Fixes #274
Type of Change
How Has This Been Tested?
Checklist: (Feel free to delete this section upon completion)