Skip to content

2.2.0

Choose a tag to compare

@jheagle jheagle released this 15 Oct 14:14
· 26 commits to main since this release
v2.2.0
9c21704

New ScopedCollection<Scope, Key, Value>: a keyed collection partitioned by an arbitrary scope object, backed by WeakMap<Scope, Map<Key, Value>> - a scope's own keys are freed once nothing else references that scope.

This is the first piece of a larger json-dom change (stable item ids, replacing position-based getItemPath/getItemByPath forwarding, which breaks whenever a client's tree differs in shape from the server's). json-dom depends on this published version to build a per-root id→item lookup index. The same WeakMap<Root, X> shape already existed independently twice in battleship's own code - a signal this belongs here as a general collection, not a one-off.

199 tests passing, typecheck and build both clean.