# D66. pnpm installs the checkouts, in npm's flat layout (28 Oct 2026)

Each piece of work runs in a git worktree of its own, each with its own `node_modules`: about 650 MB with npm for a worktree of the core and one of the app, 9.6 GB for the 48 of one computer. pnpm keeps one store per computer and links its files into each `node_modules` (copy-on-write clones on APFS, hard links on NTFS): a new worktree costs almost nothing on disk. Installing takes a few seconds with either.

Weighed:
- **npm.** Fast enough, but every worktree copies everything. Rejected for the disk.
- **pnpm in its isolated layout** (each package sees only its own dependencies). Stricter, but packaging the app then has to find each module through its owner, and links have to be made again in the core's snapshot. Rejected: the strictness was never asked for.
- **pnpm with `nodeLinker: hoisted`.** The same flat `node_modules` as npm, its files linked from the store. Chosen.

What it means:
- `pnpm-lock.yaml` and `pnpm-workspace.yaml` (the packages, the overrides, the install scripts allowed in `allowBuilds`) replace `package-lock.json` and the `workspaces`, `overrides` and `allowScripts` of `package.json`. `packageManager` names pnpm's version.
- The packages depend on each other as `workspace:*`: a release changes their versions, never the lockfile.
- The app links the sibling checkout's packages (`link:../elabora-core/packages/*`): a change of the core is seen there without installing again, as before.
- Library users install the published packages with the package manager they like; nothing in the packages needs pnpm.

*Revisit if:* npm shares files between installs, or a tool of the chain does not work with pnpm.
