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

Unnecessary @types/lodash on dependency #6

Open
adriangodong opened this issue May 25, 2022 · 5 comments
Open

Unnecessary @types/lodash on dependency #6

adriangodong opened this issue May 25, 2022 · 5 comments

Comments

@adriangodong
Copy link

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
Copy link

THETCR commented Jun 2, 2022

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
Copy link

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 microsoft/TypeScript#18588. This blocks my project from upgrading our storybook version.

@chrisburkejr
Copy link

chrisburkejr commented Mar 11, 2023

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
Copy link

THETCR commented Mar 11, 2023

@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
Copy link

@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..

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

No branches or pull requests

4 participants