0.2.1 • Published 5 years ago

hoist-packages v0.2.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

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/