Skip to content

3.0.0

Latest

Choose a tag to compare

@makoni makoni released this 08 Jun 11:02
5b3696f

Breaking Changes

  • Minimum Swift version is now 6.1 (swift-tools-version:6.1); async-http-client minimum is now 1.34.0.
  • The per-call eventLoopGroup: parameter on every request method (get, find, update, …) is now a deprecated no-op. It still compiles, but the value is ignored — the HTTPClient is fixed once at init. This reverses the per-call EventLoopGroup support expanded in 2.4.0.

Migration

  • To run requests on a specific EventLoopGroup (e.g. Vapor's app.eventLoopGroup), pass it once to the initializer instead of per call:
    CouchDBClient(config: config, eventLoopGroup: app.eventLoopGroup)
  • If you don't need a custom group, drop the eventLoopGroup: arguments — the client uses the long-lived HTTPClient.shared by default.

Highlights

  • CouchDBClient now uses a single long-lived HTTPClient, chosen once at init, instead of creating and tearing one down per request. This removes a new connection pool + TLS handshake on every call and restores connection keep-alive.
  • The client is selected as: a caller-provided httpClient → a client bound to a provided eventLoopGroupHTTPClient.shared (default).
  • shutdown() now performs an async shutdown instead of a blocking syncShutdown() on the main thread, and is a no-op when using the shared client.

API and Behavior Improvements

  • New optional eventLoopGroup parameter on init (source-compatible).
  • Compilation is warning-free; tests cover the new init-time eventLoopGroup path (46 tests).

Documentation

  • Updated the Vapor tutorial to use the default client (no per-call eventLoopGroup).
  • Fixed the DocC reference for init(config:httpClient:eventLoopGroup:).

Full Changelog: 2.4.0...3.0.0