Skip to content

Commit 4c9f725

Browse files
fi3eworknyqykk
andauthored
fix(storybook-addon): correct peerDependencies declaration (#3231)
Co-authored-by: nyqykk <[email protected]>
1 parent 0309fb5 commit 4c9f725

File tree

4 files changed

+280
-1065
lines changed

4 files changed

+280
-1065
lines changed

.changeset/fifty-flies-impress.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/storybook-addon': patch
3+
---
4+
5+
correct peerDependencies declaration

packages/storybook-addon/package.json

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
"module-federation",
1212
"typescript",
1313
"storybook",
14+
"rsbuild",
15+
"storybook-rsbuild",
1416
"addon"
1517
],
1618
"files": [
@@ -54,12 +56,39 @@
5456
"webpack-virtual-modules": "0.6.2"
5557
},
5658
"peerDependencies": {
59+
"@rsbuild/core": "^1.0.1",
5760
"@module-federation/utilities": "^3.1.27",
58-
"@nx/react": "~16.0.0 || ~17.0.0 || ~17.2.0",
59-
"@nx/webpack": "~16.0.0 || ~17.0.0 || ~17.2.0",
60-
"@storybook/core-common": "^6.5.16 || ^7.0.0",
61-
"@storybook/node-logger": "^6.5.16 || ^7.0.0",
61+
"@nx/react": ">= 16.0.0",
62+
"@nx/webpack": ">= 16.0.0",
63+
"@storybook/core-common": "^6.5.16 || ^7.0.0 || ^ 8.0.0",
64+
"@storybook/node-logger": "^6.5.16 || ^7.0.0 || ^ 8.0.0",
6265
"webpack": "^5.75.0",
6366
"webpack-virtual-modules": "^0.5.0 || ^0.6.0"
67+
},
68+
"peerDependenciesMeta": {
69+
"@rsbuild/core": {
70+
"optional": true
71+
},
72+
"@module-federation/utilities": {
73+
"optional": true
74+
},
75+
"@nx/react": {
76+
"optional": true
77+
},
78+
"@nx/webpack": {
79+
"optional": true
80+
},
81+
"@storybook/core-common": {
82+
"optional": true
83+
},
84+
"@storybook/node-logger": {
85+
"optional": true
86+
},
87+
"webpack": {
88+
"optional": true
89+
},
90+
"webpack-virtual-modules": {
91+
"optional": true
92+
}
6493
}
6594
}

packages/storybook-addon/src/lib/storybook-addon.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import * as process from 'process';
44
import VirtualModulesPlugin from 'webpack-virtual-modules';
55
import { container, Configuration } from 'webpack';
66
import { logger } from '@storybook/node-logger';
7+
// NOTE: @storybook/core-common is deprecated while still available, considering importing
8+
// from 'storybook/internal/common' or '@storybook/core'. Considering requires Storybook 8
9+
// at least and change this in the next breaking change version.
710
import { normalizeStories } from '@storybook/core-common';
811
import { ModuleFederationPluginOptions } from '@module-federation/utilities';
912

0 commit comments

Comments
 (0)