Skip to content

Commit

Permalink
fix(config): tie save-exact/save-prefix together
Browse files Browse the repository at this point in the history
Each affects the other
  • Loading branch information
wraithgar committed Mar 25, 2021
1 parent 2b3d1f9 commit 75506aa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/utils/config/definitions.js
Expand Up @@ -1526,7 +1526,10 @@ define('save-exact', {
Dependencies saved to package.json will be configured with an exact
version rather than using npm's default semver range operator.
`,
flatten,
flatten (key, obj, flatOptions) {
// just call the save-prefix flattener, it reads from obj['save-prefix']
definitions['save-prefix'].flatten('save-prefix', obj, flatOptions)
},
})

define('save-optional', {
Expand Down Expand Up @@ -1595,6 +1598,7 @@ define('save-prefix', {
`,
flatten (key, obj, flatOptions) {
flatOptions.savePrefix = obj['save-exact'] ? '' : obj['save-prefix']
obj['save-prefix'] = flatOptions.savePrefix
},
})

Expand Down

0 comments on commit 75506aa

Please sign in to comment.