0.1.0 • Published 3 years ago
sync-pnpm-deps v0.1.0
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 installedwebpack@5.0.0. And thelibhas installedwebpack@4.0.0. Runingnpx sync-pnpm-deps checkwill throw an error, because the versions ofwebpackin the same application are different. - The
apphas installedwebpack@5.0.0. And thelibhas installedwebpack@5.0.0andwebpack-cli@4.0.0. Runingnpx sync-pnpm-deps checkwill throw an error, becausewebpackhas been saved into 2 copies. That means, there are 2webpackinstances in the same application.