You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tools/doc/versions.js should cache version data #32512
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.
Maybe simpler than that, this will be in a clean repo (in the git clean -fdx sense) and this file can be added to .gitignore so it could be in the top level, .master_CHANGELOG.md or something like that. If it exists, use it, if it doesn't exist, fetch it. I don't think there's a good reason to do any timestamping on this.
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 master copy unless we're actually running on master, which will lead to a truncated version list.
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.
Activity
hassaanp commentedon Mar 27, 2020
Hey @rvagg,
Do you think that the following flow makes sense:
timestamp-CHANGELOG.mdtimestamp-CHANGELOG.md exists locally and use that otherwise repeat step 2rvagg commentedon Mar 27, 2020
Maybe simpler than that, this will be in a clean repo (in the
git clean -fdxsense) and this file can be added to .gitignore so it could be in the top level,.master_CHANGELOG.mdor something like that. If it exists, use it, if it doesn't exist, fetch it. I don't think there's a good reason to do any timestamping on this.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
mastercopy unless we're actually running on master, which will lead to a truncated version list.hassaanp commentedon Mar 27, 2020
Acknowledged.
Here is my approach in versions.js
the
createMasterChangeloguses writeFileSync to create the.master-CHANGELOG.mdWhat do you think
doc, tools: added caching support for CHANGELOG.md in tools/doc/versi…
richardlau commentedon Mar 27, 2020
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.
tools: only fetch previous versions when necessary
tools: only fetch previous versions when necessary
tools: only fetch previous versions when necessary
tools: only fetch previous versions when necessary
tools: only fetch previous versions when necessary