Re:A one-line package broke `npm create-react-app`
by TechBro8615 on Saturday April 25, 2020 @01:14PM
(#22979522)
The package referred to in the clickbait title is `is-promise`
[ Parent
| on HN ]
Re:A one-line package broke `npm create-react-app`
by tzs on Saturday April 25, 2020 @01:30PM
(#22979653)
How would you rewrite the title to not be clickbait?
Re:A one-line package broke `npm create-react-app`
by detaro on Saturday April 25, 2020 @01:31PM
(#22979666)
"1-line package "is-promise" broke `NPM create-react-app`" ?
Re:A one-line package broke `npm create-react-app`
by TechBro8615 on Saturday April 25, 2020 @01:34PM
(#22979686)
I would include the name of the package.
Re:A one-line package broke `npm create-react-app`
by dang on Saturday April 25, 2020 @02:46PM
(#22980285)
The title doesn't strike me as clickbait. The significant thing is what happened.
Re:A one-line package broke `npm create-react-app`
by TechBro8615 on Saturday April 25, 2020 @03:24PM
(#22980618)
Personally as a JS dev, the significant thing is which package it was. These stories happen all the time, so when I see them I’d rather know which package it is at a glance so I know if I’m affected.
Re:A one-line package broke `npm create-react-app`
by capableweb on Saturday April 25, 2020 @07:20PM
(#22982542)
Fun thing with building applications overusing npm is that you usually don't know exactly what packages you have. Not until you check for the specific package, so you probably don't "know at a glance" if you're affected or not.
Re:A one-line package broke `npm create-react-app`
by TechBro8615 on Saturday April 25, 2020 @10:45PM
(#22983906)
Hah, true. I got bit by one of these two days ago where the offending package was trying to install node itself (wtf?). It was two levels deep of `yarn why` before I figured out the issue. Fortunately I've been around long enough that the first thing I did was check the package for github issues... sure enough, found a 5 hour old issue with a bunch of people complaining of failing builds. If I hadn't searched first, I probably would have banged my head for another couple hours...
Re:A one-line package broke `npm create-react-app`
by Lammy on Saturday April 25, 2020 @01:23PM
(#22979580)
Does the package name need to be in the title if it's already the URL? :)
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.
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.