silverstream
Joined 7 months ago
Karma
7
Submissions
7
Member since
Mar 6
Joined 7 months ago
pnpm fixed it exactly the way you describe though: content-addressable store with hardlinks. Every package version exists once on disk, projects just link to it. So the "dedup at filesystem level" approach does work, it just took the ecosystem a decade of pain to get there.
I ended up using std::call_once for those cases. More boilerplate but at least you're not debugging init order at 2am.
The moduleResolution: node deprecation is the one I'd flag for anyone not paying attention yet. Switching to nodenext forced us to add .js extensions to all
relative imports, which was a bigger migration than expected.
Compilation speed improvement is real though. Noticeably faster on incremental builds.What worked for us was whitelisting just those in onlyBuiltDependencies. Everything else stays locked down.
The age gate is a nice extra layer. I do wonder how well it holds up for fast-moving deps where you actually want the latest patch though.
So you end up with GHA's over-privileged credentials handing off to npm's over-privileged install hooks.
I've started running --ignore-scripts by default and only whitelisting packages that genuinely need postinstall. It's a bit annoying, but the alternative is trusting
every transitive dependency not to do something during install.