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

Addon Test: Always use installed version of vitest #30134

Merged
merged 1 commit into from
Dec 24, 2024

Conversation

kasperpeulen
Copy link
Contributor

@kasperpeulen kasperpeulen commented Dec 24, 2024

Closes #

What I did

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This pull request has been released as version 0.0.0-pr-30134-sha-dcd49108. Try it out in a new sandbox by running npx [email protected] sandbox or in an existing project with npx [email protected] upgrade.

More information
Published version 0.0.0-pr-30134-sha-dcd49108
Triggered by @kasperpeulen
Repository storybookjs/storybook
Branch kasper/use-installed-version-vitest
Commit dcd49108
Datetime Tue Dec 24 10:16:08 UTC 2024 (1735035368)
Workflow run 12480338785

To request a new release of this pull request, mention the @storybookjs/core team.

core team members can create a new canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=30134

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 77.8 MB 77.8 MB 0 B 1.33 0%
initSize 143 MB 143 MB 0 B 1.18 0%
diffSize 65.6 MB 65.6 MB 0 B 1.18 0%
buildSize 7.19 MB 7.19 MB 0 B -0.88 0%
buildSbAddonsSize 1.85 MB 1.85 MB 0 B -0.72 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.87 MB 1.87 MB 0 B 0.23 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.92 MB 3.92 MB 0 B -0.73 0%
buildPreviewSize 3.28 MB 3.28 MB 0 B -0.9 0%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 7.2s 24.2s 17s 1.83 🔺70.3%
generateTime 21.1s 19.1s -1s -930ms -0.92 -10.1%
initTime 14.6s 13.2s -1s -466ms -1.33 🔰-11.1%
buildTime 11.5s 8.5s -3s -1ms -1.04 -35.2%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 5.5s 5.3s -239ms -0.03 -4.5%
devManagerResponsive 4.1s 3.7s -347ms -0.33 -9.2%
devManagerHeaderVisible 755ms 611ms -144ms -0.29 -23.6%
devManagerIndexVisible 799ms 640ms -159ms -0.27 -24.8%
devStoryVisibleUncached 2s 1.5s -499ms -0.79 -31.2%
devStoryVisible 800ms 641ms -159ms -0.32 -24.8%
devAutodocsVisible 711ms 553ms -158ms -0.16 -28.6%
devMDXVisible 577ms 492ms -85ms -0.64 -17.3%
buildManagerHeaderVisible 595ms 604ms 9ms -0.24 1.5%
buildManagerIndexVisible 682ms 700ms 18ms -0.24 2.6%
buildStoryVisible 575ms 586ms 11ms -0.22 1.9%
buildAutodocsVisible 562ms 482ms -80ms -0.24 -16.6%
buildMDXVisible 545ms 440ms -105ms -0.72 -23.9%

Greptile Summary

Based on the provided information, I'll create a concise summary of the changes:

Modified the postinstall script in Storybook's test addon to ensure consistent Vitest versioning across dependencies by using the installed version instead of falling back to default versions.

  • Removed fallback to allDeps.vitest in favor of using packageManager.getInstalledVersion('vitest')
  • Added logic to use 'latest' version when Vitest is not installed
  • Ensures consistent versioning between Vitest and related packages like @vitest/browser and @vitest/coverage-v8
  • Prevents potential version mismatches between Vitest dependencies during installation

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

LGTM

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link

nx-cloud bot commented Dec 24, 2024

View your CI Pipeline Execution ↗ for commit dcd4910.

Command Status Duration Result
nx affected -t check -c production --parallel=7 ✅ Succeeded 7s View ↗
nx run-many -t build -c production --parallel=3 ✅ Succeeded 16s View ↗

☁️ Nx Cloud last updated this comment at 2024-12-24 10:19:07 UTC

@kasperpeulen kasperpeulen changed the title Addon-Test: Always use installed version of vitest Addon Test: Always use installed version of vitest Dec 24, 2024
@yannbf yannbf merged commit a36f3f0 into next Dec 24, 2024
67 of 76 checks passed
@yannbf yannbf deleted the kasper/use-installed-version-vitest branch December 24, 2024 14:54
@github-actions github-actions bot mentioned this pull request Dec 24, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants