chore(deps): upgrade vitest from 0.34 to 4.0#823
Conversation
|
|
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
✅ Deploy Preview for histoire-examples-svelte3 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for histoire-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for histoire-controls ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for histoire-examples-vue3 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Summary of ChangesHello @Kapcash, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on a crucial maintenance task: upgrading the project's testing framework, Vitest, to its latest major version. The primary motivation behind this update is to enhance developer experience by ensuring compatibility with the VSCode Vitest extension, which was previously hindered by an outdated version. The upgrade involved updating the Vitest dependency in core packages and subsequently refreshing all related transitive dependencies, along with necessary adjustments to existing test snapshots to conform to the new format. This change ensures the testing infrastructure remains modern, stable, and integrated with current development tools. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request upgrades vitest from version 0.34.6 to 4.0.16. The changes are straightforward, involving updates to package.json files, the pnpm-lock.yaml file, and test snapshots. The snapshot updates are expected due to format changes in the new version of vitest. This is a welcome maintenance update that keeps the project's dependencies current. The changes look correct and I have no further comments.
histoire
@histoire/app
@histoire/controls
@histoire/plugin-nuxt
@histoire/plugin-percy
@histoire/plugin-screenshot
@histoire/plugin-svelte
@histoire/plugin-vue
@histoire/shared
@histoire/vendors
commit: |
hugoattal
left a comment
There was a problem hiding this comment.
LGTM, thanks for contributing 😄 !
| @@ -1,9 +1,5 @@ | |||
| // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | |||
|
|
|||
| exports[`HstCheckbox > toggle to checked 1`] = `"<label class=\\"histoire-wrapper htw-p-2 hover:htw-bg-primary-100 dark:hover:htw-bg-primary-800 htw-flex htw-gap-2 htw-flex-wrap histoire-checkbox htw-cursor-pointer htw-items-center\\" role=\\"checkbox\\" tabindex=\\"0\\"><span class=\\"htw-w-28 htw-whitespace-nowrap htw-text-ellipsis htw-overflow-hidden htw-shrink-0 v-popper--has-tooltip\\">Label</span><span class=\\"htw-grow htw-max-w-full htw-flex htw-items-center htw-gap-1\\"><span class=\\"htw-block htw-grow htw-max-w-full\\"><div class=\\"histoire-simple-checkbox htw-group htw-text-white htw-w-[16px] htw-h-[16px] htw-relative\\"><div class=\\"htw-border htw-border-solid group-active:htw-bg-gray-500/20 htw-rounded-sm htw-box-border htw-absolute htw-inset-0 htw-transition-border htw-duration-150 htw-ease-out group-hover:htw-border-primary-500 group-hover:dark:htw-border-primary-500 htw-border-black/25 dark:htw-border-white/25 htw-delay-150\\"></div><svg width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 24 24\\" class=\\"htw-relative htw-z-10\\"><path d=\\"m 4 12 l 5 5 l 10 -10\\" fill=\\"none\\" class=\\"htw-stroke-white htw-stroke-2 htw-duration-200 htw-ease-in-out htw-transition-none\\" stroke-dasharray=\\"21.21\\" stroke-dashoffset=\\"21.21\\"></path></svg></div></span></span></label>"`; | |||
There was a problem hiding this comment.
Out of curiosity, why dropping the two first exports?
There was a problem hiding this comment.
To be honest I could not answer, I've just let vitest update the snapshots automatically haha
I just know that the snapshot format got improved in v1.0.0, removing the escaping characters.
Description
When creating unit tests for #822, I've realized the vitest version was quite old. It's not compatible with the VSCode Vitest extension.
So I just upgraded it and ensured all unit tests passes.
The snapshot format changed so I've updated them.
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).