Skip to content

Commit a27b79f

Browse files
committed
Merge branch 'main' into doc-module-stst-indentation
2 parents 00e4597 + 6a3d358 commit a27b79f

File tree

408 files changed

+10964
-8996
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

408 files changed

+10964
-8996
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
/onboarding.md @nodejs/tsc
2424

2525
# nodejs.org website
26-
/doc/api_assets @nodejs/nodejs-website
27-
/doc/template.html @nodejs/nodejs-website
2826
/tools/doc @nodejs/web-infra
2927

3028
# streams

.github/workflows/tools.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ permissions:
5353
jobs:
5454
tools-deps-update:
5555
if: github.repository == 'nodejs/node' || github.event_name == 'workflow_dispatch'
56-
runs-on: ubuntu-slim
56+
# cannot use ubuntu-slim here because some update scripts require Docker
57+
runs-on: ubuntu-latest
5758
strategy:
5859
fail-fast: false # Prevent other jobs from aborting if one fails
5960
matrix:
@@ -120,6 +121,14 @@ jobs:
120121
run: |
121122
make corepack-update
122123
echo "NEW_VERSION=$(node deps/corepack/dist/corepack.js --version)" >> $GITHUB_ENV
124+
- id: doc-kit
125+
subsystem: tools
126+
label: tools
127+
run: |
128+
./tools/dep_updaters/update-doc.sh > temp-output
129+
cat temp-output
130+
tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
131+
rm temp-output
123132
- id: googletest
124133
subsystem: deps
125134
label: dependencies, test

Makefile

Lines changed: 55 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ V ?= 0
101101
# Use -e to double check in case it's a broken link
102102
available-node = \
103103
if [ -x '$(NODE)' ] && [ -e '$(NODE)' ]; then \
104-
'$(NODE)' $(1); \
104+
PATH='$(PWD)/out/$(BUILDTYPE):$$PATH' '$(NODE)' $(1); \
105105
elif [ -x `command -v node` ] && [ -e `command -v node` ] && [ `command -v node` ]; then \
106106
`command -v node` $(1); \
107107
else \
@@ -340,7 +340,6 @@ coverage-run-js: ## Run JavaScript tests with coverage.
340340
# This does not run tests of third-party libraries inside deps.
341341
test: all ## Run default tests, linters, and build docs.
342342
$(MAKE) -s tooltest
343-
$(MAKE) -s test-doc
344343
$(MAKE) -s build-addons
345344
$(MAKE) -s build-js-native-api-tests
346345
$(MAKE) -s build-node-api-tests
@@ -376,7 +375,7 @@ test-valgrind: all ## Run tests using valgrind.
376375
test-check-deopts: all
377376
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) --check-deopts parallel sequential
378377

379-
DOCBUILDSTAMP_PREREQS = tools/doc/addon-verify.mjs doc/api/addons.md
378+
DOCBUILDSTAMP_PREREQS = doc/api/addons.md
380379

381380
ifeq ($(OSTYPE),aix)
382381
DOCBUILDSTAMP_PREREQS := $(DOCBUILDSTAMP_PREREQS) out/$(BUILDTYPE)/node.exp
@@ -385,14 +384,22 @@ ifeq ($(OSTYPE),os400)
385384
DOCBUILDSTAMP_PREREQS := $(DOCBUILDSTAMP_PREREQS) out/$(BUILDTYPE)/node.exp
386385
endif
387386

387+
DOC_KIT ?= tools/doc/node_modules/@nodejs/doc-kit/bin/cli.mjs
388+
388389
node_use_openssl_and_icu = $(call available-node,"-p" \
389390
"process.versions.openssl != undefined && process.versions.icu != undefined")
390391
test/addons/.docbuildstamp: $(DOCBUILDSTAMP_PREREQS) tools/doc/node_modules
391392
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
392393
echo "Skipping .docbuildstamp (no crypto and/or no ICU)"; \
393394
else \
394395
$(RM) -r test/addons/??_*/; \
395-
[ -x '$(NODE)' ] && '$(NODE)' $< || node $< ; \
396+
$(call available-node, \
397+
$(DOC_KIT) generate \
398+
-t addon-verify \
399+
-i doc/api/addons.md \
400+
-o test/addons/ \
401+
--type-map doc/type-map.json \
402+
) \
396403
[ $$? -eq 0 ] && touch $@; \
397404
fi
398405

@@ -791,14 +798,14 @@ test-v8 test-v8-intl test-v8-benchmarks test-v8-all:
791798
$(warning Use the git repo instead: $$ git clone https://github.com/nodejs/node.git)
792799
endif
793800

794-
apidoc_dirs = out/doc out/doc/api out/doc/api/assets
801+
apidoc_dirs = out/doc out/doc/api
795802
skip_apidoc_files = doc/api/quic.md
796803

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

801-
apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
808+
run-npm-ci = $(PWD)/$(NPM) ci --omit=dev
802809

803810
tools/doc/node_modules: tools/doc/package.json
804811
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
@@ -807,14 +814,12 @@ tools/doc/node_modules: tools/doc/package.json
807814
cd tools/doc && $(call available-node,$(run-npm-ci)) \
808815
fi
809816

817+
RAWVER=$(shell $(PYTHON) tools/getnodeversion.py)
818+
VERSION=v$(RAWVER)
819+
810820
.PHONY: doc-only
811-
doc-only: tools/doc/node_modules \
812-
$(apidoc_dirs) $(apiassets) ## Build the docs with the local or the global Node.js binary.
813-
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
814-
echo "Skipping doc-only (no crypto and/or no ICU)"; \
815-
else \
816-
$(MAKE) out/doc/api/all.html out/doc/api/all.json out/doc/api/stability; \
817-
fi
821+
.NOTPARALLEL: doc-only
822+
doc-only: $(apidoc_dirs) $(apidocs_html) $(apidocs_json) out/doc/api/all.html out/doc/api/all.json out/doc/apilinks.json ## Builds the docs with the local or the global Node.js binary.
818823

819824
.PHONY: doc
820825
doc: $(NODE_EXE) doc-only ## Build Node.js, and then build the documentation with the new binary.
@@ -829,82 +834,60 @@ out/doc/api: doc/api
829834
mkdir -p $@
830835
cp -r doc/api out/doc
831836

832-
# If it's a source tarball, assets are already in doc/api/assets
833-
out/doc/api/assets:
834-
mkdir -p $@
835-
if [ -d doc/api/assets ]; then cp -r doc/api/assets out/doc/api; fi;
836-
837-
# If it's not a source tarball, we need to copy assets from doc/api_assets
838-
out/doc/api/assets/%: doc/api_assets/% | out/doc/api/assets
839-
@cp $< $@ ; $(RM) out/doc/api/assets/README.md
840-
841-
842-
run-npm-ci = '$(PWD)/$(NPM)' ci
843-
844-
LINK_DATA = out/doc/apilinks.json
845-
VERSIONS_DATA = out/previous-doc-versions.json
846-
gen-api = tools/doc/generate.mjs --node-version=$(FULLVERSION) \
847-
--apilinks=$(LINK_DATA) $< --output-directory=out/doc/api \
848-
--versions-file=$(VERSIONS_DATA)
849-
gen-apilink = tools/doc/apilinks.mjs $(LINK_DATA) $(wildcard lib/*.js)
850-
851-
$(LINK_DATA): $(wildcard lib/*.js) tools/doc/apilinks.mjs | out/doc
852-
$(call available-node, $(gen-apilink))
853-
854-
# Regenerate previous versions data if the current version changes
855-
$(VERSIONS_DATA): CHANGELOG.md src/node_version.h tools/doc/versions.mjs
856-
$(call available-node, tools/doc/versions.mjs $@)
857-
858-
node_use_icu = $(call available-node,"-p" "typeof Intl === 'object'")
859-
860-
out/doc/api/%.json out/doc/api/%.html: doc/api/%.md tools/doc/generate.mjs \
861-
tools/doc/markdown.mjs tools/doc/html.mjs tools/doc/json.mjs \
862-
tools/doc/apilinks.mjs $(VERSIONS_DATA) | $(LINK_DATA) out/doc/api
863-
@if [ "$(shell $(node_use_icu))" != "true" ]; then \
864-
echo "Skipping documentation generation (no ICU)"; \
865-
else \
866-
$(call available-node, $(gen-api)) \
867-
fi
868-
869-
out/doc/api/all.html: $(apidocs_html) tools/doc/allhtml.mjs \
870-
tools/doc/apilinks.mjs | out/doc/api
871-
@if [ "$(shell $(node_use_icu))" != "true" ]; then \
872-
echo "Skipping HTML single-page doc generation (no ICU)"; \
873-
else \
874-
$(call available-node, tools/doc/allhtml.mjs) \
875-
fi
876-
877-
out/doc/api/all.json: $(apidocs_json) tools/doc/alljson.mjs | out/doc/api
878-
@if [ "$(shell $(node_use_icu))" != "true" ]; then \
879-
echo "Skipping JSON single-file generation (no ICU)"; \
837+
# Generate all doc files (individual and all.html/all.json) in a single doc-kit call
838+
# Using grouped targets (&:) so Make knows one command produces all outputs
839+
ifeq ($(OSTYPE),aix)
840+
# TODO(@nodejs/web-infra): AIX is currently hanging during HTML minification
841+
$(apidocs_html) $(apidocs_json) out/doc/api/all.html out/doc/api/all.json:
842+
@echo "Skipping $@ (not currently supported by $(OSTYPE) machines)"
843+
else
844+
$(apidocs_html) $(apidocs_json) out/doc/api/all.html out/doc/api/all.json &: $(apidoc_sources) tools/doc/node_modules | out/doc/api
845+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
846+
echo "Skipping $@ (no crypto and/or no ICU)"; \
880847
else \
881-
$(call available-node, tools/doc/alljson.mjs) \
848+
$(call available-node, \
849+
$(DOC_KIT) generate \
850+
-t legacy-html-all \
851+
-t legacy-json-all \
852+
-i doc/api/*.md \
853+
--ignore $(skip_apidoc_files) \
854+
-o out/doc/api \
855+
-c ./CHANGELOG.md \
856+
-v $(VERSION) \
857+
--index doc/api/index.md \
858+
--type-map doc/type-map.json \
859+
) \
882860
fi
861+
endif
883862

884-
.PHONY: out/doc/api/stability
885-
out/doc/api/stability: out/doc/api/all.json tools/doc/stability.mjs | out/doc/api
886-
@if [ "$(shell $(node_use_icu))" != "true" ]; then \
887-
echo "Skipping stability indicator generation (no ICU)"; \
863+
out/doc/apilinks.json: $(wildcard lib/*.js) tools/doc/node_modules | out/doc
864+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
865+
echo "Skipping $@ (no crypto and/or no ICU)"; \
888866
else \
889-
$(call available-node, tools/doc/stability.mjs) \
867+
$(call available-node, \
868+
$(DOC_KIT) generate \
869+
-t api-links \
870+
-i lib/*.js \
871+
-o $(@D) \
872+
-c ./CHANGELOG.md \
873+
-v $(VERSION) \
874+
--type-map doc/type-map.json \
875+
) \
890876
fi
891877

892878
.PHONY: docopen
893-
docopen: out/doc/api/all.html ## Open the documentation in a web browser.
879+
docopen: doc-only ## Open the documentation in a web browser.
894880
@$(PYTHON) -mwebbrowser file://$(abspath $<)
895881

896882
.PHONY: docserve
897-
docserve: $(apidocs_html) $(apiassets) ## Serve the documentation on localhost:8000.
883+
docserve: doc-only ## Serve the documentation on localhost:8000.
898884
@$(PYTHON) -m http.server 8000 --bind 127.0.0.1 --directory out/doc/api
899885

900886
.PHONY: docclean
901887
.NOTPARALLEL: docclean
902888
docclean: ## Remove the generated documentation.
903889
$(RM) -r out/doc
904-
$(RM) "$(VERSIONS_DATA)"
905890

906-
RAWVER=$(shell $(PYTHON) tools/getnodeversion.py)
907-
VERSION=v$(RAWVER)
908891
CHANGELOG=doc/changelogs/CHANGELOG_V$(firstword $(subst ., ,$(RAWVER))).md
909892

910893
# For nightly builds, you must set DISTTYPE to "nightly", "next-nightly" or

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -889,15 +889,15 @@ releases on a rotation basis as outlined in the
889889
* [bengl](https://github.com/bengl) -
890890
**Bryan English** <<bryan@bryanenglish.com>> (he/him)
891891
* [HeroDevs](https://www.herodevs.com/)
892-
* [juanarbol](https://github.com/juanarbol) - OpenJSF handle: `juanarbol`
892+
* [juanarbol](https://github.com/juanarbol) - OpenJS Slack handle: `juanarbol`
893893
**Juan José Arboleda** <<soyjuanarbol@gmail.com>> (he/him)
894-
* [marco-ippolito](https://github.com/marco-ippolito) - OpenJSF handle: `Marco Ippolito`
894+
* [marco-ippolito](https://github.com/marco-ippolito) - OpenJS Slack handle: `Marco Ippolito`
895895
**Marco Ippolito** <<marcoippolito54@gmail.com>> (he/him)
896896
* [NodeSource](https://nodesource.com/)
897-
* [RafaelGSS](https://github.com/RafaelGSS) - OpenJSF handle: `RafaelGSS`
897+
* [RafaelGSS](https://github.com/RafaelGSS) - OpenJS Slack handle: `RafaelGSS`
898898
**Rafael Gonzaga** <<rafael.nunu@hotmail.com>> (he/him)
899899
* [Platformatic](https://platformatic.dev/)
900-
* [mcollina](https://github.com/mcollina) - OpenJSF handle: `mcollina`
900+
* [mcollina](https://github.com/mcollina) - OpenJS Slack handle: `mcollina`
901901
**Matteo Collina** <<matteo.collina@gmail.com>> (he/him)
902902
* [Red Hat](https://redhat.com) / [IBM](https://ibm.com)
903903
* [BethGriggs](https://github.com/BethGriggs) -

benchmark/fixtures/transform-types-benchmark.js

Lines changed: 0 additions & 28 deletions
This file was deleted.

benchmark/fixtures/transform-types-benchmark.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

benchmark/ts/transform-typescript.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

deps/npm/docs/content/commands/npm-ls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Note that nested packages will *also* show the paths to the specified packages.
2323
For example, running `npm ls promzard` in npm's source tree will show:
2424

2525
```bash
26-
npm@11.10.1 /path/to/npm
26+
npm@11.11.0 /path/to/npm
2727
└─┬ init-package-json@0.0.4
2828
└── promzard@0.1.5
2929
```

deps/npm/docs/content/commands/npm-trust.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,30 @@ npm trust gitlab [package] --file [--project|--repo|--repository] [--env|--envir
9494
| `--registry` | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. |
9595
| `--yes`, `-y` | null | null or Boolean | Automatically answer "yes" to any prompts that npm might print on the command line. |
9696

97+
### `npm trust circleci`
98+
99+
Create a trusted relationship between a package and CircleCI
100+
101+
#### Synopsis
102+
103+
```bash
104+
npm trust circleci [package] --org-id <uuid> --project-id <uuid> --pipeline-definition-id <uuid> --vcs-origin <origin> [--context-id <uuid>...] [-y|--yes]
105+
```
106+
107+
#### Flags
108+
109+
| Flag | Default | Type | Description |
110+
| --- | --- | --- | --- |
111+
| `--org-id` | null | String (required) | CircleCI organization UUID |
112+
| `--project-id` | null | String (required) | CircleCI project UUID |
113+
| `--pipeline-definition-id` | null | String (required) | CircleCI pipeline definition UUID |
114+
| `--vcs-origin` | null | String (required) | CircleCI repository origin in format 'provider/owner/repo' |
115+
| `--context-id` | null | null or String (can be set multiple times) | CircleCI context UUID to match |
116+
| `--dry-run` | false | Boolean | Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, `install`, `update`, `dedupe`, `uninstall`, as well as `pack` and `publish`. Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc. |
117+
| `--json` | false | Boolean | Whether or not to output JSON data, rather than the normal output. * In `npm pkg set` it enables parsing set values with JSON.parse() before saving them to your `package.json`. Not supported by all npm commands. |
118+
| `--registry` | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. |
119+
| `--yes`, `-y` | null | null or Boolean | Automatically answer "yes" to any prompts that npm might print on the command line. |
120+
97121
### `npm trust list`
98122

99123
List trusted relationships for a package

deps/npm/docs/content/commands/npm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Note: This command is unaware of workspaces.
1414

1515
### Version
1616

17-
11.10.1
17+
11.11.0
1818

1919
### Description
2020

0 commit comments

Comments
 (0)