npm / @toon-format/toon
@toon-format/toon
What changed in @toon-format/toon 0.6 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
12 breaking2 security11 new APIs and options2 performance3 behavior and defaults4 tooling34 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@toon-format/toon 434 changes
Breaking changes 7
Normalizes sparse array holes to null during encoding.
Decoding rejects a bare token line outside root primitive position.
Encoding rejects unpaired surrogates and invalid delimiters.
Decoding omits leaf fields that have no cell instead of yielding undefined.
Ill-formed UTF-8 input now produces an error in strict mode.
Strict decoding rejects indentation depth jumps.
Key folding and path expansion have been removed.
New APIs and options 4
Adds support for spec v4.4.
Adds an export for verbatim replacer output.
Adds a marker for verbatim replacer output.
Tabular headers support nested field groups.
Behavior and default changes 1
The decoder supports comment lines, and the encoder quotes strings beginning with #.
Fixes and other changes 22
Keeps usage output off stdout.
Fixes three decoder cases that diverged from the spec.
Updates the decoder to follow spec 4.2 rules.
When decoding with --no-strict, keeps the last duplicate key.
Quotes a root string that starts with U+FEFF.
Fixes how short option values are split.
CLI diagnostics are written to stderr so stdout contains results only.
File output now terminates its last line with a newline.
A raw string with a comment marker following a byte-order mark is rejected.
A tab-indented hash line is treated as content rather than a comment.
Decoding no longer truncates at a declared
[N].Decoding strips a byte-order mark and trailing spaces.
Accepts the
indentSizeoption named by the spec.A quoted colon is kept inside an unquoted key during decoding.
Decoding no longer falsely detects array headers for unquoted keys.
The decoder rejects inline content after fields-bearing headers.
Objects of uniform objects can use keyed tabular form.
The decoder rejects keyless headers outside root and list-item positions.
The encoder quotes numeric-like strings beginning with a plus sign.
Strict decoding rejects over-indented orphan lines and trailing root content.
A trailing carriage return is treated as part of the line terminator.
The decoder trims value tokens using U+0020 only.
@toon-format/toon 217 changes
Breaking changes 4
Strict mode now covers errors for §§6, 9.1, and 14.
Encoding emits the canonical empty-array form
key: [].Deprecated bare list item decoding logic has been removed.
Encoding for list-item objects was standardized to spec v3, which may change the encoded output.
Security 2
Encoding and decoding are hardened against prototype pollution.
TOON: Prototype pollution when decoding untrusted TOON input
New APIs and options 2
Decode errors now throw ToonDecodeError, giving applications a specific error type to handle.
Adds a replacer function for encoding transformations and filtering.
Behavior and default changes 1
Supports the toJSON method for custom serialization.
Tooling 1
The CLI renders decode errors with line context, source, and a caret.
Fixes and other changes 7
Key-value rest is sliced at the key token end offset.
Quoted spans are treated as opaque during line classification.
Decoding now supports
\uXXXXescapes as specified in §7.1.Decoding rejects whitespace gaps in array headers, as required by §6.
Decoding rejects array headers with trailing content between the bracket and colon.
Empty-string keys in array headers are preserved across encoding and decoding.
Negative numbers with leading zeros are now rejected during decoding.
@toon-format/toon 18 changes
Breaking changes 1
The optional length marker [#N] is removed in favor of [N].
New APIs and options 2
Adds streaming decode functionality with event-based parsing.
Adds encodeLines for streaming encoding to TOON.
Performance 2
The CLI uses memory-efficient streaming for encoding.
Empty object checks are improved for better performance.
Behavior and default changes 1
Parsing now supports nested tabular arrays in list items with a bare hyphen, as specified in spec v2.1.
Tooling 1
Adds stream output for both encoding and decoding.
Fixes and other changes 1
Fixes encoding mixed-format arrays at the root level.
@toon-format/toon 0.92 changes
New APIs and options 1
Adds opt-in key folding and path expansion.
Fixes and other changes 1
Path expansion now overwrites with the new value.
@toon-format/toon 0.81 changes
Fixes and other changes 1
Minor fixes improve compliance with spec v1.4.
@toon-format/toon 0.75 changes
New APIs and options 1
The SPEC was moved to @toon-format/spec, making it available as a separate package.
Tooling 2
The CLI supports stdin for input handling.
The CLI package is published under this name; developers should use it to access the CLI.
Fixes and other changes 2
Handling was fixed for empty list items and nested objects in list items.
The package is published under this name; developers should use it to access the package.
@toon-format/toon 0.61 changes
New APIs and options 1
Adds a CLI flag to show token savings.