Skip to content

Find versions of a package that work with given peer dependencies

License

Notifications You must be signed in to change notification settings

jeysal/peer-compatible

Repository files navigation

peer-compatible

Find versions of a package that work with given peer dependencies

build status AppVeyor build status code coverage

npm package license

Installation

npm install --save peer-compatible

Usage

const compatible = require('peer-compatible').default;

API

index

Finds versions of pkgName that work with given peers. Given extra peers that the package does not require at all are considered to be compatible.

Parameters

  • pkgName string The package to search for.
  • peers {} The peers that found versions need to be compatible with, formatted like a regular peer dependency object literal. Versions must be exact, ranges are not supported.

Examples

peerCompatible('some-component-lib', { 'some-framework-core-lib': '1.0.0' })
  .then(versions => console.log(versions));

Returns Promise<Array<string>> The versions of the package that work with given peers.

CLI version

peer-compatible-cli

About

Find versions of a package that work with given peer dependencies

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published