fecgov / fecfile-web-app

Other
7 stars 4 forks source link

Investigate and Address Deprecated Package Warnings on NPM Install #2112

Closed exalate-issue-sync[bot] closed 2 weeks ago

exalate-issue-sync[bot] commented 1 month ago

When running npm install, a series of warnings are reported listing node packages that have been deprecated. Some of these packages are sub-dependencies of other installed packages and are out of our direct control, but we should endeavor to fix those packages that are imported through our package.json

The developer should investigate the listed packages, determine which ones we import directly, and upgrade them where possible. If a package that we import in our package.json has no obvious replacement, a new ticket should be created to follow up on it at a later date.

QA Notes

These are under-the-hood changes, and we don’t expect any visible changes. Unit tests and End-to-End tests should pass.

DEV Notes

As of writing this ticket, the current warnings are as follows:

{noformat}npm WARN deprecated readdir-scoped-modules@1.1.0: This functionality has been moved to @npmcli/fs npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm WARN deprecated osenv@0.1.5: This package is no longer supported. npm WARN deprecated read-package-json@7.0.1: This package is no longer supported. Please use @npmcli/package-json instead. npm WARN deprecated debuglog@1.0.1: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated read-package-json@2.1.2: This package is no longer supported. Please use @npmcli/package-json instead. npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported npm WARN deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead npm WARN deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported npm WARN deprecated intl-messageformat-parser@1.8.1: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser npm WARN deprecated read-installed@4.0.3: This package is no longer supported. {noformat}

NOTE: the {{intl-messageformat-parser}} package is covered in a different ticket.

Design

null

See full ticket and images here: FECFILE-1533

exalate-issue-sync[bot] commented 1 month ago

As far as I can tell, all of these packages are from subdependencies, but I did notice most of these are subdependencies of license-checker, which it seems like we might not be using and that package hasn’t been updated for 6 years, which would explain why all of it’s subdependencies are deprecated. We have it declared as a potential script to run from the package.json but as far as I can tell we aren't actually ever calling that script. I was wondering if anyone had some insight into if we're still using this or why it was being used in the past but maybe it isn't any longer?

If we could remove this package it would take out 5 of those 13 deprecated warnings. If we also update angular to the latest version we could take out another 3 of the warnings getting it down to 5 warnings (including the intl-messageformat-parser which has a separate ticket) The remaining deprecations come from Karma which we unfortunately can’t do anything about as we have it at the latest version and we are definitely using that as part of our front end unit tests.

exalate-issue-sync[bot] commented 1 month ago

Warnings resolved [x] - readdir-scoped-modules [x] - osenv [x] - debuglog [x] - @humanwhocodes/config-array [x] - @humanwhocodes/object-schema [x] - read-installed

Warnings remaining:

exalate-issue-sync[bot] commented 1 month ago

Elaine Krauss commented: Packages updated with all E2E tests passing

!image-20240821-124100.png|width=814,height=490,alt="image-20240821-124100.png"! See image in Jira

exalate-issue-sync[bot] commented 1 month ago

Matt Travers commented: For QA, unit tests passing:

[https://app.circleci.com/pipelines/github/fecgov/fecfile-web-app/6311/workflows/8dfb2a23-c691-4f4d-a590-c7ecc2075a80/jobs/21685|https://app.circleci.com/pipelines/github/fecgov/fecfile-web-app/6311/workflows/8dfb2a23-c691-4f4d-a590-c7ecc2075a80/jobs/21685]

!image-20240822-210109.png|width=1550,height=529,alt="image-20240822-210109.png"! See image in Jira

e2e tests passing:

[https://app.circleci.com/pipelines/github/fecgov/fecfile-web-app/6311/workflows/8dfb2a23-c691-4f4d-a590-c7ecc2075a80/jobs/21682|https://app.circleci.com/pipelines/github/fecgov/fecfile-web-app/6311/workflows/8dfb2a23-c691-4f4d-a590-c7ecc2075a80/jobs/21682]

!image-20240822-210016.png|width=1550,height=529,alt="image-20240822-210016.png"!

Passes CR. Sending to QA.

exalate-issue-sync[bot] commented 1 month ago

Shelly Wise commented: QA review verified visual inspection of Unit Test Passing.

!image-20240823-175738.png|width=1226,height=418,alt="image-20240823-175738.png"! See image in Jira

QA Review Completed. Moved to Stage Ready.

exalate-issue-sync[bot] commented 2 weeks ago

Automation for Jira commented: Sprint accepted by Paul Clark at Sprint Review on comment date.