fix: migrate excludedPackageNames to excludePackageNames (#961)

This commit is contained in:
Rhys Arkins 2017-10-17 11:16:02 +02:00 committed by GitHub
parent 78cff771af
commit 665ede8475
3 changed files with 6 additions and 0 deletions

View file

@ -87,6 +87,10 @@ function migrateConfig(config, parentConfig) {
p => migrateConfig(p).migratedConfig
);
delete migratedConfig.packages;
} else if (key === 'excludedPackageNames') {
isMigrated = true;
migratedConfig.excludePackageNames = val;
delete migratedConfig.excludedPackageNames;
} else if (key === 'packageName') {
isMigrated = true;
migratedConfig.packageNames = [val];

View file

@ -46,6 +46,7 @@ Object {
},
"packageRules": Array [
Object {
"excludePackageNames": "foo",
"groupName": "angular packages",
"packagePatterns": "^(@angular|typescript)",
},

View file

@ -23,6 +23,7 @@ describe('config/migration', () => {
{
packagePatterns: '^(@angular|typescript)',
groupName: ['angular packages'],
excludedPackageNames: 'foo',
},
{
packagePatterns: ['^foo'],