Commit Graph
16 Commits
Author SHA1 Message Date
Daniel Lemire 2e9d43c3b7 src: stop including simdjson.h from env.h
env.h includes inspector_profiler.h, which included simdjson.h for
the types of two virtual methods and a parser member. As a result,
about 155 files in src/ parsed the amalgamated simdjson header,
which is over 10 MB.

Keep simdjson out of inspector_profiler.h: the profile connections
now say which field of `result` holds the profile, and
WriteProfile() takes the profile as raw JSON. The parser becomes a
local variable, so its buffers are no longer kept alive for the
lifetime of the Environment.

Also drop the unused include from node_task_runner.h, and let the
config file reader rewind its document instead of parsing the whole
file a second time with a second parser.

Now only the eight files that use simdjson include it. On an Apple
M-series machine, a clean rebuild of the src/ objects takes about
15% less CPU time (376 s to 320 s) and 19% less wall time at -j14.

Signed-off-by: Daniel Lemire <daniel@lemire.me>
PR-URL: https://github.com/nodejs/node/pull/66620
Refs: https://github.com/simdjson/simdjson/pull/2913
Refs: https://github.com/nodejs/node/pull/66495
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-10-11 03:36:15 +00:00
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
Moonki Choi 2388088fba src: rename private fields to follow naming convention
PR-URL: https://github.com/nodejs/node/pull/59923
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-09-20 19:00:24 +00:00
Daniel Lemire 2e9e844d99 src: use ranges library (C++20) more systematically
PR-URL: https://github.com/nodejs/node/pull/58028
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2025-06-26 02:31:52 +00:00
Nathan Baulch b5fb2ff81e src: fix typos
PR-URL: https://github.com/nodejs/node/pull/55064
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-09-27 15:34:48 +00:00
Chengzhong Wu 84966703e0 src: track BaseObjects with an efficient list
PR-URL: https://github.com/nodejs/node/pull/55104
Refs: https://github.com/nodejs/node/pull/54880
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2024-09-26 18:40:33 +01: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
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 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