Skip to content

Commit 18e1277

Browse files
committed
Add NODE_OPTIONS to constants.ENV
1 parent 3cff86b commit 18e1277

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

registry/lib/constants/env.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
declare interface ENV {
22
readonly CI: boolean
33
readonly DEBUG: string
4+
readonly LOG_LEVEL: string
45
readonly NODE_AUTH_TOKEN: string
56
readonly NODE_ENV: string
7+
readonly NODE_OPTIONS: string
68
readonly PRE_COMMIT: boolean
79
readonly SOCKET_CLI_DEBUG: boolean
810
readonly TAP: boolean

registry/lib/constants/env.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ module.exports = ObjectFreeze({
2828
envAsString(env.NODE_ENV).toLowerCase() === 'development'
2929
? 'development'
3030
: 'production',
31+
// A space-separated list of command-line options. `options...` are interpreted
32+
// before command-line options, so command-line options will override or compound
33+
// after anything in `options...`. Node.js will exit with an error if an option
34+
// that is not allowed in the environment is used, such as `-p` or a script file.
35+
// https://nodejs.org/api/cli.html#node_optionsoptions
36+
NODE_OPTIONS: envAsString(env.NODE_OPTIONS),
3137
// PRE_COMMIT is set to '1' by our 'test-pre-commit' script run by the
3238
// .husky/pre-commit hook.
3339
PRE_COMMIT: envAsBoolean(env.PRE_COMMIT),

0 commit comments

Comments
 (0)