Skip to content

test: add tests to ensure that node.1 is kept in sync with cli.md #58878

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

Merged

Conversation

dario-piotrowicz
Copy link
Member

add tests to make sure that the content of the doc/node.1 file is kept in snyc with the content of the doc/api/cli.md file (to make sure that when a flag or environment variable is added or removed to one, the same change is also applied to the other)

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Jun 28, 2025
Copy link

codecov bot commented Jun 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.11%. Comparing base (4d5ee24) to head (c3be698).
Report is 13 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #58878   +/-   ##
=======================================
  Coverage   90.10%   90.11%           
=======================================
  Files         640      640           
  Lines      188493   188426   -67     
  Branches    36971    36960   -11     
=======================================
- Hits       169843   169793   -50     
+ Misses      11358    11332   -26     
- Partials     7292     7301    +9     

see 31 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.

@dario-piotrowicz dario-piotrowicz force-pushed the dario/node.1-cli-sync-tests branch 4 times, most recently from 436ee86 to f9bf6f8 Compare June 28, 2025 23:05
add tests to make sure that the content of the doc/node.1 file
is kept in snyc with the content of the doc/api/cli.md file
(to make sure that when a flag or environment variable is added
or removed to one, the same change is also applied to the other)
@dario-piotrowicz dario-piotrowicz force-pushed the dario/node.1-cli-sync-tests branch from f9bf6f8 to 31315b2 Compare June 28, 2025 23:27
@nodejs-github-bot

This comment was marked as outdated.

Co-authored-by: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
@dario-piotrowicz dario-piotrowicz added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Jun 29, 2025
@dario-piotrowicz
Copy link
Member Author

@VoltrexKeyva, suggestions accepted, thanks for having a look at the PR 🫶

Regarding non-capturing groups, I did accept the suggestions anyways I wanted to mention that I generally purposely avoid adding the ?:s unless actually necessary since they, in my opinion, add extra noise to regexes, which are already generally hard to read on their own (I appreciate that with ?: you're clearly indicating that you don't care about capturing the content inside that group, however I don't know if that is worth the extra (although small) complexity/noise 🤔 )

@nodejs-github-bot
Copy link
Collaborator

'experimental-require-module',
'experimental-sea-config',
'experimental-worker-inspection',
'expose-gc',
Copy link
Member

Choose a reason for hiding this comment

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

This is the only one I'm not sure about adding to node.1. The rest should be fine tho.

Copy link
Member Author

Choose a reason for hiding this comment

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

what's the rationale about wanting the flag in the CLI docs but not in the manpage? 🤔

Copy link
Member

Choose a reason for hiding this comment

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

expose-gc is actually a v8 provided flag and we typically do not document them. I can't remember the rationale for why we added it to the CLI docs.

Copy link
Member Author

@dario-piotrowicz dario-piotrowicz Jun 29, 2025

Choose a reason for hiding this comment

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

The documentation was added in #53078

It seems like you and Joyee requested the doc's removal, but only part of it was actually removed? 🤔

(although Joyee's next suggestion makes it sound like they were ok with the docs after all?... 🤔)

Anyways, it looks likely that the docs for the flag were just added by mistake, what do you think?
I can open a PR removing the flag from the docs and see what people say?

@dario-piotrowicz dario-piotrowicz added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 29, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 29, 2025
@nodejs-github-bot
Copy link
Collaborator

@dario-piotrowicz
Copy link
Member Author

@jasnell Issues added for the missing env variables and options 🙂

I've also linked those in the code comments 👍

By the way, I put my name in the TODO comments as I am happy to look into adding those, however the issues also seems like nice potential good first issues (and we only have a few of those), what do you think? maybe it'd be better to remove my name from the TODO comments, add the good first issue label to the issues? 🤔

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Jun 30, 2025

@jasnell
Copy link
Member

jasnell commented Jun 30, 2025

Add your name to the todo comments isn't really claiming them but providing a pointer for someone who may want to tackle those todos later... it basically identifies who to go ask about it :-)

@jasnell jasnell added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 30, 2025
@atlowChemi atlowChemi added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 30, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 30, 2025
@nodejs-github-bot nodejs-github-bot merged commit 4b4aaf9 into nodejs:main Jun 30, 2025
60 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 4b4aaf9

@dario-piotrowicz dario-piotrowicz deleted the dario/node.1-cli-sync-tests branch June 30, 2025 21:24
targos pushed a commit that referenced this pull request Jul 3, 2025
add tests to make sure that the content of the doc/node.1 file
is kept in snyc with the content of the doc/api/cli.md file
(to make sure that when a flag or environment variable is added
or removed to one, the same change is also applied to the other)

PR-URL: #58878
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants