Re:Escaping from Anaconda's Stranglehold on macOS
by jampekka on Monday September 02, 2024 @06:31AM
(#41424214)
Node.js has (or at least had before the ES6 mess) the sanest and best thought out package manager out there.
Re:Escaping from Anaconda's Stranglehold on macOS
by dumbo-octopus on Monday September 02, 2024 @12:10PM
(#41426615)
NPM’s original sin was making package installation and general management so painless that folks installed micro packages for everything. Can’t really fault the software for that.
The issue was, as you say, the introduction of ESM. It used to be that you required modules one way and one way only (yes there was AMD for advanced use cases, but it was an add-on), then people felt the need to “standardize” that, no we have this mess of ESM and CJS.
Re:Escaping from Anaconda's Stranglehold on macOS
by jampekka on Monday September 02, 2024 @05:20PM
(#41428910)
I don't see what's wrong with micropackages.
Re:Escaping from Anaconda's Stranglehold on macOS
by VHRanger on Monday September 02, 2024 @09:13PM
(#41430236)
Massive attack surface. That's true as a security risk, but also as a dependency risk (eg. left-pad).
Re:Escaping from Anaconda's Stranglehold on macOS
by dumbo-octopus on Tuesday September 03, 2024 @05:34AM
(#41433047)
If you don’t vendor your dependencies. Which is a poor practice that is commonly associated with NPM, but is by no means a requirement of the technology.
Re:Escaping from Anaconda's Stranglehold on macOS
by dumbo-octopus on Tuesday September 03, 2024 @05:46AM
(#41433114)
Especially if…, I should say. Even vendored dependencies are a risk as NPM commits the additional sin of allowing the act of pulling a package onto the local machine for inspection to execute arbitrary code in the form of “postinstall” hooks.
Re:Escaping from Anaconda's Stranglehold on macOS
by jampekka on Tuesday September 03, 2024 @06:35AM
(#41433401)
Review and pin your direct dependencies. With transitive dependencies it doesn't differ from trusting large dependencies in general.
The alternative to micropackages has significant downsides. Pulling in extra surface and rolling your own buggy implementations while waiting for some commitee to bikeshed years on the implementation.
Making the right thing easy rather than the wrong thing hard is a lot better approach.
The bar is so low, you have to excavate it from a landfill of rotten node_modules...