Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I know that npm now has a per-user cache in ~/.npm:

https://docs.npmjs.com/cli/v7/commands/npm-cache

I am not sure if it uses CoW to bring those packages into each project. If it did, that would be efficient and speed up "npm install" if the cache was warm.



Language package managers don't need copy-on-write, because there's no "write" — the files that make up dependencies are immutable from the perspective of the projects that they get installed into. There's no advantage to using CoW to "deploy" such files into work trees, over using plain-old hard links to do so. (And hard-linking these files is indeed what all the Node package managers — other than NPM — already do.)


Not npm but it’s used by pnpm for awhile.

https://github.com/pnpm/pnpm/issues/1505




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: