-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
tools: doc: improve async workflow of generate.js #30106
Conversation
Use fs.promises for read and write file Use unified().process wich is async instead processSync html and json are write in parallel errors are logged and exit process with `1` code Fixes: #30090
Co-Authored-By: Michaël Zasso <[email protected]>
|
||
// Exit process with code 1 if some errors | ||
if (errors.length > 0) { | ||
return process.exit(1); |
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.
technically you don't need a return here :P
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 know, but I think it's more clear and concistent whith early return pattern (I don't know the real name)
Use fs.promises for read and write file Use unified().process wich is async instead processSync html and json are write in parallel errors are logged and exit process with `1` code Fixes: #30090 PR-URL: #30106 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]>
Landed in f035f55. Thanks for the PR! |
You welcome, I'm glad to contribute ^^ |
Use fs.promises for read and write file Use unified().process wich is async instead processSync html and json are write in parallel errors are logged and exit process with `1` code Fixes: #30090 PR-URL: #30106 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]>
Use fs.promises for read and write file Use unified().process wich is async instead processSync html and json are write in parallel errors are logged and exit process with `1` code Fixes: #30090 PR-URL: #30106 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]>
Use fs.promises for read and write file Use unified().process wich is async instead processSync html and json are write in parallel errors are logged and exit process with `1` code Fixes: #30090 PR-URL: #30106 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]>
Use fs.promises for read and write file Use unified().process wich is async instead processSync html and json are write in parallel errors are logged and exit process with `1` code Fixes: #30090 PR-URL: #30106 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]>
Use fs.promises for read and write file Use unified().process wich is async instead processSync html and json are write in parallel errors are logged and exit process with `1` code Fixes: #30090 PR-URL: #30106 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]>
Use fs.promises for read and write file
Use unified().process wich is async instead processSync
html and json are write in parallel
errors are logged and exit process with
1
codeFixes: #30090
Checklist
vcbuild test
(Windows) passesI'm behind a corporate proxy and get some network errors during the tests, so I hope tests passes with the CI.