mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-11 14:36:25 +00:00
refactor: add extends config massage (#1256)
This commit is contained in:
parent
d948553a2e
commit
5e68613150
3 changed files with 15 additions and 0 deletions
|
@ -47,6 +47,16 @@ function migrateConfig(config) {
|
|||
} else {
|
||||
migratedConfig.semanticCommitScope = null;
|
||||
}
|
||||
} else if (key === 'extends' && Array.isArray(val)) {
|
||||
for (let i = 0; i < val.length; i += 1) {
|
||||
if (val[i] === 'config:application' || val[i] === ':js-app') {
|
||||
isMigrated = true;
|
||||
migratedConfig.extends[i] = 'config:js-app';
|
||||
} else if (val[i] === 'config:library') {
|
||||
isMigrated = true;
|
||||
migratedConfig.extends[i] = 'config:js-lib';
|
||||
}
|
||||
}
|
||||
} else if (key === 'automergeMinor') {
|
||||
isMigrated = true;
|
||||
migratedConfig.minor = migratedConfig.minor || {};
|
||||
|
|
|
@ -21,6 +21,10 @@ Object {
|
|||
"schedule": Array [],
|
||||
},
|
||||
"enabled": true,
|
||||
"extends": Array [
|
||||
"config:js-app",
|
||||
"config:js-lib",
|
||||
],
|
||||
"ignorePaths": Array [
|
||||
"node_modules/",
|
||||
],
|
||||
|
|
|
@ -6,6 +6,7 @@ describe('config/migration', () => {
|
|||
it('it migrates config', () => {
|
||||
const config = {
|
||||
enabled: true,
|
||||
extends: [':js-app', 'config:library'],
|
||||
maintainYarnLock: true,
|
||||
onboarding: 'false',
|
||||
automerge: 'none',
|
||||
|
|
Loading…
Reference in a new issue