-
Notifications
You must be signed in to change notification settings - Fork 920
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
USWDS - Core: Remove unused dependencies #5832
base: develop
Are you sure you want to change the base?
Conversation
@@ -157,16 +153,13 @@ | |||
"merge-stream": "2.0.0", | |||
"mocha": "10.2.0", | |||
"mq-polyfill": "1.1.8", | |||
"normalize.css": "8.0.1", |
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.
It looks like the mention of normalize.css
here could be updated or removed. It's possible it could be updated to "uswds-elements/lib/normalize"
, but looking at https://github.com/uswds/uswds/blob/develop/packages/uswds-elements/lib/_normalize.scss, it doesn't look like anything is actually being overridden.
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.
The appearance: none
would still override the -webkit-appearance: textfield
from the _normalize.scss
stylesheet. I think the comment itself is meant to serve as an explanation for the disabled Stylelint rule, since Stylelint would normally expect a selector of [type="search"]
, which would have equal specificity to the normalized styles. I think as long as it came after the normalize styles, it would take priority, but maybe it was desired to want to avoid depending on stylesheet order?
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.
But yes I would agree with your point that the comment could be updated to reference USWDS's internal normalization stylesheet rather than normalize.css
, which is not used directly.
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.
Thanks for submitting this!
I can confirm builds and local storybookJS are unaffected
5f21bd8
to
59de4b0
Compare
Summary
Removed many unused development dependencies.
Breaking change
This is not a breaking change.
Problem statement
USWDS should minimize its use of dependencies and eliminate unused dependencies in order to improve maintainability of remaining dependencies and to reduce attack surface area for supply chain attacks.
Solution
Removes unused dependencies after analysis.
Analysis:
babel-loader
gulp-changed
gulp-clean
gulp-cli
gulp
, which already provides CLI binarynormalize.css
path
path
is a default Node modulereact-dom
react
andreact-dom
to peer deps storybookjs/storybook#12972twig-html-loader
.twig
files with.json
data dependencies #4363 (afec153), but usage removed prior to merge (cac79c3)Testing and review
Verify build passes and Storybook local development is unaffected.
Dependency updates
babel-loader
gulp-changed
gulp-clean
gulp-cli
normalize.css
path
react-dom
twig-html-loader