Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .changeset/bufout-one-point-oh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"@react-native-node-api/cli-utils": patch
"react-native-node-api": patch
"cmake-rn": patch
"ferric-cli": patch
---

Upgrade `bufout` to v1.0.0, which keeps the number of listeners on the process
and 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 for the CLIs to raise `EventEmitter.defaultMaxListeners`
to 100, so those assignments are gone and Node's default limit again applies —
restoring the leak warning it exists to give.
2 changes: 1 addition & 1 deletion packages/cli-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@commander-js/extra-typings": "^14.0.0",
"bufout": "^0.3.2",
"bufout": "^1.0.0",
"chalk": "^5.4.1",
"commander": "^14.0.1",
"ora": "^8.2.0",
Expand Down
4 changes: 0 additions & 4 deletions packages/cmake-rn/src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import assert from "node:assert/strict";
import path from "node:path";
import fs from "node:fs";
import { EventEmitter } from "node:events";

import {
chalk,
Expand All @@ -22,9 +21,6 @@ import {
import { Platform } from "./platforms/types.js";
import { getCcachePath } from "./ccache.js";

// We're attaching a lot of listeners when spawning in parallel
EventEmitter.defaultMaxListeners = 100;

const verboseOption = new Option(
"--verbose",
"Print more output during the build",
Expand Down
5 changes: 0 additions & 5 deletions packages/ferric/src/run.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
import EventEmitter from "node:events";

import { program } from "./program.js";

// We're attaching a lot of listeners when spawning in parallel
EventEmitter.defaultMaxListeners = 100;

program.parseAsync(process.argv).catch(console.error);
4 changes: 0 additions & 4 deletions packages/host/src/node/cli/program.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import assert from "node:assert/strict";
import path from "node:path";
import { EventEmitter } from "node:stream";

import {
Command,
Expand Down Expand Up @@ -28,9 +27,6 @@ import { linkModules, pruneLinkedModules, ModuleLinker } from "./link-modules";
import { ensureXcodeBuildPhase, createAppleLinker } from "./apple";
import { linkAndroidDir } from "./android";

// We're attaching a lot of listeners when spawning in parallel
EventEmitter.defaultMaxListeners = 100;

export const program = new Command("react-native-node-api").addCommand(
vendorHermes,
);
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading