feat(api): decoupled docs parsing - #2728
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2728 +/- ##
==========================================
- Coverage 68.83% 66.04% -2.79%
==========================================
Files 119 117 -2
Lines 1325 1334 +9
Branches 332 334 +2
==========================================
- Hits 912 881 -31
- Misses 379 417 +38
- Partials 34 36 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
Please find a preview at: https://staging.nodejs.dev/2728/ |
Co-authored-by: Michael Esteban <mickel13@gmail.com>
|
LGTM! I just had a question. How will we decide when to run the upcoming Github Action to update the files? I think GitHub Actions supports triggering actions cross repository... So are we planning to use that, or does it has to be manual? |
|
That’s a good point! We could have a CRON scheduler or just do this inter repo triggers (need to check the docs) |
We had a similar issue previously as well where we were planning to use the repository-dispatch action (See #1538 (comment)) Maybe we can keep it for a next PR |
repository_dispatch would require |
|
@manishprivet @benhalverson kindly requesting a review here :) |

Description
This PR introduces a decoupled API synchronisation. Which allows the whole API docs to be written towards the file-system, instead of using cache.
It allows also for in the future for a GitHub Action to sync the API docs from time-to-time, reduces the build-generation and finally allows Internationalisation of the API docs.
Future changes
api.tsxto attempt to get the version of the doc for the current language or fallback to the default language.Related changes
util-nodeto the root of the repositoryscriptsfolderRelated Issues
Closes https://github.com/nodejs/nodejs.dev/issues/2719
Check List
npm run lint:js -- --fixand/ornpm run lint:md -- --fixfor my JavaScript and/or Markdown changes.npm run testto check if all tests are passing, and/ornpm run test -- -uto update snapshots if I created and/or updated React Components.npm run buildwork fine.