From e6fc4f9cc1ebe7194f043f9de31c0f5a8ec05573 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Cruz?= Date: Sun, 29 Nov 2026 05:18:31 +0000 Subject: [PATCH 1/3] docs: correct the comment on normalizing the command path The comment said the command would otherwise always fail with ENOENT, but that came from the old ENOENT detection based on cmd.exe's exit code, which was removed. Say what the normalization is for instead, and that batch files don't need it, since they are run by their resolved path. --- src/parse.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/parse.js b/src/parse.js index 1c6b892..0a4bbbb 100644 --- a/src/parse.js +++ b/src/parse.js @@ -60,8 +60,9 @@ function parseNonShell(parsed) { // If a shell is required, use cmd.exe and take care of escaping everything correctly // Note that `forceShell` is an hidden option used only in tests if (parsed.options.forceShell || needsShell) { - // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar) - // This is necessary otherwise it will always fail with ENOENT in those cases + // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar), as cmd.exe expects `\` as the path + // separator and might otherwise not find the command + // Batch files don't need it, as they are run by their resolved path below parsed.command = path.normalize(parsed.command); // Arguments can't contain values that can't be escaped for cmd.exe either, e.g. line breaks From 26bdf4e331075c9daf8fba41d1c895cf59cfde82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Cruz?= Date: Sun, 29 Nov 2026 05:18:32 +0000 Subject: [PATCH 2/3] docs: mention that TypeScript types are included --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index cdccd13..00b364b 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,8 @@ const result = spawnSync('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit const { spawn, spawnSync } = require('cross-spawn'); ``` +TypeScript types are included, so `@types/cross-spawn` isn't needed. + ## Caveats From 656874db1cc4ad9e36b62dc7766eaabdc327760e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Cruz?= Date: Sun, 29 Nov 2026 05:18:34 +0000 Subject: [PATCH 3/3] docs: drop --disable-warning from the watch mode command Keep the command short. The DEP0190 warning is only hidden in `npm test`. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 00b364b..e1838a5 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ npm test npm run typecheck # During development, in watch mode -node --disable-warning=DEP0190 --test --watch "test/*.test.js" "src/**/*.test.js" +node --test --watch "test/*.test.js" "src/**/*.test.js" ```