Skip to content

fix(react): include depth-4 headings in the table of contents - #1115

Open
btea wants to merge 1 commit into
nodejs:mainfrom
btea:fix/toc-heading-depth
Open

btea wants to merge 1 commit into
nodejs:mainfrom
btea:fix/toc-heading-depth

Conversation

@btea

@btea btea commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

Modules documenting class methods at heading depth 4 (e.g., diagnostics_channel, fs, http2) had those methods missing from the sidebar ToC, because extractHeadings capped headings at depth 3.

before after
image image

Validation

Related Issues

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run node --run test and all tests passed.
  • I have check code formatting with node --run format:check & node --run lint.
  • I've covered new added functionality with unit tests if necessary.

@vercel

vercel Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
api-docs-tooling Ready Ready Preview Sep 29, 2026 2:45am UTC

Request Review

@btea
btea marked this pull request as ready for review September 29, 2026 02:44
@btea
btea requested a review from a team as a code owner September 29, 2026 02:44
@codecov

codecov Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.39%. Comparing base (6c484cb) to head (8151b3f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1115   +/-   ##
=======================================
  Coverage   91.38%   91.39%           
=======================================
  Files         249      249           
  Lines       23253    23276   +23     
  Branches     2244     2247    +3     
=======================================
+ Hits        21250    21273   +23     
  Misses       1994     1994           
  Partials        9        9           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown
Contributor

api-links Generator

Output: 1 file differs

apilinks.json
Expected values to be strictly deep-equal:
+ actual - expected
... Skipped lines

  {
    'Agent.defaultMaxSockets': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L300',
    'Buffer.alloc': 'https://github.com/{repository}/blob/HEAD/lib/buffer.js#L454',
    'Buffer.allocUnsafe': 'https://github.com/{repository}/blob/HEAD/lib/buffer.js#L473',
    'Buffer.allocUnsafeSlow': 'https://github.com/{repository}/blob/HEAD/lib/buffer.js#L496',
...
    'agent.addRequest': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L365',
+   'agent.createConnection': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L304',
-   'agent.createConnection': 'https://github.com/{repository}/blob/HEAD/lib/https.js#L354',
    'agent.createSocket': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L446',
    'agent.destroy': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L679',
+   'agent.getName': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L334',
+   'agent.keepSocketAlive': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L635',
-   'agent.getName': 'https://github.com/{repository}/blob/HEAD/lib/https.js#L537',
-   'agent.keepSocketAlive': 'https://github.com/{repository}/blob/HEAD/lib/https.js#L506',
    'agent.removeSocket': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L574',
    'agent.reuseSocket': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L671',
    'assert.assert': 'https://github.com/{repository}/blob/HEAD/lib/assert.js#L185',
    'asyncResource.asyncId': 'https://github.com/{repository}/blob/HEAD/lib/async_hooks.js#L243',
    'asyncResource.bind': 'https://github.com/{repository}/blob/HEAD/lib/async_hooks.js#L275',
...
    'server.address': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2776',
+   'server.close': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L697',
+   'server.closeAllConnections': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L707',
+   'server.closeIdleConnections': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L719',
-   'server.close': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2909',
-   'server.closeAllConnections': 'https://github.com/{repository}/blob/HEAD/lib/https.js#L125',
-   'server.closeIdleConnections': 'https://github.com/{repository}/blob/HEAD/lib/https.js#L127',
    'server.getConnections': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2871',
    'server.listen': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2566',
    'server.ref': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L3023',
+   'server.setTimeout': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L735',
-   'server.setTimeout': 'https://github.com/{repository}/blob/HEAD/lib/https.js#L129',
    'server.unref': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L3032',
+   'server[SymbolAsyncDispose]': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L703',
-   'server[SymbolAsyncDispose]': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2950',
    'server[SymbolAsyncIterator]': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2957',
    'server[kDeserialize]': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2487',
    'server[kTransferList]': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2459',
    'server[kTransfer]': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2464',
+   'server[undefined]': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L742',
-   'server[undefined]': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2987',
    'serverresponse._finish': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L262',
    'serverresponse._implicitHeader': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L419',
    'serverresponse.assignSocket': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L312',
    'serverresponse.detachSocket': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L323',
    'serverresponse.statusCode': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L285',

Performance estimate (single CI run)

  • Generation time: 3.5% slower (1.42 s → 1.47 s)
  • Peak memory: 18.9% lower (440.25 MB → 356.89 MB)

json Generator

Performance estimate (single CI run)

  • Generation time: 44.9% slower (6.41 s → 9.29 s)
  • Peak memory: 2.1% lower (1.74 GB → 1.70 GB)

legacy-html Generator

Performance estimate (single CI run)

  • Generation time: 2.7% faster (42.69 s → 41.55 s)
  • Peak memory: 1.9% higher (2.34 GB → 2.39 GB)

legacy-json Generator

Performance estimate (single CI run)

  • Generation time: 10.0% slower (7.81 s → 8.59 s)
  • Peak memory: 7.0% lower (1.57 GB → 1.46 GB)

llms-txt Generator

Performance estimate (single CI run)

  • Generation time: 1.7% slower (7.61 s → 7.74 s)
  • Peak memory: 4.0% higher (1.52 GB → 1.59 GB)

orama-db Generator

Output size: 1 file changed · net +153.00 B

File size details
File Main PR Change
orama-db.json 9.54 MB 9.54 MB +153.00 B (+0.0%)

Performance estimate (single CI run)

  • Generation time: 3.4% faster (6.45 s → 6.23 s)
  • Peak memory: 8.8% lower (1.76 GB → 1.61 GB)

web Generator

Output size: 49 files changed · net +462.12 KB

File size details
File Main PR Change
all.html 32.97 MB 33.20 MB +231.06 KB (+0.7%)
http2.html 1.25 MB 1.28 MB +30.32 KB (+2.4%)
fs.html 2.21 MB 2.24 MB +26.36 KB (+1.2%)
n-api.html 1.00 MB 1.02 MB +22.52 KB (+2.2%)
quic.html 924.12 KB 946.34 KB +22.21 KB (+2.4%)
webstreams.html 535.38 KB 555.37 KB +19.99 KB (+3.7%)
webcrypto.html 640.93 KB 660.47 KB +19.54 KB (+3.0%)
diagnostics_channel.html 529.81 KB 540.33 KB +10.52 KB (+2.0%)
url.html 512.50 KB 521.63 KB +9.14 KB (+1.8%)
events.html 834.21 KB 841.78 KB +7.57 KB (+0.9%)
stream.html 1.22 MB 1.23 MB +6.94 KB (+0.6%)
v8.html 551.12 KB 557.02 KB +5.90 KB (+1.1%)
stream_iter.html 734.29 KB 740.04 KB +5.75 KB (+0.8%)
module.html 510.36 KB 515.31 KB +4.96 KB (+1.0%)
errors.html 530.83 KB 535.58 KB +4.75 KB (+0.9%)
inspector.html 214.37 KB 217.55 KB +3.18 KB (+1.5%)
test.html 1.36 MB 1.36 MB +2.76 KB (+0.2%)
crypto.html 1.96 MB 1.96 MB +2.40 KB (+0.1%)
readline.html 363.68 KB 365.77 KB +2.08 KB (+0.6%)
permissions.html 90.04 KB 91.79 KB +1.75 KB (+1.9%)
worker_threads.html 634.84 KB 636.49 KB +1.66 KB (+0.3%)
esm.html 187.11 KB 188.76 KB +1.64 KB (+0.9%)
single-executable-applications.html 159.44 KB 161.08 KB +1.64 KB (+1.0%)
repl.html 302.99 KB 304.51 KB +1.52 KB (+0.5%)
util.html 1.21 MB 1.21 MB +1.46 KB (+0.1%)
zlib.html 949.01 KB 950.25 KB +1.24 KB (+0.1%)
child_process.html 674.81 KB 675.96 KB +1.15 KB (+0.2%)
cli.html 631.57 KB 632.70 KB +1.13 KB (+0.2%)
modules.html 227.47 KB 228.51 KB +1.04 KB (+0.5%)
async_hooks.html 283.61 KB 284.49 KB +897.00 B (+0.3%)
dgram.html 299.77 KB 300.55 KB +800.00 B (+0.3%)
dtls.html 300.38 KB 301.12 KB +760.00 B (+0.2%)
debugger.html 143.46 KB 144.18 KB +742.00 B (+0.5%)
tracing.html 126.07 KB 126.79 KB +740.00 B (+0.6%)
environment_variables.html 37.69 KB 38.34 KB +666.00 B (+1.7%)
net.html 633.42 KB 634.07 KB +659.00 B (+0.1%)
report.html 231.42 KB 232.01 KB +610.00 B (+0.3%)
process.html 1.14 MB 1.14 MB +588.00 B (+0.0%)
buffer.html 1.75 MB 1.75 MB +486.00 B (+0.0%)
perf_hooks.html 866.72 KB 867.18 KB +471.00 B (+0.1%)
tls.html 523.79 KB 524.25 KB +466.00 B (+0.1%)
packages.html 218.57 KB 218.99 KB +436.00 B (+0.2%)
vfs.html 191.63 KB 192.03 KB +410.00 B (+0.2%)
os.html 164.88 KB 165.26 KB +384.00 B (+0.2%)
sqlite.html 520.05 KB 520.42 KB +380.00 B (+0.1%)
intl.html 56.42 KB 56.62 KB +202.00 B (+0.3%)
http.html 1.10 MB 1.10 MB +191.00 B (+0.0%)
https.html 240.53 KB 240.69 KB +165.00 B (+0.1%)
addons.html 379.19 KB 379.32 KB +142.00 B (+0.0%)

Performance estimate (single CI run)

  • Generation time: 2.0% faster (66.31 s → 64.97 s)
  • Peak memory: 1.1% lower (3.72 GB → 3.68 GB)

@ovflowd

ovflowd commented Sep 30, 2026

Copy link
Copy Markdown
Member

I'm unsure adding up to level 4 would be a good idea, it would definitely bloat the ToC no?

This branch was successfully deployed

1 active deployment
Preview – api-docs-tooling — 8151b3f7 Deployed Sep 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants