News for hackers. Stuff that matters.
Re:Bun v1.0.0 by AaronFriel on Friday September 08, 2023 @01:47PM (#37436904)
How common are packages with no imports, exports, requires, or "module.exports="?

I imagine that's quite rare, because such a package would only be imported or required for its side effects; and because that package cannot import or require any others, could you safely just assume that if it was `require()`ed use CJS, and if it was `import`ed, use ESM?

Re:Bun v1.0.0 by Touche on Friday September 08, 2023 @01:58PM (#37437062)
Rare things still happen a lot at the scale of npm. And due to transitive dependencies it winds up affecting a lot of actual users. And this is just one example of an incompatibility, there are many more. Bun didn't discover a silver bullet here that dozens of other tools in the past missed on.
Re:Bun v1.0.0 by AaronFriel on Friday September 08, 2023 @02:09PM (#37437202)
Do you have an empirical basis for that? I'm curious because on one hand, Bun is advertising they are solving a major challenge for library authors, really betting quite heavily on that being persuasive for adoption.

The risk for Bun's adoption is that they're wrong, of course.

The risk for Node's usage is that they're right, and library authors begin urging users to use Bun because it's 100x easier than making a useful library with Node. (This will happen very slowly, but things that happen very slowly can start happening all at once very quickly.)

Re:Bun v1.0.0 by fkyoureadthedoc on Friday September 08, 2023 @05:12PM (#37439495)
> And this is just one example of an incompatibility, there are many more

Such as? If you could provide 5-10 of your many examples and why you think that Bun's approach doesn't solve them it would be very helpful.

Re:Bun v1.0.0 by throw10920 on Friday September 08, 2023 @08:45PM (#37441083)
Yeah, I don't believe GP. Their assertions that Bun hasn't solved this (or that the heuristic used is inadequate) are basically based on speculation without any evidence.
Re:Bun v1.0.0 by 3np on Saturday September 09, 2023 @12:08AM (#37442205)
Jarred even came here and agree with them. It's nothing controversial. Just nuance. No need to flame. DYOR.