sync-pnpm-deps
v0.1.0
Published
Sync pnpm deps according to monorepo graph. Never run app when deps are different.
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 checkExample
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
apphas installed[email protected]. And thelibhas installed[email protected]. Runingnpx sync-pnpm-deps checkwill throw an error, because the versions ofwebpackin the same application are different. - The
apphas installed[email protected]. And thelibhas installed[email protected]and[email protected]. Runingnpx sync-pnpm-deps checkwill throw an error, becausewebpackhas been saved into 2 copies. That means, there are 2webpackinstances in the same application.
