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

fix: remove unused dependencies from core-common #20994

Merged
merged 6 commits into from
Feb 14, 2023

Conversation

benmccann
Copy link
Contributor

What I did

I looked for these packages using grep -r src and did not see them being used

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • If this PR should be tested against many or all sandboxes,
    make sure to add the ci:merged or ci:daily GH label to it.
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]

Copy link
Contributor

@JReinhold JReinhold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm I don't see any of these in core-common too, with a simple search.

Is there any aspect we're missing here @ndelangen, or is it just leftovers?

@JReinhold JReinhold self-assigned this Feb 7, 2023
@JReinhold JReinhold added the maintenance User-facing maintenance tasks label Feb 7, 2023
"@types/mock-fs": ^4.13.1
"@types/node": ^16.0.0
"@types/picomatch": ^2.3.0
"@types/pretty-hrtime": ^1.0.0
chalk: ^4.1.0
esbuild: ^0.16.4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

esbuild is a peerDependency of esbuild-register

I recon the above is likely the reason some of those exists, though there's no doubt in my mind, some of them are likely unused.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with a simple search

This does not tell the whole story, and consider we do not have good tests in place to check for pnp/pnpm compatibility / package conformance.. removing dependencies is a risky business, and can cause old bugs to re-appear.

Thread carefully

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes, thank you. I see now that yarn had a warning I overlooked:

➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code

Running that command showed:

➤ YN0000: p174e8 → @storybook/core-common@workspace:lib/core-common doesn't provide @types/esbuild to esbuild-register
➤ YN0000: p9d342 → @storybook/core-common@workspace:lib/core-common doesn't provide esbuild to esbuild-register

I added back esbuild. As far as I can see @types/esbuild does not exist, so that seems like a bug in esbuild-register specifying a package that doesn't exist. I'll just leave that as is since that's how it was before so should not cause any new issues.

I much prefer pnpm which would make this much easier to find 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I much prefer pnpm which would make this much easier to find 😄

some day..

@ndelangen ndelangen merged commit 44525e0 into storybookjs:next Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants