Skip to content

Releases: DecimalTurn/toml-patch

v1.3.0

11 May 01:09

Choose a tag to compare

Added

  • Formatting: Add leadingBom option to TomlFormat to preserve or add UTF-8 BOM (byte order mark) on output. This option is auto-detected from input strings and maintained through patch, stringify and document update operations (#198).

Full Changelog: v1.2.2...v1.3.0


Version specific links

Registry Link
npm https://www.npmjs.com/package/@decimalturn/toml-patch/v/1.3.0
jsr https://jsr.io/@decimalturn/toml-patch@1.3.0

v1.2.2

08 May 18:48

Choose a tag to compare

Fixed

  • Parsing: Strip leading UTF-8 BOM (byte order mark) from input strings and byte buffers (#189).
  • Parsing: Reject disallowed control characters in bare tokens (#189).
  • Parsing: Reject Arabic numerals and other Unicode digits in decimal integers (#187).

Full Changelog: v1.2.1...v1.2.2


Version specific links

Registry Link
npm https://www.npmjs.com/package/@decimalturn/toml-patch/v/1.2.2
jsr https://jsr.io/@decimalturn/toml-patch@1.2.2

v1.2.1

05 May 05:25

Choose a tag to compare

Fixed

  • Patching: Correctly append to nested AOT (array of tables) (#176).
  • Patching: Fixed findByPath scanning in AOT scope to continue looking at sibling entries after a partial prefix match fails (#176).
  • Patching: Support replacement of a entire table section with a scalar value (#176).

Full Changelog: v1.2.0...v1.2.1


Version specific links

Registry Link
npm https://www.npmjs.com/package/@decimalturn/toml-patch/v/1.2.1
jsr https://jsr.io/@decimalturn/toml-patch@1.2.1

v1.2.0

29 Apr 19:08

Choose a tag to compare

Added

  • Patching: Preserve trailing comments alignement when element of a row changes width (#165).

Fixed

  • Patching: New root-level key-values pairs are now inserted at the top within the implicit root table scope (before the first [table] or [[array]] header) instead of being appended at the end of the document (#171).
  • Patching: Ensure deleting last key of inline-table is done cleanly (#164).
  • Patching: Preserving trailing comments on inline tables when deleting keys (#164).
  • Patching: Support nested multiline inline-table patching inside arrays (#164).

Full Changelog: v1.1.1...v1.2.0


Version specific links

Registry Link
npm https://www.npmjs.com/package/@decimalturn/toml-patch/v/1.2.0
jsr https://jsr.io/@decimalturn/toml-patch@1.2.0

v1.1.1

20 Apr 02:09

Choose a tag to compare

Fixed

  • Patching: Preserve inline comment alignment when patching existing TOML date values with regular JavaScript Date objects (#160).

Full Changelog: v1.1.0...v1.1.1


Version specific links

Registry Link
npm https://www.npmjs.com/package/@decimalturn/toml-patch/v/1.1.1
jsr https://jsr.io/@decimalturn/toml-patch@1.1.1

v1.1.0

15 Apr 16:38

Choose a tag to compare

Added

  • Patching: Preserve preferred escape sequence representation in basic strings (#131)
  • Parsing: Add support for raw UTF-8 bytes (Uint8Array/Buffer) as input for parse() and TomlDocument (#153).
  • Parsing: Add parsing options for integersAsBigInt modes ('asNeeded', true, false) with 'asNeeded' as default (#153).
  • Formatting: Add minimumDecimals option to TomlFormat to 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 BigInt for values outside the JS safe integer range. Fallback to Number when integer cannot be parsed as a BigInt (#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
npm https://www.npmjs.com/package/@decimalturn/toml-patch/v/1.1.0
jsr https://jsr.io/@decimalturn/toml-patch@1.1.0

v1.0.7

09 Apr 00:28

Choose a tag to compare

Fixed

  • Stringifying: undefined values in objects are now silently ignored, matching JSON.stringify behavior (#148).
  • Patching: Setting a key to undefined now correctly removes it, including in nested tables and inline tables (#148).
  • Patching: Deleting a key from an inline table nested inside an inline array (e.g. items = [{ name = "x", color = "y" }]) now works correctly (#148).

Full Changelog: v1.0.6...v1.0.7


Version specific links

Registry Link
npm https://www.npmjs.com/package/@decimalturn/toml-patch/v/1.0.7
jsr https://jsr.io/@decimalturn/toml-patch@1.0.7

v1.0.6

06 Apr 17:07

Choose a tag to compare

What's Changed

Full Changelog: v1.0.5...v1.0.6

Links for this version:

v1.0.5

17 Mar 19:22

Choose a tag to compare

What's Changed

Main improvements

Specification update

  • chore(deps): update submodules/toml-test digest to d2f3945 by @renovate[bot] in #114

Full Changelog: v1.0.2...v1.0.5

v1.0.2

14 Feb 22:23

Choose a tag to compare

What's Changed

Full Changelog: v1.0.1...v1.0.2