Two long-standing dependencies are now part of the binary. --watch, stable since Node 22, restarts the process when the entry point or any file it loaded changes — no nodemon 26,658 , no configuration, and it follows the real module graph instead of a glob. It cannot be combined with --check, --eval or the REPL, and it needs a file: without one, Node exits with status 9.
node --watch server.js # restart on any loaded file
node --watch --watch-preserve-output app.js # keep earlier output on screen
node --watch-path=./src --watch-path=./config server.js
node --run test -- --test-name-pattern=auth--watch-path is the escape hatch for files outside the module graph, such as templates or SQL read at runtime. It implicitly enables --watch, replaces module watching, and works only on macOS and Windows; elsewhere it throws ERR_FEATURE_UNAVAILABLE_ON_PLATFORM. The related --watch-kill-signal, which changes the restart signal, is still labeled active development.
--run executes a script from package.json. It walks up to the nearest manifest, runs the command in that directory, and prepends every ancestor node_modules/.bin to PATH, so local binaries resolve as under npm 2,036 run. Arguments after -- are appended, a bare --run lists the available scripts since Node 26.9, and the command sees NODE_RUN_SCRIPT_NAME and NODE_RUN_PACKAGE_JSON_PATH. Speed is the point: npm run boots a second Node process to read the manifest first. The limits are deliberate — no pre and post scripts, no npm_package_* variables, and no values from --env-file.