Skip to content

Conversation

@ChALkeR
Copy link
Member

@ChALkeR ChALkeR commented Nov 2, 2025

Fixes: #60507
Regression from: #58283

Since #58283, readline is not compatible with EventEmitter.on (and readline own async iterator)
It throws on attempting to .resume the stream after it was closed, which was what EventEmitter.on was doing

Another option is to make .resume a noop in closed state instead of throwing

@nodejs-github-bot nodejs-github-bot added events Issues and PRs related to the events subsystem / EventEmitter. needs-ci PRs that need a full CI run. labels Nov 2, 2025
@ChALkeR ChALkeR changed the title events: don't call resume after close events: don't call resume after close (fix readline regression) Nov 2, 2025
@ChALkeR ChALkeR marked this pull request as ready for review November 3, 2025 13:11
@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.52%. Comparing base (955d347) to head (8f2e714).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #60548      +/-   ##
==========================================
- Coverage   88.52%   88.52%   -0.01%     
==========================================
  Files         704      704              
  Lines      208802   208884      +82     
  Branches    40318    40335      +17     
==========================================
+ Hits       184842   184906      +64     
- Misses      15947    15972      +25     
+ Partials     8013     8006       -7     
Files with missing lines Coverage Δ
lib/events.js 99.83% <100.00%> (+<0.01%) ⬆️

... and 41 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ChALkeR
Copy link
Member Author

ChALkeR commented Jan 18, 2026

Rebased

@ChALkeR
Copy link
Member Author

ChALkeR commented Jan 18, 2026

cc @jasnell @lpinca @dario-piotrowicz Can this get a review pls?
Ecosystem is already landing hacks to work-around the bug (see linked references of #60507)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

events Issues and PRs related to the events subsystem / EventEmitter. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

readline regression since v24.2.0 on >= 1026 lines in input

2 participants