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

chore(deps): update dependency vapor/vapor to from: "4.67.4" #37

Merged
merged 1 commit into from
Dec 10, 2022

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 29, 2022

Mend Renovate

This PR contains the following updates:

Package Update Change
vapor/vapor minor from: "4.61.1" -> from: "4.67.4"

Release Notes

vapor/vapor

v4.67.4: Fix encoding/decoding an array of dates with URL Encoding

Compare Source

This patch was authored and released by @​Joannis.

Fixes a bug where an Array of Dates wouldn't be encoded or decoded when using URL encoding.

v4.67.3: Fix Stream Callback never being called in close

Compare Source

This patch was authored and released by @​0xTim.

Fixes a bug where abandoned requests mean that the stream callback is never invoked. This happens when a client sends a request, the server starts processing it but hasn't constructed the Response and then the client closes early. The response is discarded, as is the stream callback so it never gets invoked. This fixes that issue

v4.67.2: Fix unused generator parameter in Array.random(count:using:)

Compare Source

This patch was authored by @​michal-tomlein and released by @​0xTim.

The generator parameter in Array.random(count:using:) was unused in what appears to be a copy-paste error. This change passes it down to FixedWidthInteger.random(using:), which was the original intention.

v4.67.1: Fix 24h timeformat for expire and last-modified header

Compare Source

This patch was authored by @​patrick-zippenfenig and released by @​0xTim.

Expire and Last-Modified header were encoding the hour part in 12h format (hh) instead of 24h format (HH). This results in timestamps being 12 hours off for all afternoon hours. This fixes the format used to follow the spec correctly and adds tests to ensure no regressions.

v4.67.0: Conforms Request.Body to AsyncSequence

Compare Source

This patch was authored by @​mcritz and released by @​0xTim.

This PR wraps Request.Body.drain() as a modern Swift AsyncSequence<ByteBuffer, Error>.

This is useful to stream bytes from request rather than collecting them in memory. Example: A route could handle a multigigbyte file upload like this:

do {
    let nioFileHandle = try NIOFileHandle(path: filePath, mode: .write)
    var offset: Int64 = 0
    
    for try await bytes in req.body {
        try await req.application.fileio.write(fileHandle: nioFileHandle,
                                               toOffset: offset,
                                               buffer: bytes,
                                               eventLoop: req.eventLoop).get()
        offset += Int64(bytes.readableBytes)
        try nioFileHandle.close()
    }
} catch {
   ...
}

v4.66.1: Migrate from Lock to NIOLock

Compare Source

This patch was authored by @​MahdiBM and released by @​0xTim.

Lock has recently been deprecated in favor of NIOLock.

Changes

All Locks have been renamed to NIOLock.

v4.66.0: Prevent vapor from crashing during a crash in third-party code, obfuscating the real problem

Compare Source

This patch was authored by @​Joannis and released by @​0xTim.

If a third-party library or user defined code crashed a Vapor app, the Vapor Application deinit will crash the app before the real issue pops up. This leads to frustrating debug sessions

v4.65.2: Fixing issue #​2755: updating config storage inside HTTPServer

Compare Source

This patch was authored by @​rkreutz and released by @​gwynne.

We can update application.storage from within HTTPServer, this way we can keep any changes that happen to the configuration internally up-to-date with the application storage.

This possibly has the least changes and less surface of potential flaws, since we are only adding an extra param and working on top of it. However, now we are setting the application storage from within HTTPServer, there is no issue with that, is just that now we have 2 places changing the storage for the config.

Resolves #​2755

v4.65.1: Add missing protocol ExpressibleByStringLiteral to HTTPHeaders.Name

Compare Source

This patch was authored by @​grahamburgsma and released by @​0xTim.

Add missing protocol ExpressibleByStringLiteral to HTTPHeaders.Name. The implementation init(stringLiteral:) was there, but the actual protocol was missing.

v4.65.0: Implement support for custom verify callbacks

Compare Source

This patch was authored by @​Lukasa and released by @​0xTim.

Motivation

When using NIOSSL it is sometimes necessary to completely take over the
certificate verification logic. NIOSSL exposes a callback for this, but
it's currently hidden from Vapor users. We should let them get access to
this callback.

Modifications

  • Added the callback to the HTTPServer configuration struct.
  • Plumbed the callback through.
  • Added some invalid test certs to the resources for the tests.
  • Added a test to confirm the override functions correctly.

Result

Users can override client cert validation.

v4.64.0: Add support for regular expression validations

Compare Source

This patch was authored by @​K1NXZ and released by @​0xTim.

Validate a regular expression pattern

Example:

struct TestContent: Codable, Validatable {
    static func validations(_ validations: inout Validations) {
        validations.add("numbersOnly", as: String.self, is: .pattern("^[0-9]*$"))
    }
    
    let numbersOnly: String
    
    init(numbersOnly: String) {
        self.numbersOnly = numbersOnly
    }
}

v4.63.0: Add documentation comments and a defaulting subscript to Storage.

Compare Source

This patch was authored and released by @​gwynne.

The new subscript simplifies "provider" implementations that extend Application and use its Storage instance without complex initialization requirements:

extension Application {
    public struct Foo {
        final class Storage { /* content which needs no special initialization */ }
        struct Key: StorageKey { typealias Value = Storage }
        let application: Application

        // Before:
        var storage: Storage {
            if self.application.storage[Key.self] == nil { self.initialize() }
            return self.application.storage[Key.self]!
        }

        func initialize() { self.application.storage[Key.self] = .init() }

        // After:
        var storage: Storage { self.application.storage[Key.self, default: .init()] }

v4.62.2: fix: validate each not taking required parameter into account

Compare Source

This patch was authored by @​BasPeter and released by @​0xTim.
  • Required parameter in add(each) now taken into account for validation
  • Add tests for required false test case

v4.62.1: Fix CredentialsAuthenticator not receiving all the body

Compare Source

This patch was authored and released by @​0xTim.

This is a workaround for #​2742. This ensures the request body is available in the middleware rather than it failing silently.

v4.62.0: Conform Bool to Content

Compare Source

This patch was authored by @​josercc and released by @​0xTim.

Conform Bool to Content to allow Bool types to be returned to the top level

app.get("isOK") { req in
    return true
}

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 2 times, most recently from dd67d80 to d076e16 Compare December 9, 2022 19:14
@renovate renovate bot force-pushed the renovate/vapor-vapor-4.x branch from d076e16 to 7f629ab Compare December 9, 2022 22:53
@renovate renovate bot merged commit 05e9258 into main Dec 10, 2022
@renovate renovate bot deleted the renovate/vapor-vapor-4.x branch December 10, 2022 00:55
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.

0 participants