Development
: Add peer dependency overrides to avoid NPM resolve errors
#5227
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.
Checklist
General
Motivation and Context
Some of you might have noticed that our CI Pipelines building the client on GitHub actions started to fail in all PRs randomly.
This is due to the release of Node.js v16.15.1 which GH Actions gradually started to use on their runners. Compared to 16.15.0, this included a bump of NPM from 8.5.5 to 8.11.0:
Our dependency tree for the client has conflicts due to outdated or even ancient dependencies that are hard to replace. They depend on older versions of other dependencies, causing NPM to fail when installing without
--force
:@swimlane/ngx-data-table
: Last update on2021-09-14
- Depends onrxjs@6.6.3
while we haverxjs@7.5.5
showdown-katex
: Last update on2020-03-12
- Depends onshowdown@1.9.1
while we haveshowdown@2.1.0
.Previously, NPM was fine with letting us install the broken dependencies once with
--force
, generating apackage-lock.json
, and live on from then on. This apparently changed with NPM 8.6.0: Now all builds are failing, even if thepackage-lock.json
already exists, when not using the--force
flag. I've always considered this to be a feature, but apparently it was a "bug" that just got fixed, defeating one of the biggest purposes of lock files (imho) and randomly breaking thousands of production CI pipelines in a minor Node.JS patch 👍 🚀 ✨Description
As it wouldn't be wise to always use
--force
in light of future dependency updates we do, this PR adds overrides to the conflicting packages to force them onto the versions of dependencies that we use. These version have worked up until now, but we now have to take special care and spoon-feed NPM that we really want that. 🙃