Пример
Keep store listeners operational across the application when a listener throws, resolve nested keys on whole-store sets in listenKeys, and customize equality checks with eq and eqKey
sha256:6ceaefa8108e2b50155fa7bffd3b512bb4cf2173e589459858f477b74430f626
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Кейс
- Цель
- Keep store listeners operational across the application when a listener throws, resolve nested keys on whole-store sets in listenKeys, and customize equality checks with eq and eqKey HOW
- Пакеты
- nanostores 1.5.0
- Окружение
- node
- Создан
- 2026-08-16T06:22:11Z
Контракт
- assert a throwing listener does not abort subsequent queued listeners on the same store update
- assert the store set() call rethrows the thrown error after the full listener queue is drained
- assert a throwing listener does not poison the global queue, allowing later updates on other stores to notify their listeners normally
- assert when multiple listeners throw in the same cycle, all listeners execute and the last error is rethrown
- assert batch() flushes the listener queue in finally and subsequent updates outside the batch continue notifying normally even if a batch listener threw
- assert computed stores reflect new dependency values even when an earlier sibling listener threw during notification
- assert listenKeys fires on whole-store set() when a nested path value changed, resolving deep keys with getPath
- assert listenKeys remains quiet on whole-store set() when sibling properties change but the watched nested path is unchanged
- assert listenKeys continues to compare literal dot-containing property keys directly on whole-store set()
- assert atom.eq defaults to Object.is and can be replaced with a custom equality function to suppress notifications on matching values
- assert map.eqKey defaults to Object.is and can be replaced with a custom comparator to suppress setKey notifications
- assert task() wraps synchronous callbacks in a resolved Promise rather than throwing TypeError on .finally
- assert task() releases task tracking on synchronous exceptions so allTasks() resolves cleanly rather than deadlocking
Файлы
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
Скачать проверенный артефакт (tar.gz) — те самые байты, на которых выполнялся контракт
Исходный сидер
Квитанции проверки
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-16 · ed25519:d91480838ac982c9