News for hackers. Stuff that matters.
Re:A one-line package broke `npm create-react-app` by ajross on Saturday April 25, 2020 @01:17PM (#22979543)
I don't know how "clickbait" that title can be when it is, in fact, longer than the line of code in question:

    declare function isPromise<T, S>(obj: Promise<T> | S): obj is Promise<T>;
This is, indeed, the only line of exported code in the entire package.

I genuinely don't understand the NPM world.

Re:A one-line package broke `npm create-react-app` by hn_throwaway_99 on Saturday April 25, 2020 @01:25PM (#22979597)
> I genuinely don't understand the NPM world.

You're right, you don't. What you posted is just the function declaration, not the implementation.

Re:A one-line package broke `npm create-react-app` by hughes on Saturday April 25, 2020 @01:25PM (#22979601)
I think it reflects how the evolution of the JS ecosystem strongly resembles natural evolution. This package is now a vestigial organ, but there was a time when it served a useful purpose. Other packages formed connective tissue to this package, and since those package may still be useful, this one has stuck around.
Re:A one-line package broke `npm create-react-app` by redmorphium on Saturday April 25, 2020 @01:23PM (#22979586)
Me neither. I can't wait for Deno 1.0 next month.

https://deno.land/

Re:A one-line package broke `npm create-react-app` by stickac on Saturday April 25, 2020 @01:28PM (#22979636)
How exactly will the new runtime fix the habit of Javascript developers to pull-in millions of dependencies?
Re:A one-line package broke `npm create-react-app` by jpangs88 on Saturday April 25, 2020 @01:34PM (#22979689)
Makes me look forward to this more https://romejs.dev/ since one of the ideas is that it will have no third party dependencies...
Re:A one-line package broke `npm create-react-app` by freeqaz on Saturday April 25, 2020 @01:28PM (#22979637)
What is this exactly? The website is a bit unclear.
Re:A one-line package broke `npm create-react-app` by frank2 on Saturday April 25, 2020 @01:43PM (#22979751)
Deno is much like node (uses the V8 engine, does not require a browser) and was created by the man who created node.
Re:A one-line package broke `npm create-react-app` by jpangs88 on Saturday April 25, 2020 @01:41PM (#22979735)
I was wrong about what this was I have edited this comment
Re:A one-line package broke `npm create-react-app` by eropple on Saturday April 25, 2020 @01:45PM (#22979759)
Why would a Rust wrapper around the C++ project that is V8, which implements a garbage-collected programming language and environment, "use less ram" just by virtue of some parts of it being written in Rust?
Re:A one-line package broke `npm create-react-app` by jakear on Saturday April 25, 2020 @01:22PM (#22979579)
That's just the type definition. Think of it like the .h if you're into that sort of thing.
Re:A one-line package broke `npm create-react-app` by svnpenn on Saturday April 25, 2020 @01:28PM (#22979635)
NPM is the answer to the question: what would happen if everyone refused to use any idioms ever, and instead replace them all with packages?

God help you, if you import a JavaScript (or Rust) package today. Lest you fall in a gaping chasm of endless cascading dependencies.

Re:A one-line package broke `npm create-react-app` by linkdd on Saturday April 25, 2020 @01:36PM (#22979710)
It's not NPM's fault, it's developer's fault.

I would never in my right mind publish a one-line package, Python, Javascript, whatever.

And I would never add a one line package as dependency