Skip to content

Commit

Permalink
fix(storybook-addon): correct peerDependencies declaration (module-fe…
Browse files Browse the repository at this point in the history
…deration#3231)

Co-authored-by: nyqykk <65393845+nyqykk@users.noreply.github.com>
  • Loading branch information
fi3ework and nyqykk authored Nov 15, 2024
1 parent 0309fb5 commit 4c9f725
Show file tree
Hide file tree
Showing 4 changed files with 280 additions and 1,065 deletions.
5 changes: 5 additions & 0 deletions .changeset/fifty-flies-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@module-federation/storybook-addon': patch
---

correct peerDependencies declaration
37 changes: 33 additions & 4 deletions packages/storybook-addon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"module-federation",
"typescript",
"storybook",
"rsbuild",
"storybook-rsbuild",
"addon"
],
"files": [
Expand Down Expand Up @@ -54,12 +56,39 @@
"webpack-virtual-modules": "0.6.2"
},
"peerDependencies": {
"@rsbuild/core": "^1.0.1",
"@module-federation/utilities": "^3.1.27",
"@nx/react": "~16.0.0 || ~17.0.0 || ~17.2.0",
"@nx/webpack": "~16.0.0 || ~17.0.0 || ~17.2.0",
"@storybook/core-common": "^6.5.16 || ^7.0.0",
"@storybook/node-logger": "^6.5.16 || ^7.0.0",
"@nx/react": ">= 16.0.0",
"@nx/webpack": ">= 16.0.0",
"@storybook/core-common": "^6.5.16 || ^7.0.0 || ^ 8.0.0",
"@storybook/node-logger": "^6.5.16 || ^7.0.0 || ^ 8.0.0",
"webpack": "^5.75.0",
"webpack-virtual-modules": "^0.5.0 || ^0.6.0"
},
"peerDependenciesMeta": {
"@rsbuild/core": {
"optional": true
},
"@module-federation/utilities": {
"optional": true
},
"@nx/react": {
"optional": true
},
"@nx/webpack": {
"optional": true
},
"@storybook/core-common": {
"optional": true
},
"@storybook/node-logger": {
"optional": true
},
"webpack": {
"optional": true
},
"webpack-virtual-modules": {
"optional": true
}
}
}
3 changes: 3 additions & 0 deletions packages/storybook-addon/src/lib/storybook-addon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import * as process from 'process';
import VirtualModulesPlugin from 'webpack-virtual-modules';
import { container, Configuration } from 'webpack';
import { logger } from '@storybook/node-logger';
// NOTE: @storybook/core-common is deprecated while still available, considering importing
// from 'storybook/internal/common' or '@storybook/core'. Considering requires Storybook 8
// at least and change this in the next breaking change version.
import { normalizeStories } from '@storybook/core-common';
import { ModuleFederationPluginOptions } from '@module-federation/utilities';

Expand Down
Loading

0 comments on commit 4c9f725

Please sign in to comment.