spotify-web-api-node
spotify-web-api-node copied to clipboard
Replace superagent with `fetch` library wide
Changes
- Completely replaces superagent with Node's/the browser's
fetch
function.- This is a major version change, IMHO, as the application using this will now need to be in an environment that has the
fetch
function or has afetch
polyfill installed.
- This is a major version change, IMHO, as the application using this will now need to be in an environment that has the
- All responses return a
Headers
object instead of a plain object, matching the behavior of the underlyingfetch
calls. - Updates all test mocking to use
jest-fetch-mock
. - Formats all files with the correct prettier config.
- Cleans up unneeded development dependencies.
Note to reviewer
@thelinmichael I know that this is a big pull request and it seems that you have stepped away from this project, but I would encourage you to take this seriously. I am heavily invested in the Spotify API and would love to step up and help maintain this library, as Spotify links to this library in their documentation. If you truly are not interested in maintaining this project and are going to ignore this, I am going to merge this into its own namespace (probably spotify-web-api-fetch
) and just keep running with this. Just please let us know what the status of this project is.
Closes #491
Thank you for making this and setting it up as its package! Totally necessary for getting this working with Cloudflare
Recently, I began the transition to spotify-web-api-ts-sdk, as I encountered issues where requests would hang indefinitely without any timeouts being triggered. However, I quickly realized that the repository was still in the early stages of development. Imagine my delight upon discovering this Pull Request!
A heartfelt thank you to @eligundry for your invaluable contributions. Your spotify-web-api-fetch
republication has saved me a lot of time. 🙏