Skip to content

Releases: ElliotNB/observable-slim

0.2.2

04 Dec 02:32

Choose a tag to compare

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) with Symbol-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, or ObservableSlim.symbols.*).

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.
    • flushCleanup is 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 dupProxy propagation spec without creating loops.
    • Fixes a bug related to getParent after migrating to Symbols.

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, and remove.
  • 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 bench command 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 type auto-generates the declaration file correctly and adds a test script to validate type usage.

0.1.6

04 May 19:56

Choose a tag to compare

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 domDelay argument.
  • Modernize build process and dev dependencies.
  • Fix integration with Coveralls and Travis CI.
  • Add npm script type for TypeScript declarations.

0.1.5

22 Jan 05:36
b6e3936

Choose a tag to compare

Enhancement courtesy of @dashersw

  • Add a new __getPath property for fetching the path of a proxy.

0.1.4

24 Dec 05:33

Choose a tag to compare

Major performance overhaul, resolves issue #24 (processing very large arrays of objects).

0.1.3

28 Nov 20:25

Choose a tag to compare

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

19 Nov 03:23

Choose a tag to compare

Improvements courtesy of @reda-alaoui

  • Adds better support for Date objects.
  • Bug fix for property deletion after proxy observers removed.

0.1.1

11 Nov 01:13

Choose a tag to compare

Bug fix for the clean-up process on overwritten (orphaned) objects. Perform a recursive check to verify that that there are no other references to the same object nested somewhere off the parent observed object.

0.1.0

22 Aug 03:55

Choose a tag to compare

Bug fixes for #17 and a scenario where multiple observers on a single object could be invoked before the mutation has been applied.

0.0.9

13 Aug 17:16

Choose a tag to compare

Bug fixes for Array mutation issues cited in #15 and #16.

0.0.8

08 Aug 20:01

Choose a tag to compare

currentPath on Arrray mutations now refer to the specific item/property. Resolves issue #14.