From 3192dfa1f31012b6a3c87aa3b08b56a15ce75386 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Thu, 27 Sep 2018 16:45:27 +0200 Subject: [PATCH] refactor(schematics): rename migration entry-points (#13333) * In favor of consistency, we should rename the migration entry-points for Material similarly to the CDK migration entry-points. Also `migration-01` and `migration-01` is pretty much saying nothing about what it does. --- src/lib/schematics/migration.json | 4 ++-- .../ng-update/test-cases/misc/constructor-checks.spec.ts | 2 +- .../ng-update/test-cases/misc/import-checks.spec.ts | 2 +- .../ng-update/test-cases/misc/method-call-checks.spec.ts | 2 +- src/lib/schematics/ng-update/test-cases/v6-test-cases.spec.ts | 2 +- src/lib/schematics/ng-update/test-cases/v7-test-cases.spec.ts | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib/schematics/migration.json b/src/lib/schematics/migration.json index 8f6af4b05ca..41364f86c45 100644 --- a/src/lib/schematics/migration.json +++ b/src/lib/schematics/migration.json @@ -1,12 +1,12 @@ { "$schema": "./node_modules/@angular-devkit/schematics/collection-schema.json", "schematics": { - "migration-01": { + "migration-v6": { "version": "6", "description": "Updates Angular Material to v6", "factory": "./ng-update/index#updateToV6" }, - "migration-02": { + "migration-v7": { "version": "7", "description": "Updates Angular Material to v7", "factory": "./ng-update/index#updateToV7" diff --git a/src/lib/schematics/ng-update/test-cases/misc/constructor-checks.spec.ts b/src/lib/schematics/ng-update/test-cases/misc/constructor-checks.spec.ts index d57393ea2fc..b702af39517 100644 --- a/src/lib/schematics/ng-update/test-cases/misc/constructor-checks.spec.ts +++ b/src/lib/schematics/ng-update/test-cases/misc/constructor-checks.spec.ts @@ -3,7 +3,7 @@ import {resolveBazelDataFile, runTestCases} from '../index.spec'; describe('constructor checks', () => { it('should properly report invalid constructor expression signatures', async () => { - const {logOutput} = await runTestCases('migration-01', { + const {logOutput} = await runTestCases('migration-v6', { 'constructor-checks': resolveBazelDataFile(`misc/constructor-checks_input.ts`) }); diff --git a/src/lib/schematics/ng-update/test-cases/misc/import-checks.spec.ts b/src/lib/schematics/ng-update/test-cases/misc/import-checks.spec.ts index 77956203ea2..25a8029700e 100644 --- a/src/lib/schematics/ng-update/test-cases/misc/import-checks.spec.ts +++ b/src/lib/schematics/ng-update/test-cases/misc/import-checks.spec.ts @@ -3,7 +3,7 @@ import {resolveBazelDataFile, runTestCases} from '../index.spec'; describe('v6 import misc checks', () => { it('should report imports for deleted animation constants', async () => { - const {logOutput} = await runTestCases('migration-01', { + const {logOutput} = await runTestCases('migration-v6', { 'import-checks': resolveBazelDataFile(`misc/import-checks_input.ts`) }); diff --git a/src/lib/schematics/ng-update/test-cases/misc/method-call-checks.spec.ts b/src/lib/schematics/ng-update/test-cases/misc/method-call-checks.spec.ts index 30f65c5e73c..5a2f00f9842 100644 --- a/src/lib/schematics/ng-update/test-cases/misc/method-call-checks.spec.ts +++ b/src/lib/schematics/ng-update/test-cases/misc/method-call-checks.spec.ts @@ -3,7 +3,7 @@ import {resolveBazelDataFile, runTestCases} from '../index.spec'; describe('v6 method call checks', () => { it('should properly report invalid method calls', async () => { - const {logOutput} = await runTestCases('migration-01', { + const {logOutput} = await runTestCases('migration-v6', { 'method-call-checks': resolveBazelDataFile(`misc/method-call-checks_input.ts`) }); diff --git a/src/lib/schematics/ng-update/test-cases/v6-test-cases.spec.ts b/src/lib/schematics/ng-update/test-cases/v6-test-cases.spec.ts index 1d4ee7a619c..84182e53584 100644 --- a/src/lib/schematics/ng-update/test-cases/v6-test-cases.spec.ts +++ b/src/lib/schematics/ng-update/test-cases/v6-test-cases.spec.ts @@ -25,7 +25,7 @@ describe('v6 upgrade test cases', () => { return inputs; }, {}); - const {tempPath} = await runTestCases('migration-01', testCaseInputs); + const {tempPath} = await runTestCases('migration-v6', testCaseInputs); testCasesOutputPath = join(tempPath, 'projects/material/src/test-cases/'); }); diff --git a/src/lib/schematics/ng-update/test-cases/v7-test-cases.spec.ts b/src/lib/schematics/ng-update/test-cases/v7-test-cases.spec.ts index 880110171eb..bbdc6b5a577 100644 --- a/src/lib/schematics/ng-update/test-cases/v7-test-cases.spec.ts +++ b/src/lib/schematics/ng-update/test-cases/v7-test-cases.spec.ts @@ -20,7 +20,7 @@ describe('v7 upgrade test cases', () => { return inputs; }, {}); - const {tempPath} = await runTestCases('migration-02', testCaseInputs); + const {tempPath} = await runTestCases('migration-v7', testCaseInputs); testCasesOutputPath = join(tempPath, 'projects/material/src/test-cases/'); });