Releases: DecimalTurn/toml-patch
v1.1.1
Fixed
- Patching: Preserve inline comment alignment when patching existing TOML date values with regular JavaScript
Dateobjects (#160).
Full Changelog: v1.1.0...v1.1.1
Version specific links
| Registry | Link |
|---|---|
| https://www.npmjs.com/package/@decimalturn/toml-patch/v/1.1.1 | |
| https://jsr.io/@decimalturn/toml-patch@1.1.1 |
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 |
v1.0.7
Fixed
- Stringifying:
undefinedvalues in objects are now silently ignored, matchingJSON.stringifybehavior (#148). - Patching: Setting a key to
undefinednow 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 |
|---|---|
| https://www.npmjs.com/package/@decimalturn/toml-patch/v/1.0.7 | |
| https://jsr.io/@decimalturn/toml-patch@1.0.7 |
v1.0.6
What's Changed
- fix: ensure multiline inline table patching works by @DecimalTurn in #127
- fix: respect
inlineTableStartinside Table Arrays by @DecimalTurn in #144
Full Changelog: v1.0.5...v1.0.6
Links for this version:
v1.0.5
What's Changed
Main improvements
- feat: reduce bundle size by @DecimalTurn in #122
- fix: support patching for adding to nested inline tables by @DecimalTurn in #120
Specification update
Full Changelog: v1.0.2...v1.0.5
v1.0.2
What's Changed
- Improve stringification performance by @DecimalTurn in #106
Full Changelog: v1.0.1...v1.0.2
v1.0.1
Main changes:
- Add profiling and improve parsing performance by @DecimalTurn in #105
Minor changes:
- Improve Benchmarking by @DecimalTurn in #104
- chore(deps): update dependency glob to v13.0.3 by @renovate[bot] in #102
Full Changelog: v1.0.0...v1.0.1
v1.0.0
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)
- Node.js v22.12.0+ or v23.3.0+ can directly
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
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
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