yarn 이 프로젝트를 설치 하는 방법 (pnp, pnpm, node-modules)
nodeLinker: pnp
장점
Extremely fast
Content-addressable store
Protects against ghost dependencies
Semantic dependency errors
Perfect hoisting optimizations
Provides a dependency tree API
Can be upgraded into zero-installs
https://yarnpkg.com/advanced/pnpapi
PnP API | Yarn
In-depth documentation of the PnP API.
yarnpkg.com
https://yarnpkg.com/features/caching#zero-installs
Cache strategies | Yarn
How to ensure your installs perform the absolute minimal amount of work.
yarnpkg.com
단점
Less idiomatic
IDE integrations often require SDKs
Sometimes requires packageExtensions
https://yarnpkg.com/configuration/yarnrc#packageExtensions
Settings (.yarnrc.yml) | Yarn
Allowed fields in .yarnrc.yml files
yarnpkg.com
nodeLinker: pnpm
장점
Slower than PnP, but still very fast
Content-addressable store
Protects against some ghost dependencies
No need for IDE SDKs
단점
Symlinks aren't always supported by tools
Hard links can lead to strange behaviors
Generic dependency errors
Sometimes requires packageExtensions
nodeLinker: node-modules
장점
Perfect compatibility with the whole ecosystem
Optional support for hardlinks (nmMode)
No need for IDE SDKs
단점
Average speed
No protection against ghost dependencies
Imperfect hoisting due to the filesystem reliance
속도 비교
https://xionwcfm.tistory.com/452
yarn berry는 4가 되었고 zeroinstall 은 못생겼다.
yarn berry는 2023년 10월 23일에 4.0 릴리즈라인이 마침내 스테이블로 들어오게되었습니다. 메이저 버전이 바뀐만큼 많은 부분에서의 개선이 있었는데요 개인적으로는 무리를 해서라도 버전을 올려
xionwcfm.tistory.com
추가 의견
https://engineering.ab180.co/stories/yarn-to-pnpm
Yarn 대신 pnpm으로 넘어간 3가지 이유
패키지 매니저를 바꾸고 1년 동안 사용해보며 든 생각들
engineering.ab180.co