Releases: ElliotNB/observable-slim
0.2.2
This release bundles a long line of perf, correctness, and DX improvements that landed after 0.2.0, plus a small cleanup for 0.2.2 itself. Internals have been modernized (Symbols, WeakMaps, coalesced cleanup scheduler, linked-list path tracking), with better memory behavior and tooling to validate performance.
Breaking changes
-
Dropped IE11 support
- The library now targets modern environments only.
- IE11-specific code paths and shims have been removed.
-
Internal introspection moved to Symbols
- Replaces magic string internals (e.g.
"__getTarget"-style) withSymbol-based capabilities and public helpers. - If you relied on undocumented internal string keys on the proxy, you’ll need to switch to the public helpers (
ObservableSlim.isProxy,getTarget,getParent,getPath, orObservableSlim.symbols.*).
- Replaces magic string internals (e.g.
Features & behavior improvements
-
Cycle-safe graph handling
- Adds protection against self-referential / cyclic object graphs so deeply nested or circular structures no longer risk blowing the stack or leaking.
- Introduces a cycle-safe DFS and proxy unwrapping when tearing down orphaned subtrees.
-
Configurable cleanup scheduler
- Replaces the previous fixed timeout cleanup with a coalesced, configurable scheduler.
- Cleanup of orphaned subgraphs is batched to reduce overhead on hot paths.
flushCleanupis available so tests can run deterministically and quickly.
-
Linked-list-based path tracking
- Refactors path tracking from array-based paths to a linked-list lineage of parent proxies.
- Keeps creation time O(N) with clearer semantics for
getPath/ JSON Pointer reporting, especially in nested and array-heavy graphs.
-
More robust proxy orchestration
- Ensures sibling proxies are notified of deletes using a
dupProxypropagation spec without creating loops. - Fixes a bug related to
getParentafter migrating to Symbols.
- Ensures sibling proxies are notified of deletes using a
Performance and memory
-
WeakMap-based tracking for observables
- Replaces array-based tracking with WeakMaps for O(1) lookups and GC-safe tracking of targets and proxies.
- Reduces overhead for
pause,resume,pauseChanges,resumeChanges, andremove.
-
Shallow hydration of assigned objects
- When assigning new objects/arrays onto the graph, only shallowly hydrates them instead of doing a deep walk.
- Greatly improves performance for large graphs and frequent assignments.
-
Memory leak fixes and cleanup
- Cleans up unused path-related bookkeeping that could otherwise contribute to minor leaks.
- Prunes orphaned, unused functions that were left behind after earlier perf refactors.
Tooling and benchmarks
-
Benchmark suite
- Adds a benchmark suite to validate time complexity and scaling performance on realistic object graphs.
- New
npm run benchcommand to run these benchmarks locally.
-
Post-build conformance tests
- Adds tests to validate built artifacts (UMD, CJS, ESM, etc.) behave as expected across module formats.
-
Typing improvements
- Multiple passes over the JSDoc and type surface to improve generated
.d.ts. - Ensures
npm run typeauto-generates the declaration file correctly and adds a test script to validate type usage.
- Multiple passes over the JSDoc and type surface to improve generated
0.1.6
Major kudos to @brokensourcecode for his contributions on this release.
- Proper documentation that code editors and IDEs can automatically read.
- Add npm script for
lint:fix. - Allow numbers for
domDelayargument. - Modernize build process and dev dependencies.
- Fix integration with Coveralls and Travis CI.
- Add npm script
typefor TypeScript declarations.
0.1.5
0.1.4
0.1.3
Bug fix courtesy of @richardsolomou
- Correct "Cannot read property '__isProxy' of undefined" during clean-up process,, when an object attribute is set to null.
0.1.2
Improvements courtesy of @reda-alaoui
- Adds better support for
Dateobjects. - Bug fix for property deletion after proxy observers removed.