Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

@tpoisseau
Copy link
Contributor

tpoisseau commented Oct 24, 2019

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

Checklist

I'm behind a corporate proxy and get some network errors during the tests, so I hope tests passes with the CI.

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
@targos
targos approved these changes Oct 24, 2019
tools/doc/generate.js Outdated Show resolved Hide resolved
tools/doc/generate.js Outdated Show resolved Hide resolved
@targos

This comment has been minimized.

Copy link
Member

targos commented Oct 24, 2019

Co-Authored-By: Michaël Zasso <targos@protonmail.com>

// Exit process with code 1 if some errors
if (errors.length > 0) {
return process.exit(1);

This comment has been minimized.

Copy link
@devsnek

devsnek Oct 24, 2019

Member

technically you don't need a return here :P

This comment has been minimized.

Copy link
@tpoisseau

tpoisseau Oct 24, 2019

Author Contributor

I know, but I think it's more clear and concistent whith early return pattern (I don't know the real name)

@ZYSzys
ZYSzys approved these changes Oct 25, 2019
@targos targos added the author ready label Oct 25, 2019
targos added a commit that referenced this pull request Oct 27, 2019
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 <targos@protonmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
@targos

This comment has been minimized.

Copy link
Member

targos commented Oct 27, 2019

Landed in f035f55. Thanks for the PR!

@targos targos closed this Oct 27, 2019
@tpoisseau

This comment has been minimized.

Copy link
Contributor Author

tpoisseau commented Oct 27, 2019

You welcome, I'm glad to contribute ^^

targos added a commit that referenced this pull request Oct 28, 2019
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 <targos@protonmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
@targos targos mentioned this pull request Nov 5, 2019
targos added a commit that referenced this pull request Nov 8, 2019
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 <targos@protonmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
targos added a commit that referenced this pull request Nov 10, 2019
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 <targos@protonmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
targos added a commit that referenced this pull request Nov 10, 2019
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 <targos@protonmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
targos added a commit that referenced this pull request Nov 11, 2019
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 <targos@protonmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.