|
1 | | -Version 1.0.0 - 1.2.0 |
2 | | -Added single default function javaScriptToString |
3 | | -See https://github.com/lopatnov/jsToString/tree/2ad125ef392d7db45b26e14ec3225f35f28aad41 |
| 1 | +# Changelog |
| 2 | + |
| 3 | +All notable changes to this project will be documented in this file. |
| 4 | + |
| 5 | +## [2.0.0] - 2026-02-14 |
| 6 | + |
| 7 | +### Added |
| 8 | + |
| 9 | +- Cross-reference support: shared objects between different branches are now preserved as references |
| 10 | +- `throwOnNonSerializable` option: throws an error for non-serializable values instead of returning `"undefined"` |
| 11 | +- Explicit handling for non-serializable types: `Promise`, `Generator`, `WeakRef`, `WeakMap`, `WeakSet`, `FinalizationRegistry` |
| 12 | +- Negative zero (`-0`) preserved correctly |
| 13 | +- Sparse arrays preserved (holes are not filled with `undefined`) |
| 14 | +- `Symbol.for()` registry symbols distinguished from regular symbols |
| 15 | +- `Symbol("")` (empty description) distinguished from `Symbol()` (no description) |
| 16 | +- RegExp `lastIndex` preserved when non-zero |
| 17 | +- Error subclasses preserved: `TypeError`, `RangeError`, `ReferenceError`, `SyntaxError`, `URIError`, `EvalError` |
| 18 | +- `Object.create(null)` objects supported |
| 19 | +- Async functions and async generator functions supported |
| 20 | +- `SharedArrayBuffer` supported (grouped with `ArrayBuffer`) |
| 21 | +- ESM (`.mjs`) and CJS (`.cjs`) dual-package support via `exports` field |
| 22 | +- UMD build for browsers |
| 23 | +- `"type": "module"` in package.json |
| 24 | +- Biome for linting and formatting (replaced JSHint) |
| 25 | +- Jest coverage reporting enabled |
| 26 | +- 191 tests total (up from 53) |
| 27 | + |
| 28 | +### Fixed |
| 29 | + |
| 30 | +- **Issue #1:** Circular references to parent elements at the top level are now resolved correctly |
| 31 | +- Circular chain references (A -> B -> C -> A) now work at any depth |
| 32 | +- `counter = counter++` post-increment bug in cross-reference actions (value never incremented) |
| 33 | +- `Object.prototype.hasOwnProperty.call()` used instead of `value.hasOwnProperty()` to support null-prototype objects |
| 34 | +- Non-identifier property names in function properties now use bracket notation (`fn["my-prop"]` instead of invalid `fn.my-prop`) |
| 35 | +- Non-identifier property names in object literals are now quoted |
| 36 | +- Invalid `Date` objects now serialize as `new Date(NaN)` instead of `new Date("null")` |
| 37 | +- Date strings are now quoted in output |
| 38 | + |
| 39 | +### Changed |
| 40 | + |
| 41 | +- Cross-reference output uses dot notation when possible (`___ref1.prop` instead of `___ref1['prop']`) |
| 42 | +- Internal IIFE variable renamed from `___j2s_` to `___ref` for readability |
| 43 | +- Updated `@lopatnov/get-internal-type` to 2.0.0 |
| 44 | +- Updated all dependencies to latest versions |
| 45 | +- Migrated from `rollup-plugin-*` to `@rollup/plugin-*` official packages |
| 46 | +- Migrated CI from Node.js 12.x to Node.js 18/20/22/24 |
| 47 | +- Updated `@lopatnov/rollup-plugin-uglify` from 2.x to 3.x |
| 48 | +- Upgraded TypeScript to 5.8, Jest to 30, Rollup to 4, Biome to 2.x |
| 49 | +- tsconfig lib updated to ES2022 |
| 50 | +- Minimum Node.js version is now 18.0.0 |
| 51 | + |
| 52 | +### Removed |
| 53 | + |
| 54 | +- Travis CI configuration (replaced by GitHub Actions) |
| 55 | +- JSHint configuration (replaced by Biome) |
| 56 | +- `rollup-plugin-sourcemaps` (deprecated, no longer needed) |
| 57 | + |
| 58 | +## [1.7.3] - 2022 |
| 59 | + |
| 60 | +### Changed |
| 61 | + |
| 62 | +- Updated terser dependency |
| 63 | + |
| 64 | +## [1.7.0 - 1.7.2] |
| 65 | + |
| 66 | +### Changed |
| 67 | + |
| 68 | +- Updated packages and dependencies |
| 69 | + |
| 70 | +## [1.5.0 - 1.6.0] |
| 71 | + |
| 72 | +### Added |
| 73 | + |
| 74 | +- Options for limiting nesting depth (`nestedObjectsAmount`, `nestedArraysAmount`, `nestedFunctionsAmount`) |
| 75 | + |
| 76 | +## [1.3.0 - 1.4.0] |
| 77 | + |
| 78 | +### Added |
| 79 | + |
| 80 | +- Support for Map, Set, TypedArray, ArrayBuffer, DataView |
| 81 | +- Support for BigInt, Symbol |
| 82 | + |
| 83 | +## [1.0.0 - 1.2.0] |
| 84 | + |
| 85 | +### Added |
| 86 | + |
| 87 | +- Initial release with `javaScriptToString` function |
| 88 | +- Support for primitives, objects, arrays, functions, Date, RegExp, Error |
| 89 | +- Circular reference handling |
| 90 | +- Function properties and prototype serialization |
| 91 | + |
| 92 | +See [GitHub releases](https://github.com/lopatnov/jsToString/releases) for more details. |
0 commit comments