warengonzaga/buymeacoffee.js

transition to Got

warengonzaga opened this issue · 12 comments

This is better than axios and closing #2

Noticed that with this change the library will not work for NodeJS versions older than 10.

I will close this since we transitioned to Got.

Noticed that with this change the library will not work for NodeJS versions older than 10.

Let's add this notice... is there any project still uses NodeJS 10 below? this could be an issue as we move forward?

The current LTS is 10 and above, the previous one (version 8) went past "end of life" in January 2020. So it is relatively safe for us to stick with v10 or greater as a requirement.
image
But there will be projects on older versions and overtime libraries drop support with later releases.

Awesome @JohnDoePBabu! I'll make a requirement on the readme for this one.

Found an issue with this. I overlooked the fact that this has to work as a library on the browser as well.
Got does not support the browser
image
I will quickly change to an alternative, maybe our original choice - Axios.

@JohnDoePBabu which means we can't use it to return a value to browser?

yeah, we cannot use it as a package within javascript executed by a browser. So can't use directly on websites, front end framework (React, Angular) based apps.

@JohnDoePBabu so we will go back to our original plan for axios? what else our options?

Alternatives suggested by request request/request#3143.
If we need browser and NodeJS support, Axios is the only viable option as far as I can tell.
Funnily, I don't think even request worked well as a package on the browser.

@JohnDoePBabu jackpot! Well let's go with axios...

@JohnDoePBabu I'm going to close this now let's continue the conversation here #2