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

React: Fix missing peer dependency #30371

Open
wants to merge 3 commits into
base: next
Choose a base branch
from

Conversation

valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented Jan 24, 2025

Closes #30306

What I did

  • @storybook/preset-react-webpack has a dependency requirement on @storybook/react, which defines @storybook/test as a peer-dependency. @storybook/preset-react-webpack has broken the peer-dependency requirement chain by not listing it as a peer-dependency. This led to errors during upgrades.
  • @storybook/react-vite had a missing peer dependency requirement on typescript.
  • removed obsolete dependencies

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-30371-sha-07dc4675. 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-30371-sha-07dc4675
Triggered by @valentinpalkovic
Repository storybookjs/storybook
Branch valentin/fix-missing-peer-dependency
Commit 07dc4675
Datetime Fri Jan 24 13:36:47 UTC 2025 (1737725807)
Workflow run 12950726304

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=30371

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 77.9 MB 77.9 MB 8.32 kB 1.63 0%
initSize 131 MB 131 MB 481 B 2.8 0%
diffSize 53 MB 53 MB -7.84 kB 3.16 0%
buildSize 7.19 MB 7.19 MB 0 B 0.5 0%
buildSbAddonsSize 1.85 MB 1.85 MB 0 B -0.5 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.87 MB 1.87 MB 0 B 0.5 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.91 MB 3.91 MB 0 B 0.5 0%
buildPreviewSize 3.28 MB 3.28 MB 0 B 0.5 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 10.7s 17.5s 6.8s 0.68 38.7%
generateTime 20.3s 21.9s 1.6s 0.68 7.3%
initTime 13.7s 15s 1.2s 0.09 8.4%
buildTime 12.1s 10s -2s -135ms 0.61 -21.3%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 4.4s 5.8s 1.3s 2.15 🔺22.9%
devManagerResponsive 3.3s 4.3s 982ms 3.27 🔺22.7%
devManagerHeaderVisible 544ms 747ms 203ms 3.02 🔺27.2%
devManagerIndexVisible 574ms 777ms 203ms 2.06 🔺26.1%
devStoryVisibleUncached 1.8s 2.1s 297ms 1.24 🔺13.7%
devStoryVisible 575ms 778ms 203ms 3.2 🔺26.1%
devAutodocsVisible 498ms 682ms 184ms 2.53 🔺27%
devMDXVisible 479ms 637ms 158ms 1.53 🔺24.8%
buildManagerHeaderVisible 506ms 687ms 181ms 2.1 🔺26.3%
buildManagerIndexVisible 590ms 810ms 220ms 2.51 🔺27.2%
buildStoryVisible 488ms 666ms 178ms 2.14 🔺26.7%
buildAutodocsVisible 393ms 508ms 115ms 0.51 22.6%
buildMDXVisible 413ms 568ms 155ms 2.22 🔺27.3%

@valentinpalkovic valentinpalkovic self-assigned this Jan 24, 2025
@valentinpalkovic valentinpalkovic changed the title CLI: Fix missing peer dependency React: Fix missing peer dependency Jan 24, 2025
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 Jan 24, 2025

View your CI Pipeline Execution ↗ for commit 07dc467.

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

☁️ Nx Cloud last updated this comment at 2025-01-24 13:39:27 UTC

@valentinpalkovic valentinpalkovic force-pushed the valentin/fix-missing-peer-dependency branch from 930bfd3 to e4f914e Compare January 24, 2025 11:27
@storybook-bot
Copy link
Contributor

Failed to publish canary version of this pull request, triggered by @valentinpalkovic. See the failed workflow run at: https://github.com/storybookjs/storybook/actions/runs/12948750354

@valentinpalkovic valentinpalkovic force-pushed the valentin/fix-missing-peer-dependency branch from e4f914e to ebe7f62 Compare January 24, 2025 11:35
@storybook-pr-benchmarking
Copy link

storybook-pr-benchmarking bot commented Jan 24, 2025

Package Benchmarks

Commit: 07dc467, ran on 24 January 2025 at 13:48:25 UTC

The following packages have significant changes to their size or dependencies:

@storybook/angular

Before After Difference
Dependency count 264 261 🎉 -3 🎉
Self size 366 KB 366 KB 🎉 -137 B 🎉
Dependency size 33.70 MB 33.69 MB 🎉 -6 KB 🎉
Bundle Size Analyzer Link Link

@storybook/experimental-nextjs-vite

Before After Difference
Dependency count 153 149 🎉 -4 🎉
Self size 232 KB 232 KB 0 B
Dependency size 44.73 MB 44.72 MB 🎉 -8 KB 🎉
Bundle Size Analyzer Link Link

@storybook/html-vite

Before After Difference
Dependency count 15 12 🎉 -3 🎉
Self size 5 KB 5 KB 0 B
Dependency size 1.91 MB 1.90 MB 🎉 -6 KB 🎉
Bundle Size Analyzer Link Link

@storybook/html-webpack5

Before After Difference
Dependency count 247 244 🎉 -3 🎉
Self size 6 KB 6 KB 0 B
Dependency size 31.68 MB 31.67 MB 🎉 -6 KB 🎉
Bundle Size Analyzer Link Link

@storybook/nextjs

Before After Difference
Dependency count 592 588 🎉 -4 🎉
Self size 472 KB 472 KB 0 B
Dependency size 83.41 MB 83.40 MB 🎉 -8 KB 🎉
Bundle Size Analyzer Link Link

@storybook/preact-vite

Before After Difference
Dependency count 13 10 🎉 -3 🎉
Self size 6 KB 6 KB 0 B
Dependency size 1.31 MB 1.30 MB 🎉 -6 KB 🎉
Bundle Size Analyzer Link Link

@storybook/preact-webpack5

Before After Difference
Dependency count 245 242 🎉 -3 🎉
Self size 6 KB 6 KB 0 B
Dependency size 31.25 MB 31.25 MB 🎉 -6 KB 🎉
Bundle Size Analyzer Link Link

@storybook/react-native-web-vite

Before After Difference
Dependency count 137 133 🎉 -4 🎉
Self size 43 KB 43 KB 0 B
Dependency size 19.89 MB 19.88 MB 🎉 -8 KB 🎉
Bundle Size Analyzer Link Link

@storybook/react-vite

Before After Difference
Dependency count 87 83 🎉 -4 🎉
Self size 13 KB 13 KB 🚨 +80 B 🚨
Dependency size 16.06 MB 16.05 MB 🎉 -8 KB 🎉
Bundle Size Analyzer Link Link

@storybook/react-webpack5

Before After Difference
Dependency count 323 319 🎉 -4 🎉
Self size 6 KB 6 KB 0 B
Dependency size 42.46 MB 42.45 MB 🎉 -8 KB 🎉
Bundle Size Analyzer Link Link

@storybook/server-webpack5

Before After Difference
Dependency count 255 252 🎉 -3 🎉
Self size 14 KB 14 KB 0 B
Dependency size 32.66 MB 32.65 MB 🎉 -6 KB 🎉
Bundle Size Analyzer Link Link

@storybook/svelte-vite

Before After Difference
Dependency count 134 131 🎉 -3 🎉
Self size 22 KB 22 KB 0 B
Dependency size 36.38 MB 36.37 MB 🎉 -6 KB 🎉
Bundle Size Analyzer Link Link

@storybook/svelte-webpack5

Before After Difference
Dependency count 310 307 🎉 -3 🎉
Self size 6 KB 6 KB 0 B
Dependency size 39.25 MB 39.24 MB 🎉 -6 KB 🎉
Bundle Size Analyzer Link Link

@storybook/sveltekit

Before After Difference
Dependency count 142 139 🎉 -3 🎉
Self size 47 KB 47 KB 0 B
Dependency size 39.68 MB 39.68 MB 🎉 -6 KB 🎉
Bundle Size Analyzer Link Link

@storybook/vue3-vite

Before After Difference
Dependency count 108 105 🎉 -3 🎉
Self size 15 KB 15 KB 0 B
Dependency size 42.58 MB 42.57 MB 🎉 -6 KB 🎉
Bundle Size Analyzer Link Link

@storybook/vue3-webpack5

Before After Difference
Dependency count 495 492 🎉 -3 🎉
Self size 6 KB 6 KB 0 B
Dependency size 55.65 MB 55.65 MB 🎉 -6 KB 🎉
Bundle Size Analyzer Link Link

@storybook/web-components-vite

Before After Difference
Dependency count 16 13 🎉 -3 🎉
Self size 5 KB 5 KB 0 B
Dependency size 1.94 MB 1.94 MB 🎉 -6 KB 🎉
Bundle Size Analyzer Link Link

@storybook/web-components-webpack5

Before After Difference
Dependency count 245 242 🎉 -3 🎉
Self size 5 KB 5 KB 0 B
Dependency size 31.30 MB 31.29 MB 🎉 -6 KB 🎉
Bundle Size Analyzer Link Link

@storybook/preset-react-webpack

Before After Difference
Dependency count 191 187 🎉 -4 🎉
Self size 24 KB 24 KB 🚨 +95 B 🚨
Dependency size 33.53 MB 33.52 MB 🎉 -8 KB 🎉
Bundle Size Analyzer Link Link

@storybook/preset-server-webpack

Before After Difference
Dependency count 18 15 🎉 -3 🎉
Self size 10 KB 10 KB 0 B
Dependency size 1.48 MB 1.47 MB 🎉 -6 KB 🎉
Bundle Size Analyzer Link Link

@storybook/html

Before After Difference
Dependency count 6 3 🎉 -3 🎉
Self size 47 KB 47 KB 🎉 -137 B 🎉
Dependency size 40 KB 34 KB 🎉 -6 KB 🎉
Bundle Size Analyzer Link Link

@storybook/preact

Before After Difference
Dependency count 6 3 🎉 -3 🎉
Self size 23 KB 23 KB 🎉 -137 B 🎉
Dependency size 40 KB 34 KB 🎉 -6 KB 🎉
Bundle Size Analyzer Link Link

@storybook/react

Before After Difference
Dependency count 6 2 🎉 -4 🎉
Self size 932 KB 932 KB 🎉 -183 B 🎉
Dependency size 24 KB 16 KB 🎉 -8 KB 🎉
Bundle Size Analyzer Link Link

@storybook/server

Before After Difference
Dependency count 9 6 🎉 -3 🎉
Self size 13 KB 13 KB 🎉 -137 B 🎉
Dependency size 974 KB 968 KB 🎉 -6 KB 🎉
Bundle Size Analyzer Link Link

@storybook/svelte

Before After Difference
Dependency count 106 103 🎉 -3 🎉
Self size 96 KB 95 KB 🎉 -137 B 🎉
Dependency size 10.59 MB 10.59 MB 🎉 -6 KB 🎉
Bundle Size Analyzer Link Link

@storybook/vue3

Before After Difference
Dependency count 17 14 🎉 -3 🎉
Self size 87 KB 87 KB 🎉 -137 B 🎉
Dependency size 6.11 MB 6.10 MB 🎉 -6 KB 🎉
Bundle Size Analyzer Link Link

@storybook/web-components

Before After Difference
Dependency count 7 4 🎉 -3 🎉
Self size 62 KB 62 KB 🎉 -137 B 🎉
Dependency size 55 KB 49 KB 🎉 -6 KB 🎉
Bundle Size Analyzer Link Link

@storybook-bot
Copy link
Contributor

Failed to publish canary version of this pull request, triggered by @valentinpalkovic. See the failed workflow run at: https://github.com/storybookjs/storybook/actions/runs/12950176182

@valentinpalkovic valentinpalkovic force-pushed the valentin/fix-missing-peer-dependency branch from 199c1b2 to 07dc467 Compare January 24, 2025 13:34
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.

[Bug]: Upgrade fails with npx storybook@latest upgrade
3 participants