-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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/versions.js should cache version data #32512
Comments
Hey @rvagg, Do you think that the following flow makes sense:
|
Maybe simpler than that, this will be in a clean repo (in the Unless someone thinks otherwise? Using https://nodejs.org/download/release/index.json is another option, which would be easy to process, but I guess the reason we use CHANGELOG.md is that we always have a local copy if this needs to be done in offline mode. We just don't have a local |
Acknowledged. Here is my approach in versions.js
the What do you think |
…ons.js When running `make doc` the CHANGELOG.md file is pulled everytime for each of the doc file that requires the versions list. This commit introduces a new file called `.master-CHANGELOG.md` which will be created once so that subsequent calls for the version are pulled locally instead of from the repo. Since this file is not part of the codebase proper, it is appended in the .gitignore file. References Issue nodejs#32512
I've had some half finished code to address this for awhile (started since #31849 (review)). Tidied up today (using up work vacation today so had time) and submitted as #32518. |
Refactor the logic for working out the previous versions of Node.js for the API documentation so that the parsing (including the potential https get) happens at most once per build (as opposed to the current once per generated API doc). Signed-off-by: Richard Lau <[email protected]> PR-URL: #32518 Fixes: #32512 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Myles Borins <[email protected]>
Refactor the logic for working out the previous versions of Node.js for the API documentation so that the parsing (including the potential https get) happens at most once per build (as opposed to the current once per generated API doc). Signed-off-by: Richard Lau <[email protected]> PR-URL: #32518 Fixes: #32512 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Myles Borins <[email protected]>
Refactor the logic for working out the previous versions of Node.js for the API documentation so that the parsing (including the potential https get) happens at most once per build (as opposed to the current once per generated API doc). Signed-off-by: Richard Lau <[email protected]> PR-URL: #32518 Fixes: #32512 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Myles Borins <[email protected]>
Refactor the logic for working out the previous versions of Node.js for the API documentation so that the parsing (including the potential https get) happens at most once per build (as opposed to the current once per generated API doc). Signed-off-by: Richard Lau <[email protected]> Backport-PR-URL: nodejs#32642 PR-URL: nodejs#32518 Fixes: nodejs#32512 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Myles Borins <[email protected]>
Refactor the logic for working out the previous versions of Node.js for the API documentation so that the parsing (including the potential https get) happens at most once per build (as opposed to the current once per generated API doc). Signed-off-by: Richard Lau <[email protected]> Backport-PR-URL: #32642 PR-URL: #32518 Fixes: #32512 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Myles Borins <[email protected]>
make doc
forces a version fetch which fetches the CHANGELOG.md from this repo. This is done for each of the doc files that requires the versions list (because they are run one at a time). We should have caching in place so that the first one saves the data somewhere and subsequent runs just pick that it up. For speed, and also to save our CI hammering GitHub each time this is run.Ref: #32511
The text was updated successfully, but these errors were encountered: