Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@github.com>2022-05-05 20:27:39 +0300
committerNathan Fritz <fritzy@github.com>2022-05-05 20:36:39 +0300
commite25d72e0f03af8c888b653886f13aa4341207d82 (patch)
treed194c14afd9c244e1b701d122cafc824c00989d0
parent8e7ea9b61afe37de6017ff77c142ef3abdff6bec (diff)
feat: add --iwr alias for --include-workspace-rootfritzy/iwr
-rw-r--r--docs/content/using-npm/config.md1
-rw-r--r--lib/utils/config/index.js1
-rw-r--r--tap-snapshots/test/lib/utils/config/index.js.test.cjs3
3 files changed, 5 insertions, 0 deletions
diff --git a/docs/content/using-npm/config.md b/docs/content/using-npm/config.md
index 4dc282982..df1d99611 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 d8706d50c..b0ad24d7e 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 f1cba9264..78055d5bc 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",
],