From 8eef50c27a55f9701b37f9befb1fa01d939bd956 Mon Sep 17 00:00:00 2001 From: avivkeller Date: Fri, 26 Jun 2026 14:52:29 -0400 Subject: [PATCH] build: allow linting node.1 --- Makefile | 36 +++++++++++++++++++++++++++++++++++- doc/node.1 | 6 ++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 961682e607272c..1cf8e499e1e743 100644 --- a/Makefile +++ b/Makefile @@ -932,6 +932,19 @@ out/doc/apilinks.json: $(wildcard lib/*.js) tools/doc/node_modules | out/doc ) \ fi +doc/node.1: doc/api/cli.md tools/doc/node_modules + @if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \ + echo "Skipping $@ (no crypto and/or no ICU)"; \ + else \ + $(call available-node, \ + $(DOC_KIT) generate \ + -t man-page \ + -i $< \ + -o $(@D) \ + -v $(VERSION) \ + ) \ + fi + .PHONY: docopen docopen: doc-only ## Open the documentation in a web browser. @$(PYTHON) -mwebbrowser file://$(abspath $<) @@ -1480,8 +1493,29 @@ tools/.mdlintstamp: tools/lint-md/node_modules/remark-parse/package.json $(LINT_ @$(call available-node,$(run-lint-md)) @touch $@ +tools/.manpagelintstamp: doc/api/cli.md tools/doc/node_modules + $(info Verifying that doc/node.1 is up to date...) + @if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \ + echo "Skipping doc/node.1 verification (no crypto and/or no ICU)"; \ + else \ + $(RM) -r out/doc/.manpagecheck && \ + mkdir -p out/doc/.manpagecheck && \ + $(call available-node, \ + $(DOC_KIT) generate \ + -t man-page \ + -i doc/api/cli.md \ + -o out/doc/.manpagecheck \ + -v $(VERSION) \ + ) \ + if ! diff -u doc/node.1 out/doc/.manpagecheck/node.1; then \ + echo 'doc/node.1 is out of date; run `make doc/node.1` to regenerate it.'; \ + exit 1; \ + fi; \ + fi + @touch $@ + .PHONY: lint-md -lint-md: lint-js-doc | tools/.mdlintstamp ## Lint the markdown documents maintained by us in the codebase. +lint-md: lint-js-doc | tools/.mdlintstamp tools/.manpagelintstamp ## Lint the markdown documents maintained by us in the codebase. run-format-md = tools/lint-md/lint-md.mjs --format $(LINT_MD_FILES) .PHONY: format-md diff --git a/doc/node.1 b/doc/node.1 index 1bfc09a5934885..9a9016f024026a 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -745,6 +745,10 @@ Enable experimental \fBimport.meta.resolve()\fR parent URL support, which allows passing a second \fBparentURL\fR argument for contextual resolution. Previously gated the entire \fBimport.meta.resolve\fR feature. . +.It Fl -experimental-import-text +Enable experimental support for importing modules with +\fBwith { type: 'text' }\fR. +. .It Fl -experimental-inspector-network-resource Enable experimental support for inspector network resources. . @@ -1958,6 +1962,8 @@ one is included in the list below. .It \fB--experimental-import-meta-resolve\fR .It +\fB--experimental-import-text\fR +.It \fB--experimental-json-modules\fR .It \fB--experimental-loader\fR