This might be out of scope for the project but an awesome feature (IMHO).
Monorepos are pretty popular lately but extremely slow when npm is used for installation. Lerna tries to change the behavior of npm (with different hacks) to make it faster and to not install stuff many times. On the other side, pnpm, with its store concept, that can be shared between packages, already has the possibility of very fast installations inside a monorepo.
I think with some small changes pnpm would be a great choice for many monorepo projects:
- change the way local dependencies are connected to a package. Instead of using
npm pack to make a tarball and then unpacking it in the store, use pnpm link to connect it to the package (pnpm link is already implemented).
- rewrite
pnpm publish to convert the local dependencies into versioned dependencies before publish. So if there would be a dependency like "foo": "file:../foo", pnpm would look up the foo package.json, and insert the version of it to the package that is being published.
@patrickheeney, you might be interested in this.
This might be out of scope for the project but an awesome feature (IMHO).
Monorepos are pretty popular lately but extremely slow when npm is used for installation. Lerna tries to change the behavior of npm (with different hacks) to make it faster and to not install stuff many times. On the other side, pnpm, with its store concept, that can be shared between packages, already has the possibility of very fast installations inside a monorepo.
I think with some small changes pnpm would be a great choice for many monorepo projects:
npm packto make a tarball and then unpacking it in thestore, usepnpm linkto connect it to the package (pnpm linkis already implemented).pnpm publishto convert the local dependencies into versioned dependencies before publish. So if there would be a dependency like"foo": "file:../foo", pnpm would look up thefoopackage.json, and insert the version of it to the package that is being published.@patrickheeney, you might be interested in this.