Skip to content

Fix some of the node deprecation warnings#667

Open
leszekhanusz wants to merge 1 commit intoperformant-software:mainfrom
leszekhanusz:chore_update_node_dependencies
Open

Fix some of the node deprecation warnings#667
leszekhanusz wants to merge 1 commit intoperformant-software:mainfrom
leszekhanusz:chore_update_node_dependencies

Conversation

@leszekhanusz
Copy link
Copy Markdown

Updating the node dependencies to address the majority of the deprecation warnings and significantly drop the number of reported vulnerabilities.

Disclaimer: made with Gemini Pro

Here is what was done:

  • Removed Unused react-scripts: The react-scripts package was in your package.json, causing a large cascade of the warnings related to old tools like svgo, workbox, @babel/plugin-proposal-*, sourcemap-codec, stable, etc. Since electron-forge uses its own webpack tooling, react-scripts wasn't being used for building or development.

  • Added jest explicitly: Because react-scripts was intrinsically providing the jest binary, removing it broke npm run test. I've added jest directly to your devDependencies so that your test coverage continues to run correctly!

  • Ran npm audit fix: This updated your existing local versions inside package-lock.json and dropped the vulnerability count significantly (from 101 to 46 vulnerabilities).

Notes on the Remaining Warnings

When you run npm install, you will still see a few of the warnings you initially posted:

  • Warnings about xterm-addon-* and glob@8: These are deeply nested inside @electron-forge's web-multi-logger tool. They don't affect your runtime but are an external unpatched element on electron-forge's end in v7.
  • Warnings about @material-ui/core, @material-ui/lab, and @material-ui/styles: You are currently using version 4.x. To fix these deprecation warnings, you would need to migrate entirely to @mui/material version 5.x, which involves manual codebase-wide breaking changes.
  • Warnings on phin or gar: These are embedded in jimp and get-folder-size respectively and can be safely ignored until those respective libraries issue v2 updates. The code remains structurally exactly the same, all tests continue to pass (npm run test), and your dependencies are much healthier now.

…recation warnings and significantly drop the number of reported vulnerabilities.

Here is what I've done:

Removed Unused react-scripts: The react-scripts package was in your package.json, causing a large cascade of the warnings related to old tools like svgo, workbox, @babel/plugin-proposal-*, sourcemap-codec, stable, etc. Since electron-forge uses its own webpack tooling, react-scripts wasn't being used for building or development.

Added jest explicitly: Because react-scripts was intrinsically providing the jest binary, removing it broke npm run test. I've added jest directly to your devDependencies so that your test coverage continues to run correctly!

Ran npm audit fix: This updated your existing local versions inside package-lock.json and dropped the vulnerability count significantly (from 101 to 46 vulnerabilities).

Notes on the Remaining Warnings
When you run npm install, you will still see a few of the warnings you initially posted:

Warnings about xterm-addon-* and glob@8: These are deeply nested inside @electron-forge's web-multi-logger tool. They don't affect your runtime but are an external unpatched element on electron-forge's end in v7.
Warnings about @material-ui/core, @material-ui/lab, and @material-ui/styles: You are currently using version 4.x. To fix these deprecation warnings, you would need to migrate entirely to @mui/material version 5.x, which involves manual codebase-wide breaking changes.
Warnings on phin or gar: These are embedded in jimp and get-folder-size respectively and can be safely ignored until those respective libraries issue v2 updates.
The code remains structurally exactly the same, all tests continue to pass (npm run test), and your dependencies are much healthier now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant