storybookjs / mdx1-csf

MDX to CSF compiler using MDXv1
MIT License
4 stars 12 forks source link

add necessary packages to devDependencies #14

Open aschlumpf opened 1 year ago

aschlumpf commented 1 year ago

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 https://github.com/microsoft/TypeScript/issues/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

kylegach commented 1 year ago

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

JannesMeyer commented 1 year ago

Love this PR!

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

PeerRich commented 1 year ago

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

emrysal commented 1 year ago

This also closes https://github.com/storybookjs/mdx1-csf/pull/8 & https://github.com/storybookjs/mdx1-csf/pull/10 💯

aschlumpf commented 1 year ago

@shilman Any updates here for merging this in?

trulyronak commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

Any update on this?

aschlumpf commented 1 year ago

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

aschlumpf commented 1 year ago

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