USWDS - Dependencies: Use node LTS 20.9.0#5560
Conversation
| "postcss-preset-env": "9.2.0", | ||
| "postcss-sass-loader": "1.1.0", | ||
| "prettier": "2.4.1", | ||
| "prettier": "3.0.3", |
There was a problem hiding this comment.
Prettier 3x
Tried prettier v3.0.3, but reverting to last 2x version [2.8.8] because of conflicts with other prettier plugins.
Prettier 3x error
➜ npx gulp lintSass
[15:37:11] Using gulpfile ~/web/uswds/gulpfile.js
[15:37:11] Starting 'lintSass'...
[15:37:13] 'lintSass' errored after 2.02 s
[15:37:13] TypeError: prettier.resolveConfig.sync is not a function
at /Users/jmejia-a/web/uswds/node_modules/stylelint-prettier/stylelint-prettier.js:50:56
at /Users/jmejia-a/web/uswds/node_modules/stylelint/lib/lintPostcssResult.js:121:8
at Array.map (<anonymous>)
at lintPostcssResult (/Users/jmejia-a/web/uswds/node_modules/stylelint/lib/lintPostcssResult.js:111:18)
at lintSource (/Users/jmejia-a/web/uswds/node_modules/stylelint/lib/lintSource.js:110:8)
at async /Users/jmejia-a/web/uswds/node_modules/stylelint/lib/standalone.js:211:27
at async Promise.all (index 8)
at async Function.standalone [as lint] (/Users/jmejia-a/web/uswds/node_modules/stylelint/lib/standalone.js:254:22)
at async lintSass (/Users/jmejia-a/web/uswds/tasks/lint.js:43:31)See all prettier releases here [GitHub].
| "@storybook/addon-a11y": "6.5.16", | ||
| "@storybook/addon-essentials": "6.5.16", | ||
| "@storybook/addon-links": "6.5.16", | ||
| "@storybook/builder-webpack5": "6.5.16", | ||
| "@storybook/html": "6.5.16", | ||
| "@storybook/manager-webpack5": "6.5.16", |
There was a problem hiding this comment.
Latest 6x StorybookJS version. The next major version, 7 requires major updates. Captured in #5239.
There was a problem hiding this comment.
Terminal message [OUTDATED]
Previous review
This is looking good to me! Just had one potential regression in the terminal logs.
When I open the console in storybook I see a collapsable warning with a sass-loader error followed by our USWDS Notifications:
I'm not seeing the same thing on our current build.
Testing Checklist
- No regressions in icons.
- No regressions in SASS compilation.
- No regressions in linting & prettier.
- No regressions in
html:build. - No regressions in StorybookJS.
- No regressions in terminal logs (
doc-utils.js - ex: npx gulp build). - Confirmed
identity-stylelint-config@2.0.0is the latest
There was a problem hiding this comment.
Just noting this PR resolves 1 critical vulnerability and introduces 3 moderate vulnerabilities.
Develop:
50 vulnerabilities (1 low, 21 moderate, 27 high, 1 critical)This branch:
51 vulnerabilities (24 moderate, 27 high)Running npm audit fix didn't resolve any of the new vulnerabilities.
|
Scratch that console message note. I see it on other branches as well as develop now. |
|
@mahoneycm would you mind updating the comment with the outdated console message note? It could be potentially confusing to new readers. Maybe hide it in a Also, do you have any requested changes or should I request another re-review from you? |
mahoneycm
left a comment
There was a problem hiding this comment.
Lgtm!
The previous regression I flagged turned out to be a false alarm.
Testing Checklist
- No regressions in icons.
- No regressions in SASS compilation.
- No regressions in linting & prettier.
- No regressions in
html:build. - No regressions in StorybookJS.
- No regressions in terminal logs (
doc-utils.js - ex: npx gulp build). - Confirmed
identity-stylelint-config@2.0.0is the latest
amyleadem
left a comment
There was a problem hiding this comment.
This looks good to me! I was able to successfully perform the following tests using both Node 16.18.0 and 18.12.0:
- Confirmed I can successfully run the following:
npm installnpm run startnpm run buildnpm run build:htmlnpm run prettiernpm run lint
- Confirmed that Storybook builds and displays as expected
- Confirmed icons display as expected
I did notice that there have been some minor and patch updates in the dependencies since this PR was opened. I tagged them in the comments for your awareness in case we want to update.
Co-authored-by: Amy Leadem <93996430+amyleadem@users.noreply.github.com>
|
Note that |
|
I'd like to consider modifying this PR to move to the current Node LTS, |
|
I was also able to successfully perform the following tests using Node 20.9.0:
I'm going to test a bit on |
|
OK, done. Updated description as well as the dependency table |
| container: &container | ||
| docker: | ||
| - image: cimg/node:16.15.0-browsers | ||
| - image: cimg/node:20.9.0-browsers |

Summary
Set node 18 as the default. Updated
.nvmrcfile from 16→20, which is the current LTS version.Breaking change
This is not a breaking change.
Related issue
Closes #5010.
Related pull requests
Related to uswds/uswds-site#2304.
Preview link
Preview link:
Problem statement
Support for node 16 is going to stop on CloudGov pages.
Solution
.nvmrcto 20..tool-versionstonpmjs 20.9.0.Major changes
16→20.tool-versionstonpmjs 20.9.0.Testing and review
npm install.npm startto run StorybookJS without errors.npx gulp buildto confirm builds.Checklist
html:build.doc-utils.js - ex: npx gulp build).Dependency updates