I want to update my project's dependencies but keep the Angular version.
Since npm update
only updates within the version range specified in package.json, I chose npm-check-updates (ncu
) to more widely detect possible updates:
ncu --minimal --peer --reject @angular*
The output includes two types of suggested updates (exemplary):
glob ^9.2.1 → ^10.2.2
jest ^28.1.3 → ^29.5.0
✅ The glob
line is what I am looking for: a dependency that can be updated.
❗ Updating jest
(and others similar), on the other hand, causes conflicts
npm WARN Conflicting peer dependency: jest@28.1.3
npm WARN peer jest@"^28.0.0" from jest-preset-angular@12.2.2
npm WARN jest-preset-angular@"12.2.2" from @angular-builders/jest@14.1.0
indicating that @angular-builders/jest
(in other cases also @angular-devkit/build-angular
and @angular/compiler-cli
) would also have to be updated to the next major version (Angular 15), which I wanted to avoid.
Why did ncu --peer
fail to detect this (and accordingly not suggest the update of jest
)?
How else can possible dependency updates be detected under the constraint of maintaining compatibility with the existing (or a particular) Angular version across transitive dependencies?