Skip to content

Upgrade bufout to v1.0.0 and remove EventEmitter listener limits (main) - #463

Merged
kraenhansen merged 2 commits into
mainfrom
bufout-1-on-main
Oct 7, 2026
Merged

kraenhansen merged 2 commits into
mainfrom
bufout-1-on-main

Conversation

@kraenhansen

Copy link
Copy Markdown
Collaborator

Cherry-picks #438 from next onto main, so the bufout listener-leak fix ships as patch releases rather than only through the rc releases in #394.

Merging this PR will:

  • Upgrade bufout to ^1.0.0 in @react-native-node-api/cli-utils.
  • Remove the EventEmitter.defaultMaxListeners = 100 workarounds from cmake-rn, ferric-cli and react-native-node-api.

Additional context intended for coding agents and bots

Relation to next

This is git cherry-pick -x 48fa7fc (#438, merged into next), applied cleanly with no conflicts. Once this merges, next will be rebased onto main and force-pushed; the rebase drops the original #438 commit as already-applied. next's .changeset/pre.json lists no consumed changesets, so the moved .changeset/bufout-one-point-oh.md is versioned from main only.

Test plan and verification

  • pnpm install --frozen-lockfile (lockfile up to date)
  • pnpm run build (passed)
  • pnpm run prettier:check (passed)
  • pnpm run depcheck (passed)
  • pnpm run lint locally reports 4 errors in apps/test-app/App.tsx, all from example addon types that only exist after the native bootstrap, and none in files touched here; CI runs it with the bootstrap in place.

🤖 Generated with Claude Code

* chore: upgrade bufout to v1.0.0 and drop defaultMaxListeners bumps

bufout v1.0.0 keeps the number of listeners on the process and on the
output streams constant regardless of how many children are spawned
concurrently: a single shared exit/SIGINT listener is attached only while
children are running, and every child pipes into one shared pass-through
per destination stream.

That removes the reason the CLIs raised EventEmitter.defaultMaxListeners
to 100, so those assignments (and the now-unused node:events /
node:stream imports) are gone and Node's default limit applies again,
restoring the leak warning it exists to give.

Verified with 80 concurrent children in both "inherit" and "buffered"
mode, plus the SpawnFailure flush path, at the default limit of 10: no
MaxListenersExceededWarning, and process listener counts return to zero.

The public API is unchanged from 0.3.x — the major bump reflects the
1.0.0 milestone, not a breaking change to spawn/SpawnFailure.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BAjP89a9VA9EtQsVBxGcto

* ci: trigger label-gated jobs

The Check workflow only runs on opened/synchronize/reopened, so the
Apple/Android/Ferric jobs gated on labels never evaluated the labels
added after the pull request was opened. This empty commit fires a
synchronize event so they run.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BAjP89a9VA9EtQsVBxGcto

---------

Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 48fa7fc)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kraenhansen kraenhansen self-assigned this Oct 7, 2026
@kraenhansen
kraenhansen marked this pull request as ready for review October 7, 2026 09:18
@kraenhansen
kraenhansen merged commit 294de3f into main Oct 7, 2026
9 checks passed
@kraenhansen
kraenhansen deleted the bufout-1-on-main branch October 7, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant