Skip to content

Commit ba46b6d

Browse files
authored
feat: Conform to Sendable (#69)
* feat: Conform to Sendable * fix test due to improved option hashing
1 parent 3c8cc44 commit ba46b6d

File tree

5 files changed

+43
-43
lines changed

5 files changed

+43
-43
lines changed

Package.resolved

Lines changed: 36 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ let package = Package(
2121
dependencies: [
2222
.package(
2323
url: "https://github.com/vapor/vapor.git",
24-
.upToNextMajor(from: "4.92.1")
24+
.upToNextMajor(from: "4.102.1")
2525
),
2626
.package(
2727
url: "https://github.com/netreconlab/Parse-Swift.git",
28-
.upToNextMajor(from: "5.8.2")
28+
.upToNextMajor(from: "5.10.0")
2929
)
3030
],
3131
targets: [

Sources/App/entrypoint.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ enum Entrypoint {
3434
var env = try Environment.detect()
3535
try LoggingSystem.bootstrap(from: &env)
3636

37-
let app = Application(env)
37+
let app = try await Application.make(env)
3838

3939
defer { app.shutdown() }
4040

Sources/ParseServerSwift/Parse.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func initializeServer(_ configuration: ParseServerConfiguration,
7373
try await checkServerHealth()
7474
} catch {
7575
await deleteHooks(app)
76-
app.shutdown()
76+
try await app.asyncShutdown()
7777
}
7878
} else {
7979
Parse.configuration = configuration

Tests/ParseServerSwiftTests/AppTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,16 +195,16 @@ final class AppTests: XCTestCase {
195195
from: encoded)
196196

197197
let options = hookRequest.options()
198-
let installationOption = options.first(where: { $0 == .installationId("") })
198+
let installationOption = options.first(where: { $0 == .installationId(installationId) })
199199
XCTAssertEqual(options.count, 1)
200200
XCTAssertTrue(installationOption.debugDescription.contains(installationId))
201201

202202
let uri = URI(stringLiteral: urlString)
203203
let request = Request(application: app, url: uri, on: app.eventLoopGroup.any())
204204
let options2 = try hookRequest.options(request,
205205
parseServerURLStrings: configuration.parseServerURLStrings)
206-
let installationOption2 = options2.first(where: { $0 == .installationId("") })
207-
let serverURLOption = options2.first(where: { $0 == .serverURL("") })
206+
let installationOption2 = options2.first(where: { $0 == .installationId(installationId) })
207+
let serverURLOption = options2.first(where: { $0 == .serverURL(urlString) })
208208
XCTAssertEqual(options2.count, 2)
209209
XCTAssertTrue(installationOption2.debugDescription.contains(installationId))
210210
XCTAssertTrue(serverURLOption.debugDescription.contains("\"\(urlString)\""))

0 commit comments

Comments
 (0)