Skip to content

Commit 75506aa

Browse files
committed
fix(config): tie save-exact/save-prefix together
Each affects the other
1 parent 2b3d1f9 commit 75506aa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/utils/config/definitions.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1526,7 +1526,10 @@ define('save-exact', {
15261526
Dependencies saved to package.json will be configured with an exact
15271527
version rather than using npm's default semver range operator.
15281528
`,
1529-
flatten,
1529+
flatten (key, obj, flatOptions) {
1530+
// just call the save-prefix flattener, it reads from obj['save-prefix']
1531+
definitions['save-prefix'].flatten('save-prefix', obj, flatOptions)
1532+
},
15301533
})
15311534

15321535
define('save-optional', {
@@ -1595,6 +1598,7 @@ define('save-prefix', {
15951598
`,
15961599
flatten (key, obj, flatOptions) {
15971600
flatOptions.savePrefix = obj['save-exact'] ? '' : obj['save-prefix']
1601+
obj['save-prefix'] = flatOptions.savePrefix
15981602
},
15991603
})
16001604

0 commit comments

Comments
 (0)