Skip to content

chore: restore active maintenance for v1.4.0 - #36

Merged
coderwhy merged 6 commits into
mainfrom
codex/oss-readiness
Aug 16, 2026
Merged

chore: restore active maintenance for v1.4.0#36
coderwhy merged 6 commits into
mainfrom
codex/oss-readiness

Conversation

@coderwhy

@coderwhy coderwhy commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • establish community maintenance, contribution, and private security-reporting guidance
  • fix event-bus listener cleanup, one-time listener iteration, and prototype-key event names
  • return synchronous and Promise action results from dispatch
  • validate store configuration, state keys, and atomic multi-state listener operations
  • add comprehensive regression tests and automated package validation
  • remove the unused vulnerable demo dependency and tighten npm package metadata
  • refresh English and Chinese API documentation for the maintained behavior

Why

The repository had several long-standing edge cases reported by users, no automated CI gate, and stale package/documentation metadata. This maintenance cycle restores a small, reviewable release path for v1.4.0 while preserving the existing API shape.

User impact

  • event names such as constructor, toString, and __proto__ now work safely
  • once, off, clear, and hasEvent behave consistently
  • callers can await or directly consume values returned by dispatched actions
  • invalid configuration and unknown state keys fail clearly instead of creating partial or unobservable state
  • published package contents are constrained to the runtime source and documentation

Validation

  • 14/14 regression tests pass
  • core source files have 100% line, branch, and function coverage
  • GitHub Actions passes on Node.js 18, 20, 22, 24, and 26
  • npm audit --audit-level=low: 0 vulnerabilities
  • npm pack --dry-run: passes
  • clean-package installation and consumer smoke test: passes
  • node --check and git diff --check: pass

Related: #24, #25, #26, #27, #29, #30, #31, #32, #33

Credits: the dispatch return-value behavior follows the contribution proposed by @Thunder7991 in #32.

Use a stable handler snapshot during emit, make off safe for missing events, and repair clear and hasEvent state access. Add regression coverage for listener removal and one-time handlers.\n\nRefs #30 and #33.
Return action results unchanged so both synchronous values and Promises propagate to callers. Add focused regression coverage for both paths.\n\nImplements the behavior proposed by @Thunder7991 in #32.\nRefs #29 and #31.
Prevent event-name collisions with object prototype properties, validate optional store configuration, reject unobservable state keys, and make multi-state listener changes atomic. Expand regression coverage across all public behaviors.
Add npm test and coverage commands, remove the unused vulnerable demo dependency, constrain published files, and run tests plus package dry-runs on Node 18 through 26 with current GitHub Actions.
@coderwhy
coderwhy marked this pull request as ready for review August 16, 2026 04:04
@coderwhy
coderwhy merged commit 78fc05e into main Aug 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant