-
Notifications
You must be signed in to change notification settings - Fork 753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hoist monorepo modules #730
Comments
evertonfraga
changed the title
Normalize dependency tree to better use Lerna's dependency hoisting
Hoist monorepo modules
Apr 27, 2020
Quick command to see all unique devDependencies and versions in all monorepo packages:
|
A more advanced command that comprises cat packages/*/package.json | \
jq '.dependencies, .devDependencies' | \
grep -Eo '".+"' | \
sort | \
sed -E 's/[":]//g' | \
uniq -c output: 1 @ethereumjs/account ^3.0.0
3 @ethereumjs/block ^3.0.0
1 @ethereumjs/blockchain ^4.0.3
4 @ethereumjs/common ^1.5.0
7 @ethereumjs/config-nyc ^1.1.1
7 @ethereumjs/config-prettier ^1.1.1
7 @ethereumjs/config-tsc ^1.1.1
7 @ethereumjs/config-tslint ^1.1.1
1 @ethereumjs/ethash ^1.0.0
2 @ethereumjs/tx ^2.1.2
1 @types/async ^2.4.1
5 @types/bn.js ^4.11.6
1 @types/core-js ^2.5.0
1 @types/levelup ^4.3.0
3 @types/lru-cache ^5.1.0
1 @types/minimist ^1.2.0
6 @types/node ^11.13.4
1 @types/semaphore ^1.1.0
1 @types/tape ^4.13.0
6 @types/tape ^4.2.33
1 async ^2.1.2
1 async ^2.6.1
1 async ^3.2.0
1 async-eventemitter ^0.2.4
3 browserify ^16.5.1
1 buffer-xor ^2.0.1
1 contributor ^0.1.25
1 core-js-pure ^3.0.1
1 crc-32 ^1.2.0
2 ethereumjs-testing git+https//github.com/ethereumjs/ethereumjs-testing.git#v1.3.1
5 ethereumjs-util ^7.0.2
1 ethereumjs-util ~6.1.0
1 flow-stoplight ^1.0.0
1 functional-red-black-tree ^1.0.1
2 istanbul ^0.4.1
3 karma ^4.1.0
3 karma-browserify ^6.0.0
2 karma-chrome-launcher ^2.2.0
1 karma-detect-browsers ^2.3.3
3 karma-firefox-launcher ^1.1.0
3 karma-tap ^4.1.4
1 level ^6.0.0
2 level-mem ^3.0.1
1 levelup ^1.3.0
1 lru-cache ^5.1.1
1 memdown ^1.1.0
2 merkle-patricia-tree ^2.3.2
1 merkle-patricia-tree ^3.0.0
1 miller-rabin ^4.0.0
2 minimist ^1.2.0
7 nyc ^14.0.0
7 prettier ^2.0.5
3 rlp ^2.2.3
1 rustbn.js ~0.2.0
2 safe-buffer ^5.1.1
1 semaphore ^1.1.0
1 standard ^10.0.0
1 tap-spec ^5.0.0
7 tape ^4.10.1
7 ts-node ^8.8.2
7 tslint ^5.16.0
6 typedoc next
6 typedoc-plugin-markdown ^2.2.17
7 typescript ^3.9.3
6 typestrict ^1.0.2
1 util-callbackify ^1.0.0
1 util.promisify ^1.0.1 |
While using |
Merged
10 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Lerna bootstrap
has the--hoist
option, that aims to install each common dependency only once, at the repository root level. This is useful for development as it provides faster installs, and super nice for CIs, as besides faster installs, it's easier to cache them.Risks: if any module or script does not follow the default package resolution method — recursively up the directory tree (
packages/vm/node_modules
,packages/node_modules
,./node_modules
, etc…), there might be misbehaviors.Currently, the command
lerna bootstrap --hoist
gives the following warnings:The text was updated successfully, but these errors were encountered: