15 Commits
Author SHA1 Message Date
James Ross 5e48fb3a1e src: list scripts when --run has no command
Signed-off-by: James Ross <james@jross.me>
PR-URL: https://github.com/nodejs/node/pull/64606
Fixes: https://github.com/nodejs/node/issues/64870
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-24 03:14:09 +00:00
Antoine du Hamel 73eed9be27 src: escape Windows environment variables in task runner
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65217
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
2026-08-13 16:34:53 +00:00
Archkon ab9afa9267 src: match cmd.exe case-insensitively in task runner
Use a case-insensitive suffix comparison for ComSpec so uppercase and
mixed-case CMD.EXE paths use the correct /c invocation.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64907
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-09 19:10:51 +00:00
Archkon 793a6ec0de src: use UTF-8 for task runner filesystem paths
Use ConvertPathToUTF8() instead of path::string() when passing
filesystem paths to Node and libuv interfaces. This prevents paths
containing characters outside the active Windows code page from being
corrupted or rejected.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64868
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2026-08-04 12:33:13 +00:00
Antoine du Hamel e76c573e45 src: fix escaping of single quotes in task runner
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64089
Refs: https://hackerone.com/reports/3817602
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-07-04 08:56:09 +00:00
Yagiz Nizipli 12dd4c7575 src: mark node --run as stable
PR-URL: https://github.com/nodejs/node/pull/53763
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-21 09:29:47 -07:00
Yagiz Nizipli 0c5fa57bc7 cli: ensure --run has proper pwd
PR-URL: https://github.com/nodejs/node/pull/54949
Refs: https://github.com/nodejs/node/pull/53600
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2024-09-18 12:18:40 +00:00
sungpaks 359b4284bc test: add subtests to test-node-run
Added two subtests to test-node-run. First one is about unparsable
package.json file, and the second one is about there is no "script"
fields in package.json

PR-URL: https://github.com/nodejs/node/pull/54204
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2024-08-06 15:47:52 +00:00
Yagiz Nizipli 5731e2b346 src: traverse parent folders while running --run
PR-URL: https://github.com/nodejs/node/pull/53154
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-06-07 21:20:52 +00:00
Yagiz Nizipli 2aaeaa863c cli: add NODE_RUN_PACKAGE_JSON_PATH env
PR-URL: https://github.com/nodejs/node/pull/53058
Refs: https://github.com/nodejs/node/issues/52673
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
2024-05-21 13:59:35 +00:00
Yagiz Nizipli cb90a316d0 cli: add NODE_RUN_SCRIPT_NAME env to node --run
PR-URL: https://github.com/nodejs/node/pull/53032
Refs: https://github.com/nodejs/node/issues/52673
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-05-19 01:37:25 +00:00
Yagiz Nizipli fe4e569759 src: fix positional args in task runner
PR-URL: https://github.com/nodejs/node/pull/52810
Fixes: https://github.com/nodejs/node/issues/52740
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-05-08 11:37:07 +00:00
Yagiz Nizipli d18438928f test: add env variable test for --run
PR-URL: https://github.com/nodejs/node/pull/52811
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-05-04 21:27:05 +00:00
Yagiz Nizipli c5cfdd4849 src: rewrite task runner in c++
PR-URL: https://github.com/nodejs/node/pull/52609
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2024-05-02 19:54:02 +00:00
Yagiz NizipliandDaniel Lemire 128c60d906 cli: implement node --run <script-in-package-json>
Co-authored-by: Daniel Lemire <daniel@lemire.me>
PR-URL: https://github.com/nodejs/node/pull/52190
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
2024-04-08 00:49:14 +00:00