From 01f4e9c9149aece222c2f07e9ef1a85778e0b334 Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Mon, 21 Mar 2022 12:30:49 +0200 Subject: [PATCH] fix: fetch should allow the same options as install (#4460) close #4453 --- .changeset/large-dragons-guess.md | 6 ++++++ packages/plugin-commands-installation/src/fetch.ts | 11 +++-------- 2 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 .changeset/large-dragons-guess.md diff --git a/.changeset/large-dragons-guess.md b/.changeset/large-dragons-guess.md new file mode 100644 index 0000000000..0ed1304fe1 --- /dev/null +++ b/.changeset/large-dragons-guess.md @@ -0,0 +1,6 @@ +--- +"@pnpm/plugin-commands-installation": patch +"pnpm": patch +--- + +`pnpm fetch` should allow the same CLI options as `pnpm install` [#4453](https://github.com/pnpm/pnpm/issues/4453). diff --git a/packages/plugin-commands-installation/src/fetch.ts b/packages/plugin-commands-installation/src/fetch.ts index 62701ff94f..6defa60207 100644 --- a/packages/plugin-commands-installation/src/fetch.ts +++ b/packages/plugin-commands-installation/src/fetch.ts @@ -1,19 +1,14 @@ import { docsUrl } from '@pnpm/cli-utils' import { UNIVERSAL_OPTIONS } from '@pnpm/common-cli-options-help' -import { Config, types as allTypes } from '@pnpm/config' +import { Config } from '@pnpm/config' import { createOrConnectStoreController, CreateStoreControllerOptions } from '@pnpm/store-connection-manager' import { InstallOptions, mutateModules } from '@pnpm/core' -import pick from 'ramda/src/pick' import renderHelp from 'render-help' +import { cliOptionsTypes } from './install' export const rcOptionsTypes = cliOptionsTypes -export function cliOptionsTypes () { - return pick([ - 'production', - 'dev', - ], allTypes) -} +export { cliOptionsTypes } export const commandNames = ['fetch']