mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-11 22:46:27 +00:00
fix: migrate fields within depTypes (#718)
This commit is contained in:
parent
52b2de3bdb
commit
9d0cbb2e5d
3 changed files with 8 additions and 9 deletions
|
@ -54,8 +54,6 @@ function migrateConfig(config, parentConfig) {
|
||||||
migratedConfig.major = migratedConfig.major || {};
|
migratedConfig.major = migratedConfig.major || {};
|
||||||
migratedConfig.major.automerge = false;
|
migratedConfig.major.automerge = false;
|
||||||
} else if (val === 'minor') {
|
} else if (val === 'minor') {
|
||||||
migratedConfig.patch = migratedConfig.patch || {};
|
|
||||||
migratedConfig.patch.automerge = true;
|
|
||||||
migratedConfig.minor = migratedConfig.minor || {};
|
migratedConfig.minor = migratedConfig.minor || {};
|
||||||
migratedConfig.minor.automerge = true;
|
migratedConfig.minor.automerge = true;
|
||||||
migratedConfig.major = migratedConfig.major || {};
|
migratedConfig.major = migratedConfig.major || {};
|
||||||
|
@ -104,7 +102,7 @@ function migrateConfig(config, parentConfig) {
|
||||||
if (isObject(depType)) {
|
if (isObject(depType)) {
|
||||||
const depTypeName = depType.depType;
|
const depTypeName = depType.depType;
|
||||||
if (depTypeName) {
|
if (depTypeName) {
|
||||||
migratedConfig[depTypeName] = { ...depType };
|
migratedConfig[depTypeName] = migrateConfig(depType).migratedConfig;
|
||||||
delete migratedConfig[depTypeName].depType;
|
delete migratedConfig[depTypeName].depType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,9 +12,6 @@ Object {
|
||||||
"minor": Object {
|
"minor": Object {
|
||||||
"automerge": true,
|
"automerge": true,
|
||||||
},
|
},
|
||||||
"patch": Object {
|
|
||||||
"automerge": true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"lockFileConfig": Object {
|
"lockFileConfig": Object {
|
||||||
|
@ -22,6 +19,12 @@ Object {
|
||||||
},
|
},
|
||||||
"onboarding": false,
|
"onboarding": false,
|
||||||
"optionalDependencies": Object {
|
"optionalDependencies": Object {
|
||||||
|
"major": Object {
|
||||||
|
"automerge": false,
|
||||||
|
},
|
||||||
|
"minor": Object {
|
||||||
|
"automerge": true,
|
||||||
|
},
|
||||||
"respectLatest": false,
|
"respectLatest": false,
|
||||||
},
|
},
|
||||||
"packageRules": Array [
|
"packageRules": Array [
|
||||||
|
@ -96,8 +99,5 @@ Object {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"patch": Object {
|
|
||||||
"automerge": true,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -41,6 +41,7 @@ describe('config/migration', () => {
|
||||||
{
|
{
|
||||||
depType: 'optionalDependencies',
|
depType: 'optionalDependencies',
|
||||||
respectLatest: false,
|
respectLatest: false,
|
||||||
|
automerge: 'minor',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue