The package referred to in the clickbait title is `is-promise`
A one-line package broke `npm create-react-app`
31–40 of 478 posts
Re: A one-line package broke `npm create-react-app`
#32There is something aggravating about the first comment in an issue like this posted minutes after the issue was created to say “is this fixed yet?”
Re: A one-line package broke `npm create-react-app`
#33Which adds support for ES modules: https://medium.com/@nodejs/announcing-core-node-js-support-f...
However the exports syntax requires a relative url, e.g. ‘./index.mjs’ not ‘index.mjs’. The fix is here: https://github.com/then/is-promise/pull/15/commits/3b3ea4150...
Re: A one-line package broke `npm create-react-app`
#34Re: A one-line package broke `npm create-react-app`
#35And the source code of the library is: function isPromise(obj) { return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; }
Re: A one-line package broke `npm create-react-app`
#36And the source code of the library is: function isPromise(obj) { return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; }
My prior decision to never work with JavaScript again has just grown firmer.
Myself as a Java developer is middle of the pyramid. The apex predators are embedded developers, followed by c Devs then game Devs.
Re: A one-line package broke `npm create-react-app`
#37Earlier quoted context omitted.
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 (obj: Promise | S): obj is Promise ; This is, indeed, the only line of exported code in the entire package. I genuinely don't understand the NPM world.
> 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`
#38Re: A one-line package broke `npm create-react-app`
#39Earlier quoted context omitted.
Could create-react-app have avoided this through regression suites?
Bumping your comment because I would like to know. I'm following the github thread.