-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Description
Contribution
- I'd be willing to implement this feature (contributing guide)
Describe the user story
A user would like to add a non-string config setting via pnpm config set, eg:
- adding a new element to an array (eg. adding
'webpack'to theminimumReleaseAgeExcludearray) - setting a new property in a deeper config object (eg. setting
packageExtensions['react-redux'].peerDependencies['react-dom']to'*')
Describe the solution you'd like
For example, adding to the arrays for minimumReleaseAgeExclude or onlyBuiltDependencies:
$ pnpm config set 'minimumReleaseAgeExclude[]' 'webpack' --location project
$ pnpm config set 'minimumReleaseAgeExclude[]' 'react' --location project
$ pnpm config set 'onlyBuiltDependencies[]' 'sharp' --location project
$ pnpm config set 'onlyBuiltDependencies[]' 'bcrypt' --location project
$ cat pnpm-workspace.yaml
minimumReleaseAgeExclude:
- webpack
- react
onlyBuiltDependencies:
- sharp
- bcryptThis could also apply to global configuration (INI format currently, with kebab case settings):
$ pnpm config set 'minimum-release-age-exclude[]' 'webpack'
$ pnpm config set 'minimum-release-age-exclude[]' 'react'
$ pnpm config set 'only-built-dependencies[]' 'sharp'
$ pnpm config set 'only-built-dependencies[]' 'bcrypt'
$ cat "$HOME/Library/Preferences/pnpm/rc"
minimum-release-age-exclude[]=webpack
minimum-release-age-exclude[]=react
only-built-dependencies[]=sharp
only-built-dependencies[]=bcryptDescribe the drawbacks of your solution
Possibly: costs of building? I can't see big drawbacks of the solution
Describe alternatives you've considered
The alternatives are more prone to error:
- Editing the files by hand
- Editing the files using
yqor Perl orecho --jsonflag usage eg.pnpm config set --location=project --json minimumReleaseAgeExclude '["webpack", "react"]'- this does not append to an existing array or allow for setting via property path
Reactions are currently unavailable