Skip to content

Commit

Permalink
build: add skip_apidoc_files and include QUIC
Browse files Browse the repository at this point in the history
PR-URL: #56941
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
  • Loading branch information
RafaelGSS authored and targos committed Feb 25, 2025
1 parent 46df14d commit fec2d50
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 12 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,9 @@ test-v8 test-v8-intl test-v8-benchmarks test-v8-all:
endif

apidoc_dirs = out/doc out/doc/api out/doc/api/assets
apidoc_sources = $(wildcard doc/api/*.md)
skip_apidoc_files = doc/api/quic.md

apidoc_sources = $(filter-out $(skip_apidoc_files), $(wildcard doc/api/*.md))
apidocs_html = $(addprefix out/,$(apidoc_sources:.md=.html))
apidocs_json = $(addprefix out/,$(apidoc_sources:.md=.json))

Expand Down
9 changes: 0 additions & 9 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -998,14 +998,6 @@ If the ES module being `require()`'d contains top-level `await`, this flag
allows Node.js to evaluate the module, try to locate the
top-level awaits, and print their location to help users find them.

### `--experimental-quic`

<!--
added: v23.8.0
-->

Enables the experimental `node:quic` built-in module.

### `--experimental-require-module`

<!-- YAML
Expand Down Expand Up @@ -3175,7 +3167,6 @@ one is included in the list below.
* `--experimental-modules`
* `--experimental-permission`
* `--experimental-print-required-tla`
* `--experimental-quic`
* `--experimental-require-module`
* `--experimental-shadow-realm`
* `--experimental-specifier-resolution`
Expand Down
4 changes: 4 additions & 0 deletions doc/contributing/internal-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ application usage.

Enables debugging of `ArrayBuffer` allocations.

#### `--experimental-quic`

Enable QUIC Protocol (under development)

#### `--expose-internals`

Allows the usage of `internal/*` modules, granting access to internal Node.js functionality.
Expand Down
2 changes: 1 addition & 1 deletion src/node_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
kAllowedInEnvvar,
true);
AddOption("--experimental-quic",
"experimental QUIC API",
"" /* undocumented until its development */,
&EnvironmentOptions::experimental_quic,
kAllowedInEnvvar);
AddOption("--experimental-webstorage",
Expand Down
2 changes: 2 additions & 0 deletions test/doctool/test-make-doc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ const expectedJsons = linkedHtmls
.map((name) => name.replace('.html', '.json'));
const expectedDocs = linkedHtmls.concat(expectedJsons);
const renamedDocs = ['policy.json', 'policy.html'];
const skipedDocs = ['quic.json', 'quic.html'];

// Test that all the relative links in the TOC match to the actual documents.
for (const expectedDoc of expectedDocs) {
if (skipedDocs.includes(expectedDoc)) continue;
assert.ok(actualDocs.includes(expectedDoc), `${expectedDoc} does not exist`);
}

Expand Down
3 changes: 2 additions & 1 deletion test/parallel/test-cli-node-options-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ for (const [, envVar, config] of nodeOptionsCC.matchAll(addOptionRE)) {
}

// NODE_OPTIONS
if (isInNodeOption && !hasTrueAsDefaultValue && new RegExp(`\`${envVar}\``).test(nodeOptionsText) === false) {
if (isInNodeOption && !hasTrueAsDefaultValue &&
new RegExp(`\`${envVar}\``).test(nodeOptionsText) === false) {
assert(false, `Should have option ${envVar} in NODE_OPTIONS documented`);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ assert(undocumented.delete('--verify-base-objects'));
assert(undocumented.delete('--no-verify-base-objects'));
assert(undocumented.delete('--trace-promises'));
assert(undocumented.delete('--no-trace-promises'));
assert(undocumented.delete('--experimental-quic'));
assert(undocumented.delete('--no-experimental-quic'));

// Remove negated versions of the flags.
for (const flag of undocumented) {
Expand Down

0 comments on commit fec2d50

Please # to comment.