• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

reactivando / use-pubsub-js / 28131737072
100%
master: 80%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 24 Jun 2026 09:47PM UTC
Jobs 1
Files 4
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Jun 2026 09:46PM UTC coverage: 100.0%. Remained the same
28131737072

push

github

web-flow
feat!: brand SubscriptionToken so unsubscribe rejects arbitrary strings (#84)

subscribe/subscribeOnce now return a branded `SubscriptionToken` (a string at
runtime). `unsubscribe` accepts only that token or a handler reference, so
passing an arbitrary string — e.g. a topic name by mistake — is a compile error.
`Token` is kept as a deprecated alias; the hook's internal token ref is typed
accordingly. Build-enforced; runtime behavior unchanged (107 tests, 100% cov).

The broader "unified PubSubInterface" idea from the audit was dropped after
empirically verifying it cannot remove the createPubSub cast (generic method
variance makes the loose impl unassignable to a strict generic interface, and
`keyof E` admits `number` which violates the key constraint). Branding is the
high-value, low-risk half.

BREAKING CHANGE: `subscribe`/`subscribeOnce` return `SubscriptionToken` (branded)
instead of a plain string; code that stored the token as `string` and passed it
to `unsubscribe` must type it as `SubscriptionToken`.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

26 of 26 branches covered (100.0%)

Branch coverage included in aggregate %.

2 of 2 new or added lines in 2 files covered. (100.0%)

167 of 167 relevant lines covered (100.0%)

36.35 hits per line

Jobs
ID Job ID Ran Files Coverage
1 28131737072.1 24 Jun 2026 09:47PM UTC 4
100.0
GitHub Action Run
Source Files on build 28131737072
  • Tree
  • List 4
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #28131737072
  • d401dd82 on github
  • Prev Build on main (#28131253287)
  • Next Build on main (#28132066450)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc