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(components): move react-syntax-highlighter types to dev deps #18323

Closed
wants to merge 3 commits into from
Closed

fix(components): move react-syntax-highlighter types to dev deps #18323

wants to merge 3 commits into from

Conversation

iamandrewluca
Copy link
Contributor

@iamandrewluca iamandrewluca commented May 25, 2022

Discussion: vuejs/language-tools#592

Using @storybook/vue JSX Runtime types and Volar extension conflicts with @types/react from Storybook

❯ npm ls @types/react
my-project@0.0.0 /Users/iamandrewluca/Projects/my-project
└─┬ @storybook/addon-essentials@6.5.4
  └─┬ @storybook/addon-actions@6.5.4
    └─┬ @storybook/components@6.5.4
      └─┬ @types/react-syntax-highlighter@11.0.5
        └── @types/react@18.0.9

Closes #12505

@nx-cloud
Copy link

nx-cloud bot commented May 25, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit ad02c64. 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.

Discussion: vuejs/language-tools#592

Using `@storybook/vue` JSX Runtime types and Volar extension conflicts with `@types/react`

```shell
❯ npm ls @types/react
my-project@0.0.0 /Users/iamandrewluca/Projects/my-project
└─┬ @storybook/addon-essentials@6.5.4
  └─┬ @storybook/addon-actions@6.5.4
    └─┬ @storybook/components@6.5.4
      └─┬ @types/react-syntax-highlighter@11.0.5
        └── @types/react@18.0.9
```

Closes #12505
@yannbf
Copy link
Member

yannbf commented May 30, 2022

Hey @iamandrewluca thanks a lot for your contribution! This is a quite tricky one, @ndelangen could you assist? Thanks!

@ndelangen
Copy link
Member

This seems the same as #18425

@iamandrewluca
Copy link
Contributor Author

@ndelangen cool! Then this PR can be closed?! 🙂

@shilman
Copy link
Member

shilman commented Jun 29, 2022

@iamandrewluca thanks so much for your patience on this & the original contribution. it looks like the contents of this PR are already contained in next so i'm closing it now.

@shilman shilman closed this Jun 29, 2022
@iamandrewluca iamandrewluca deleted the fix-components branch June 29, 2022 10:28
@mockingjet
Copy link

mockingjet commented Sep 15, 2022

Hi, @types/react is still installed, and btw I use pnpm

"devDependencies": {
    "@babel/core": "^7.18.10",
    "@storybook/addon-actions": "^6.5.12",
    "@storybook/addon-essentials": "^6.5.12",
    "@storybook/addon-interactions": "^6.5.12",
    "@storybook/addon-links": "^6.5.12",
    "@storybook/builder-vite": "^0.2.2",
    "@storybook/mdx2-csf": "^0.0.3",
    "@storybook/testing-library": "^0.0.13",
    "@storybook/vue3": "^6.5.12",
    "babel-loader": "^8.2.5",
    "vue-loader": "^16.8.3"
}

@iamandrewluca
Copy link
Contributor Author

@mockingjet please read the conversation above

@mockingjet
Copy link

I read it, but I don't get it. v6.5.12 has this fix, right? I still get @types/react installed

@iamandrewluca
Copy link
Contributor Author

iamandrewluca commented Sep 19, 2022

It was fixed in v7 only. I think v6 won't get the fix 👀

@mockingjet
Copy link

Cool. I thought this fix was merged in May, it should be in the current version. Never thought of next branch means v7. Thanks

@Timakra
Copy link

Timakra commented Dec 6, 2022

Can we cherry pick this fix to have it fixed in 6.5.* too and not only v7

@noamori25
Copy link

I think it will be great to cherry-pick this fix also to 6.5 version.

@mockingjet
Copy link

I pernoally hope the v7 released beta as soon as possible.
And I do feel like the team take a negative attitude towards v6, which I think it's a good thing meaning that they can put more efforts on v7-beta

@yuval-agritask
Copy link

Hi all,
Thanks to everyone for their contribution, and this library, my team and I enjoy using it mostly.
Quite recently we upgraded to version 6 of Storybook since we upgraded to Vue 3.
We were very sad to see that we've tons of issues in our code due to React types appearing in normal dependencies. We see a lot of warnings and it really distracts us from our main efforts.
There are a lot of other people who also ran into the same issues, see: #12505
vuejs/language-tools#592

It's quite unfortunate that using Storybook, hurts so much the development experience on your actual code, not even the Storybook files, while it supposes to be the opposite to improve your Developer experience.

Since the PR is just moving the dependency from a normal to dev one, can't we just cherry pick it and release a hotfix? @shilman @ndelangen

I really hope you consider it. Since version 7 is in Alpha which means it's still very raw, and the previous upgrade we did for Storybook was quite painful, hopefully, we won't need to wait so much time and go through a major upgrade just for this small fix.

@shilman
Copy link
Member

shilman commented Dec 7, 2022

@yuval-agritask Sorry to hear about the upgrade headaches. I'll discuss with @ndelangen and see whether we can do anything here.

@alexandrkrucheniuk
Copy link

also faced the issue described by @yuval-agritask

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.

Storybook v6 + vue + tsx -> tsc errors: conflict types with @types/react
9 participants