Skip to content

Bump superagent from 5.3.1 to 6.1.0 #91

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

dependabot-preview[bot]
Copy link
Contributor

Bumps superagent from 5.3.1 to 6.1.0.

Release notes

Sourced from superagent's releases.

v6.1.0

  • fix: use qs to serialize form data in browser (#1591) aa43b3d
  • Create FUNDING.yml f817806
  • docs: updated docs, set to master branch 6a31af9
  • chore: updated docs 484f890

ladjs/superagent@v6.0.0...v6.1.0

v6.0.0

  • fix: bump deps, fixed linting, specific retry approach d68907b
  • fix: fixed content-type case-sensitivity (closes #1572) 44fadf9
  • Add mention of bearer auth to docs (#1583) e88a13f
  • Update jQuery in tail.html (#1582) a009ace
  • Revert "Improve .retry() method functionality with delays and prevent calling on successful request (#1527)" 74641bb
  • fix: fixed lint, yarnlock 0c4f96f
  • Improve .retry() method functionality with delays and prevent calling on successful request (#1527) 62eae78
  • fix: fixed travis f8ea331
  • removed extra should from test description (#1581) cc34638

ladjs/superagent@v5.3.1...v6.0.0

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

@dependabot-preview dependabot-preview bot added the dependencies Pull requests that update a dependency file label Aug 31, 2020
@kiwicopple
Copy link
Member

@soedirgo perhaps you can check this out as part of your updated fork? I can't see any breaking changes in superagent

@soedirgo
Copy link
Member

soedirgo commented Sep 1, 2020

I actually switched to axios in my fork. I'll make a draft PR highlighting this and some other changes soon and we can discuss this there.

@kiwicopple
Copy link
Member

If we do axios in postgrest-js then we have to do axios everywhere (so that we don't end up with dependency bloat). Is there any reason why?

@soedirgo
Copy link
Member

soedirgo commented Sep 1, 2020

There wasn't a big reason, now that we no longer extend superagent's Request, the choice of HTTP client is not important as it's only used at the end on await. I chose axios because it's the more popular one (and so the one people will more likely have as a dependency already), and because I can weave a custom type on the Response object.

I'm not aware of other tools we have that already use superagent (other than supabase-js), but it wouldn't be difficult to switch back if you want.

@kiwicopple
Copy link
Member

Actually you're right - there aren't many places besides postgrest-js, supabase-js. Soon we will do a gotrue-js (their client works with micro-api-client, so we have to switch anyway).

I actually prefer axios, but I think we will have to go through all the docs/code and change

let { body } = await supabase...

to

let { data } = await supabase...

right?

@soedirgo
Copy link
Member

soedirgo commented Sep 1, 2020

The previous version will work fine in JS, I made a change that makes it work here, but yeah, the compiler will complain in TypeScript. Unless I can find a way to modify the type somehow...

Edit: A simple way would be to extend AxiosResponse and add the body field.

@kiwicopple
Copy link
Member

I think if we are going to make a change, we'd be better off going with a fetch polyfill, like Next.js did here: https://nextjs.org/blog/next-9-4#improved-built-in-fetch-support

This would require some work to be backwards compatible.

Otherwise I'm not sure if there is a benefit to switching - i prefer axios's API, but my preference isn't a benefit to developers, as they don't see the request lib's API. Thoughts?

@soedirgo
Copy link
Member

soedirgo commented Sep 1, 2020

I like the fetch polyfill idea (apparently it wasn't within my radar). I'm looking at isomorphic-unfetch, which makes for a significant bundle size difference: superagent (10.1 kB), axios (4.6 kB), isomorphic-unfetch (582 B). superagent's size ballooned in 6.1.0 for some reason.

Fetch uses a similar response format, so back-compat shouldn't be an issue. We can use a custom Response type so body can have a custom type instead of a ReadableStream.

@soedirgo soedirgo mentioned this pull request Sep 2, 2020
@kiwicopple
Copy link
Member

Let's close this in favour of your work in the TypeScript branch

@kiwicopple kiwicopple closed this Sep 2, 2020
@dependabot-preview
Copy link
Contributor Author

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot-preview dependabot-preview bot deleted the dependabot/npm_and_yarn/superagent-6.1.0 branch September 2, 2020 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants