From 911f55dc6ac3672f48740d0675f67c934c01aaf4 Mon Sep 17 00:00:00 2001 From: Nathan Fritz Date: Mon, 9 May 2022 09:27:56 -0700 Subject: [PATCH] feat: add --iwr alias for --include-workspace-root (#4864) --- docs/content/using-npm/config.md | 1 + lib/utils/config/index.js | 1 + tap-snapshots/test/lib/utils/config/index.js.test.cjs | 3 +++ 3 files changed, 5 insertions(+) diff --git a/docs/content/using-npm/config.md b/docs/content/using-npm/config.md index 4dc2829825d60..df1d996110b31 100644 --- a/docs/content/using-npm/config.md +++ b/docs/content/using-npm/config.md @@ -68,6 +68,7 @@ The following shorthands are parsed on the command-line: * `--desc`: `--description` * `-f`: `--force` * `-g`: `--global` +* `--iwr`: `--include-workspace-root` * `-L`: `--location` * `-d`: `--loglevel info` * `-s`: `--loglevel silent` diff --git a/lib/utils/config/index.js b/lib/utils/config/index.js index d8706d50c612d..b0ad24d7ee12f 100644 --- a/lib/utils/config/index.js +++ b/lib/utils/config/index.js @@ -25,6 +25,7 @@ const shorthands = { porcelain: ['--parseable'], readonly: ['--read-only'], reg: ['--registry'], + iwr: ['--include-workspace-root'], } for (const [key, { short }] of Object.entries(definitions)) { diff --git a/tap-snapshots/test/lib/utils/config/index.js.test.cjs b/tap-snapshots/test/lib/utils/config/index.js.test.cjs index f1cba9264ee2f..78055d5bc720b 100644 --- a/tap-snapshots/test/lib/utils/config/index.js.test.cjs +++ b/tap-snapshots/test/lib/utils/config/index.js.test.cjs @@ -61,6 +61,9 @@ Object { "help": Array [ "--usage", ], + "iwr": Array [ + "--include-workspace-root", + ], "l": Array [ "--long", ],