Skip to content

feat(manifest): add stream EventEmitter methods to API gate#967

Merged
proggeramlug merged 1 commit into
mainfrom
worktree-agent-a63f14b2e9fe45606
May 17, 2026
Merged

feat(manifest): add stream EventEmitter methods to API gate#967
proggeramlug merged 1 commit into
mainfrom
worktree-agent-a63f14b2e9fe45606

Conversation

@proggeramlug
Copy link
Copy Markdown
Contributor

Summary

Adds stream.on / once / off / emit / removeListener / removeAllListeners (plus addListener / prependListener / prependOnceListener / listenerCount / listeners / rawListeners / eventNames / setMaxListeners / getMaxListeners) to the Perry API manifest in crates/perry-api-manifest/src/entries.rs. These are EventEmitter methods that every Readable/Writable/Duplex/Transform/PassThrough instance exposes — Perry rejected them at the #463 unimplemented-API gate even though the runtime closures were already wired through crates/perry-runtime/src/node_stream.rs.

Repro before

import axios from 'axios';
console.log(typeof axios.get);
// Error: \`stream.on\` is not implemented in Perry

After

axios 1.7.7 now compiles + runs past the gate. axios.get still resolves to undefined at runtime — that's a separate runtime gap (likely default-export getter on the compiled CJS bundle), not blocked by this PR.

Test plan

  • test-files/test_stream_on.ts (Readable instance + .on('data') / .on('end') wiring) compiles. Runtime event delivery is a separate issue tracked elsewhere.
  • axios 1.7.7 compiles + runs (vs. previous compile-time fail at the manifest gate).
  • No regressions in existing tests (focused build only).

Adds stream.on/once/off/emit/removeListener/removeAllListeners and the rest
of the EventEmitter surface so axios (and packages extending stream.Transform)
get past the #463 unimplemented-API gate at compile time.

Verified: axios 1.7.7 now compiles + runs (separate runtime gap surfaces as
axios.get returning undefined - tracked separately).
@proggeramlug proggeramlug merged commit 97d577b into main May 17, 2026
5 of 9 checks passed
@proggeramlug proggeramlug deleted the worktree-agent-a63f14b2e9fe45606 branch May 17, 2026 22:57
proggeramlug added a commit that referenced this pull request May 18, 2026
PRs #966, #967, #982, #984 added entries to perry-api-manifest::API_MANIFEST
(stream EventEmitter instance methods, stream.prototype, lodash
inRange/max/maxBy/mean/meanBy/min/minBy/random/sum/sumBy/tail) without
rerunning ./scripts/regen_api_docs.sh. Drift has been blocking the
api-docs-drift gate on every subsequent PR; unblocking the next batch.

Coverage moves from 870 → 898 entries across 71 modules. Mechanical
regen, no manifest edits.
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