-
Notifications
You must be signed in to change notification settings - Fork 38
Commit 34c523a
chore(deps): update dependency vapor/vapor to v4.102.0 (#1037)
This PR contains the following updates:
| Package | Update | Change |
|---|---|---|
| [vapor/vapor](https://github.com/vapor/vapor) | minor | `4.93.1` ->
`4.102.0` |
---
### Release Notes
<details>
<summary>vapor/vapor (vapor/vapor)</summary>
### [`v4.102.0`](https://github.com/vapor/vapor/releases/tag/4.102.0):
- Add Sendable conformance to XCTApplicationTester,
XCTHTTPRequest/Response, and some others
[Compare
Source](https://github.com/vapor/vapor/compare/4.101.4...4.102.0)
#### What's Changed
Add Sendable conformance to XCTApplicationTester,
XCTHTTPRequest/Response, and some others by
[@​gwynne](https://github.com/gwynne) in
[#​3208](https://github.com/vapor/vapor/issues/3208)
> This prevents compiler errors in the Swift 6 language mode for test
methods isolated to global actors (especially `@MainActor`). Also adds
`Sendable` conformance to `XCTHTTPRequest` and `XCTHTTPResponse`, for
much the same reason.
>
> Also fixes lots and lots of various `Sendable` warnings in Vapor in
general, including adding `Sendable` conformance to
`ContentConfiguration`, `ContentEncoder`, `ContentDecoder`,
`URLQueryEncoder`, `URLQueryDecoder`, `URLEncodedFormEncoder`, and
`URLEncodedFormDecoder`.
###### *This patch was released by
[@​gwynne](https://github.com/gwynne)*
**Full Changelog**:
vapor/vapor@4.101.4...4.102.0
### [`v4.101.4`](https://github.com/vapor/vapor/releases/tag/4.101.4):
- Fixed an issue where response compression would fail when returning
304 Not Modified
[Compare
Source](https://github.com/vapor/vapor/compare/4.101.3...4.101.4)
#### What's Changed
Fixed an issue where response compression would fail when returning 304
Not Modified by
[@​dimitribouniol](https://github.com/dimitribouniol) in
[#​3206](https://github.com/vapor/vapor/issues/3206)
> I recently discovered that when response compression was enabled,
browsers would fail to load resources they had cached when the server
responded with `304 Not Modified`, indicating the browser should use the
resource they have, but failed to do so leading to images or stylesheets
not loading. This applied to both HTTP 1.1 and 2 servers, using the
FileMiddleware to provide the caching logic. This was
[fixed](https://github.com/apple/swift-nio/pull/2737) in `SwiftNIO`,
and has new
[tests](https://github.com/apple/swift-nio-extras/pull/224) in
`NIOHTTPCompression`, so this PR just bumps the minimum version to
ensure folks don’t run into the bug if response compression is enabled
and caching is actually used.
>
> ### Learn More:
>
> - [Discussion on
Discord](https://discord.com/channels/431917998102675485/1249304655863877637/1249304655863877637)
> -
[apple/swift-nio#2737](https://github.com/apple/swift-nio/pull/2737)
> -
[apple/swift-nio-extras#224](https://github.com/apple/swift-nio-extras/pull/224)
###### *This patch was released by
[@​gwynne](https://github.com/gwynne)*
**Full Changelog**:
vapor/vapor@4.101.3...4.101.4
### [`v4.101.3`](https://github.com/vapor/vapor/releases/tag/4.101.3):
- Fix decoding 'flag' URL query params via
`.decode(StructType.self)`
[Compare
Source](https://github.com/vapor/vapor/compare/4.101.2...4.101.3)
#### What's Changed
Fix decoding 'flag' URL query params via `.decode(StructType.self)` by
[@​challfry](https://github.com/challfry) in
[#​3164](https://github.com/vapor/vapor/issues/3164)
> Fixes [#​3163](https://github.com/vapor/vapor/issues/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
- [@​challfry](https://github.com/challfry) made their first
contribution in
[#​3164](https://github.com/vapor/vapor/issues/3164) 🎉
###### *This patch was released by
[@​0xTim](https://github.com/0xTim)*
**Full Changelog**:
vapor/vapor@4.101.2...4.101.3
### [`v4.101.2`](https://github.com/vapor/vapor/releases/tag/4.101.2):
- Adds TIFF and WebP HTTP Media Types
[Compare
Source](https://github.com/vapor/vapor/compare/4.101.1...4.101.2)
#### What's Changed
Adds TIFF and WebP HTTP Media Types by
[@​qalandarov](https://github.com/qalandarov) in
[#​3194](https://github.com/vapor/vapor/issues/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](https://github.com/0xTim)*
**Full Changelog**:
vapor/vapor@4.101.1...4.101.2
### [`v4.101.1`](https://github.com/vapor/vapor/releases/tag/4.101.1):
- Exclude Query and Fragment from URI semicolon fix on Linux
[Compare
Source](https://github.com/vapor/vapor/compare/4.101.0...4.101.1)
On Linux, `URLComponents` does not have 100% the same behavior like on
macOS. Vapor accounts for [this unfixed
bug](https://github.com/apple/swift-corelibs-foundation/issues/3352)
by replacing percent-encoded semicolon `%3B` with `;` in `URI`s.
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`](https://github.com/vapor/vapor/releases/tag/4.101.0):
- Add Async Storage shutdown
[Compare
Source](https://github.com/vapor/vapor/compare/4.100.2...4.101.0)
#### What's Changed
Add Async Storage shutdown by
[@​0xTim](https://github.com/0xTim) in
[#​3196](https://github.com/vapor/vapor/issues/3196)
> Currently running
>
> ```swift
> 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](https://github.com/0xTim)*
**Full Changelog**:
vapor/vapor@4.100.2...4.101.0
### [`v4.100.2`](https://github.com/vapor/vapor/releases/tag/4.100.2):
- asyncBoot will no longer try booting server again if it is already
booted
[Compare
Source](https://github.com/vapor/vapor/compare/4.100.1...4.100.2)
#### What's Changed
asyncBoot will no longer try booting server again if it is already
booted by [@​RussBaz](https://github.com/RussBaz) in
[#​3195](https://github.com/vapor/vapor/issues/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](https://github.com/0xTim)*
**Full Changelog**:
vapor/vapor@4.100.1...4.100.2
### [`v4.100.1`](https://github.com/vapor/vapor/releases/tag/4.100.1):
- Update URLEncodedFormEncoder encoding rules
[Compare
Source](https://github.com/vapor/vapor/compare/4.100.0...4.100.1)
#### What's Changed
Update URLEncodedFormEncoder encoding rules by
[@​ptoffy](https://github.com/ptoffy) in
[#​3192](https://github.com/vapor/vapor/issues/3192)
> Solves [#​3173](https://github.com/vapor/vapor/issues/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](https://url.spec.whatwg.org/#application-x-www-form-urlencoded-percent-encode-set)
contains all code points, except the [ASCII
alphanumeric](https://infra.spec.whatwg.org/#ascii-alphanumeric), U+002A
(\*), U+002D (-), U+002E (.), and U+005F (\_).
###### *This patch was released by
[@​0xTim](https://github.com/0xTim)*
**Full Changelog**:
vapor/vapor@4.100.0...4.100.1
### [`v4.100.0`](https://github.com/vapor/vapor/releases/tag/4.100.0):
- Add Async Lifecycle Handlers
[Compare
Source](https://github.com/vapor/vapor/compare/4.99.3...4.100.0)
#### What's Changed
Add Async Lifecycle Handlers by
[@​0xTim](https://github.com/0xTim) in
[#​3193](https://github.com/vapor/vapor/issues/3193)
> Adds new protocol functions to `LifecycleHandler`s to support async
contexts. This is important because packages like
[Redis](https://github.com/vapor/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](https://github.com/0xTim)*
**Full Changelog**:
vapor/vapor@4.99.3...4.100.0
### [`v4.99.3`](https://github.com/vapor/vapor/releases/tag/4.99.3): -
Async Serve Command
[Compare
Source](https://github.com/vapor/vapor/compare/4.99.2...4.99.3)
#### What's Changed
Async Serve Command by [@​0xTim](https://github.com/0xTim) in
[#​3190](https://github.com/vapor/vapor/issues/3190)
> Migrate `ServeCommand` to an `AsyncCommand` to enable proper custom
executor support and remove any calls to `wait()`
###### *This patch was released by
[@​0xTim](https://github.com/0xTim)*
**Full Changelog**:
vapor/vapor@4.99.2...4.99.3
### [`v4.99.2`](https://github.com/vapor/vapor/releases/tag/4.99.2): -
Support compiling against Musl
[Compare
Source](https://github.com/vapor/vapor/compare/4.99.1...4.99.2)
#### What's Changed
Support compiling against Musl by
[@​simonjbeaumont](https://github.com/simonjbeaumont) in
[#​3188](https://github.com/vapor/vapor/issues/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](https://github.com/0xTim)*
**Full Changelog**:
vapor/vapor@4.99.1...4.99.2
### [`v4.99.1`](https://github.com/vapor/vapor/releases/tag/4.99.1): -
Fix availability message
[Compare
Source](https://github.com/vapor/vapor/compare/4.99.0...4.99.1)
#### What's Changed
Fix availability message by
[@​valeriyvan](https://github.com/valeriyvan) in
[#​3191](https://github.com/vapor/vapor/issues/3191)
>
###### *This patch was released by
[@​0xTim](https://github.com/0xTim)*
**Full Changelog**:
vapor/vapor@4.99.0...4.99.1
### [`v4.99.0`](https://github.com/vapor/vapor/releases/tag/4.99.0): -
Add async alternative for Application.shutdown
[Compare
Source](https://github.com/vapor/vapor/compare/4.98.0...4.99.0)
#### What's Changed
Add async alternative for Application.shutdown by
[@​0xTim](https://github.com/0xTim) in
[#​3189](https://github.com/vapor/vapor/issues/3189)
> Adds an async alternative for `Application.shutdown()` and annotates
`shutdown()` with `noasync`
###### *This patch was released by
[@​0xTim](https://github.com/0xTim)*
**Full Changelog**:
vapor/vapor@4.98.0...4.99.0
### [`v4.98.0`](https://github.com/vapor/vapor/releases/tag/4.98.0): -
Mark all functions that use `wait` as `noasync`
[Compare
Source](https://github.com/vapor/vapor/compare/4.97.1...4.98.0)
#### What's Changed
Mark all functions that use `wait` as `noasync` by
[@​0xTim](https://github.com/0xTim) in
[#​3168](https://github.com/vapor/vapor/issues/3168)
> 1 parent 9b4fe94 commit 34c523aCopy full SHA for 34c523a
File tree
Expand file treeCollapse file tree
1 file changed
+1
-1
lines changedFilter options
- examples/vapor_example/swift
Expand file treeCollapse file tree
1 file changed
+1
-1
lines changedexamples/vapor_example/swift/Package.swift
Copy file name to clipboardExpand all lines: examples/vapor_example/swift/Package.swift+1-1Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
8 |
| - | |
| 8 | + | |
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
|
0 commit comments