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 leaking @types/* from package.json dependencies #18169

Closed
wants to merge 6 commits into from
Closed

Fix leaking @types/* from package.json dependencies #18169

wants to merge 6 commits into from

Conversation

mrauhu
Copy link
Contributor

@mrauhu mrauhu commented May 7, 2022

Hello.

I found that the @storybook/components package is leaking the @types/react package to a Vue project node_modules directory:

npm ls @types/react

my-vue-project@0.0.0
`-- @my-vue-project/storybook@0.0.0 -> ./packages/storybook
  `-- @storybook/addon-a11y@6.4.22
    `-- @storybook/components@6.4.22
      `-- @types/react-syntax-highlighter@11.0.5       
        `-- @types/react@18.0.8

This results to a bug with the vue-tsc package: vuejs/language-tools#592.

So, I check all package.json files in the Storybook repository and fix them.

What I did

Moved @types/* packages from dependencies to devDependencies in package.json files.

How to test

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

Best wishes,
Sergey.

@nx-cloud
Copy link

nx-cloud bot commented May 7, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 33f6851. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@mrauhu mrauhu changed the title Fix leaking @types/* from a dependencies field of package.json files Fix leaking @types/* from package.json dependencies May 7, 2022
…pendencies` in the `@storybook/components` `package.json`
…@storybook/addon-storyshots` `package.json`
… `package.json` files for packages:

* `@storybook/builder-webpack4`;
* `@storybook/builder-webpack5`;
* `@storybook/core-common`;
* `@storybook/core-server`;
* `@storybook/manager-webpack5`.
…es` to `devDependencies` in the `@storybook/core-server` `package.json`
@mrauhu
Copy link
Contributor Author

mrauhu commented May 14, 2022

@Andarist thank you for suggestions.

I rechecked export in generated *.d.ts files and moved to devDependencies only not exported @types/* packages.

@shilman
Copy link
Member

shilman commented Jun 29, 2022

This was already fixed in next in another PR, see comment #18323 (comment)

We don't feel comfortable merging these changes without a way to verify that they don't disrupt TS users. Thanks so much for your contribution & patience @mrauhu !!!

@shilman shilman closed this Jun 29, 2022
@ndelangen
Copy link
Member

Hello @mrauhu I'm going to close this... I think all relevant bits got merged / fixed in a few other PRs already, the react-syntax-highlighter should at least be fixed, and the other types changes don't look right me me.

Thank you the work you did, very much appreciated!

@mrauhu
Copy link
Contributor Author

mrauhu commented Jun 29, 2022

Thank you.

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

Successfully merging this pull request may close these issues.

None yet

4 participants