hoist-packages

0.2.1 • Public • Published

hoist-packages

Parse all package.json files of each package of a monorepo and will collect the used dependencies. If a dependency is used in more than one monorepo-package, then it's hoisted in the main package.json with the highest version used. All other matches for this dependency will be set to this highest version.

Warning: this tool will NOT check for pinned versions or resolve the most accurate version. All versions are simplified, e.g. "^1.2.3" will be simplified to "1.2.3", etc.

Usage

const hoist = require('hoist-packages');
await hoist('/path/to/monorepo/');

or, while development:

npm start /path/to/monorepo/

Package Sidebar

Install

npm i hoist-packages

Weekly Downloads

3

Version

0.2.1

License

MIT

Unpacked Size

75.8 kB

Total Files

12

Last publish

Collaborators

  • arndissler