Skip to content

Releases: denostack/weakref

0.2.5

Choose a tag to compare

@wan2land wan2land released this 19 Jun 14:09
73ce8af

Bug Fixes

  • WeakValueMap: a failed set() no longer drops the existing entry (#3)

0.2.4

Choose a tag to compare

@wan2land wan2land released this 27 Apr 04:50
e1187eb

Features

  • Add getOrInsert and getOrInsertComputed — Implement the TC39 upsert proposal methods on IterableWeakMap and WeakValueMap to align with the updated Map<K, V> interface in TypeScript.

0.2.3

Choose a tag to compare

@wan2land wan2land released this 17 Mar 15:43
f6b3d6e

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 return undefined instead of treating the entry as absent. Applied lazy cleanup on access to WeakValueMap, IterableWeakSet, and IterableWeakMap.

0.2.1

Choose a tag to compare

@wan2land wan2land released this 23 Jun 06:06
37eb9d8
  • fix: resolve issue with broken types due to addition of union, intersection, etc. in typescript esnext types for Set