department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
282 stars 202 forks source link

Discovery: review libraries/dependencies and recommend upgrades #27348

Closed meganhkelley closed 3 years ago

meganhkelley commented 3 years ago

Details

The purpose of this ticket is to investigate what software dependencies should be upgraded in frontend repos.

This should be done in vets-website, content-build, and vets-json-schema if applicable.

To Do:

Next steps (will be separate tickets)

jhonnyoddball commented 3 years ago

Tools to be used:

jhonnyoddball commented 3 years ago

Inventory the package.json files in vets-website and content-build

The audit can be found in this spreadsheet

jhonnyoddball commented 3 years ago

Possible unused dependencies

Generate a report using depcheck

vets-website

Running: depcheck vets-website --ignores='eslint'

Unused dependencies

content-build

Running: depcheck content-build --ignores='eslint'

Unused dependencies

jhonnyoddball commented 3 years ago

npm-check can also be used to find unused dependencies as well as its current versions.

Screen Shot 2021-07-26 at 1 41 10 PM

jhonnyoddball commented 3 years ago

Recommendations

Now that the audit is complete, we can take in consideration the following actions:

Remove unused dependencies.

The audit contains a column called USED?. the ? represents that the dependency was not found. Those dependencies need to be verified and removed.

Minor upgrades

These upgrades usually don't affect the existing code and should be prioritized over the major upgrades.

Major upgrades

These should be the latest since they are the hardest, specially if jumping several versions up.

jhonnyoddball commented 3 years ago

After auditing our current dependencies, we will be removing the following unused dependencies:

vets-website

content-build

jhonnyoddball commented 3 years ago

Based on the recommendations above, these are the final decisions: