storybookjs / mdx1-csf

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

Unnecessary @types/lodash on dependency #6

Open adriangodong opened 2 years ago

adriangodong commented 2 years ago

Describe the bug

@types/lodash is currently declared as a dependency. This is unnecessary since @types/lodash is a build time dependency, so it should be moved to devDependency instead.

To Reproduce Steps to reproduce the behavior:

  1. Initialize a new package and install mdx1-csf
  2. Verify @types/lodash is installed

Expected behavior

@types/lodash is not installed.

Additional context

I hit this issue because of a conflicting type with underscore.

THETCR commented 2 years ago

The same thing applies to prettier, ts-dedent and @babel/preset-env. ts-dedent and @babel/preset-env are listed as dependencies and devDependencies

Looking at the package manifest it seems a lot of dependencies are heavily outdated and some of them are not even used.

aschlumpf commented 1 year ago

This causes projects which use lodash to have many type errors, and there is no solid workaround other than removing the @types package manually in a post-install script for npm/yarn. See https://github.com/microsoft/TypeScript/issues/18588. This blocks my project from upgrading our storybook version.

chrisburkejr commented 1 year ago

Can this get approved and merged? This looks like a super simple change and is effecting users who are using nx storybook generators.. @aschlumpf is correct there is no solid workaround

THETCR commented 1 year ago

@chrisburkejr This fix was incorporated with f073b57. Which only took more then half a year and the issues were just blatantly ignored.

The difference in size of the installed production dependencies is 18,2 MB. In the past year this package was downloaded 94.5 million times. That is approximately 1639 TB of wasted data.

chrisburkejr commented 1 year ago

@THETCR Thanks for pointing this out, this actually is enough to unblock by putting this in peer deps. Sorry about the wasted downloaded data for dependencies..