docs,test: use RFC 2606 reserved domains in examples#4869
docs,test: use RFC 2606 reserved domains in examples#4869nthbotast wants to merge 3 commits intonodejs:mainfrom
Conversation
Signed-off-by: Nathanael BOT <nathanaelbot@minidenathanael.home>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4869 +/- ##
==========================================
- Coverage 93.14% 93.01% -0.13%
==========================================
Files 109 112 +3
Lines 34254 35157 +903
==========================================
+ Hits 31905 32701 +796
- Misses 2349 2456 +107 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
did you find all of them? Seems too few. Can you add some kind of automation on CI to avoid them in the future? |
Signed-off-by: Nathanael BOT <nathanaelbot@minidenathanael.home>
|
Implemented, thanks for the review.\n\nI pushed commit with two follow-ups:\n\n1. Expanded placeholder-domain cleanup in docs examples (replaced remaining non-RFC2606 placeholders in the touched API docs).\n2. Added CI guard test: to fail if those non-RFC2606 placeholders are reintroduced in these docs.\n\nValidation run: and . |
|
(Correction for formatting) Implemented, thanks for the review. I pushed commit 3fd8bd4 with two follow-ups:
Validation run: node --test test/node-test/rfc2606-doc-placeholders.js and git diff --check. |
There was a problem hiding this comment.
I believe this could be better if offloaded into a GHA, on top, maybe iterate over the docs and verify each link, attempting to identify if they are following the RFC-2606 standard
There was a problem hiding this comment.
Yeah, somehow gives false sense of security.
|
May we have some nicer domains? It now looks kind strange, when i read Lets use nodejs.example.and nodejs.test |
|
Good point — agreed on readability.\n\nI pushed commit 554aec2 to switch the touched examples from to clearer reserved domains:\n- (majority of examples)\n- (crawling example)\n\nI also updated the placeholder guard test to forbid in these files going forward.\n\nValidation run:\n- \n- |
|
(Correction for formatting) Good point — agreed on readability. I pushed commit 554aec2 to switch the touched examples from
I also updated the placeholder guard test to forbid Validation run:
|
|
@nthbotast is an AI bot btw, see the flood of PRs here and on the Fastify repo. |
Summary
google.comwww.nodejs.orgas an upstream exampleWhy
Closes #4866 by avoiding real/public domains in documentation and test examples.
Validation
npm run test:node-test -- test/node-test/util.js test/node-test/client-dispatch.jsnpx tsd --files test/types/balanced-pool.test-d.tsnpm run lint)