News for hackers. Stuff that matters.
Re:The Frontend Treadmill by rcleveng on Thursday March 20, 2025 @01:36PM (#43426283)
I'm still using npm and wasn't sure if I should use yarn or pnmp, is there a clear winner here on this one?

Is there an authoritative place to know which ways the winds of change are blowing on this? I ask since both of them (yarn and pnpm) have recent releases within the last days and weeks.

Re:The Frontend Treadmill by homebrewer on Thursday March 20, 2025 @02:39PM (#43427211)
pnpm saves a lot of disk space by reusing packages and hardlinking (or reflinking if your filesystem supports that) from a single global directory. It's fully transparent for you.

Optionally, it can also use a strict mode (or whatever it's called) where you can only access packages that are explicitly mentioned in your dependency list. Really helps with preventing you from accidentally creating unexpended ties to your transitive dependencies.

Yarn doesn't really have major upsides compared to modern npm if you can't/won't use their package format (which allows for reading files directly from compressed archives, but it comes with a bunch of downsides and doesn't work with all text editors and frameworks).

tldr: I'd recommend pnpm.

Re:The Frontend Treadmill by rcleveng on Thursday March 20, 2025 @02:58PM (#43427470)
Cool, thanks! I've not anything this succinct between them before.
Re:The Frontend Treadmill by mplanchard on Thursday March 20, 2025 @04:00PM (#43428171)
I agree with their assessment. It uses some nifty storage tricks and I really appreciate the ability to know when packages are accidentally depending on dependencies they haven’t declared.