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

Draft because I need to add tests

Actual changes are ready though, PTAL

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.55%. Comparing base (dbe45b7) to head (9bedc04).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #60548      +/-   ##
==========================================
+ Coverage   88.54%   88.55%   +0.01%     
==========================================
  Files         704      704              
  Lines      207843   207879      +36     
  Branches    40044    40053       +9     
==========================================
+ Hits       184028   184083      +55     
+ Misses      15858    15845      -13     
+ Partials     7957     7951       -6     
Files with missing lines Coverage Δ
lib/events.js 99.83% <100.00%> (+<0.01%) ⬆️

... and 33 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.

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