-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
build, doc: use new api doc tooling #57343
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
base: main
Are you sure you want to change the base?
Conversation
Review requested:
|
77ede22
to
3423c21
Compare
3423c21
to
451f8a7
Compare
There was a problem hiding this 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.
cf2609b
to
a3ce99d
Compare
It also looks like |
Also not sure what's going on with |
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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #57343 +/- ##
==========================================
- Coverage 90.22% 90.14% -0.08%
==========================================
Files 635 633 -2
Lines 187313 187004 -309
Branches 36784 36676 -108
==========================================
- Hits 168998 168576 -422
- Misses 11080 11258 +178
+ Partials 7235 7170 -65 🚀 New features to boost your workflow:
|
I’m not sure either, but I’ll check it out. |
On the README.md file you updated ( |
There was a problem hiding this 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!
cc @nodejs/collaborators can we have another approval here? 🙏 |
There was a problem hiding this 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.
@avivkeller I can see that, it's in the diff; what's not in the diff is why is it like that, how to fix it, etc. |
Switches over to using the new doc generation tooling. For more background on this, please see nodejs#52343 Signed-off-by: flakey5 <[email protected]> Co-authored-by: Claudio W <[email protected]> Co-authored-by: avivkeller <[email protected]> Co-authored-by: Antoine du Hamel <[email protected]>
1e6e74f
to
92015b5
Compare
Signed-off-by: flakey5 <[email protected]>
Signed-off-by: flakey5 <[email protected]>
Apologizes for the delay, got a bit busy
This should be fixed now
The old tooling intakes each source file individually, whereas Regardless, the performance isn't amazing and is something we're looking into |
Co-authored-by: Antoine du Hamel <[email protected]>
Makefile
Outdated
--ignore $(skip_apidoc_files) \ | ||
-o out/doc/api/ \ | ||
--no-lint \ | ||
-c file://$(PWD)/CHANGELOG.md \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-c file://$(PWD)/CHANGELOG.md \ | |
-c $(call available-node, -p 'url.pathToFileURL("CHANGELOG.md")') \ |
Makefile
Outdated
$(call available-node, \ | ||
$(NPX) --prefix tools/doc api-docs-tooling generate \ | ||
-t legacy-html-all legacy-json-all api-links \ | ||
-i doc/api/*.md \ | ||
-i lib/*.js \ | ||
--ignore $(skip_apidoc_files) \ | ||
-o out/doc/api/ \ | ||
--no-lint \ | ||
-c file://$(PWD)/CHANGELOG.md \ | ||
-v $(VERSION) \ | ||
-p $(DOC_THREADS) \ | ||
) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it'd be better to let Make handle the caching and the parallelism – it would also decrease the maintenance burden of maintaining slightly different commands
$(call available-node, \ | |
$(NPX) --prefix tools/doc api-docs-tooling generate \ | |
-t legacy-html-all legacy-json-all api-links \ | |
-i doc/api/*.md \ | |
-i lib/*.js \ | |
--ignore $(skip_apidoc_files) \ | |
-o out/doc/api/ \ | |
--no-lint \ | |
-c file://$(PWD)/CHANGELOG.md \ | |
-v $(VERSION) \ | |
-p $(DOC_THREADS) \ | |
) \ | |
$(MAKE) $(apidocs_html) $(apidocs_json) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm generally -1 on this since the new tooling is designed to support handling all the files at once, but I'm either or atp. Wdyt @ovflowd?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im not sure what is being requested here, but in general we want to generate all files…. But we should still support users that want to generate just one file or a set of files, not sure if that’s what is being suggested here. Im also not sure parallelism is a good idea 🤔 not sure the old tooling even did that, I don’t think so, but I might be wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in general we want to generate all files…. But we should still support users that want to generate just one file or a set of files
The current setup allows for this, but the question was more for when we're generating all files, do we want to run the tooling separately for each file vs passing them all into the -i
flag
Co-authored-by: Antoine du Hamel <[email protected]>
Signed-off-by: flakey5 <[email protected]>
Signed-off-by: flakey5 <[email protected]>
Hmmm |
Signed-off-by: flakey5 <[email protected]>
The fix would be to have the tooling take a path rather than a URL |
Re nodejs/node#57343 (comment) Signed-off-by: flakey5 <[email protected]>
Re nodejs/node#57343 (comment) Signed-off-by: flakey5 <[email protected]>
Re nodejs/node#57343 (comment) Signed-off-by: flakey5 <[email protected]>
Re nodejs/node#57343 (comment) Signed-off-by: flakey5 <[email protected]>
Signed-off-by: flakey5 <[email protected]>
Signed-off-by: flakey5 <[email protected]>
apidocs_json = $(addprefix out/,$(apidoc_sources:.md=.json)) | ||
|
||
apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*))) | ||
run-npm-ci = $(PWD)/$(NPM) ci |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probably get faster download times if we only install production dependencies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.
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