microsoft / fluentui

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.
https://react.fluentui.dev
Other
18.52k stars 2.73k forks source link

[Feature]: package manager switch #29179

Open Hotell opened 1 year ago

Hotell commented 1 year ago

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

Hotell commented 1 year ago

I've done some research/experimentation during FHL and tried to migrate our repo to following package managers:

Benchmarks

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)

yarn v1 - midgard

pros:

cons:

yarn 3

pros:

cons:

pnpm (v8)

pros:

cons:

bun (v1)

pros:

cons:

more details:

Summary

Based 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.

Bessonov commented 1 year ago

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.

Hotell commented 1 year ago

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
Bessonov commented 1 year ago

Ok, this should work. Don't forget to look at ~/.bun/install/cache/ and ~/.cache/pnpm/metadata/ :+1:

microsoft-github-policy-service[bot] commented 8 months ago

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.