-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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): remove @carbon/icons from peerDependencies #5656
Conversation
Deploy preview for carbon-components-react ready! Built with commit 57a5972 https://deploy-preview-5656--carbon-components-react.netlify.com |
Deploy preview for carbon-elements ready! Built with commit 57a5972 |
Vanilla users need to write the HTML by their own. That said, how can vanilla users get the SVG contents without |
@asudoh I believe the dependency is still valid/needed to install, just that it doesn't need to be listed as a peer dependency 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
@joshblack Did you want to add |
@asudoh I think if a team would like to use the package they can install it, but there should no need to rely on Listing it as a peer dependency would lead to the warning in projects even if they don't need or want that dependency, and would be frustrating given that the library itself doesn't use it. Listing it as a dependency would mean that folks are consuming the dependency through hoisted node_modules which would lead to unintended behavior. If the library is using it in code, we 100% can bring it in but it seemed like that was not the case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signing off based on @joshblack's latest response, though in most of the use cases of vanilla library application code needs @carbon/icons
(or copy contents from it) to create its markup.
We currently don't' use
@carbon/icons
in our Vanilla JS and this will prompt folks to install an additional dependency even if they won't use it directly, or if code they use from the library does not use it. Let me know if I'm missing a place where it's being used!For reference, without this change folks would technically need to install the following packages to remove warnings:
Changelog
New
Changed
package.json
forcomponents
to not have peerDependenciesRemoved