Releases: hummingbird-project/hummingbird
Releases · hummingbird-project/hummingbird
v2.1.0
Minor release changes
- Add additional
init
toHTTPError
that takes list of headers. Also remove the assumption thatHTTPError
content-type is json. #561
Patch release changes
- Remove
@escaping
fromApplication.test
closure. #555 Environment.set
will actually set the environment variable. #557- Remove retroactive
Sendable
requirement fromJSONEncoder/Decoder
. #559 - Don't update
expires
value if persist update is called withnil
expire value. #562 - Check for
HTTPResponseError
instead ofHTTPError
inFileMiddleware
. #569 - Use
ProcessInfo.processInfo.environment
instead ofenviron
. #571 from @GNMoseke
Other changes
v2.0.1
Version 2.0.0
🎉 🎉 🎉
This is a major re-write of the Hummingbird server framework using structured concurrency. Below is a list of the larger changes
- Rebuild server on top of Swift NIO communication layer (NIOAsyncChannel) between their own EventLoop based APIs and structured concurrency.
- Removed all Swift NIO
EventLoopFuture
internals. - Reimplemented TLS and HTTP2 libraries.
- Rewrote router and heavily optimised it.
- Added user-defined generic context to be passed alongside requests through router.
- Add support for streamed request payloads using AsyncSequences and streamed response payloads using a output writer.
- Added result builder middleware stack.
- Used result builder middleware stack to write a result builder based router in
HummimgbirdRouter
library. - Use new HTTP types from Apple.
- Added integration with Service Lifecycle package.
Application
conforms toService
and uses graceful shutdown handlers. - The ability to extend the
Application
type has been removed. Instead it recommended to use dependency injection. - Similarly the ability to extend
Request
has been removed. Instead you should use theRequestContext
generic parameter. - Moved HummingbirdCore libraries into Hummingbird package.
- Merged
HummingbirdFoundation
library intoHummingbird
library. - Renamed
HummingbirdXCT
toHummingbirdTesting
. HummingbirdJobs
library has been broken out into it's own package swift-jobs.- The
HB
prefix on all the symbols has been removed.
To help with moving from Hummingbird 1.0 we have written a migration guide.
v2.0.0 Release Candidate 6
Breaking changes
- Renamed
RouterMethods.add(middlewareStack:)
toRouterMethods.addMiddleware(buildMiddlewareStack:)
. #540
Minor release changes
- MetricsMiddleware reports metrics and dimensions conforming to OpenTelemetry conventions. #541
- Added new meter
http.server.active_requests
measuring how active requests are in flight at this point in time. #541 - Edited logger attributes to be a similar format to metrics. #541
Patch release changes
- Fix for crash when decoding badly formatted
ClosedRange
usingURLEncodedFormDecoder
. #543 - Add support to
URLEncodedFormDecoder
for decoding arrays formatted with array index egarr[0]=url&arr[1]=encoded&arr[2]=form
. #542 from @supersonicbyte
v2.0.0 Release Candidate 5
Breaking changes
- Make
ResponseBodyWriter
methods mutating. #529
Patch release changes
- Fix serving of multiple files on the same connection. #531
- Return empty response from
FileIO
for empty files . #532 from @andreasley
v2.0.0 Release Candidate 4
Breaking changes
- Removed
allocator
fromRequestContext
. #521 Server
usesResponseWriter
to write HTTP response. #519- Removed
ResponseBodyWriter.withTrailingHeaders
. #519 ResponseBodyWriter
closure should callfinish(_:)
once it is finished. It can also supply trailingHeaders to the `finish(_:) call. #519
Minor release changes
- Added new Configuration parameter
availableConnectionDelegate
to control how many connections the server accepts. #518 - Implemented
MaximumAvailableConnections
conforming toAvailableConnectionsDelegate
which limits the number of connections the server allows to a specific amount. #518 - Add support for binding server to
NWEndpoint
. #525 - Add
map
toResponseBodyWriter
to support simple transforms of response bodies #526
Patch release changes
Other changes
- Always use
fulfillment
in tests. #524
v2.0.0 Release Candidate 3
Breaking changes
- Renamed
RouterPath.appendPath
toRouterPath.appendingPath
as it is non-mutating. PR #511
Minor release changes
- Add MediaType
.applicationManifest
. PR #507 from @alephao - Allow user to add Middleware stack result builder to RouterMethods. PR #512
- Add
RouterMethods.group(_:context:)
to transform RequestContext into new type. PR #513 - Add
ContextTransform(to:)
to transform RequestContext in RouterBuilder. PR #513, #514 - Add
urlBasePath
parameter toFileMiddleware
that is removed from path when loading file. PR #510
Other changes
- Updated to using SwiftFormat 0.53.10
v2.0.0 Release Candidate 2
Minor release changes
- Make
MediaTypeCategory
public. PR #498 from @CallumTodd7 - Set
hb_uri
metric toNotFound
inMetricsMiddleware
for 404 errors. PR #499 from @CallumTodd7 - Use quiescing helper to implement graceful shutdown instead of
withGracefulShutdown
inside HTTP handling code. PR #453 - Add ExpressibleByStringInterpolation conformance to RouterPath. PR #505
- Remove
headers
member variable requirement fromHTTPResponseError
protocol. PR #506
Patch release changes
- Add test dependency to fix linking error in unit tests. PR #504 from @JonPulfer
v2.0.0 Release Candidate 1
Breaking changes
- HummingbirdJobs has been moved into its own repository https://github.com/hummingbird-project/swift-jobs.
- Add
FileIdentifier
associated type toFileProvider
. PR #487 - Use
RouterPath
instead ofString
in Router endpoint functions. PR #491 Environment.shared
has been removed.DateCache
is no longer a public symbolMediaType.Category
has been converted from an enum to a struct- Add options field to RouterBuilder and add
caseInsensitive
option. PR #483 - Deprecated symbols prefixed with
HB
have now been taggedunavailable
. PR #486 MiddlewareGroup.add
returnsself
to allow for builder pattern. PR #496 from @runhum
Patch release changes
- Router bug fixes. PR #479
- Fixed issue where tracing middleware span names weren't set with the RouterBuilder. PR #480
FileMiddleware
reports the resolved endpoint as "FileMiddleware", to avoid fragmentation of metrics and tracing data. PR #482- Remove unnecessary
@available
s where they are testing against older versions of swift that we don't support. PR #490 - Use TaskLocal instead of ServiceContext to store state while running the RouterBuilder result builder. PR #488
- Fix HTTPError serialisation and move error conversion to
Response
inside theRouter
. PR #484
Other changes
- Fix Swift 6 concurrency errors in HTTP2 and TransportServices tests. PR #481
v2.0.0 Beta 8
- Include
Collections
in dependencies of HummingbirdCore