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

add necessary packages to devDependencies #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aschlumpf
Copy link

Issue: #6

What Changed

Currently, there are dependencies which should be devDependencies in the external dependencies. This issue causes projects which use Storybook, using this package as a dependency, to install these packages. The @types packages which are installed are added to these projects' installed types, forcing dependencies to be type checked at these particular versions. There is no workaround built into TypeScript for installing transient@types from packages, see microsoft/TypeScript#18588.

This issue blocks my project from upgrading to Storybook 6.5.9, as lodash is having its types checked when we have version 4.17.21 installed and do not enforce strong typing on our use of lodash. The other changes are just good practice.

How to test

Run a build and run the tests.

Change Type

  • maintenance
  • documentation
  • patch
  • minor
  • major

@kylegach
Copy link

kylegach commented Aug 1, 2022

@aschlumpf — Thank you for your (first! 🥳) contribution! I've assigned a relevant maintainer to take a look as soon as they're able.

@JannesMeyer
Copy link

Love this PR!

The prettier dependency "prettier": ">=2.2.1 <=2.3.0", is quite annoying and breaking stuff.

@PeerRich
Copy link

PeerRich commented Sep 1, 2022

👍 this'll unlock some of our prettier issues ❤️

@emrysal
Copy link

emrysal commented Sep 1, 2022

This also closes #8 & #10 💯

@aschlumpf
Copy link
Author

@shilman Any updates here for merging this in?

@trulyronak
Copy link

@shilman +1000 The prettier dependencies cause a bunch of problems, and there doesn't seem to be a way to override this. Would love to update prettier to 2.8.1 + keep it up to date!!

@dgattey
Copy link

dgattey commented Dec 21, 2022

This update to the prettier version would help immensely! The main @storybook packages use version 2.8.1, which unlocks some fixes around generics, namely enabling prettier to properly parse typeof x<Type> syntax, where you're passing a generic to a typeof. As it's just a dev dependency, merging this PR would enable us to not use an older version of prettier and instead correctly use 2.8.1 like we'd like to!

@marcovanharten-cpi
Copy link

Any update on this?

@aschlumpf
Copy link
Author

@shilman Can we please try and get this merged soon? Thank you!

Copy link

@chrisburkejr chrisburkejr left a comment

Choose a reason for hiding this comment

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

This looks good to me

@aschlumpf
Copy link
Author

@chrisburkejr Thank you, it says I need approval from someone with write access in order to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.