Skip to content

Commit 61f4ea7

Browse files
committed
Use node 18 safe warnings flag
1 parent d57ee6f commit 61f4ea7

File tree

7 files changed

+24
-14
lines changed

7 files changed

+24
-14
lines changed

.dep-stats.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"@socketregistry/hyrious__bun.lockb": "1.0.5",
77
"@socketregistry/yocto-spinner": "^1.0.1",
88
"@socketsecurity/config": "^2.1.3",
9-
"@socketsecurity/registry": "^1.0.48",
9+
"@socketsecurity/registry": "^1.0.50",
1010
"@socketsecurity/sdk": "^1.3.0",
1111
"blessed": "^0.1.81",
1212
"blessed-contrib": "^4.11.0",

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"@socketregistry/hyrious__bun.lockb": "1.0.5",
8080
"@socketregistry/yocto-spinner": "^1.0.1",
8181
"@socketsecurity/config": "^2.1.3",
82-
"@socketsecurity/registry": "^1.0.48",
82+
"@socketsecurity/registry": "^1.0.50",
8383
"@socketsecurity/sdk": "^1.3.0",
8484
"blessed": "^0.1.81",
8585
"blessed-contrib": "^4.11.0",

src/commands/npm.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import path from 'node:path'
22

33
import spawn from '@npmcli/promise-spawn'
44

5-
import constant from '../constants'
5+
import constants from '../constants'
66

77
import type { CliSubcommand } from '../utils/meow-with-subcommands'
88

9-
const { distPath } = constant
9+
const { distPath } = constants
1010

1111
const description = 'npm wrapper functionality'
1212

@@ -17,7 +17,12 @@ export const npm: CliSubcommand = {
1717
process.exitCode = 1
1818
const spawnPromise = spawn(
1919
process.execPath,
20-
['--disable-warning', 'ExperimentalWarning', wrapperPath, ...argv],
20+
[
21+
// Lazily access constants.nodeNoWarningsFlags.
22+
...constants.nodeNoWarningsFlags,
23+
wrapperPath,
24+
...argv
25+
],
2126
{ stdio: 'inherit' }
2227
)
2328
spawnPromise.process.on('exit', (code, signal) => {

src/commands/npx.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ export const npx: CliSubcommand = {
1717
process.exitCode = 1
1818
const spawnPromise = spawn(
1919
process.execPath,
20-
['--disable-warning', 'ExperimentalWarning', wrapperPath, ...argv],
20+
[
21+
// Lazily access constants.nodeNoWarningsFlags.
22+
...constants.nodeNoWarningsFlags,
23+
wrapperPath,
24+
...argv
25+
],
2126
{ stdio: 'inherit' }
2227
)
2328
spawnPromise.process.on('exit', (code, signal) => {

src/shadow/npm-cli.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ process.exitCode = 1
4242
const spawnPromise = spawn(
4343
process.execPath,
4444
[
45-
'--disable-warning',
46-
'ExperimentalWarning',
45+
// Lazily access constants.nodeNoWarningsFlags.
46+
...constants.nodeNoWarningsFlags,
4747
'--require',
4848
injectionPath,
4949
npmPath,

src/shadow/npx-cli.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ process.exitCode = 1
1515
const spawnPromise = spawn(
1616
process.execPath,
1717
[
18-
'--disable-warning',
19-
'ExperimentalWarning',
18+
// Lazily access constants.nodeNoWarningsFlags.
19+
...constants.nodeNoWarningsFlags,
2020
'--require',
2121
injectionPath,
2222
npxPath,

0 commit comments

Comments
 (0)