https://github.com/ssmirr/compatible
🛠📦Check how compatible two versions of a dependency are
https://github.com/ssmirr/compatible
dependancy-manager dependencies npm pip
Last synced: 2 months ago
JSON representation
🛠📦Check how compatible two versions of a dependency are
- Host: GitHub
- URL: https://github.com/ssmirr/compatible
- Owner: ssmirr
- Created: 2019-02-13T19:33:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-15T05:46:55.000Z (over 6 years ago)
- Last Synced: 2025-01-23T01:29:52.034Z (4 months ago)
- Topics: dependancy-manager, dependencies, npm, pip
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Compatible 🛠📦
Tiny (has no dependencies) package to check how compatible a version of dependency is with another version.
This package gets the data from Dependabot which supports many languages (JavaScript, Python, Java, ...) and package managers (npm, pip, mvn, ...).## Installation
Install latest release from npm:
``` shell
$ npm install compatible
```Install latest updates from source:
``` shell
$ npm install ssmirr/compatible
```## Using _Compatible_
You can fetch compatibility status of a package and all the versions:
``` js
await compatible.dependency('', '', ''));
```, specific version of a package:
``` js
await compatible.update('', '', '', ''));
```, or updating from version a to version b of a package:
``` js
await compatible.version('', '', ''));
```## Example
``` js
const compatible = require('compatible');(async () => {
console.log(await compatible.update('django', 'pip', '2.1.4', '2.1.5'))
console.log(await compatible.version('got', 'npm_and_yarn', '9.5.0'))
console.log(await compatible.dependency('got', 'npm_and_yarn', true))
})();// results is a json object:
// [ { candidate_updates: 1,
// successful_updates: 0,
// previous_version: '1.10.3',
// updated_version: '1.11.7',
// non_breaking_if_semver: true
// success_rate: 0.94 } ]
```> Note: `candidate_updates` is the number of pull requests Dependabot made, and `successful_updates` is how many were merged.