diff options
author | Luca Casonato <hello@lcas.dev> | 2024-07-31 16:28:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-31 16:28:08 +0200 |
commit | 1faac2dce380afa387f08780ae1a79d087b3acf0 (patch) | |
tree | c1a47a7a3f6306e0387a41edff627f22438cd19e /ext/node/polyfills/internal/child_process.ts | |
parent | f6fad68d7b26f2b58a31b96860dba2bbfcfd1e61 (diff) |
fix(ext/node): handle node child_process with --v8-options flag (#24804)
Makes `v8flags` package from NPM work.
Diffstat (limited to 'ext/node/polyfills/internal/child_process.ts')
-rw-r--r-- | ext/node/polyfills/internal/child_process.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/node/polyfills/internal/child_process.ts b/ext/node/polyfills/internal/child_process.ts index 2dcf0e782..0996806d7 100644 --- a/ext/node/polyfills/internal/child_process.ts +++ b/ext/node/polyfills/internal/child_process.ts @@ -1030,6 +1030,7 @@ const kNodeFlagsMap = new Map([ ["--v8-pool-size", kLongArg], ]); const kDenoSubcommands = new Set([ + "add", "bench", "bundle", "cache", @@ -1046,6 +1047,7 @@ const kDenoSubcommands = new Set([ "install", "lint", "lsp", + "publish", "repl", "run", "tasks", @@ -1092,6 +1094,12 @@ function toDenoArgs(args: string[]): string[] { let isLongWithValue = false; let flagValue; + if (flag === "--v8-options") { + // If --v8-options is passed, it should be replaced with --v8-flags="--help". + denoArgs.push("--v8-flags=--help"); + continue; + } + if (flagInfo === undefined) { // If the flag was not found, it's either not a known flag or it's a long // flag containing an '='. |