Remove @storybook/html peer dependency from root package.json and re-enable audit for prod #1322
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
🤨 Rationale
Fixes #1317.
The
npm audit
of production dependencies was failing because of deps that Storybook brought in. But Storybook should really be a dev dependency.Storybook is listed as a production dependency because it's in
peerDependencies
in the rootpackage.json
. We added it there in this commit of the PR that migrated us to Storybook 7. I believe the rationale was that it was necessary to apply a patch to the package. (I'd like to remove that patch but I think it's not possible until storybookjs/storybook#22384 is available. Currently it's only released in an alpha branch)👩💻 Implementation
@storybook/html
frompeerDependencies
in the rootpackage.json
git clean -fdx
npm install
to regeneratepackage-lock.json
🧪 Testing
I locally verified that the patch was still applied to the file inside node_modules. If it isn't applied, I believe we'd see a build error.
I locally verified that
npm audit --only=prod
succeeds now.Otherwise relying on the PR build.
✅ Checklist