npm-check-compatible
v1.0.2
Published
Determines latest compatible version of a package.
Downloads
6
Maintainers
Readme
npm-check-compatible
Determines latest compatible version of a package.
The command walks back the versions of the given package until it finds a version whose peer dependencies are satisfied by the packages installed in the current projects (i.e. that is compatible with the project). This is very handy for example when installing or updating an Angular library in an Angular project, but also in other use cases.
Usage:
We've updated an Angular project from version 14 to 15 and have to update @ng-bootstrap/ng-bootstrap
now to the latest version compatible with Angular 15:
$ npx npm-check-compatible @ng-bootstrap/ng-bootstrap
Searching for a version of @ng-bootstrap/ng-bootstrap whose peer dependencies are satisfied
by the packages installed in the current project:
Checking @ng-bootstrap/[email protected]......
Checking @ng-bootstrap/[email protected]......
Checking @ng-bootstrap/[email protected]......
Checking @ng-bootstrap/[email protected]......
Checking @ng-bootstrap/[email protected]......
Checking @ng-bootstrap/[email protected]......
Checking @ng-bootstrap/[email protected]......
Latest compatible version: @ng-bootstrap/[email protected]
We can now simply update to this version:
$ npm install --save @ng-bootstrap/[email protected]
Don't forget to check the changelog for breaking changes!