From e65e9bb3d8ff961decdf54d1f2b8cf6acc013fb7 Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Sat, 29 Aug 2020 13:14:15 +0300 Subject: [PATCH] fix(CLI): allow to pass fetch options close #2810 PR #2811 --- .changeset/dull-pillows-rule.md | 11 +++++++++++ packages/plugin-commands-installation/src/add.ts | 4 ++++ packages/plugin-commands-installation/src/install.ts | 4 ++++ .../plugin-commands-installation/src/update/index.ts | 4 ++++ 4 files changed, 23 insertions(+) create mode 100644 .changeset/dull-pillows-rule.md diff --git a/.changeset/dull-pillows-rule.md b/.changeset/dull-pillows-rule.md new file mode 100644 index 0000000000..56f14fc2b7 --- /dev/null +++ b/.changeset/dull-pillows-rule.md @@ -0,0 +1,11 @@ +--- +"@pnpm/plugin-commands-installation": patch +--- + +It should be possible to set the fetch related options through CLI options. +These are the fetch options: + +- `--fetch-retries=` +- `--fetch-retry-factor=` +- `--fetch-retry-maxtimeout=` +- `--fetch-retry-mintimeout=` diff --git a/packages/plugin-commands-installation/src/add.ts b/packages/plugin-commands-installation/src/add.ts index 16c26ca440..2bd976d8ef 100644 --- a/packages/plugin-commands-installation/src/add.ts +++ b/packages/plugin-commands-installation/src/add.ts @@ -11,6 +11,10 @@ export function rcOptionsTypes () { return R.pick([ 'child-concurrency', 'engine-strict', + 'fetch-retries', + 'fetch-retry-factor', + 'fetch-retry-maxtimeout', + 'fetch-retry-mintimeout', 'force', 'global-dir', 'global-pnpmfile', diff --git a/packages/plugin-commands-installation/src/install.ts b/packages/plugin-commands-installation/src/install.ts index a8e938e84a..a48dc24139 100644 --- a/packages/plugin-commands-installation/src/install.ts +++ b/packages/plugin-commands-installation/src/install.ts @@ -13,6 +13,10 @@ export function rcOptionsTypes () { 'child-concurrency', 'dev', 'engine-strict', + 'fetch-retries', + 'fetch-retry-factor', + 'fetch-retry-maxtimeout', + 'fetch-retry-mintimeout', 'frozen-lockfile', 'global-dir', 'global-pnpmfile', diff --git a/packages/plugin-commands-installation/src/update/index.ts b/packages/plugin-commands-installation/src/update/index.ts index b07dcaf5f8..dc05cb5b98 100644 --- a/packages/plugin-commands-installation/src/update/index.ts +++ b/packages/plugin-commands-installation/src/update/index.ts @@ -21,6 +21,10 @@ export function rcOptionsTypes () { 'depth', 'dev', 'engine-strict', + 'fetch-retries', + 'fetch-retry-factor', + 'fetch-retry-maxtimeout', + 'fetch-retry-mintimeout', 'force', 'global-dir', 'global-pnpmfile',