Skip to content
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

Update dependency vapor/vapor to from: "4.101.3" #220

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 24, 2024

Mend Renovate

This PR contains the following updates:

Package Update Change
vapor/vapor minor from: "4.93.1" -> from: "4.101.3"

Release Notes

vapor/vapor (vapor/vapor)

v4.101.3: - Fix decoding 'flag' URL query params via .decode(StructType.self)

Compare Source

What's Changed

Fix decoding 'flag' URL query params via .decode(StructType.self) by @​challfry in #​3164

Fixes #​3163.

The code:

struct QueryStruct: Content {
    var flag1: Bool?
}
let queryStruct = try req.query.decode(QueryStruct.self)

produces queryStruct.flag1 == true when decoding the URL query “?flag1”, matching the behavior of req.query[Bool.self, at: "flag1"].

New Contributor

This patch was released by @​0xTim

Full Changelog: vapor/vapor@4.101.2...4.101.3

v4.101.2: - Adds TIFF and WebP HTTP Media Types

Compare Source

What's Changed

Adds TIFF and WebP HTTP Media Types by @​qalandarov in #​3194

Add additional image types:

app.post("upload") { req in
    guard [.jpeg, .png, .tiff, .webp].contains(req.content.contentType) else {
        throw Abort(.unsupportedMediaType)
    }
    // ...
}
This patch was released by @​0xTim

Full Changelog: vapor/vapor@4.101.1...4.101.2

v4.101.1: - Exclude Query and Fragment from URI semicolon fix on Linux

Compare Source

On Linux, URLComponents does not have 100% the same behavior like on macOS. Vapor accounts for this unfixed bug by replacing percent-encoded semicolon %3B with ; in URIs.

This is however not fully correct, because if a URI contains a percent encoded semicolon, this might have a different meaning, than when it is not percent encoded, compare the following sentence from RFC 3986:

A percent-encoding mechanism is used to represent a data octet in a
component when that octet's corresponding character is outside the
allowed set or is being used as a delimiter of, or within, the component.

This PR aims to limit the impact of the required semicolon fix by ensuring that query and fragments are not unnecessarily and incorrectly modified.

Hopefully, in a future with the new swift-foundation this fix will not be needed anymore. But for now it would solve an issue on our side which is related to the concept of a signed request.

v4.101.0: - Add Async Storage shutdown

Compare Source

What's Changed

Add Async Storage shutdown by @​0xTim in #​3196

Currently running

Task {
    try? await Task.sleep(for: .seconds(5))
    app.running?.stop()
}

When you try and install NIO as the global executor will crash because the storage API didn’t have any async entry points so stopping would trigger a synchronous shutdown, with a wait(). This fixes that

This patch was released by @​0xTim

Full Changelog: vapor/vapor@4.100.2...4.101.0

v4.100.2: - asyncBoot will no longer try booting server again if it is already booted

Compare Source

What's Changed

asyncBoot will no longer try booting server again if it is already booted by @​RussBaz in #​3195

The synchronous boot function skips running the lifecycle handlers if the server is already booted. However, the async version ignored this check. I have added a small fix to add this check again.

This patch was released by @​0xTim

Full Changelog: vapor/vapor@4.100.1...4.100.2

v4.100.1: - Update URLEncodedFormEncoder encoding rules

Compare Source

What's Changed

Update URLEncodedFormEncoder encoding rules by @​ptoffy in #​3192

Solves #​3173
References https://url.spec.whatwg.org/#application-x-www-form-urlencoded-percent-encode-set to set the encoding rules

The application/x-www-form-urlencoded percent-encode set contains all code points, except the ASCII alphanumeric, U+002A (*), U+002D (-), U+002E (.), and U+005F (_).

This patch was released by @​0xTim

Full Changelog: vapor/vapor@4.100.0...4.100.1

v4.100.0: - Add Async Lifecycle Handlers

Compare Source

What's Changed

Add Async Lifecycle Handlers by @​0xTim in #​3193

Adds new protocol functions to LifecycleHandlers to support async contexts. This is important because packages like Redis use this to know when to shutdown their connection pool. In the shutdown function, these call .wait() which can cause application crashes if called when trying to use NIO’s event loop concurrency executor.

This provides async alternatives to allow packages to provide full async calls through their stack to avoid these crashes

This patch was released by @​0xTim

Full Changelog: vapor/vapor@4.99.3...4.100.0

v4.99.3: - Async Serve Command

Compare Source

What's Changed

Async Serve Command by @​0xTim in #​3190

Migrate ServeCommand to an AsyncCommand to enable proper custom executor support and remove any calls to wait()

This patch was released by @​0xTim

Full Changelog: vapor/vapor@4.99.2...4.99.3

v4.99.2: - Support compiling against Musl

Compare Source

What's Changed

Support compiling against Musl by @​simonjbeaumont in #​3188

Vapor already makes some provision for compiling against Musl in the RFC1123 implementation, where Glibc is not assumed and is imported conditionally alongside a conditional import of Musl. However, there are a couple of other places where Glibc is still assumed when compiling for Linux.

This patch replaces these imports with the same #if canImport(...) pattern.

This patch was released by @​0xTim

Full Changelog: vapor/vapor@4.99.1...4.99.2

v4.99.1: - Fix availability message

Compare Source

What's Changed

Fix availability message by @​valeriyvan in #​3191

This patch was released by @​0xTim

Full Changelog: vapor/vapor@4.99.0...4.99.1

v4.99.0: - Add async alternative for Application.shutdown

Compare Source

What's Changed

Add async alternative for Application.shutdown by @​0xTim in #​3189

Adds an async alternative for Application.shutdown() and annotates shutdown() with noasync

This patch was released by @​0xTim

Full Changelog: vapor/vapor@4.98.0...4.99.0

v4.98.0: - Mark all functions that use wait as noasync

Compare Source

What's Changed

Mark all functions that use wait as noasync by @​0xTim in #​3168

⚠️ WARNING: If you have strict concurrency checking enabled you should migrate to the async Application.make()

NIO’s EventLoopFuture.wait() is marked as noasync because is can cause issues when used in a concurrency context. All places where we call .wait() should also be marked as noasync to avoid this issue.

This adds async alternatives for those functions and adds noasync annotations where appropriate.

Also adds an async Application.make to replace the old initialiser that is now noasync

This patch was released by @​0xTim

Full Changelog: vapor/vapor@4.97.1...4.98.0

v4.97.1: - Log source file and line info for errors in ErrorMiddleware when possible

Compare Source

What's Changed

Log source file and line info for errors in ErrorMiddleware when possible by @​gwynne in #​3187

Ever since the last changes to ErrorMiddleware (by me, naturally), the error logging fails to correctly report file/line/function information even when the error has that data available. We now correctly pass these along to the logging machinery. The error responses sent to clients are unchanged.

Additional changes:

  • Restore recognition of the DebuggableError protocol (reason and source location information for such errors are now used again).
  • Handle generating error responses slightly more efficiently.
  • Include the original error message in the fallback text if encoding an error to JSON fails.
  • Improve the correctness of the reason messages used for DecodingErrors.
This patch was released by @​gwynne

Full Changelog: vapor/vapor@4.97.0...4.97.1

v4.97.0: - Provide AsyncFileStreaming API

Compare Source

What's Changed

Provide AsyncFileStreaming API by @​0xTim in #​3184

Builds on the work of #​2998, #​3170 and #​3167 to provide a full async streaming API that can be used in Swift Concurrency environments:

  • Provides a new asyncStreamFile(at:chunkSize:mediaType:advancedETagComparison:onCompleted:) that takes advantage of the full async response streaming
  • Fixes a number of bugs with the async Response body streaming
  • FileMiddleware is now an AsyncMiddleware
  • Replaces usages of FileManager with NIOFileSystem apart from in one deprecated API that can’t be async
  • Correctly marks XCTVapor functions as noasync where they use .wait() and provides proper async alternatives
This patch was released by @​0xTim

Full Changelog: vapor/vapor@4.96.0...4.97.0

v4.96.0: - Make # of connections accepted per event loop cycle configurable, and raise the default

Compare Source

What's Changed

Make # of connections accepted per event loop cycle configurable, and raise the default by @​gwynne in #​3186

As per @​weissi’s suggestion in this forums post, we raise the default maximum number of connections accepted per cycle of the server’s event loop from 4 to 256, and the value is now user-configurable.

There are no new tests for this because I’m not sure if there’s a way to measure the effect of changing this value that doesn’t involve nondeterministic timing measurements.

Also takes the opportunity/excuse to add the missing customCertificateVerifyCallback parameter to the initializers of HTTPServer.Configuration.

Reviewers

Thanks to the reviewers for their help:

This patch was released by @​gwynne

Full Changelog: vapor/vapor@4.95.0...4.96.0

v4.95.0: - Add support for asynchronous body stream writing

Compare Source

What's Changed

Add support for asynchronous body stream writing by @​Joannis in #​2998

  • Fixes #​2930 - a crash when users try to write a body from within a task towards the ELF APIs.
  • Introduces a new API for writing chunked HTTP response bodies
  • Adds a helper that automatically manages failing and closing streams
This patch was released by @​0xTim

Full Changelog: vapor/vapor@4.94.1...4.95.0

v4.94.1: - Patch configuration and log actual port on startup

Compare Source

What's Changed

Patch configuration and log actual port on startup by @​bisgardo in #​3160

Before this change, the application

let app = Application(.testing)
defer { app.shutdown() }
try app.server.start(hostname: nil, port: 0)
defer { app.server.shutdown() }

would log the following message before starting the server:

[Vapor] Server starting on http://127.0.0.1:0

After this change it instead logs a message like the following after starting the server:

[Vapor] Server starting on http://127.0.0.1:57935

The input configuration is also patched such that app.http.server.configuration.port will hold the actual port after startup. Currently if it has value 0 it will keep that value (only app.http.server.shared.localAddress?.port will have the correct one).

Fixes #​3159.

Reviewers

Thanks to the reviewers for their help:

This patch was released by @​0xTim

Full Changelog: vapor/vapor@4.94.0...4.94.1

v4.94.0: - Migrate to Async NIOFileIO APIs

Compare Source

What's Changed

Migrate to Async NIOFileIO APIs by @​0xTim in #​3167

This migrates collectFile(at:) and writeFile(_:at:) to use NIO’s async NIOFileIO APIs introduced in https://github.com/apple/swift-nio/releases/tag/2.63.0

Also adds a new API for streaming files using a AsyncSequence based on the new NIOFileSystem.

This work is required to move the DotEnv support over to an async API to avoid calling wait()s in an async context which can cause issues

Reviewers

Thanks to the reviewers for their help:

This patch was released by @​0xTim

Full Changelog: vapor/vapor@4.93.2...4.94.0

v4.93.2: - Removed streamFile deprecation + deactivated advancedETagComparison by default

Compare Source

What's Changed

Removed streamFile deprecation + deactivated advancedETagComparison by default by @​linus-hologram in #​3177

As discussed on Discord, this PR removes the deprecation and deactivates the lately introduced advanced ETag Comparison for the time being while the revised implementation is worked on.

New Contributor

This patch was released by @​0xTim

Full Changelog: vapor/vapor@4.93.1...4.93.2


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/vapor-vapor-4.x branch from 3c2b0c0 to 75db3e2 Compare April 26, 2024 20:33
@renovate renovate bot changed the title Update dependency vapor/vapor to from: "4.94.0" Update dependency vapor/vapor to from: "4.94.1" Apr 26, 2024
@renovate renovate bot force-pushed the renovate/vapor-vapor-4.x branch 2 times, most recently from 99a08ad to e376679 Compare April 30, 2024 14:20
@renovate renovate bot changed the title Update dependency vapor/vapor to from: "4.94.1" Update dependency vapor/vapor to from: "4.95.0" Apr 30, 2024
@renovate renovate bot force-pushed the renovate/vapor-vapor-4.x branch from e376679 to bedb363 Compare May 4, 2024 16:15
@renovate renovate bot changed the title Update dependency vapor/vapor to from: "4.95.0" Update dependency vapor/vapor to from: "4.96.0" May 4, 2024
@renovate renovate bot force-pushed the renovate/vapor-vapor-4.x branch 2 times, most recently from bbec3ea to 518525f Compare May 8, 2024 02:15
@renovate renovate bot changed the title Update dependency vapor/vapor to from: "4.96.0" Update dependency vapor/vapor to from: "4.97.0" May 8, 2024
@renovate renovate bot force-pushed the renovate/vapor-vapor-4.x branch 2 times, most recently from dc4ccc1 to 5f583dd Compare May 10, 2024 04:35
@renovate renovate bot changed the title Update dependency vapor/vapor to from: "4.97.0" Update dependency vapor/vapor to from: "4.97.1" May 10, 2024
@renovate renovate bot force-pushed the renovate/vapor-vapor-4.x branch from 5f583dd to c53a14c Compare May 10, 2024 10:20
@renovate renovate bot changed the title Update dependency vapor/vapor to from: "4.97.1" Update dependency vapor/vapor to from: "4.98.0" May 10, 2024
@renovate renovate bot force-pushed the renovate/vapor-vapor-4.x branch from c53a14c to 133bb43 Compare May 10, 2024 12:28
@renovate renovate bot changed the title Update dependency vapor/vapor to from: "4.98.0" Update dependency vapor/vapor to from: "4.99.0" May 10, 2024
@renovate renovate bot force-pushed the renovate/vapor-vapor-4.x branch from 133bb43 to 3959efc Compare May 12, 2024 22:57
@renovate renovate bot changed the title Update dependency vapor/vapor to from: "4.99.0" Update dependency vapor/vapor to from: "4.99.1" May 12, 2024
@renovate renovate bot force-pushed the renovate/vapor-vapor-4.x branch from 3959efc to 1cb9956 Compare May 13, 2024 02:16
@renovate renovate bot changed the title Update dependency vapor/vapor to from: "4.99.1" Update dependency vapor/vapor to from: "4.99.2" May 13, 2024
@renovate renovate bot force-pushed the renovate/vapor-vapor-4.x branch from 1cb9956 to da2b816 Compare May 13, 2024 16:23
@renovate renovate bot changed the title Update dependency vapor/vapor to from: "4.99.2" Update dependency vapor/vapor to from: "4.99.3" May 13, 2024
@renovate renovate bot force-pushed the renovate/vapor-vapor-4.x branch from da2b816 to c9cc0e4 Compare May 15, 2024 17:44
@renovate renovate bot changed the title Update dependency vapor/vapor to from: "4.99.3" Update dependency vapor/vapor to from: "4.100.0" May 15, 2024
@renovate renovate bot force-pushed the renovate/vapor-vapor-4.x branch 3 times, most recently from b81721c to e1cfce8 Compare May 20, 2024 23:12
@renovate renovate bot changed the title Update dependency vapor/vapor to from: "4.100.0" Update dependency vapor/vapor to from: "4.100.1" May 20, 2024
@renovate renovate bot force-pushed the renovate/vapor-vapor-4.x branch from e1cfce8 to 711f047 Compare May 22, 2024 03:21
@renovate renovate bot changed the title Update dependency vapor/vapor to from: "4.100.1" Update dependency vapor/vapor to from: "4.100.2" May 22, 2024
@renovate renovate bot force-pushed the renovate/vapor-vapor-4.x branch from 711f047 to c471293 Compare May 24, 2024 13:45
@renovate renovate bot changed the title Update dependency vapor/vapor to from: "4.100.2" Update dependency vapor/vapor to from: "4.101.0" May 24, 2024
@renovate renovate bot force-pushed the renovate/vapor-vapor-4.x branch 2 times, most recently from 9d0ca55 to 120eccd Compare May 29, 2024 10:46
@renovate renovate bot changed the title Update dependency vapor/vapor to from: "4.101.0" Update dependency vapor/vapor to from: "4.101.1" May 29, 2024
@renovate renovate bot force-pushed the renovate/vapor-vapor-4.x branch 2 times, most recently from 50c6677 to cf68313 Compare June 5, 2024 03:50
@renovate renovate bot changed the title Update dependency vapor/vapor to from: "4.101.1" Update dependency vapor/vapor to from: "4.101.2" Jun 5, 2024
@renovate renovate bot force-pushed the renovate/vapor-vapor-4.x branch 3 times, most recently from 7e0c551 to 9e72e88 Compare June 11, 2024 01:06
@renovate renovate bot changed the title Update dependency vapor/vapor to from: "4.101.2" Update dependency vapor/vapor to from: "4.101.3" Jun 11, 2024
@renovate renovate bot force-pushed the renovate/vapor-vapor-4.x branch from 9e72e88 to 57bd7f2 Compare June 17, 2024 01:31
@renovate renovate bot merged commit aacd95f into main Jun 17, 2024
1 check passed
@renovate renovate bot deleted the renovate/vapor-vapor-4.x branch June 17, 2024 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants