Skip to content

Upgrade to Vitest v3 #2168

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

Merged
merged 6 commits into from
Feb 24, 2025
Merged

Upgrade to Vitest v3 #2168

merged 6 commits into from
Feb 24, 2025

Conversation

htunnicliff
Copy link
Member

Changes

Upgraded Vitest.

How to Review

How can a reviewer review your changes? What should be kept in mind for this review?

Checklist

  • Unit tests updated
  • docs/ updated (if necessary)
  • pnpm run update:examples run (only applicable for openapi-typescript)

Copy link

changeset-bot bot commented Feb 22, 2025

⚠️ No Changeset found

Latest commit: 3fabf8c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

netlify bot commented Feb 22, 2025

Deploy Preview for openapi-ts canceled.

Name Link
🔨 Latest commit 3fabf8c
🔍 Latest deploy log https://app.netlify.com/sites/openapi-ts/deploys/67ba61249303eb0008b4ae9d

Copy link
Contributor

github-actions bot commented Feb 22, 2025

size-limit report 📦

Path Size
packages/openapi-fetch/dist/index.min.js 6.53 KB (0%)

@htunnicliff htunnicliff added the dependencies Pull requests that update a dependency file label Feb 22, 2025
@htunnicliff htunnicliff self-assigned this Feb 22, 2025
@htunnicliff htunnicliff marked this pull request as ready for review February 22, 2025 23:52
@htunnicliff htunnicliff requested a review from a team as a code owner February 22, 2025 23:52
@@ -127,7 +127,7 @@ describe("transformSchemaObject > string", () => {
async () => {
const result = astToString(transformSchemaObject(given, options));
if (want instanceof URL) {
expect(result).toMatchFileSnapshot(fileURLToPath(want));
await expect(result).toMatchFileSnapshot(fileURLToPath(want));
Copy link
Contributor

Choose a reason for hiding this comment

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

Love all these cleanups. The test output had quite a lot of unnecessary warnings.

Does this PR clean up all of them? If so, it would be pretty great to switch these from warnings to errors in the vitest config to prevent new ones from sneaking in.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd be glad to make these errors, but I'm not finding a relevant Vitest config option to do that. If you know of one, would you mind sharing a link to its docs?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm going to merge for now, but am happy to add additional rules once we find them!

Copy link
Contributor

Choose a reason for hiding this comment

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

The way I typically handle this isn't in vitest, but with the no-floating-promises typescript-eslint rule.

@htunnicliff htunnicliff merged commit 8330f5a into main Feb 24, 2025
14 checks passed
@htunnicliff htunnicliff deleted the ht/vitest-3 branch February 24, 2025 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants