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

Automigrate: Disable missingStorybookDependencies for 9.0 #30769

Merged
merged 5 commits into from
Mar 10, 2025

Conversation

ndelangen
Copy link
Member

@ndelangen ndelangen commented Mar 7, 2025

What I did

Modify the missing Storybook dependencies check to:

  • Import consolidated packages from a separate helper module
  • Update version range to exclude 9.0
  • Use Object.keys() for checking consolidated packages

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 PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

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

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 79.9 MB 79.9 MB 0 B -0.71 0%
initSize 79.9 MB 79.9 MB 0 B -0.71 0%
diffSize 97 B 97 B 0 B - 0%
buildSize 7.47 MB 7.47 MB 0 B -1.41 0%
buildSbAddonsSize 1.98 MB 1.98 MB 0 B -1.41 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.88 MB 1.88 MB 0 B - 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 4.06 MB 4.06 MB 0 B -1.41 0%
buildPreviewSize 3.42 MB 3.42 MB 0 B -1.41 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 28.9s 7.6s -21s -271ms -1.37 🔰-277.9%
generateTime 18.5s 20s 1.5s 5.69 🔺7.8%
initTime 4.3s 4.6s 323ms 7.24 🔺6.9%
buildTime 8.4s 9.7s 1.3s 1.05 13.5%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 4.7s 4.8s 138ms -0.94 2.8%
devManagerResponsive 4.5s 4.6s 117ms -1 2.5%
devManagerHeaderVisible 700ms 702ms 2ms -1.01 0.3%
devManagerIndexVisible 706ms 757ms 51ms -0.74 6.7%
devStoryVisibleUncached 2.6s 2.4s -172ms -0.99 -7.1%
devStoryVisible 1.2s 1.1s -39ms -1.19 -3.3%
devAutodocsVisible 1s 1s -18ms -1.21 -1.7%
devMDXVisible 1s 1.1s 22ms -0.99 2%
buildManagerHeaderVisible 680ms 646ms -34ms -1.36 🔰-5.3%
buildManagerIndexVisible 685ms 648ms -37ms -1.4 🔰-5.7%
buildStoryVisible 667ms 638ms -29ms -1.33 -4.5%
buildAutodocsVisible 630ms 725ms 95ms -0.31 13.1%
buildMDXVisible 529ms 566ms 37ms -1.09 6.5%

Greptile Summary

Removes the missing Storybook dependencies check functionality from the automigrate system for version 9.0, eliminating automatic detection and installation of missing dependencies.

  • Removed code/lib/cli-storybook/src/automigrate/fixes/missing-storybook-dependencies.ts which handled dependency detection and installation
  • Removed associated test file missing-storybook-dependencies.test.ts
  • Removed missingStorybookDependencies from fixes array in code/lib/cli-storybook/src/automigrate/fixes/index.ts

Modify the missing Storybook dependencies check to:
- Import consolidated packages from a separate helper module
- Update version range to exclude 9.0
- Use Object.keys() for checking consolidated packages
- Prepare for package consolidation in Storybook 9.0
Copy link

nx-cloud bot commented Mar 7, 2025

View your CI Pipeline Execution ↗ for commit 2d73181.

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 1m 54s View ↗

☁️ Nx Cloud last updated this comment at 2025-03-10 08:45:26 UTC

@@ -65,20 +45,20 @@ async function checkInstallations(
export const missingStorybookDependencies: Fix<MissingStorybookDependenciesOptions> = {
Copy link
Contributor

Choose a reason for hiding this comment

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

We can just get rid of the automigration at all, can't we?
The new version range indicates, that this automigration can never be called when upgrading to 9.
If someone upgrades from let's say Storybook 7 to Storybook 8, the storybook@8 version is taken and not the latest. We can savely remove this automigration entirely.

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

Base automatically changed from norbert/manual-cpc-migration to norbert/automigrate-cpc-complaince March 10, 2025 06:54
Base automatically changed from norbert/automigrate-cpc-complaince to next March 10, 2025 07:10
valentinpalkovic and others added 2 commits March 10, 2025 08:11
This commit removes the missingStorybookDependencies fix from the automigrate process, including the implementation file, test file, and its import in the index. The fix appears to have been deprecated or replaced by another mechanism.
@ndelangen ndelangen marked this pull request as ready for review March 10, 2025 09:19
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

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

@ndelangen ndelangen merged commit 60a6e5c into next Mar 10, 2025
54 of 56 checks passed
@ndelangen ndelangen deleted the norbert/fix-missingStorybookDependencies branch March 10, 2025 09:27
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.

2 participants