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

Chore: Remove unused dependencies in /lib #19100

Merged
merged 8 commits into from Sep 6, 2022
Merged

Chore: Remove unused dependencies in /lib #19100

merged 8 commits into from Sep 6, 2022

Conversation

IanVS
Copy link
Member

@IanVS IanVS commented Sep 3, 2022

Issue: There are dependencies that are being installed along with storybook that aren't being used.

What I did

I used npx depcheck to help identify unused (and missing) dependencies, searched the repo for usages of those dependencies to be sure the tool wasn't giving wrong results, and removed deps or added deps when needed.

This PR covers packages in /lib, and I'll open other PRs to deal with addons and renderers, etc.

Note: I also pinned the @storybook/test-runner to next, in order to pull in a change that is needed now that some babel dependencies are not always being installed. This can be reverted once @storybook/test-runner 0.7.1 is released.

How to test

I think CI should be good enough to detect any bugs this might introduce.

@IanVS
Copy link
Member Author

IanVS commented Sep 3, 2022

Vite is failing in sandbox tests, because it is missing @babel/preset-react. Which is interesting, because it shouldn't need that, and the sandbox works fine for me locally. I think a .babelrc is being injected or something, when it shouldn't be. Still investigating.

Edit: I figured out that @storybook/test-runner didn't have a dependency on some babel packages, even though it's using them in a transform. I've opened storybookjs/test-runner#187 to address that.

@IanVS IanVS changed the base branch from next to remove-core-js September 4, 2022 04:40
Base automatically changed from remove-core-js to next September 5, 2022 16:24
# Conflicts:
#	code/lib/addons/package.json
#	code/lib/blocks/package.json
#	code/lib/client-api/package.json
#	code/lib/core-client/package.json
#	code/lib/core-common/package.json
#	code/lib/preview-web/package.json
#	code/lib/source-loader/package.json
#	code/yarn.lock
This should be removed once 7.1 stable is released
@IanVS IanVS marked this pull request as ready for review September 5, 2022 22:23
@IanVS IanVS changed the title Chore: Remove unused dependencies Chore: Remove unused dependencies in /lib Sep 5, 2022
@IanVS IanVS requested review from shilman and ndelangen and removed request for shilman September 5, 2022 22:23
@ndelangen ndelangen merged commit 7bb0486 into next Sep 6, 2022
@ndelangen ndelangen deleted the deps-cleanup branch September 6, 2022 09:04
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.

None yet

2 participants