Skip to content

Releases: DecimalTurn/toml-patch

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

v1.0.1

14 Feb 22:15

Choose a tag to compare

Main changes:

Minor changes:

Full Changelog: v1.0.0...v1.0.1

v1.0.0

12 Feb 19:25

Choose a tag to compare

Main Changes

  • Move to ESM-only distribution (v1.0.0) by @DecimalTurn in #100

    This removes CommonJS and UMD builds. Users must use ESM or one of these migration paths:

    For ESM Users (Recommended)

    No changes needed - already fully supported.

    For CJS Users

    Option 1: Use recent Node.js with require(esm) support

    • Node.js v22.12.0+ or v23.3.0+ can directly require() ESM packages
    • No code changes needed

    Option 2: Use dynamic import in CJS

     // Instead of: const toml = require('@decimalturn/toml-patch');
     const toml = await import('@decimalturn/toml-patch');

    Option 3: Migrate to ESM
    Add "type": "module" to package.json and use ESM syntax.

    Option 4: Stay on v0.x
    Users on legacy Node.js versions can continue using v0.x releases.

    Compatibility

    • Modern bundlers: Fully compatible (Webpack 5+, Vite, Rollup, esbuild)
    • Node.js 22.12.0+/23.3.0+: Direct require() support for ESM
    • Node.js 12+: Dynamic import support
    • Node.js < 12: Must stay on v0.x (EOL since 2019)

Minor Changes

  • chore(deps): update dependency @decimalturn/toml-patch to v0.7.0 by @renovate[bot] in #99
  • chore(deps): update dependency glob to v13.0.2 by @renovate[bot] in #101

Full Changelog: v0.7.0...v1.0.0

v0.7.0

08 Feb 18:44

Choose a tag to compare

Main changes

  • Implement invalid TOML detection and error reporting by @DecimalTurn in #95

Minor changes

  • chore(deps): update dependency glob to v13.0.1 by @renovate[bot] in #97
  • chore(deps): update dependency @decimalturn/toml-patch to v0.6.0 by @renovate[bot] in #96

Full Changelog: v0.6.0...v0.7.0

v0.6.0

01 Feb 03:28

Choose a tag to compare

What's Changed

  • Add TOML v1.1 support by @DecimalTurn in #92
    • Multiline inline tables (even if nested or with comments)
    • Optional seconds in datetime and time values
    • New string escape sequences
  • chore(deps): update submodules/toml-test digest to 0ee318a by @renovate[bot] in #93

Full Changelog: v0.5.2...v0.6.0