Open Hotell opened 1 year ago
I've done some research/experimentation during FHL and tried to migrate our repo to following package managers:
run on macos M1 MAX
package manager | install (no cache) | install (cache) | node_modules size | |
---|---|---|---|---|
yarn 1 - midgard (Baseline) | 114s | 31s | 1.3 GB | |
yarn 3 (nodeLinker: node-modules) | 74s π (35% speed increase) | 44s π¨ (42% speed decrease) | 1.7 GB π¨ (31% size increase) | |
yarn 4 rc (nodeLinker: node-modules) | 94s π (18% speed increase) | 45s π¨ (45% speed decrease) | 1.7 GB π¨ (31% size increase) | |
pnpm | 88s π (23% speed increase) | 28s π (10% speed increase) | 1.1 GB π (15% size decrease) | |
bun | 36s π π (68% speed increase) | 14s π π (54% speed increase) | 3.1 GB π¨ (138% size increase) |
pros:
cons:
workspace:*
protocolpros:
workspace:*
protocolcons:
"scripts
" via yarn run -T <binary-name>
pros:
excellent node_modules size reduction ( thanks to shared storage )
zero ghost dependencies within workspaces
workspace:*
protocol
nicely complements single version policy approach
packages (and their binaries) installed only in root package.json just work when executing from within workspace
pnpm --filter @fluentui/react-text exec tsc -v
works
"@fluentui/scripts-prettier": "workspace:*",
"@fluentui/scripts-storybook": "workspace:*",
"@fluentui/scripts-babel": "workspace:*",
adding workspace packages to root /package.json
makes them available globally within any workspaces
patching packages is build-in
lerna support
cons:
pros:
cons:
more details:
workspace:*
protocol to enable hoistingBased on initial benchmarks and our use cases testing it looks like we have 3 options:
All of those option will nicely complement to our goal to adopt single version policy.
I am wondering how you have checked the size for bun
. bun
uses hardlinks, which can lead to incorrect size measurements.
Personally, I think pnpm
is a great choice, and bun
is far from being stable.
I am wondering how you have checked the size for bun.
great question ! I used simple find . -name "node_modules" -type d -prune -print | xargs du -chs
yeah adding bun to the metrics was just pure experiment.
I run yarn 3 with various nmMode
as well do get further metrics:
nmMode | size |
---|---|
classic | 1.7 GB |
hardlinks-local | 1.1 GB (same as pnpm) |
hardlins-global | 1.1 GB |
Ok, this should work. Don't forget to look at ~/.bun/install/cache/
and ~/.cache/pnpm/metadata/
:+1:
Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.
Still require assistance? Please, create a new issue with up-to date details.
Describe the feature that you would like added
ATM we use yarn midgard (msft fork of yarn v1 ) - it seems it doesn't have much traction from both feature additions/supporting the package.
"outside of fluent" family of packages maintained by core team uses yarn v3. It would be nice to unify on what package manager is used across our scope of projects.
"on paper" yarn 3 / pnpm should be faster and provide more richer feature set for our needs.
Features we are looking for:
Have you discussed this feature with our team
v-build
Additional context
No response
Validations
Priority
None