Skip to content

Commit

Permalink
Merge pull request #69 from badgateway/release-2
Browse files Browse the repository at this point in the history
Releasing v2
  • Loading branch information
evert authored Oct 3, 2024
2 parents f0c7589 + 4eff52d commit 2256622
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
24 changes: 19 additions & 5 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -22,6 +22,7 @@
"structured-header",
"structured-fields",
"structured fields",
"RFC9651",
"RFC8941",
"headers"
],
Expand Down
12 changes: 7 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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

0 comments on commit 2256622

Please sign in to comment.