10 Commits
Author SHA1 Message Date
Rick Newton-Rogers 933538faa4 Drop Swift 6.0 (#78)
Motivation:

Swift 6.0 is no longer supported, we should bump the tools version and
remove it from our CI.

Modifications:

* Bump the Swift tools version to Swift 6.1
* Remove Swift 6.0 jobs where appropriate in main.yml, pull_request.yml

Result:

Code reflects our support window.
2026-04-01 21:19:32 +01:00
Clinton Nkwocha 1a14678249 Integer serialization fix for 32 bit platform compatibility (#52)
Motivation:

[RFC 9651](https://www.ietf.org/rfc/rfc9651.html) permits serializing an
integer in the range of -999,999,999,999,999 to 999,999,999,999,999
inclusive ([Section
4.1.4-2.1.1](https://www.ietf.org/rfc/rfc9651.html#section-4.1.4-2.1.1)).
As `RFC9651BareItem` takes values `integer` or `date` with an associated
value of type `Int`, that range is implicitly more constrained on 32-bit
platforms to a subset range of `Int32.min` to `Int32.max` inclusive.

Modifications:

- Adjust `RFC9651BareItem` to take values `integer` or `date` with an
associated value of type `Int64` instead, which is sufficient for the
permitted range.

Result:

Compatibility for the Integer and Date Structured Types on 32-bit
platforms.
2024-12-12 14:16:50 +00:00
Clinton NkwochaandCory Benfield be84570e9f Add support for Display String type to StructuredFieldValues (#51)
Motivation:

The parser and serializer for the Display String type have been
implemented. The high-level encoder and decoder should follow.

Modifications:

Implement the encoder and decoder for Display String.

Result:

The StructuredFieldValues module will support the Display String type.

---------

Co-authored-by: Cory Benfield <lukasa@apple.com>
2024-12-10 07:56:51 +00:00
Clinton Nkwocha 6e527aa16a Add support for Date type to StructuredFieldValues (#49)
Motivation:

The parser and serializer for the Date type has been implemented. The high-level encoder and decoder should follow.

Modifications:

- Implement the encoder and decoder for Date.

Result:

The StructuredFieldValues module will support the Date type.
2024-11-26 16:04:41 +00:00
Rick Newton-Rogers 8b35bf45bf Migrate to GitHub Actions (#42)
Migrate CI to use GitHub Actions.

Motivation:

To migrate to GitHub actions and centralised infrastructure.

Modifications:

Changes of note:
* Adopt swift-format using rules from SwiftNIO
* Remove scripts and docker files which are no longer needed

Result:

Feature parity with old CI.
2024-10-30 13:20:20 +00:00
Clinton Nkwocha f069b10a87 [RFC 9651] Implement adjustments for backward compatible update (#40)
Motivation:

`swift-http-structured-headers` has to be updated to [RFC 9651](https://www.ietf.org/rfc/rfc9651.html). And it will be convenient for users to have this update as a SemVer minor.

Modifications:

- Deprecate the `BareItem` type and replace it with `RFC9651BareItem`, retaining existing behaviours. Updates for the new RFC will be based on `RFC9651BareItem`.

Result:

The library can be updated to the new RFC in a backward-compatible manner.
2024-10-23 10:56:35 +01:00
Peter AdamsandCory Benfield ef88c2245f Remove Swift 5.5 Dockerfile (#34)
* Remove Swift 5.5 Dockerfile

Motivation:

Swift 5.5 is no longer supported.

Modifications:

Remove Swift 5.5 Dockerfile

Result:

Swift 5.5 support fully removed

* Remove SHSendable

---------

Co-authored-by: Cory Benfield <lukasa@apple.com>
2023-04-14 03:21:10 -07:00
David EvansandCory Benfield 522c301c0f Adopt Sendable (#23)
* Make RawStructuredFieldValues sendable

* Make StructuredFieldValues Sendable

* Rename _Sendable to SHSendable

* Fix date checking

* Fix warning

* Soundness

* Update date

Co-authored-by: Cory Benfield <lukasa@apple.com>

Co-authored-by: Cory Benfield <lukasa@apple.com>
2022-05-13 17:11:50 +01:00
Xiaodi WuandCory Benfield 8c5c9aa00d Update for open-source Decimal fixes (#16)
* Update to future-proof usage of Decimal.significand

* Update all remaining uses of Decimal.significand

* Update usage of `Decimal(sign:exponent:significand:)`

* Apply suggestions from code review

Co-authored-by: Cory Benfield <lukasa@apple.com>

Co-authored-by: Cory Benfield <lukasa@apple.com>
2022-01-04 16:24:20 +00:00
Cory Benfield 27e163f96a Rename a number of types and modules. (#13)
Motivation:

In general we should try to be specific about what we're referring to.
"Structured headers" is not really an accurate description of what this
module works with: "Structured Header Field Values", or "Structured
Field Value" is usually better. To that end this change adjusts our
naming to be closer to what we want. It also changes our module names to
prioritise the use of the Codable-based one.

Modifications:

- Renamed CodableStructuredHeaders to StructuredFieldValues.
- Renamed StructuredHeaders to RawStructuredFieldValues.
- Renamed a number of types from Field to FieldValue.
- Renamed a number of types from Header to Field or FieldValue.
- Renamed some functions along the above lines.

Result:

Better and more consistent terminology will be used.
2021-07-02 11:48:41 +01:00