-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
fix(core): get versions utility #29577
base: next
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile
it('with constraint it throws an error if command output is not a valid JSON', async () => { | ||
vi.spyOn(npmProxy, 'executeCommand').mockResolvedValueOnce('NOT A JSON'); | ||
|
||
await expect(npmProxy.latestVersion('@storybook/core')).rejects.toThrow(); | ||
await expect(npmProxy.latestVersion('@storybook/core', '5.X')).rejects.toThrow(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: test description should clarify that this only applies when using version constraints, as unconstrained version queries now expect plain strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The updated test description explicitly focuses the scope to just when using version constraints to satisfy the fact that this test previously existed. I'm not sure why this test is even here when it's making an assumption on how an external system will fail and forcing it to fail by intentionally mocking a failing response from the external system. An integration test that actually confirms that the expected result and format from calling the external system is true would be a better test.
it('with constraint it throws an error if command output is not a valid JSON', async () => { | ||
vi.spyOn(pnpmProxy, 'executeCommand').mockResolvedValueOnce('NOT A JSON'); | ||
|
||
await expect(pnpmProxy.latestVersion('@storybook/core')).rejects.toThrow(); | ||
await expect(pnpmProxy.latestVersion('@storybook/core', '5.X')).rejects.toThrow(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Test case should also verify behavior without constraint since both paths can throw JSON parse errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The behavior without constraint cannot be tested because it does not throw an error nor does it attempt to validate the correctness of the command output.
b5d9e82
to
170c43a
Compare
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 170c43a. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
Package BenchmarksCommit: The following packages have significant changes to their size or dependencies:
|
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 3 | 🚨 +3 🚨 |
Self size | 0 B | 44 KB | 🚨 +44 KB 🚨 |
Dependency size | 0 B | 2.80 MB | 🚨 +2.80 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-actions
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 7 | 🚨 +7 🚨 |
Self size | 0 B | 59 KB | 🚨 +59 KB 🚨 |
Dependency size | 0 B | 3.22 MB | 🚨 +3.22 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-backgrounds
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 4 | 🚨 +4 🚨 |
Self size | 0 B | 27 KB | 🚨 +27 KB 🚨 |
Dependency size | 0 B | 99 KB | 🚨 +99 KB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-controls
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 3 | 🚨 +3 🚨 |
Self size | 0 B | 260 KB | 🚨 +260 KB 🚨 |
Dependency size | 0 B | 47 KB | 🚨 +47 KB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-docs
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 17 | 🚨 +17 🚨 |
Self size | 0 B | 2.20 MB | 🚨 +2.20 MB 🚨 |
Dependency size | 0 B | 7.88 MB | 🚨 +7.88 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-essentials
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 36 | 🚨 +36 🚨 |
Self size | 0 B | 17 KB | 🚨 +17 KB 🚨 |
Dependency size | 0 B | 13.83 MB | 🚨 +13.83 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-mdx-gfm
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 69 | 🚨 +69 🚨 |
Self size | 0 B | 4 KB | 🚨 +4 KB 🚨 |
Dependency size | 0 B | 2.39 MB | 🚨 +2.39 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-highlight
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 1 | 🚨 +1 🚨 |
Self size | 0 B | 9 KB | 🚨 +9 KB 🚨 |
Dependency size | 0 B | 5 KB | 🚨 +5 KB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-interactions
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 56 | 🚨 +56 🚨 |
Self size | 0 B | 129 KB | 🚨 +129 KB 🚨 |
Dependency size | 0 B | 12.43 MB | 🚨 +12.43 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-jest
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 4 | 🚨 +4 🚨 |
Self size | 0 B | 38 KB | 🚨 +38 KB 🚨 |
Dependency size | 0 B | 84 KB | 🚨 +84 KB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-links
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 4 | 🚨 +4 🚨 |
Self size | 0 B | 19 KB | 🚨 +19 KB 🚨 |
Dependency size | 0 B | 283 KB | 🚨 +283 KB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-measure
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 2 | 🚨 +2 🚨 |
Self size | 0 B | 32 KB | 🚨 +32 KB 🚨 |
Dependency size | 0 B | 20 KB | 🚨 +20 KB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-onboarding
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 2 | 🚨 +2 🚨 |
Self size | 0 B | 216 KB | 🚨 +216 KB 🚨 |
Dependency size | 0 B | 235 KB | 🚨 +235 KB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-outline
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 2 | 🚨 +2 🚨 |
Self size | 0 B | 23 KB | 🚨 +23 KB 🚨 |
Dependency size | 0 B | 32 KB | 🚨 +32 KB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-storysource
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 7 | 🚨 +7 🚨 |
Self size | 0 B | 1.89 MB | 🚨 +1.89 MB 🚨 |
Dependency size | 0 B | 10.12 MB | 🚨 +10.12 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/experimental-addon-test
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 61 | 🚨 +61 🚨 |
Self size | 0 B | 581 KB | 🚨 +581 KB 🚨 |
Dependency size | 0 B | 13.85 MB | 🚨 +13.85 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-themes
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 1 | 🚨 +1 🚨 |
Self size | 0 B | 18 KB | 🚨 +18 KB 🚨 |
Dependency size | 0 B | 28 KB | 🚨 +28 KB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-toolbars
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 0 | 0 |
Self size | 0 B | 10 KB | 🚨 +10 KB 🚨 |
Dependency size | 0 B | 659 B | 🚨 +659 B 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-viewport
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 2 | 🚨 +2 🚨 |
Self size | 0 B | 27 KB | 🚨 +27 KB 🚨 |
Dependency size | 0 B | 67 KB | 🚨 +67 KB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/builder-vite
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 6 | 🚨 +6 🚨 |
Self size | 0 B | 457 KB | 🚨 +457 KB 🚨 |
Dependency size | 0 B | 832 KB | 🚨 +832 KB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/builder-webpack5
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 223 | 🚨 +223 🚨 |
Self size | 0 B | 79 KB | 🚨 +79 KB 🚨 |
Dependency size | 0 B | 29.54 MB | 🚨 +29.54 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/core
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 46 | 🚨 +46 🚨 |
Self size | 0 B | 19.08 MB | 🚨 +19.08 MB 🚨 |
Dependency size | 0 B | 14.29 MB | 🚨 +14.29 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/builder-manager
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 0 | 0 |
Self size | 0 B | 1 KB | 🚨 +1 KB 🚨 |
Dependency size | 0 B | 703 B | 🚨 +703 B 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/channels
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 0 | 0 |
Self size | 0 B | 1 KB | 🚨 +1 KB 🚨 |
Dependency size | 0 B | 675 B | 🚨 +675 B 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/client-logger
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 0 | 0 |
Self size | 0 B | 1 KB | 🚨 +1 KB 🚨 |
Dependency size | 0 B | 695 B | 🚨 +695 B 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/components
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 0 | 0 |
Self size | 0 B | 1 KB | 🚨 +1 KB 🚨 |
Dependency size | 0 B | 683 B | 🚨 +683 B 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/core-common
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 0 | 0 |
Self size | 0 B | 1 KB | 🚨 +1 KB 🚨 |
Dependency size | 0 B | 687 B | 🚨 +687 B 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/core-events
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 0 | 0 |
Self size | 0 B | 4 KB | 🚨 +4 KB 🚨 |
Dependency size | 0 B | 687 B | 🚨 +687 B 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/core-server
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 0 | 0 |
Self size | 0 B | 1 KB | 🚨 +1 KB 🚨 |
Dependency size | 0 B | 687 B | 🚨 +687 B 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/csf-tools
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 0 | 0 |
Self size | 0 B | 1 KB | 🚨 +1 KB 🚨 |
Dependency size | 0 B | 679 B | 🚨 +679 B 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/docs-tools
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 0 | 0 |
Self size | 0 B | 1 KB | 🚨 +1 KB 🚨 |
Dependency size | 0 B | 683 B | 🚨 +683 B 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/manager
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 0 | 0 |
Self size | 0 B | 1 KB | 🚨 +1 KB 🚨 |
Dependency size | 0 B | 671 B | 🚨 +671 B 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/manager-api
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 0 | 0 |
Self size | 0 B | 1 KB | 🚨 +1 KB 🚨 |
Dependency size | 0 B | 687 B | 🚨 +687 B 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/node-logger
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 0 | 0 |
Self size | 0 B | 1 KB | 🚨 +1 KB 🚨 |
Dependency size | 0 B | 687 B | 🚨 +687 B 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/preview
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 0 | 0 |
Self size | 0 B | 1 KB | 🚨 +1 KB 🚨 |
Dependency size | 0 B | 671 B | 🚨 +671 B 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/preview-api
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 0 | 0 |
Self size | 0 B | 1 KB | 🚨 +1 KB 🚨 |
Dependency size | 0 B | 687 B | 🚨 +687 B 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/router
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 0 | 0 |
Self size | 0 B | 2 KB | 🚨 +2 KB 🚨 |
Dependency size | 0 B | 667 B | 🚨 +667 B 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/telemetry
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 0 | 0 |
Self size | 0 B | 1 KB | 🚨 +1 KB 🚨 |
Dependency size | 0 B | 679 B | 🚨 +679 B 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/theming
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 0 | 0 |
Self size | 0 B | 2 KB | 🚨 +2 KB 🚨 |
Dependency size | 0 B | 671 B | 🚨 +671 B 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/types
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 0 | 0 |
Self size | 0 B | 1 KB | 🚨 +1 KB 🚨 |
Dependency size | 0 B | 663 B | 🚨 +663 B 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/angular
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 257 | 🚨 +257 🚨 |
Self size | 0 B | 362 KB | 🚨 +362 KB 🚨 |
Dependency size | 0 B | 34.19 MB | 🚨 +34.19 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/ember
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 250 | 🚨 +250 🚨 |
Self size | 0 B | 22 KB | 🚨 +22 KB 🚨 |
Dependency size | 0 B | 31.94 MB | 🚨 +31.94 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/experimental-nextjs-vite
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 87 | 🚨 +87 🚨 |
Self size | 0 B | 230 KB | 🚨 +230 KB 🚨 |
Dependency size | 0 B | 31.03 MB | 🚨 +31.03 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/html-vite
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 15 | 🚨 +15 🚨 |
Self size | 0 B | 5 KB | 🚨 +5 KB 🚨 |
Dependency size | 0 B | 1.93 MB | 🚨 +1.93 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/html-webpack5
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 233 | 🚨 +233 🚨 |
Self size | 0 B | 6 KB | 🚨 +6 KB 🚨 |
Dependency size | 0 B | 30.09 MB | 🚨 +30.09 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/nextjs
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 587 | 🚨 +587 🚨 |
Self size | 0 B | 461 KB | 🚨 +461 KB 🚨 |
Dependency size | 0 B | 83.64 MB | 🚨 +83.64 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/preact-vite
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 13 | 🚨 +13 🚨 |
Self size | 0 B | 6 KB | 🚨 +6 KB 🚨 |
Dependency size | 0 B | 1.33 MB | 🚨 +1.33 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/preact-webpack5
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 231 | 🚨 +231 🚨 |
Self size | 0 B | 6 KB | 🚨 +6 KB 🚨 |
Dependency size | 0 B | 29.66 MB | 🚨 +29.66 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/react-vite
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 103 | 🚨 +103 🚨 |
Self size | 0 B | 12 KB | 🚨 +12 KB 🚨 |
Dependency size | 0 B | 18.54 MB | 🚨 +18.54 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/react-webpack5
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 309 | 🚨 +309 🚨 |
Self size | 0 B | 6 KB | 🚨 +6 KB 🚨 |
Dependency size | 0 B | 40.83 MB | 🚨 +40.83 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/server-webpack5
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 241 | 🚨 +241 🚨 |
Self size | 0 B | 14 KB | 🚨 +14 KB 🚨 |
Dependency size | 0 B | 31.07 MB | 🚨 +31.07 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/svelte-vite
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 134 | 🚨 +134 🚨 |
Self size | 0 B | 22 KB | 🚨 +22 KB 🚨 |
Dependency size | 0 B | 36.04 MB | 🚨 +36.04 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/svelte-webpack5
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 296 | 🚨 +296 🚨 |
Self size | 0 B | 6 KB | 🚨 +6 KB 🚨 |
Dependency size | 0 B | 37.66 MB | 🚨 +37.66 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/sveltekit
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 142 | 🚨 +142 🚨 |
Self size | 0 B | 47 KB | 🚨 +47 KB 🚨 |
Dependency size | 0 B | 39.34 MB | 🚨 +39.34 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/vue3-vite
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 107 | 🚨 +107 🚨 |
Self size | 0 B | 15 KB | 🚨 +15 KB 🚨 |
Dependency size | 0 B | 42.08 MB | 🚨 +42.08 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/vue3-webpack5
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 483 | 🚨 +483 🚨 |
Self size | 0 B | 6 KB | 🚨 +6 KB 🚨 |
Dependency size | 0 B | 53.93 MB | 🚨 +53.93 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/web-components-vite
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 16 | 🚨 +16 🚨 |
Self size | 0 B | 5 KB | 🚨 +5 KB 🚨 |
Dependency size | 0 B | 1.96 MB | 🚨 +1.96 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/web-components-webpack5
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 231 | 🚨 +231 🚨 |
Self size | 0 B | 5 KB | 🚨 +5 KB 🚨 |
Dependency size | 0 B | 29.71 MB | 🚨 +29.71 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/blocks
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 4 | 🚨 +4 🚨 |
Self size | 0 B | 604 KB | 🚨 +604 KB 🚨 |
Dependency size | 0 B | 1.49 MB | 🚨 +1.49 MB 🚨 |
Bundle Size Analyzer | Link | Link |
storybook
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 47 | 🚨 +47 🚨 |
Self size | 0 B | 22 KB | 🚨 +22 KB 🚨 |
Dependency size | 0 B | 33.37 MB | 🚨 +33.37 MB 🚨 |
Bundle Size Analyzer | Link | Link |
sb
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 48 | 🚨 +48 🚨 |
Self size | 0 B | 1 KB | 🚨 +1 KB 🚨 |
Dependency size | 0 B | 33.39 MB | 🚨 +33.39 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/cli
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 390 | 🚨 +390 🚨 |
Self size | 0 B | 480 KB | 🚨 +480 KB 🚨 |
Dependency size | 0 B | 74.43 MB | 🚨 +74.43 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/codemod
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 270 | 🚨 +270 🚨 |
Self size | 0 B | 612 KB | 🚨 +612 KB 🚨 |
Dependency size | 0 B | 64.42 MB | 🚨 +64.42 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/core-webpack
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 3 | 🚨 +3 🚨 |
Self size | 0 B | 16 KB | 🚨 +16 KB 🚨 |
Dependency size | 0 B | 2.39 MB | 🚨 +2.39 MB 🚨 |
Bundle Size Analyzer | Link | Link |
create-storybook
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 105 | 🚨 +105 🚨 |
Self size | 0 B | 1.11 MB | 🚨 +1.11 MB 🚨 |
Dependency size | 0 B | 42.37 MB | 🚨 +42.37 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/csf-plugin
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 3 | 🚨 +3 🚨 |
Self size | 0 B | 10 KB | 🚨 +10 KB 🚨 |
Dependency size | 0 B | 789 KB | 🚨 +789 KB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/instrumenter
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 5 | 🚨 +5 🚨 |
Self size | 0 B | 218 KB | 🚨 +218 KB 🚨 |
Dependency size | 0 B | 277 KB | 🚨 +277 KB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/react-dom-shim
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 0 | 0 |
Self size | 0 B | 10 KB | 🚨 +10 KB 🚨 |
Dependency size | 0 B | 795 B | 🚨 +795 B 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/source-loader
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 5 | 🚨 +5 🚨 |
Self size | 0 B | 41 KB | 🚨 +41 KB 🚨 |
Dependency size | 0 B | 10.07 MB | 🚨 +10.07 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/test
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 53 | 🚨 +53 🚨 |
Self size | 0 B | 1.52 MB | 🚨 +1.52 MB 🚨 |
Dependency size | 0 B | 8.09 MB | 🚨 +8.09 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/preset-create-react-app
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 68 | 🚨 +68 🚨 |
Self size | 0 B | 18 KB | 🚨 +18 KB 🚨 |
Dependency size | 0 B | 6.03 MB | 🚨 +6.03 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/preset-html-webpack
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 93 | 🚨 +93 🚨 |
Self size | 0 B | 4 KB | 🚨 +4 KB 🚨 |
Dependency size | 0 B | 20.16 MB | 🚨 +20.16 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/preset-preact-webpack
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 4 | 🚨 +4 🚨 |
Self size | 0 B | 5 KB | 🚨 +5 KB 🚨 |
Dependency size | 0 B | 2.40 MB | 🚨 +2.40 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/preset-react-webpack
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 182 | 🚨 +182 🚨 |
Self size | 0 B | 24 KB | 🚨 +24 KB 🚨 |
Dependency size | 0 B | 30.92 MB | 🚨 +30.92 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/preset-server-webpack
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 20 | 🚨 +20 🚨 |
Self size | 0 B | 10 KB | 🚨 +10 KB 🚨 |
Dependency size | 0 B | 3.84 MB | 🚨 +3.84 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/preset-svelte-webpack
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 103 | 🚨 +103 🚨 |
Self size | 0 B | 14 KB | 🚨 +14 KB 🚨 |
Dependency size | 0 B | 12.76 MB | 🚨 +12.76 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/preset-vue3-webpack
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 366 | 🚨 +366 🚨 |
Self size | 0 B | 9 KB | 🚨 +9 KB 🚨 |
Dependency size | 0 B | 44.86 MB | 🚨 +44.86 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/html
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 6 | 🚨 +6 🚨 |
Self size | 0 B | 47 KB | 🚨 +47 KB 🚨 |
Dependency size | 0 B | 40 KB | 🚨 +40 KB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/preact
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 6 | 🚨 +6 🚨 |
Self size | 0 B | 23 KB | 🚨 +23 KB 🚨 |
Dependency size | 0 B | 40 KB | 🚨 +40 KB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/react
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 6 | 🚨 +6 🚨 |
Self size | 0 B | 924 KB | 🚨 +924 KB 🚨 |
Dependency size | 0 B | 24 KB | 🚨 +24 KB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/server
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 9 | 🚨 +9 🚨 |
Self size | 0 B | 13 KB | 🚨 +13 KB 🚨 |
Dependency size | 0 B | 972 KB | 🚨 +972 KB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/svelte
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 106 | 🚨 +106 🚨 |
Self size | 0 B | 96 KB | 🚨 +96 KB 🚨 |
Dependency size | 0 B | 10.60 MB | 🚨 +10.60 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/vue3
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 17 | 🚨 +17 🚨 |
Self size | 0 B | 86 KB | 🚨 +86 KB 🚨 |
Dependency size | 0 B | 6.08 MB | 🚨 +6.08 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/web-components
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 7 | 🚨 +7 🚨 |
Self size | 0 B | 62 KB | 🚨 +62 KB 🚨 |
Dependency size | 0 B | 55 KB | 🚨 +55 KB 🚨 |
Bundle Size Analyzer | Link | Link |
Closes #26553
What I did
This PR patches a core utility function used to retrieve package versions with npm or pnpm and affects everyone who tries to run
npx storybook@latest init
using npm or pnpm as a package manager.The command used to retrieve the latest package version
npm info <package> version --json
on recent versions of npm no longer return a valid JSON response (eg."8.4.2"
the semantic version wrapped in double quotes), but instead just returns an unquoted string. The same is the case with pnpm and also affects those using bun since the underlying call to get versions uses an npm command.Without having to figure out what p/npm version's this behavior changed and needing to keep track of it, the following PR resorts to just using
npm info <package> version
(without the--json
flag) as this behavior is consistent across all versions of p/npm.Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal
,ci:merged
orci:daily
GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/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>
Greptile Summary
This PR fixes version retrieval functionality in Storybook's package manager proxies to handle changes in npm/pnpm version output format.
runGetVersions
in NPM/PNPM/BUN proxies to handle unquoted version strings from newer package managers--json
flag when fetching single version information since newer versions return plain stringsnpx storybook@latest init
from working with npm/pnpm package managers