Skip to content

Commit 2256622

Browse files
authored
Merge pull request #69 from badgateway/release-2
Releasing v2
2 parents f0c7589 + 4eff52d commit 2256622

File tree

3 files changed

+28
-11
lines changed

3 files changed

+28
-11
lines changed

changelog.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
11
ChangeLog
22
=========
33

4-
2.0.0 (????-??-??)
4+
2.0.0 (2024-10-02)
55
------------------
66

7-
* #66: We now convert from/to ArrayBuffer instead of a custom ByteSequence
7+
The "Structured Field Values" was updated in [RFC9651][rfc9651]. This new
8+
specification added the ['Date'][9] and ['Display String'][10] field types.
9+
The former encodes unix timestamp, the latter a Unicode string.
10+
11+
Perfect time to update this package as well! This new major release supports
12+
the new standard.
13+
14+
* #66: We now convert from/to `ArrayBuffer` instead of a custom ByteSequence
815
object. This is a breaking change.
9-
* Bundling CommonJS for backwards compat.
16+
* Add support for `Date` and `DisplayString` from RFC9651.
17+
* Switched to ESM, but we're still bundling a CommonJS build.
18+
* No longer shipping a minified build.
19+
* Dropped Chai and now using `node:assert`.
20+
* Dropped Mocha and now using `node:test`.
1021

1122

1223
2.0.0-alpha.1 (2024-02-23)
@@ -63,7 +74,7 @@ ChangeLog
6374
0.4.0 (2021-05-15)
6475
------------------
6576

66-
* Fully up to date with [RFC8941][5].
77+
* Fully up to date with [RFC8941][rfc8941].
6778
* This is a complete rewrite, all APIs have changed and return the structures
6879
that are recommended by the actual RFC document.
6980
* Passing almost all tests from the [HTTP WG test suite][6]. See the readme for
@@ -125,6 +136,9 @@ ChangeLog
125136
[2]: https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-09
126137
[3]: https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-10
127138
[4]: https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-13
128-
[5]: https://datatracker.ietf.org/doc/html/rfc8941
129139
[6]: https://github.com/httpwg/structured-field-tests
130140
[7]: https://www.ietf.org/archive/id/draft-ietf-httpbis-sfbis-05.html
141+
[9]: https://www.rfc-editor.org/rfc/rfc9651.html#name-dates
142+
[10]: https://www.rfc-editor.org/rfc/rfc9651.html#name-display-strings
143+
[rfc8941]: https://datatracker.ietf.org/doc/html/rfc8941
144+
[rfc9651]: https://datatracker.ietf.org/doc/html/rfc9651

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "structured-headers",
33
"version": "2.0.0-alpha.1",
4-
"description": "Implementation of RFC8941, structured headers for HTTP.",
4+
"description": "Implementation of Structured Field Values for HTTP (RFC9651, RFC8941)",
55
"type": "module",
66
"exports": {
77
"import": "./dist/index.js",
@@ -22,6 +22,7 @@
2222
"structured-header",
2323
"structured-fields",
2424
"structured fields",
25+
"RFC9651",
2526
"RFC8941",
2627
"headers"
2728
],

readme.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
Structured Headers parser for Javascript
22
========================================
33

4-
This library is a parser and serializer for the [Structured Headers][1]
5-
specification, a.k.a. "Structured Field Values for HTTP" (RFC8941).
4+
This library implements a parser and serializer for the [Structured Field Values for HTTP][2]
5+
specification. ([RFC9651][3], [RFC8941][1]).
66

77
This specification defines a standard serialization for complex HTTP header
88
values, including lists (arrays), dictionaries (maps) and also numbers,
9-
booleans, and binary data.
9+
booleans, binary data, timestamps and Unicode strings.
1010

1111
The library is written in Typescript, and the examples in this document are
12-
too, but plain Javascript is also fully supported.
12+
too, but plain Javascript is also fully supported. It ships with ESM and
13+
CommonJS builds and has 0 dependencies.
1314

1415
Compatibility
1516
-------------
1617

17-
This package has 2740 unittests, the vast majority are supplied from the
18+
This package has 2805 unittests, the vast majority are supplied from the
1819
official [HTTP WG test suite][2].
1920

2021
However, there are 2 differences in the serializer:
@@ -249,3 +250,4 @@ of the api.
249250

250251
[1]: https://datatracker.ietf.org/doc/html/rfc8941
251252
[2]: https://github.com/httpwg/structured-field-tests
253+
[3]: https://www.rfc-editor.org/rfc/rfc9651.html

0 commit comments

Comments
 (0)