-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
repl: Empty command should be sent to eval function #11871
Conversation
This fixes a regression introduced in nodejs#6171
Verified against
On current master, the 2nd |
🍏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a suggestion
|
||
process.on('exit', () => { | ||
assert(evalCalledWithExpectedArgs); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you don’t need for the process to exit, the eval callback should be called synchronousl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can simplify the test file, just wrote it this way to match the existing ones (cp test/parallel/test-repl-{eval,empty}.js
).
Depends on a prior semver-major commit. Marking do-not-land on lower versions. |
The `process.on("exit")` event handlers are unnecessary, so it’s okay to drop them. Ref: nodejs#11871
This fixes a regression introduced in nodejs#6171 PR-URL: nodejs#11871 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
The `process.on("exit")` event handlers are unnecessary, so it’s okay to drop them. PR-URL: #11946 Ref: #11871 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
This fixes a regression introduced in #6171
The command line debugger relies on the previous behavior. This adds a regression test and restores it.
Checklist
make -j4 test
passesAffected core subsystem(s)
repl