converge-peer-dependencies

1.0.6 • Public • Published

converge-peer-dependencies

Converge peer dependencies in package.json

Description

This tool can be applied on a NodeJS (or Babelized) project, after dependencies have been installed, to gather all peer dependencies of the dependencies in package.json, converge them, if possible, among themselves and the other dependencies, and add them back to package.json.

On success, it returns an object with existing dependencies that changed and new dependencies that were added.

{
  depChanged,
  depAdded
}

Usage

const { converge } = require('converge-peer-dependencies');

converge('./dir/to/app').then(ret => {
  console.log(JSON.stringify(ret, null, 2));
})
.catch(e => {
  console.log(JSON.stringify(e));
});

An optional options object can be provided as second argument, with the following structure.

option default description example
matcher null boolean predicate on the package name n => !n.startsWith('react')

Readme

Keywords

none

Package Sidebar

Install

npm i converge-peer-dependencies

Weekly Downloads

1

Version

1.0.6

License

MIT

Unpacked Size

6.49 kB

Total Files

4

Last publish

Collaborators

  • dsouflis