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 {
|
} else {
|
||||||
migratedConfig.semanticCommitScope = null;
|
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') {
|
} else if (key === 'automergeMinor') {
|
||||||
isMigrated = true;
|
isMigrated = true;
|
||||||
migratedConfig.minor = migratedConfig.minor || {};
|
migratedConfig.minor = migratedConfig.minor || {};
|
||||||
|
|
|
@ -21,6 +21,10 @@ Object {
|
||||||
"schedule": Array [],
|
"schedule": Array [],
|
||||||
},
|
},
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
|
"extends": Array [
|
||||||
|
"config:js-app",
|
||||||
|
"config:js-lib",
|
||||||
|
],
|
||||||
"ignorePaths": Array [
|
"ignorePaths": Array [
|
||||||
"node_modules/",
|
"node_modules/",
|
||||||
],
|
],
|
||||||
|
|
|
@ -6,6 +6,7 @@ describe('config/migration', () => {
|
||||||
it('it migrates config', () => {
|
it('it migrates config', () => {
|
||||||
const config = {
|
const config = {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
extends: [':js-app', 'config:library'],
|
||||||
maintainYarnLock: true,
|
maintainYarnLock: true,
|
||||||
onboarding: 'false',
|
onboarding: 'false',
|
||||||
automerge: 'none',
|
automerge: 'none',
|
||||||
|
|
Loading…
Reference in a new issue