v1.1.0
Added
- Patching: Preserve preferred escape sequence representation in basic strings (#131)
- Parsing: Add support for raw UTF-8 bytes (
Uint8Array/Buffer) as input forparse()andTomlDocument(#153). - Parsing: Add parsing options for
integersAsBigIntmodes ('asNeeded',true,false) with'asNeeded'as default (#153). - Formatting: Add
minimumDecimalsoption toTomlFormatto control float decimal padding during serialization (#153). - Parsing: Add support for rejection of invalid UTF-8 encoding as specified in
toml-test(#153).
Fixed
- Patching: Editing a multiline basic string that uses a line ending backslash now preserves the original line-break structure and indentation. When the new value cannot be faithfully represented with a line ending backslash (e.g., values with leading or trailing whitespace), the format falls back to a regular multiline basic string to preserve content integrity (#131).
- Parsing: Preserve full integer precision by returning
BigIntfor values outside the JS safe integer range. Fallback toNumberwhen integer cannot be parsed as aBigInt(#153 & #158). - Patching: Fixed mixed line endings bugs (#131).
- Date formatting: Ensure UTC year output is zero-padded to 4 digits for RFC3339 compliance (#153).
- Encoding: Fix encoding issue with DEL control character (#153 & #131).
Full Changelog: v1.0.7...v1.1.0
Version specific links
| Registry | Link |
|---|---|
| https://www.npmjs.com/package/@decimalturn/toml-patch/v/1.1.0 | |
| https://jsr.io/@decimalturn/toml-patch@1.1.0 |