Because PnP needs only a map and a folder of zips, a project's installed state can live in Git 1,932 . That is zero-installs: commit .yarn/cache and .pnp.cjs, and a fresh clone runs with no install step and no registry. Yarn 4 11,798 's cache is global by default, so first ask for a per-project one. When PnP is the obstacle, the nodeLinker setting switches Berry to node-modules (npm-style) or pnpm 69,400 (symlinked, pnpm's Store).
printf 'enableGlobalCache: false\n' > .yarnrc.yml
yarn install > /dev/null && ls .yarn/cache | wc -l && du -sh .yarn/cache | cut -f1
printf '.yarn/install-state.gz\nnode_modules/\n' > .gitignore
git init -q && git add -A && git commit -qm "Zero-install BookNest"
cd .. && git clone -q yarn-demo yarn-clone && cd yarn-clone
yarn node -e 'console.log(require("pg/package.json").version)'
cd ../yarn-demo && yarn config set nodeLinker node-modules
yarn install > /dev/null && node -e 'console.log(require("express/package.json").version)'83 2.9M 8.23.0 ➤ YN0000: Successfully set nodeLinker to 'node-modules' 5.2.1
The clone loaded pg 8.23.0 without yarn install: all 83 packages arrived with git clone as 2.9 MB of zips. Git keeps every archive you ever commit, so zero-installs suits small, stable dependency sets. After the linker switch, plain node finds Express 24,430 in a real node_modules, which suits tools that expect one.