From 77dbdbda8f4e7f327d7ba0b9c06d8d8a086870f9 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Wed, 11 Nov 2026 00:00:32 +0100 Subject: [PATCH 1/2] docs(changelog): document v3.0.1 fixes --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f7a3cd..912ffc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,12 @@ # Changelog -## Next +## v3.0.1 - Apply `bigint: false` and strict mode to BigInt typed-array entries. - Report strict-mode errors at their typed-array indices when `safe` is enabled. +- Escape caught error messages in safe mode so quotes, backslashes, and control characters produce valid JSON. + +## v3.0.0 - **Breaking change:** Require Node.js 18 or later. - Fix ESM imports in Node.js and bundlers, including applications that also use CommonJS. From 46f65af8714605db59b848c1549b04b1303b8ad3 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Wed, 11 Nov 2026 00:03:34 +0100 Subject: [PATCH 2/2] v3.0.1 --- esm/package.json | 2 +- esm/wrapper.mjs | 2 +- index.js | 2 +- package.json | 2 +- test.js | 2 +- wrapper.cjs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/esm/package.json b/esm/package.json index f0eba66..e31da3e 100644 --- a/esm/package.json +++ b/esm/package.json @@ -1,6 +1,6 @@ { "name": "safe-stable-stringify", - "version": "2.5.0", + "version": "3.0.1", "type": "module", "main": "./wrapper.mjs", "exports": "./wrapper.mjs" diff --git a/esm/wrapper.mjs b/esm/wrapper.mjs index 40fb691..5119e00 100644 --- a/esm/wrapper.mjs +++ b/esm/wrapper.mjs @@ -4,6 +4,6 @@ const sharedGlobal = /** @type {Record} */ ( globalThis ) -const exportSymbol = Symbol.for('safe-stable-stringify@3.0.0') +const exportSymbol = Symbol.for('safe-stable-stringify@3.0.1') if (sharedGlobal[exportSymbol] === undefined) { const stringify = configure() diff --git a/package.json b/package.json index 5230228..1d1b8e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "safe-stable-stringify", - "version": "3.0.0", + "version": "3.0.1", "description": "Deterministic and safely JSON.stringify to quickly serialize JavaScript objects", "exports": { "types": "./index.d.ts", diff --git a/test.js b/test.js index 5e8029c..51434be 100644 --- a/test.js +++ b/test.js @@ -8,7 +8,7 @@ test('escaping preserves output across runtime and string length boundaries', (a const paths = [require.resolve('./index.js'), require.resolve('.')] const cached = paths.map(path => require.cache[path]) const nativeProcess = globalThis.process - const exportSymbol = Symbol.for('safe-stable-stringify@3.0.0') + const exportSymbol = Symbol.for('safe-stable-stringify@3.0.1') const descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(globalThis, exportSymbol)) for (const process of [undefined, null, {}, { versions: {} }, { versions: { node: '21.0.0' } }, { versions: { node: '22.0.0' } }, { versions: { node: '26.3.1' } }]) { let serializer diff --git a/wrapper.cjs b/wrapper.cjs index 4145fa5..8cdace5 100644 --- a/wrapper.cjs +++ b/wrapper.cjs @@ -6,4 +6,4 @@ const sharedGlobal = /** @type {Record