Live data from Hacker News

Upcoming breaking changes for npm v12

github.blog

141–150 of 221 posts

Re: Upcoming breaking changes for npm v12

#141

Earlier quoted context omitted.

Then don't use it. Just don't presume to tell me if I can or can't.

Given that has an impact over the whole industry, I will for sure tell you that patching on install SHOULD NOT be a thing. Up to you to run your own post install script yourself

[flagged]

Re: Upcoming breaking changes for npm v12

#142
post #106

Earlier quoted context omitted.

> they fired many staff engineers Would you rather the company went under after it ran out of money and had to fire everyone instead? Not to mention a quarter of the company was laid off the year before the acquisition.

Was that the case? Can you provide sources to your claims and provide a foundation to your theories?

https://www.theregister.com/software/2019/04/01/nice-people-...

Year before the MSFT takeover. No idea about their actual financials but they were definitely shedding headcount pre 2020, including kicking people for trying to unionise.

Re: Upcoming breaking changes for npm v12

#143
post #122

postinstall scripts should've been removed long time ago, it's the cancer of NPM packages. There's so many deeply nested, uncontrolled postinstalls that run randomly when you pull something it's insane, I don't know how someone at some point ever though that was a good idea.

Absolutely not, there are plenty of use-cases for them. https://www.npmjs.com/package/patch-package comes to mind off the top of my head. Hopefully current hysteria will not result in some bs decisions like this.

Your own link says that a proper package manager (e.g. pnpm) supports this out of the box.

If there are other use cases that really need post-install scripts, you can whitelist just those in pnpm. In projects I'm working with, there are often zero post-install scripts that must be enabled for everything to work properly, and it's usually from poorly cobbled packages that use them to download prebuilt binaries (well written packages, like biome or tsgo, use per-architecture subpackages).

You enable just one or two of those, and block everything else.

Re: Upcoming breaking changes for npm v12

#145

Earlier quoted context omitted.

Given that has an impact over the whole industry, I will for sure tell you that patching on install SHOULD NOT be a thing. Up to you to run your own post install script yourself

[flagged]

Elaborate on the "behave properly". What is properly here?

Re: Upcoming breaking changes for npm v12

#146
post #68

Earlier quoted context omitted.

native modules. nodejs can have native modules (written in C++, Rust, etc...). Projects usually ship prebuilt natives binaries (for each arch/OS/Nodejs ABI combination) hosted on GitHub Releases and download them automatically at installation time; fallback to build from source if not found. that's where scripts are used the reason for not bundling all native binaries is becasue the no. of combinations are huge and i…

There should be a path for local building as well. Node.js is being used on a lot of embedded systems. I’d imagine there are also lots of other reasons for local builds.

there's fallback to build from source but it would require the builder to have all the toolchain installed (whatever the library is using: could be gcc, python, rustc....)

Re: Upcoming breaking changes for npm v12

#148

I wonder if there are still reasons to use yarn? Has yarn also implemented safeguards to protect against supply chain attacks? Until now, I only knew about pnpm. It’s great that npm has followed up.

Of course. Modern Yarn releases (4.x) are deterministic to a fault and you can rely on it to have a consistent behavior across your whole team. As for feature-wise I'd say it's a lot of small details that together add up once you grow used to them.

The next major release will keep pushing in that direction with both better performances and features we couldn't implement until now due to their reliance on said perfs improvements.

Disclaimer: I'm the Yarn lead maintainer.

Re: Upcoming breaking changes for npm v12

#149

I wonder if there are still reasons to use yarn? Has yarn also implemented safeguards to protect against supply chain attacks? Until now, I only knew about pnpm. It’s great that npm has followed up.

I don't know what NPM is doing, but yarn installs deps much faster than NPM

Re: Upcoming breaking changes for npm v12

#150

Earlier quoted context omitted.

I don’t know if this is the case here, but it’s very hard in general to judge how much software projects ought to cost. Software projects will grow in complexity to consume whatever budget you give it. If you hire 50 devs and give them a bunch of business objectives, they are going to do what they do and write a ton of software. It’s not obvious to me that it would be theoretically impossible to build a cheaper packa…

And additionally was it truly worth buying if this is what we've ended up with? Some things should be allowed to fail

Eh, easy to say. Remember how Sourceforge started shipping ads in binaries people downloaded? If you think failing was the worst scenario, you lack imagination.
Post reply on HN