Skip to content

build(deps): update surf requirement from 1.0.3 to 2.0.0 #24

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
wants to merge 1 commit into from

Conversation

dependabot-preview[bot]
Copy link

Updates the requirements on surf to permit the latest version.

Release notes

Sourced from surf's releases.

2.0.0

Docs

This major release of Surf contains substantial improvements through a variety of changes and additions.

(Note: this is a cumulative list of changes since Surf 1.0.3)

Notable mentions include:

  • Uses stable standard library [futures][]!
  • Much more type compatibility with [Tide][] via [http-types][]!
  • Re-usable Client which is able to make use of connection pooling under the hood.
  • Reduced generics for Client and Middleware.
  • Re-worked Middleware to use [async_trait][].

Major Changes

Surf 2 contains some large API changes, as noted here:

http-types

Surf has switched the common backing type interface (surf::http) from the [http][] (hyperium/http) crate to [http-types][], which covers a larger set of HTTP-related functionality than hyperium/http does, and allows Surf to use the [url standard][].

This affects any type that came from surf::http, such as StatusCode ([old][StatusCode http]|[new][StatusCode http-types]), and includes some new patterns, such as [Body][].

For more information, see this blog post.

Errors

surf::Exception, which was a plain Box<dyn Error + Send + Sync + 'static>, is no more.

Surf now exports a structured [surf::Error][] type, which holds a StatusCode alongside a dynamic error object. Just like [anyhow][], any error can be cast to this type using the ? operator.

For more information, see this blog post.

Middleware

New middleware:

use surf::middleware::{Middleware, Next};
use surf::{Client, Request, Response, Result};
#[surf::utils::async_trait]
impl Middleware for Logger {
async fn handle(
&self,
req: Request,
client: Client,
next: Next<'_>,
) -> Result<Response> {
Ok(res)
</tr></table> ... (truncated)

Changelog

Sourced from surf's changelog.

[2.0.0] - 2020-10-05

Docs

This major release of Surf contains substantial improvements through a variety of changes and additions.

(Note: this is a cumulative list of changes since Surf 1.0.3)

Notable mentions include:

  • Uses stable standard library [futures][]!
  • Much more type compatibility with [Tide][] via [http-types][]!
  • Re-usable Client which is able to make use of connection pooling under the hood.
  • Reduced generics for Client and Middleware.
  • Re-worked Middleware to use [async_trait][].

Major Changes

Surf 2 contains some large API changes, as noted here:

http-types

Surf has switched the common backing type interface (surf::http) from the [http][] (hyperium/http) crate to [http-types][], which covers a larger set of HTTP-related functionality than hyperium/http does, and allows Surf to use the [url standard][].

This affects any type that came from surf::http, such as StatusCode ([old][StatusCode http]|[new][StatusCode http-types]), and includes some new patterns, such as [Body][].

For more information, see this blog post.

Errors

surf::Exception, which was a plain Box<dyn Error + Send + Sync + 'static>, is no more.

Surf now exports a structured [surf::Error][] type, which holds a StatusCode alongside a dynamic error object. Just like [anyhow][], any error can be cast to this type using the ? operator.

For more information, see this blog post.

Middleware

New middleware:

use surf::middleware::{Middleware, Next};
use surf::{Client, Request, Response, Result};
#[surf::utils::async_trait]
impl Middleware for Logger {
async fn handle(
&self,
req: Request,
client: Client,
next: Next<'_>,
) -> Result<Response> {
</tr></table> ... (truncated)

Commits
  • eb6eaf9 2.0.0
  • c1feba5 meta: changelog for alpha.7
  • 3e6ab70 Merge pull request #249 from jbr/no-url-direct-dep
  • 30edbd3 removed url from direct deps and updated doctests
  • 9cfe1f3 remove url crate re-export
  • 10178c5 Merge pull request #247 from Fishrock123/client-send-no-boxedfuture
  • 9e438c0 Client, RB: remove BoxFuture from .send()
  • c66f051 Merge pull request #246 from Fishrock123/requestbuilder-query
  • a5f337b Request: use http-types for querystring handling
  • ed75ad9 RequestBuilder: add .query()
  • Additional commits viewable in compare view

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)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

Updates the requirements on [surf](https://github.com/http-rs/surf) to permit the latest version.
- [Release notes](https://github.com/http-rs/surf/releases)
- [Changelog](https://github.com/http-rs/surf/blob/main/CHANGELOG.md)
- [Commits](http-rs/surf@1.0.3...v2.0.0)

Signed-off-by: dependabot-preview[bot] <[email protected]>
@dependabot-preview dependabot-preview bot added the dependencies Pull requests that update a dependency file label Oct 5, 2020
@dependabot-preview
Copy link
Author

Superseded by #31.

@dependabot-preview dependabot-preview bot deleted the dependabot/cargo/surf-2.0.0 branch October 26, 2020 20:25
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.

0 participants