Re:JSR first impressions: a JavaScript package manager by th...
by bandergirl on Sunday February 18, 2024 @01:00AM
(#39416596)
The last time I pointed this out, some npm dinosaur said npm allows publishing of any type of package so it cannot enforce a structure. Wow, really, that’s exactly what I’m saying. Whose fault is that? So the result is that nobody knows how to publish anything so npm is in shambles.
[ Parent
| on HN ]
Re:JSR first impressions: a JavaScript package manager by th...
by beebeepka on Sunday February 18, 2024 @06:27AM
(#39418211)
What structure do you envision?
Re:JSR first impressions: a JavaScript package manager by th...
by bandergirl on Monday February 19, 2024 @03:49AM
(#39427442)
You can publish a package that has zero files in it, even if it mentions them in main/exports. That’s a very basic check they could do, but they don’t.
Ideally you wouldn’t be able to publish a type=module file that contains “require”, but if npm doesn’t even want to validate the existence of the file, we can never get to how to validate anything else.
At the very least warn the user that they’re publishing a broken package, but still allow it if you must.