Merged
Conversation
72e8bf4 to
64cb26a
Compare
JLHwung
commented
Jan 17, 2020
| process.kill(process.pid, signal); | ||
| } else { | ||
| process.exit(code); | ||
| process.exitCode = code; |
Contributor
Author
There was a problem hiding this comment.
node.js will terminate when all exit listeners are executed, so we don't need to call process.exit again in the listener.
JLHwung
commented
Jan 17, 2020
| var filename = process.argv[2]; | ||
| if (!filename) { | ||
| console.error("no filename specified"); | ||
| process.exit(0); |
Contributor
Author
There was a problem hiding this comment.
process.exit(0) is unnecessary after refactor.
JLHwung
commented
Jan 17, 2020
| break; | ||
| } | ||
|
|
||
| process.exit(0); |
Contributor
Author
There was a problem hiding this comment.
This is rather a bug because when --check is provided, it will still exit after checking only "plugin" data. Removed after refactor. So it can continue checking corejs2-builtin-in after the first check succeeds.
kaicataldo
approved these changes
Jan 18, 2020
nicolo-ribaudo
approved these changes
Jan 19, 2020
This was referenced Feb 22, 2020
This was referenced Mar 7, 2020
This was referenced Mar 14, 2020
This was referenced Mar 25, 2020
This was referenced Apr 2, 2020
This was referenced Apr 9, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR includes commits from #11026.
Enabled
no-process-exitrule and fixed linting errors. Rationale: https://nodejs.org/api/process.html#process_process_exit_codeIn most case the synchronous
process.exit()is unnecessary, and it causes asynchronous IO operations terminated even when they are not fulfilled, e.g. writes tostdoutorstderr.In our codebase,
process.exit()is often used as top level return: It is straightforward to fix: wrap the statements into anelsebranch so we are not scheduling new tasks for the event loop.