Skip to content

Conversation

@flakey5
Copy link
Member

@flakey5 flakey5 commented Mar 6, 2025

Switches over to using the new doc generation tooling. For more background on this, please see #52343

Currently a draft just to get feedback on the approach to this integration.

cc @nodejs/web-infra

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/nodejs-website
  • @nodejs/web-infra

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations. needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory. windows Issues and PRs related to the Windows platform. labels Mar 6, 2025
@flakey5 flakey5 marked this pull request as draft March 6, 2025 06:24
@flakey5 flakey5 force-pushed the flakey5/20250305/api-docs-tooling branch from 77ede22 to 3423c21 Compare March 6, 2025 06:29
@flakey5 flakey5 force-pushed the flakey5/20250305/api-docs-tooling branch from 3423c21 to 451f8a7 Compare March 6, 2025 06:31
Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@flakey5 I guess you also need to check our GitHub Action Workflows, and also other mentions of these files within the source.

Like within the Contributor Docs, there is a file that describes how the legacy API doc tooling works, and I believe there are other references also.

@flakey5 flakey5 force-pushed the flakey5/20250305/api-docs-tooling branch 3 times, most recently from cf2609b to a3ce99d Compare March 10, 2025 22:04
@flakey5 flakey5 marked this pull request as ready for review March 10, 2025 22:05
@flakey5
Copy link
Member Author

flakey5 commented Mar 10, 2025

lint-js-and-md is failing because of the linting errors since it exits with a non-zero status code if there's anything wrong with the docs. I think we should skip the REPLACEME checks for normal ci runs.

It also looks like synopsis.md fails the introduced_in check because it's not under the top-level header, should it be enforced that introduced_in goes under the top-level header or should we change it to just check that it exists somewhere in the file (like it was doing previously)?

@flakey5
Copy link
Member Author

flakey5 commented Mar 10, 2025

Also not sure what's going on with lint-addon-docs? cc @araujogui

@ovflowd
Copy link
Member

ovflowd commented Mar 10, 2025

lint-js-and-md is failing because of the linting errors since it exits with a non-zero status code if there's anything wrong with the docs. I think we should skip the REPLACEME checks for normal ci runs.

It also looks like synopsis.md fails the introduced_in check because it's not under the top-level header, should it be enforced that introduced_in goes under the top-level header or should we change it to just check that it exists somewhere in the file (like it was doing previously)?

REPLACEME shouldn't error, imo, just give a warning. Our linter should have warn and error levels.

And yes introduced_in must be top level!

@codecov
Copy link

codecov bot commented Mar 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.54%. Comparing base (6de0f0c) to head (b0ffd40).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #57343   +/-   ##
=======================================
  Coverage   88.53%   88.54%           
=======================================
  Files         703      703           
  Lines      208613   208613           
  Branches    40237    40240    +3     
=======================================
+ Hits       184697   184714   +17     
+ Misses      15915    15911    -4     
+ Partials     8001     7988   -13     

see 29 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@araujogui
Copy link
Member

lint-js-and-md is failing because of the linting errors since it exits with a non-zero status code if there's anything wrong with the docs. I think we should skip the REPLACEME checks for normal ci runs.

It also looks like synopsis.md fails the introduced_in check because it's not under the top-level header, should it be enforced that introduced_in goes under the top-level header or should we change it to just check that it exists somewhere in the file (like it was doing previously)?

Actually, the linter only returns 1 if there's an error-level issue, and I don't think that's the case here.

image

@araujogui
Copy link
Member

Also not sure what's going on with lint-addon-docs? cc @araujogui

I’m not sure either, but I’ll check it out.

@ovflowd
Copy link
Member

ovflowd commented Mar 12, 2025

@flakey5:

3:1-3:9   warning Use "the Node.js" instead of "Node.js'" prohibited-strings remark-lint
4:46-4:50 warning Use "Node.js" instead of "Node"         prohibited-strings remark-lint

On the README.md file you updated (tools/doc/README.md) after updating those can you run make format-md (?)

Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the result of many months of arduous work between many awesome folks, including @flakey5 @AugustinMauroy @araujogui @ovflowd @avivkeller and others.

I'm so proud of what we are achieving here and this is a huge step towards a modern tooling and a revamped API docs within Node.js

Approving, as I believe this is ready!

@ovflowd
Copy link
Member

ovflowd commented Mar 13, 2025

cc @nodejs/collaborators can we have another approval here? 🙏

Copy link
Member

@lpinca lpinca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RSLGTM because it is hard to review and outside of my comfort zone.

flakey5 and others added 17 commits December 30, 2025 18:29
Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com>
…ready

Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com>
Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com>
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com>
Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com>
@ovflowd
Copy link
Member

ovflowd commented Dec 30, 2025

@avivkeller have we added said tests? I just rebased with main and bumped the version of doc-kit here.

@ovflowd ovflowd force-pushed the flakey5/20250305/api-docs-tooling branch from c318315 to b0ffd40 Compare December 30, 2025 17:30
@avivkeller
Copy link
Member

We've added diffs for build to build, but I was under the impression that @aduh95 was going to add structural tests

@avivkeller avivkeller added commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. and removed windows Issues and PRs related to the Windows platform. labels Dec 30, 2025
@MrJithil MrJithil requested review from Copilot and removed request for aduh95 and joyeecheung December 30, 2025 17:35

This comment was marked as off-topic.

@ovflowd
Copy link
Member

ovflowd commented Dec 30, 2025

I'm confused... @MrJithil why did you request Copilot to review this PR? Just trying to understand what's your intent/goal with having Copilot reviewing these changes?

Also, @nodejs/tsc what's our stance of AI-based reviewing on nodejs/node?

Copy link

@Apakottur Apakottur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues and PRs related to build files or the CI. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. doc Issues and PRs related to the documentations. needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.