-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
sea: implement execArgvExtension #59560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sea: implement execArgvExtension #59560
Conversation
Review requested:
|
6c83973
to
a84a237
Compare
This implements the execArgvExtension configuration field for SEA, which takes one of three string values to specify whether and how execution arguments can be extended for the SEA at run time: * `"none"`: No extension is allowed. Only the arguments specified in `execArgv` will be used, and the `NODE_OPTIONS` environment variable will be ignored. * `"env"`: _(Default)_ The `NODE_OPTIONS` environment variable can extend the execution arguments. This is the default behavior to maintain backward compatibility. * `"cli"`: The executable can be launched with `--node-options="--flag1 --flag2"`, and those flags will be parsed as execution arguments for Node.js instead of being passed to the user script. This allows using arguments that are not supported by the `NODE_OPTIONS` environment variable.
a84a237
to
541dc75
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #59560 +/- ##
========================================
Coverage 89.87% 89.88%
========================================
Files 664 667 +3
Lines 194946 195278 +332
Branches 38292 38340 +48
========================================
+ Hits 175202 175519 +317
- Misses 12193 12212 +19
+ Partials 7551 7547 -4
🚀 New features to boost your workflow:
|
This is the default behavior to maintain backward compatibility. | ||
* `"cli"`: The executable can be launched with `--node-options="--flag1 --flag2"`, and those flags | ||
will be parsed as execution arguments for Node.js instead of being passed to the user script. | ||
This allows using arguments that are not supported by the `NODE_OPTIONS` environment variable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: it might be good to define "cli" in here very briefly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean defining the word "cli" as "command line interface"? I feel that for the target audience of this part of the documentation, that would be a bit superfluous - it seems unlikely that someone who is packaging an an application as a CLI SEA does not know what "cli" means.
Landed in 6722642 |
This implements the execArgvExtension configuration field for SEA, which takes one of three string values to specify whether and how execution arguments can be extended for the SEA at run time: * `"none"`: No extension is allowed. Only the arguments specified in `execArgv` will be used, and the `NODE_OPTIONS` environment variable will be ignored. * `"env"`: _(Default)_ The `NODE_OPTIONS` environment variable can extend the execution arguments. This is the default behavior to maintain backward compatibility. * `"cli"`: The executable can be launched with `--node-options="--flag1 --flag2"`, and those flags will be parsed as execution arguments for Node.js instead of being passed to the user script. This allows using arguments that are not supported by the `NODE_OPTIONS` environment variable. PR-URL: #59560 Fixes: #55573 Fixes: nodejs/single-executable#100 Refs: #51688 Reviewed-By: Xuguang Mei <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
This implements the execArgvExtension configuration field for SEA, which takes one of three string values to specify whether and how execution arguments can be extended for the SEA at run time:
"none"
: No extension is allowed. Only the arguments specified inexecArgv
will be used, and theNODE_OPTIONS
environment variable will be ignored."env"
: (Default) TheNODE_OPTIONS
environment variable can extend the execution arguments. This is the default behavior to maintain backward compatibility."cli"
: The executable can be launched with--node-options="--flag1 --flag2"
, and those flags will be parsed as execution arguments for Node.js instead of being passed to the user script. This allows using arguments that are not supported by theNODE_OPTIONS
environment variable.Refs: #51688
Fixes: #55573
Fixes: nodejs/single-executable#100