diff --git a/changelog.md b/changelog.md index 468afc8..73e4fc3 100644 --- a/changelog.md +++ b/changelog.md @@ -1,12 +1,23 @@ ChangeLog ========= -2.0.0 (????-??-??) +2.0.0 (2024-10-02) ------------------ -* #66: We now convert from/to ArrayBuffer instead of a custom ByteSequence +The "Structured Field Values" was updated in [RFC9651][rfc9651]. This new +specification added the ['Date'][9] and ['Display String'][10] field types. +The former encodes unix timestamp, the latter a Unicode string. + +Perfect time to update this package as well! This new major release supports +the new standard. + +* #66: We now convert from/to `ArrayBuffer` instead of a custom ByteSequence object. This is a breaking change. -* Bundling CommonJS for backwards compat. +* Add support for `Date` and `DisplayString` from RFC9651. +* Switched to ESM, but we're still bundling a CommonJS build. +* No longer shipping a minified build. +* Dropped Chai and now using `node:assert`. +* Dropped Mocha and now using `node:test`. 2.0.0-alpha.1 (2024-02-23) @@ -63,7 +74,7 @@ ChangeLog 0.4.0 (2021-05-15) ------------------ -* Fully up to date with [RFC8941][5]. +* Fully up to date with [RFC8941][rfc8941]. * This is a complete rewrite, all APIs have changed and return the structures that are recommended by the actual RFC document. * Passing almost all tests from the [HTTP WG test suite][6]. See the readme for @@ -125,6 +136,9 @@ ChangeLog [2]: https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-09 [3]: https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-10 [4]: https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-13 -[5]: https://datatracker.ietf.org/doc/html/rfc8941 [6]: https://github.com/httpwg/structured-field-tests [7]: https://www.ietf.org/archive/id/draft-ietf-httpbis-sfbis-05.html +[9]: https://www.rfc-editor.org/rfc/rfc9651.html#name-dates +[10]: https://www.rfc-editor.org/rfc/rfc9651.html#name-display-strings +[rfc8941]: https://datatracker.ietf.org/doc/html/rfc8941 +[rfc9651]: https://datatracker.ietf.org/doc/html/rfc9651 diff --git a/package.json b/package.json index 33ca8bf..7fd2b67 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "structured-headers", "version": "2.0.0-alpha.1", - "description": "Implementation of RFC8941, structured headers for HTTP.", + "description": "Implementation of Structured Field Values for HTTP (RFC9651, RFC8941)", "type": "module", "exports": { "import": "./dist/index.js", @@ -22,6 +22,7 @@ "structured-header", "structured-fields", "structured fields", + "RFC9651", "RFC8941", "headers" ], diff --git a/readme.md b/readme.md index 10a6c08..cd41157 100644 --- a/readme.md +++ b/readme.md @@ -1,20 +1,21 @@ Structured Headers parser for Javascript ======================================== -This library is a parser and serializer for the [Structured Headers][1] -specification, a.k.a. "Structured Field Values for HTTP" (RFC8941). +This library implements a parser and serializer for the [Structured Field Values for HTTP][2] +specification. ([RFC9651][3], [RFC8941][1]). This specification defines a standard serialization for complex HTTP header values, including lists (arrays), dictionaries (maps) and also numbers, -booleans, and binary data. +booleans, binary data, timestamps and Unicode strings. The library is written in Typescript, and the examples in this document are -too, but plain Javascript is also fully supported. +too, but plain Javascript is also fully supported. It ships with ESM and +CommonJS builds and has 0 dependencies. Compatibility ------------- -This package has 2740 unittests, the vast majority are supplied from the +This package has 2805 unittests, the vast majority are supplied from the official [HTTP WG test suite][2]. However, there are 2 differences in the serializer: @@ -249,3 +250,4 @@ of the api. [1]: https://datatracker.ietf.org/doc/html/rfc8941 [2]: https://github.com/httpwg/structured-field-tests +[3]: https://www.rfc-editor.org/rfc/rfc9651.html