Skip to content

Commit 45fc5e0

Browse files
feat: add allow-directory, allow-file, and allow-remote (#9288)
Backport of #9287 to `release/v11`. Co-authored-by: Gar <gar+gh@danger.computer>
1 parent e7805c3 commit 45fc5e0

9 files changed

Lines changed: 254 additions & 19 deletions

File tree

lib/commands/ci.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ class CI extends ArboristWorkspaceCmd {
2121
'strict-peer-deps',
2222
'foreground-scripts',
2323
'ignore-scripts',
24+
'allow-directory',
25+
'allow-file',
2426
'allow-git',
27+
'allow-remote',
2528
'audit',
2629
'bin-links',
2730
'fund',

lib/commands/dedupe.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ class Dedupe extends ArboristWorkspaceCmd {
1414
'omit',
1515
'include',
1616
'ignore-scripts',
17+
'allow-directory',
18+
'allow-file',
1719
'allow-git',
20+
'allow-remote',
1821
'audit',
1922
'bin-links',
2023
'fund',

lib/commands/install.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ class Install extends ArboristWorkspaceCmd {
2727
'package-lock-only',
2828
'foreground-scripts',
2929
'ignore-scripts',
30+
'allow-directory',
31+
'allow-file',
3032
'allow-git',
33+
'allow-remote',
3134
'audit',
3235
'before',
3336
'min-release-age',

lib/commands/link.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ class Link extends ArboristWorkspaceCmd {
2525
'omit',
2626
'include',
2727
'ignore-scripts',
28+
'allow-directory',
29+
'allow-file',
2830
'allow-git',
31+
'allow-remote',
2932
'audit',
3033
'bin-links',
3134
'fund',

smoke-tests/tap-snapshots/test/index.js.test.cjs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ npm error [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundlin
5959
npm error [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
6060
npm error [--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
6161
npm error [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts]
62-
npm error [--allow-git <all|none|root>] [--no-audit] [--no-bin-links] [--no-fund]
63-
npm error [--dry-run]
62+
npm error [--allow-directory <all|none|root>] [--allow-file <all|none|root>]
63+
npm error [--allow-git <all|none|root>] [--allow-remote <all|none|root>] [--no-audit]
64+
npm error [--no-bin-links] [--no-fund] [--dry-run]
6465
npm error [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
6566
npm error [--workspaces] [--include-workspace-root] [--install-links]
6667
npm error
@@ -88,9 +89,18 @@ npm error
8889
npm error --ignore-scripts
8990
npm error If true, npm does not run scripts specified in package.json files.
9091
npm error
92+
npm error --allow-directory
93+
npm error Limits the ability for npm to install dependencies from directories.
94+
npm error
95+
npm error --allow-file
96+
npm error Limits the ability for npm to install dependencies from tarball files.
97+
npm error
9198
npm error --allow-git
9299
npm error Limits the ability for npm to fetch dependencies from git references.
93100
npm error
101+
npm error --allow-remote
102+
npm error Limits the ability for npm to fetch dependencies from urls.
103+
npm error
94104
npm error --audit
95105
npm error When "true" submit audit reports alongside the current npm command to the
96106
npm error

tap-snapshots/test/lib/commands/config.js.test.cjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ exports[`test/lib/commands/config.js TAP config list --json > output matches sna
1616
"access": null,
1717
"all": false,
1818
"allow-same-version": false,
19+
"allow-directory": "all",
20+
"allow-file": "all",
1921
"allow-git": "all",
22+
"allow-remote": "all",
2023
"also": null,
2124
"audit": true,
2225
"audit-level": null,
@@ -192,7 +195,10 @@ exports[`test/lib/commands/config.js TAP config list --long > output matches sna
192195
_auth = (protected)
193196
access = null
194197
all = false
198+
allow-directory = "all"
199+
allow-file = "all"
195200
allow-git = "all"
201+
allow-remote = "all"
196202
allow-same-version = false
197203
also = null
198204
audit = true

0 commit comments

Comments
 (0)