chore: Upgrades lockfile to version 3 #567
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR continues the work made on #501 and upgrades the application lockfile, dealing with incompatibilities that arise from the upgrade.
Prior to this PR, the
npm install
command could only be run on Node 14. If a developer tried to tunnpm install
on Node 20 the whole lockfile would be rebuilt and compatibility errors would occur if any other dependency was changed.Steps description
We were not able to upgrade this file previous to #555 because of an incompatibility in one of the subdependencies of the React Router.
The first step was to only upgrade the lockfile version without changing any of its dependencies, which was done using
npm install --lockfile-version 3
command. ( e603860 )The next step was to actually run
npm install
on Node 20, which prompted many changes to the lockfile to respect the new environment. This command was previously run only on Node 14. ( 813bf7f ).As a consequence, the
pot
translation files failed and had to be updated usingmake update_pot
( 5e362c4 )Lastly,
react-scripts
began to fail all jest tests, because react-scriptsv4
requires Jestv26
and our React18
tests require Jestv29
. We tried using theSKIP_PREFLIGHT_CHECK=true
flag to allow the version mismatch not to break the CI, but it utimately broke the test run itself. Another approach would be to rewrite the tests using an older version of the react testing library.Since the tests were still on a stub implementation that do not improve our quality control, they were disabled until we can upgrade
react-scripts
, as described on #441. ( 704148f )Acceptance Criteria
package-lock.json
should be upgraded to v3npm install
on a development environment should not change the contents ofpackage-lock.json
Security Checklist