Open-Source Wikis

/

Node.js

/

How to contribute

/

Tooling

nodejs/node

Tooling

The repository ships a long tail of scripts and config. This page is the index — when something is auto-generated, lints, or rewrites a deps/ directory, the implementation is somewhere in this list.

Build system

  • configure / configure.py — top-level driver. Writes config.gypi. ./configure --help is the reference for every build flag.
  • node.gyp — the master GYP project. Defines targets node, cctest, js2c, mksnapshot, node_text_start, node_dtrace, etc.
  • common.gypi, node.gypi — shared GYP fragments included by node.gyp and deps/**/*.gyp.
  • tools/gyp/ — the project's pinned copy of GYP itself.
  • Makefile — the human-facing build entry. Wraps tools/gyp_node.py and the test runner. Targets like make test, make doc, make lint are defined here.
  • vcbuild.bat — Windows-equivalent of the Makefile.
  • BSDmakefile — small redirector so make works on BSD where the Makefile expects GNU make.
  • BUILD.gn, node.gni, unofficial.gni — GN build files used by Chromium-style consumers.
  • tools/install.pymake install driver.

Snapshot pipeline

  • tools/snapshot/ and node_mksnapshot (built from node.gyp target mksnapshot) generate the V8 startup snapshot.
  • tools/js2c.cc produces node_javascript.cc, the C++ source that embeds every lib/**/*.js and selected deps/** JS into the binary.
  • tools/specialize_node_d.py and tools/gen_node_def.cc produce platform-specific symbol exports.

The runtime side is in src/node_snapshotable.{cc,h} and src/node_main_instance.cc.

Documentation tooling (tools/doc/)

The doctool is custom (a Markdown → HTML/JSON pipeline using unified, remark, and Node's own renderers):

  • tools/doc/generate.mjs — entry; consumes doc/api/*.md.
  • tools/doc/html.mjs / tools/doc/json.mjs / tools/doc/markdown.mjs — output targets.
  • tools/doc/apilinks.mjs — generates apilinks.json mapping module.member to source files.
  • Output lands in out/doc/api/.
  • make doc-only skips the build dependency.

Linters

Linter Driver Config
ESLint (JS) make lint-js → ESLint eslint.config.mjs, lib/eslint.config_partial.mjs (and others)
Custom rules tools/eslint-rules/ Rules referenced from eslint.config.mjs
remark-lint make lint-mdtools/lint-md/ tools/lint-md/lint-md.mjs
cpplint make lint-cpptools/cpplint.py .cpplint, src/.clang-tidy
clang-format make format-cpp .clang-format
Shell tools/lint-sh.mjs tools/lint-sh.mjs
Python (Ruff) make lint-py pyproject.toml
YAML .yamllint.yaml make lint-yaml

Test runner

  • tools/test.py — main test driver. Forks a worker per test, parses junit-style output.
  • tools/v8-json-to-junit.py — converts V8 test JSON to JUnit XML for CI.
  • tools/run-valgrind.py, tools/pseudo-tty.py, tools/run-worker.js — auxiliary harnesses.

Dependency updaters (tools/dep_updaters/)

Each vendored dependency in deps/** has an updater:

  • tools/dep_updaters/update-acorn.sh, update-amaro.sh, update-ada.sh, update-undici.sh, update-simdjson.sh, update-icu.sh, update-llhttp.sh, update-nghttp2.sh, update-ngtcp2.sh, update-openssl.sh, update-zlib.sh, update-zstd.sh, update-sqlite.sh, update-postject.sh, update-lief.sh, update-cjs-module-lexer.sh, update-corepack.sh, update-googletest.sh, update-libffi.sh, update-minimatch.sh, update-nbytes.sh, update-uv.sh, update-uvwasi.sh, update-v8.sh.
  • The tools.yml workflow (.github/workflows/tools.yml) runs them on a schedule and opens auto-PRs.
  • OpenSSL gets its own workflow (.github/workflows/update-openssl.yml) and V8 has update-v8.yml.

Snapshot of CI utilities (tools/actions/)

Custom GitHub Actions composites that the workflows reference, e.g. installing Node-specific Python deps.

Other tools you will run into

  • tools/find-inactive-collaborators.mjs and tools/find-inactive-tsc.mjs — quarterly hygiene scripts.
  • tools/lint-pr-url.mjs — verifies the PR-URL: trailer in a commit.
  • tools/license-builder.sh and tools/license2rtf.mjs — assemble the LICENSE for installer artifacts.
  • tools/mk-ca-bundle.pl — produces node_root_certs.h from tools/certdata.txt.
  • tools/release.sh — release driver used by Releasers.
  • tools/macos-installer/, tools/msvs/ — platform installers.
  • tools/configure.d/./configure shell snippets executed in series.
  • tools/clang-format/ — pinned clang-format binary on platforms where it is unavailable.
  • tools/icu/ — ICU patching scripts when bumping deps/icu-small/.
  • tools/inspector_protocol/ — generator for the inspector wire protocol.
  • tools/v8/ and tools/v8_gypfiles/ — bridge between V8 and node.gyp.
  • tools/zos/ — z/OS-specific build helpers.

TypeScript-stripping integration

deps/amaro/ (a Rust crate) is the SWC-based TypeScript stripper. The build pulls a precompiled amaro.node addon, and JS-side glue is in lib/internal/modules/typescript.js. Updating amaro goes through tools/dep_updaters/update-amaro.sh.

When to update tooling

  • New global lint rule? Add it under tools/eslint-rules/ and reference it in eslint.config.mjs.
  • New CI workflow? File goes in .github/workflows/. Use existing reusable workflows (test-shared.yml, test-linux.yml) before duplicating.
  • New build flag? Add it in configure.py, propagate via node.gyp, document in BUILDING.md and doc/api/cli.md if user-facing.
  • New vendored dep? Add an entry under deps/, an updater under tools/dep_updaters/, and ownership in .github/CODEOWNERS. The updater workflow under .github/workflows/tools.yml keeps it fresh.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Tooling – Node.js wiki | Factory