Skip to content

Commit b4c547e

Browse files
committed
Add comments
1 parent 435fe59 commit b4c547e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/shadow/shadow-bin.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,13 @@ export default async function shadowBin(
2626
await installLinks(constants.shadowBinPath, binName),
2727
...(binName === NPM && binArgs.includes('install')
2828
? [
29-
// Add the `--quiet` and `--no-progress` flags to fix input being swallowed
30-
// by the spinner when running the command with recent versions of npm.
29+
// Add the `--quiet` and `--no-progress` flags to fix input being
30+
// swallowed by the spinner when running the command with recent
31+
// versions of npm.
3132
...binArgs.filter(a => a !== '--progress' && a !== '--no-progress'),
3233
'--no-progress',
34+
// Add the '--quiet' flag if an equivalent flag is not provided.
35+
// https://docs.npmjs.com/cli/v11/using-npm/logging#aliases
3336
...(binArgs.includes('-q') ||
3437
binArgs.includes('--quiet') ||
3538
binArgs.includes('-s') ||

src/utils/shadow-npm.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,12 @@ export function shadowNpmInstall(opts?: ShadowNpmInstallOptions) {
5555
// when running the command with recent versions of npm.
5656
'--no-progress',
5757
...(useDebug ||
58+
// Detect loglevel flags:
5859
flags.some(
5960
f =>
61+
// https://docs.npmjs.com/cli/v11/using-npm/logging#setting-log-levels
6062
f.startsWith('--loglevel') ||
63+
// https://docs.npmjs.com/cli/v11/using-npm/logging#aliases
6164
f === '-d' ||
6265
f === '--dd' ||
6366
f === '--ddd' ||

0 commit comments

Comments
 (0)