Releases: denostack/weakref
Releases · denostack/weakref
Release list
0.2.5
0.2.4
Features
- Add
getOrInsertandgetOrInsertComputed— Implement the TC39 upsert proposal methods onIterableWeakMapandWeakValueMapto align with the updatedMap<K, V>interface in TypeScript.
0.2.3
Bug Fixes
- WeakValueMap: fix overwrite existing key (#1) — When overwriting an existing key with
set(), the previous WeakRef's FinalizationRegistry was not unregistered, causing the new value to be deleted unexpectedly. - Fix accessors returning stale state before FinalizationRegistry fires (#2) — After a value was garbage-collected but before the FinalizationRegistry callback ran,
get(),has(), and iterators would returnundefinedinstead of treating the entry as absent. Applied lazy cleanup on access toWeakValueMap,IterableWeakSet, andIterableWeakMap.