You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+17-22Lines changed: 17 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,28 +5,7 @@ All notable changes to this project are documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
-
## [Unreleased]
9
-
10
-
### Performance
11
-
12
-
- Field-iteration path strings (`${path}.${key}`, `${path}[${i}]`) are no longer allocated on the happy path. `struct` / `array` codecs now wrap each child call in `try { ... } catch (e) { rethrowWithPrefix(e, segment) }` and build the error path only when something throws. Measured on Node 22:
13
-
-`nested` encode (compiled): -33%
14
-
-`list of list` encode (compiled): -59%
15
-
-`list of list` decode (compiled): -45%
16
-
-`hero` encode / decode (compiled): -17% each
17
-
18
-
### Changed
19
-
20
-
- Build: `tsup` now emits minified output. `dist/index.mjs` shrinks from ~15 KB to ~7.5 KB (~-50%); behaviour is unchanged.
21
-
22
-
### Security
23
-
24
-
- Decoded structs are now created with a `null` prototype, neutralising prototype-pollution risk if a schema is built from untrusted input that contains a `__proto__` key.
25
-
- String decoder now uses `TextDecoder` in `fatal: true` mode and throws `SCHEMA_MISMATCH` on malformed UTF-8 (previously such bytes were silently replaced with `U+FFFD`).
26
-
-`struct.encode` now asserts that `write()` emits exactly as many bytes as `measure()` reported. Defends against codec bugs leaking uninitialised memory from `Buffer.allocUnsafe`.
27
-
- CI now runs `npm audit --audit-level=high --omit=dev` and fails on high/critical advisories in production dependencies.
28
-
29
-
## [0.1.0] - 2026-05-16
8
+
## [0.1.0] - 2026-05-17
30
9
31
10
### Added
32
11
- Full TypeScript rewrite.
@@ -48,10 +27,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
48
27
- Encoder now allocates the output `Buffer` exactly once via a two-pass measure/write strategy (no `Buffer.concat`).
49
28
- Decoded `shortBytes` / `bytes` are returned as independent copies of the source memory rather than aliased views.
50
29
- Replaced deprecated `new Buffer(...)` calls with `Buffer.allocUnsafe` (for output) and `TextEncoder`/`TextDecoder` for string codecs.
30
+
- Build: `tsup` now emits minified output. `dist/index.mjs` shrinks from ~15 KB to ~7.5 KB (~-50%); behaviour is unchanged.
-**Byte-identical** with `0.0.x` for the corresponding new codecs. The previous test suite's golden buffers are preserved as goldens in `test/wire-format.test.ts`.
38
+
39
+
### Performance
40
+
41
+
- Field-iteration path strings (`${path}.${key}`, `${path}[${i}]`) are no longer allocated on the happy path. `struct` / `array` codecs now wrap each child call in `try { ... } catch (e) { rethrowWithPrefix(e, segment) }` and build the error path only when something throws. Measured on Node 22:
42
+
-`nested` encode (compiled): -33%
43
+
-`list of list` encode (compiled): -59%
44
+
-`list of list` decode (compiled): -45%
45
+
-`hero` encode / decode (compiled): -17% each
46
+
47
+
### Security
48
+
49
+
- Decoded structs are now created with a `null` prototype, neutralising prototype-pollution risk if a schema is built from untrusted input that contains a `__proto__` key.
50
+
- String decoder now uses `TextDecoder` in `fatal: true` mode and throws `SCHEMA_MISMATCH` on malformed UTF-8 (previously such bytes were silently replaced with `U+FFFD`).
51
+
-`struct.encode` now asserts that `write()` emits exactly as many bytes as `measure()` reported. Defends against codec bugs leaking uninitialised memory from `Buffer.allocUnsafe`.
52
+
- CI now runs `npm audit --audit-level=high --omit=dev` and fails on high/critical advisories in production dependencies.
0 commit comments