sync-pnpm-deps
v0.1.0
Published
Sync pnpm deps according to monorepo graph. Never run app when deps are different.
Downloads
18
Maintainers
Readme
sync-pnpm-deps
Sync pnpm deps according to monorepo graph. Never run app when deps are different.
Usage
Run the command below in the root of your project. It will analyze your project's dependencies, and throw an error if the same dependency is saved into different versions or saved into duplicate copies.
npx sync-pnpm-deps check
Example
We know that, webpack
use webpack-cli
as its peerDependencies
. Let's say we have an app
and a lib
in a monorepo. And the app
has installed the lib
as its dependencies.
- The
app
has installed[email protected]
. And thelib
has installed[email protected]
. Runingnpx sync-pnpm-deps check
will throw an error, because the versions ofwebpack
in the same application are different. - The
app
has installed[email protected]
. And thelib
has installed[email protected]
and[email protected]
. Runingnpx sync-pnpm-deps check
will throw an error, becausewebpack
has been saved into 2 copies. That means, there are 2webpack
instances in the same application.