FormidableLabs / groqd

A schema-unaware, runtime and type-safe query builder for GROQ.
https://commerce.nearform.com/open-source/groqd
MIT License
221 stars 17 forks source link

upgrade vitest from 0.x to 1.x #278

Closed Burnett2k closed 3 months ago

Burnett2k commented 3 months ago

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 of 4.2.1 of vite server any longer.

❯ pnpm why vite -r
Legend: production dependency, optional only, dev only

playground-example@0.0.1 /Users/sawyerburnett/git-repos/formidable/groqd/examples/playground-example

dependencies:
groqd-playground link:../../packages/groqd-playground
└─┬ sanity 3.15.0
  ├─┬ @vitejs/plugin-react 4.2.1
  │ └── vite 4.5.2 peer
  └── vite 4.5.2
sanity 3.15.0
├─┬ @vitejs/plugin-react 4.2.1
│ └── vite 4.5.2 peer
└── vite 4.5.2

groq-builder@0.9.0 /Users/sawyerburnett/git-repos/formidable/groqd/packages/groq-builder

devDependencies:
vitest 1.3.1
├── vite 5.1.6
└─┬ vite-node 1.3.1
  └── vite 5.1.6

groqd@0.15.10 /Users/sawyerburnett/git-repos/formidable/groqd/packages/groqd

devDependencies:
vitest 1.3.1
├── vite 5.1.6
└─┬ vite-node 1.3.1
  └── vite 5.1.6

groqd-playground@0.0.18 /Users/sawyerburnett/git-repos/formidable/groqd/packages/groqd-playground

dependencies:
sanity 3.15.0
├─┬ @vitejs/plugin-react 4.2.1
│ └── vite 4.5.2 peer
└── vite 4.5.2

Fixes #274

Type of Change

How Has This Been Tested?

Checklist: (Feel free to delete this section upon completion)

changeset-bot[bot] commented 3 months ago

🦋 Changeset detected

Latest commit: 20df5a3904449eb7894f5ef5a10b63c95fc95685

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages | Name | Type | | ------------------ | ----- | | playground-example | Patch | | groqd-playground | Patch | | groq-builder | Patch | | groqd | Patch | | website | Patch |

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

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **groqd** | ⬜️ Ignored ([Inspect](https://vercel.com/formidable-labs/groqd/B7SbPSn9RxxqPpJBLWTKkD3eGuvr)) | [Visit Preview](https://groqd-git-issue-325-upgrade-vitest-formidable-labs.vercel.app) | | Mar 19, 2024 3:22pm |