News for hackers. Stuff that matters.
Re:NPM and NodeJS should do more to make ES Modules easy to use by catapart on Thursday June 20, 2024 @09:17AM (#40738449)
Just use JSR[0] and only deal with npm when a project forces you to do things backwards. Since JSR packages are available on npm, there's nothing lost.

[0]https://jsr.io/

Re:NPM and NodeJS should do more to make ES Modules easy to use by creesch on Thursday June 20, 2024 @09:37AM (#40738648)
Neat to get to know JSR, but doesn't this have very little to do with the contents of the article you responding to? While I know NPM is in the title, the actually article is about module imports which JSR doesn't change.
Re:NPM and NodeJS should do more to make ES Modules easy to use by catapart on Thursday June 20, 2024 @09:48AM (#40738761)
The article is saying "this ecosystem should change because it doesn't do specific things that make sense for it to do".

JSR says "here's a way to leave the original ecosystem alone, but have a better-fitting ecosystem that does the things you want". (not sure about the 'jsr doesn't change' bit? It literally requires ES modules, in lieu of common js modules).

Seems pretty relevant, to me, but YMMV. I understand it's not a direct answer, but it seems as relevant as "here's typescript" to someone saying "we should add types to javascript".

Re:NPM and NodeJS should do more to make ES Modules easy to use by jmondi on Thursday June 20, 2024 @09:39AM (#40738677)
I have mixed feelings about the JSR requirement for explicit typing. Other than that, it is pretty great!
Re:NPM and NodeJS should do more to make ES Modules easy to use by catapart on Thursday June 20, 2024 @09:45AM (#40738722)
Hm? This is news to me. As far as I know, you can just publish pure javascript. I know that it's going to give you a worse 'score' if you don't have types, and it may require explicit typing of TS (but, strictly, so does TS), but I wasn't aware that there was not any way to publish to JSR without types. I'll have to look in to that, thanks!
Re:NPM and NodeJS should do more to make ES Modules easy to use by FractalHQ on Friday June 21, 2024 @02:18PM (#40752217)
This is the best feature imo. Never again will my time be drained by someone else’s failure to type their spaghetti.
Re:NPM and NodeJS should do more to make ES Modules easy to use by nox101 on Thursday June 20, 2024 @12:57PM (#40740811)
jsr seems great! I hope they work out their kinks but I'm really glad someone is trying to push things forward.