From 60cd5cce30efcca405553cb3d45e735e3c3b3e1a Mon Sep 17 00:00:00 2001 From: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com> Date: Tue, 30 Jun 2020 13:55:20 +0200 Subject: [PATCH] schematics: remove skipTest option (#2596) Closes #2561 BREAKING CHANGE: The skipTest option has been renamed to skipTests BEFORE: ng generate container UsersPage --skipTest AFTER: ng generate container UsersPage --skipTests --- modules/effects/schematics/ng-add/index.ts | 4 ---- modules/effects/schematics/ng-add/schema.json | 6 ------ modules/effects/schematics/ng-add/schema.ts | 2 -- modules/schematics/src/action/index.ts | 4 ---- modules/schematics/src/action/schema.json | 6 ------ modules/schematics/src/action/schema.ts | 5 ----- modules/schematics/src/container/index.ts | 4 ---- modules/schematics/src/container/schema.json | 6 ------ modules/schematics/src/container/schema.ts | 5 ----- modules/schematics/src/data/index.ts | 4 ---- modules/schematics/src/data/schema.json | 6 ------ modules/schematics/src/data/schema.ts | 5 ----- modules/schematics/src/effect/index.ts | 4 ---- modules/schematics/src/effect/schema.json | 6 ------ modules/schematics/src/effect/schema.ts | 5 ----- modules/schematics/src/entity/index.ts | 4 ---- modules/schematics/src/entity/schema.json | 6 ------ modules/schematics/src/entity/schema.ts | 5 ----- modules/schematics/src/feature/index.ts | 4 ---- modules/schematics/src/feature/schema.json | 6 ------ modules/schematics/src/feature/schema.ts | 5 ----- modules/schematics/src/reducer/index.ts | 4 ---- modules/schematics/src/reducer/schema.json | 6 ------ modules/schematics/src/reducer/schema.ts | 5 ----- modules/schematics/src/selector/index.ts | 4 ---- modules/schematics/src/selector/schema.json | 6 ------ modules/schematics/src/selector/schema.ts | 5 ----- modules/schematics/src/store/schema.json | 6 ------ modules/schematics/src/store/schema.ts | 5 ----- 29 files changed, 143 deletions(-) diff --git a/modules/effects/schematics/ng-add/index.ts b/modules/effects/schematics/ng-add/index.ts index a0c6226e5b..45d735fa6a 100644 --- a/modules/effects/schematics/ng-add/index.ts +++ b/modules/effects/schematics/ng-add/index.ts @@ -124,10 +124,6 @@ export default function (options: EffectOptions): Rule { options.module = findModuleFromOptions(host, options); } - if (!options.skipTests && options.skipTest) { - options.skipTests = options.skipTest; - } - const parsedPath = parseName(options.path, options.name || ''); options.name = parsedPath.name; options.path = parsedPath.path; diff --git a/modules/effects/schematics/ng-add/schema.json b/modules/effects/schematics/ng-add/schema.json index 2a08754271..1167e8ca6d 100644 --- a/modules/effects/schematics/ng-add/schema.json +++ b/modules/effects/schematics/ng-add/schema.json @@ -25,12 +25,6 @@ "default": true, "description": "Flag to indicate if a dir is created." }, - "skipTest": { - "type": "boolean", - "description": "When true, does not create test files.", - "x-deprecated": "Use skipTests instead.", - "default": false - }, "skipTests": { "type": "boolean", "default": false, diff --git a/modules/effects/schematics/ng-add/schema.ts b/modules/effects/schematics/ng-add/schema.ts index 0320ac183a..1ba2f9d1e2 100644 --- a/modules/effects/schematics/ng-add/schema.ts +++ b/modules/effects/schematics/ng-add/schema.ts @@ -3,8 +3,6 @@ export interface Schema { skipPackageJson?: boolean; path?: string; flat?: boolean; - /** @deprecated renamed to skipTests, use skipTests instead */ - skipTest?: boolean; skipTests?: boolean; project?: string; module?: string; diff --git a/modules/schematics/src/action/index.ts b/modules/schematics/src/action/index.ts index 45fcfbabb0..171b83a00c 100644 --- a/modules/schematics/src/action/index.ts +++ b/modules/schematics/src/action/index.ts @@ -25,10 +25,6 @@ export default function (options: ActionOptions): Rule { return (host: Tree, context: SchematicContext) => { options.path = getProjectPath(host, options); - if (!options.skipTests && options.skipTest) { - options.skipTests = options.skipTest; - } - const parsedPath = parseName(options.path, options.name); options.name = parsedPath.name; options.path = parsedPath.path; diff --git a/modules/schematics/src/action/schema.json b/modules/schematics/src/action/schema.json index 862920c6ab..e3d43b9ea8 100644 --- a/modules/schematics/src/action/schema.json +++ b/modules/schematics/src/action/schema.json @@ -24,12 +24,6 @@ "description": "The name of the project.", "aliases": ["p"] }, - "skipTest": { - "type": "boolean", - "description": "When true, does not create test files.", - "x-deprecated": "Use skipTests instead.", - "default": false - }, "skipTests": { "type": "boolean", "description": "When true, does not create test files.", diff --git a/modules/schematics/src/action/schema.ts b/modules/schematics/src/action/schema.ts index dbab59d2cb..bf0cf121a7 100644 --- a/modules/schematics/src/action/schema.ts +++ b/modules/schematics/src/action/schema.ts @@ -14,11 +14,6 @@ export interface Schema { */ project?: string; - /** - * When true, does not create test files. - * @deprecated Use skipTests instead - */ - skipTest?: boolean; /** * When true, does not create test files. */ diff --git a/modules/schematics/src/container/index.ts b/modules/schematics/src/container/index.ts index d80016eb67..f1244438f9 100644 --- a/modules/schematics/src/container/index.ts +++ b/modules/schematics/src/container/index.ts @@ -122,10 +122,6 @@ export default function (options: ContainerOptions): Rule { return (host: Tree, context: SchematicContext) => { options.path = getProjectPath(host, options); - if (!options.skipTests && options.skipTest) { - options.skipTests = options.skipTest; - } - const parsedPath = parseName(options.path, options.name); options.name = parsedPath.name; options.path = parsedPath.path; diff --git a/modules/schematics/src/container/schema.json b/modules/schematics/src/container/schema.json index db71143fb2..74d65ab2fc 100644 --- a/modules/schematics/src/container/schema.json +++ b/modules/schematics/src/container/schema.json @@ -56,12 +56,6 @@ "description": "The file extension or preprocessor to use for style files.", "type": "string" }, - "skipTest": { - "type": "boolean", - "description": "When true, does not create test files.", - "x-deprecated": "Use skipTests instead.", - "default": false - }, "skipTests": { "type": "boolean", "description": "When true, does not create test files." diff --git a/modules/schematics/src/container/schema.ts b/modules/schematics/src/container/schema.ts index 2637af2a1a..a39f7e00ca 100644 --- a/modules/schematics/src/container/schema.ts +++ b/modules/schematics/src/container/schema.ts @@ -35,11 +35,6 @@ export interface Schema { * The file extension or preprocessor to use for style files. */ style?: string; - /** - * When true, does not create test files. - * @deprecated Use skipTests instead - */ - skipTest?: boolean; /** * When true, does not create test files. */ diff --git a/modules/schematics/src/data/index.ts b/modules/schematics/src/data/index.ts index fc514bbd6f..8ae2ceccce 100644 --- a/modules/schematics/src/data/index.ts +++ b/modules/schematics/src/data/index.ts @@ -23,10 +23,6 @@ export default function (options: DataOptions): Rule { return (host: Tree, context: SchematicContext) => { options.path = getProjectPath(host, options); - if (!options.skipTests && options.skipTest) { - options.skipTests = options.skipTest; - } - const parsedPath = parseName(options.path, options.name); options.name = parsedPath.name; options.path = parsedPath.path; diff --git a/modules/schematics/src/data/schema.json b/modules/schematics/src/data/schema.json index bf9d4881fc..a712ca2968 100644 --- a/modules/schematics/src/data/schema.json +++ b/modules/schematics/src/data/schema.json @@ -23,12 +23,6 @@ "description": "The name of the project.", "aliases": ["p"] }, - "skipTest": { - "type": "boolean", - "description": "When true, does not create test files.", - "x-deprecated": "Use skipTests instead.", - "default": false - }, "skipTests": { "type": "boolean", "description": "When true, does not create test files.", diff --git a/modules/schematics/src/data/schema.ts b/modules/schematics/src/data/schema.ts index 4ee2279299..da41e02906 100644 --- a/modules/schematics/src/data/schema.ts +++ b/modules/schematics/src/data/schema.ts @@ -14,11 +14,6 @@ export interface Schema { */ project?: string; - /** - * When true, does not create test files. - * @deprecated use skipTests instead - */ - skipTest?: boolean; /** * When true, does not create test files. */ diff --git a/modules/schematics/src/effect/index.ts b/modules/schematics/src/effect/index.ts index 02b865dd73..06f6ccf9be 100644 --- a/modules/schematics/src/effect/index.ts +++ b/modules/schematics/src/effect/index.ts @@ -121,10 +121,6 @@ export default function (options: EffectOptions): Rule { return (host: Tree, context: SchematicContext) => { options.path = getProjectPath(host, options); - if (!options.skipTests && options.skipTest) { - options.skipTests = options.skipTest; - } - if (options.module) { options.module = findModuleFromOptions(host, options); } diff --git a/modules/schematics/src/effect/schema.json b/modules/schematics/src/effect/schema.json index 549b3225b7..ca23dee4f2 100644 --- a/modules/schematics/src/effect/schema.json +++ b/modules/schematics/src/effect/schema.json @@ -29,12 +29,6 @@ "default": true, "description": "Flag to indicate if a dir is created." }, - "skipTest": { - "type": "boolean", - "description": "When true, does not create test files.", - "x-deprecated": "Use skipTests instead.", - "default": false - }, "skipTests": { "type": "boolean", "default": false, diff --git a/modules/schematics/src/effect/schema.ts b/modules/schematics/src/effect/schema.ts index 2d13b33bf7..cbee7c67e0 100644 --- a/modules/schematics/src/effect/schema.ts +++ b/modules/schematics/src/effect/schema.ts @@ -19,11 +19,6 @@ export interface Schema { */ flat?: boolean; - /** - * When true, does not create test files. - * @deprecated Use skipTests instead - */ - skipTest?: boolean; /** * When true, does not create test files. */ diff --git a/modules/schematics/src/entity/index.ts b/modules/schematics/src/entity/index.ts index 5a64481624..1f48d6b83a 100644 --- a/modules/schematics/src/entity/index.ts +++ b/modules/schematics/src/entity/index.ts @@ -35,10 +35,6 @@ export default function (options: EntityOptions): Rule { options.name = parsedPath.name; options.path = parsedPath.path; - if (!options.skipTests && options.skipTest) { - options.skipTests = options.skipTest; - } - if (options.module) { options.module = findModuleFromOptions(host, options); } diff --git a/modules/schematics/src/entity/schema.json b/modules/schematics/src/entity/schema.json index c5b0e4c130..60fc958a3a 100644 --- a/modules/schematics/src/entity/schema.json +++ b/modules/schematics/src/entity/schema.json @@ -24,12 +24,6 @@ "description": "The name of the project.", "aliases": ["p"] }, - "skipTest": { - "type": "boolean", - "description": "When true, does not create test files.", - "x-deprecated": "Use skipTests instead.", - "default": false - }, "skipTests": { "type": "boolean", "description": "When true, does not create test files.", diff --git a/modules/schematics/src/entity/schema.ts b/modules/schematics/src/entity/schema.ts index 935e238920..ff6e7ab78f 100644 --- a/modules/schematics/src/entity/schema.ts +++ b/modules/schematics/src/entity/schema.ts @@ -17,11 +17,6 @@ export interface Schema { * Flag to indicate if a dir is created. */ flat?: boolean; - /** - * When true, does not create test files. - * @deprecated Use skipTests instead - */ - skipTest?: boolean; /** * When true, does not create test files. */ diff --git a/modules/schematics/src/feature/index.ts b/modules/schematics/src/feature/index.ts index ac167e4f92..1588905767 100644 --- a/modules/schematics/src/feature/index.ts +++ b/modules/schematics/src/feature/index.ts @@ -8,10 +8,6 @@ import { import { Schema as FeatureOptions } from './schema'; export default function (options: FeatureOptions): Rule { - if (!options.skipTests && options.skipTest) { - options.skipTests = options.skipTest; - } - return (host: Tree, context: SchematicContext) => { return chain([ schematic('action', { diff --git a/modules/schematics/src/feature/schema.json b/modules/schematics/src/feature/schema.json index 7b2e880d65..63b1093b0b 100644 --- a/modules/schematics/src/feature/schema.json +++ b/modules/schematics/src/feature/schema.json @@ -34,12 +34,6 @@ "description": "Specifies the declaring module.", "aliases": ["m"] }, - "skipTest": { - "type": "boolean", - "description": "When true, does not create test files.", - "x-deprecated": "Use skipTests instead.", - "default": false - }, "skipTests": { "type": "boolean", "default": false, diff --git a/modules/schematics/src/feature/schema.ts b/modules/schematics/src/feature/schema.ts index e6e9f88b7c..372acc6ba4 100644 --- a/modules/schematics/src/feature/schema.ts +++ b/modules/schematics/src/feature/schema.ts @@ -19,11 +19,6 @@ export interface Schema { */ flat?: boolean; - /** - * When true, does not create test files. - * @deprecated Use skipTests instead - */ - skipTest?: boolean; /** * When true, does not create test files. */ diff --git a/modules/schematics/src/reducer/index.ts b/modules/schematics/src/reducer/index.ts index 6eb0fa9a71..12f5fe4fcb 100644 --- a/modules/schematics/src/reducer/index.ts +++ b/modules/schematics/src/reducer/index.ts @@ -36,10 +36,6 @@ export default function (options: ReducerOptions): Rule { options.module = findModuleFromOptions(host, options); } - if (!options.skipTests && options.skipTest) { - options.skipTests = options.skipTest; - } - const parsedPath = parseName(options.path, options.name); options.name = parsedPath.name; options.path = parsedPath.path; diff --git a/modules/schematics/src/reducer/schema.json b/modules/schematics/src/reducer/schema.json index 37bf609b23..5f662ea1ba 100644 --- a/modules/schematics/src/reducer/schema.json +++ b/modules/schematics/src/reducer/schema.json @@ -24,12 +24,6 @@ "description": "The name of the project.", "aliases": ["p"] }, - "skipTest": { - "type": "boolean", - "description": "When true, does not create test files.", - "x-deprecated": "Use skipTests instead.", - "default": false - }, "skipTests": { "type": "boolean", "description": "When true, does not create test files.", diff --git a/modules/schematics/src/reducer/schema.ts b/modules/schematics/src/reducer/schema.ts index c769ad5b32..70d6acfde8 100644 --- a/modules/schematics/src/reducer/schema.ts +++ b/modules/schematics/src/reducer/schema.ts @@ -19,11 +19,6 @@ export interface Schema { */ flat?: boolean; - /** - * When true, does not create test files. - * @deprecated Use skipTests instead - */ - skipTest?: boolean; /** * When true, does not create test files. */ diff --git a/modules/schematics/src/selector/index.ts b/modules/schematics/src/selector/index.ts index 16926c4e5c..85100dcc66 100644 --- a/modules/schematics/src/selector/index.ts +++ b/modules/schematics/src/selector/index.ts @@ -23,10 +23,6 @@ export default function (options: SelectorOptions): Rule { return (host: Tree, context: SchematicContext) => { options.path = getProjectPath(host, options); - if (!options.skipTests && options.skipTest) { - options.skipTests = options.skipTest; - } - const parsedPath = parseName(options.path, options.name || ''); options.name = parsedPath.name; options.path = parsedPath.path; diff --git a/modules/schematics/src/selector/schema.json b/modules/schematics/src/selector/schema.json index e86c9a2c13..c16ea162a5 100644 --- a/modules/schematics/src/selector/schema.json +++ b/modules/schematics/src/selector/schema.json @@ -23,12 +23,6 @@ "description": "The name of the project.", "aliases": ["p"] }, - "skipTest": { - "type": "boolean", - "description": "When true, does not create test files.", - "x-deprecated": "Use skipTests instead.", - "default": false - }, "skipTests": { "type": "boolean", "description": "When true, does not create test files.", diff --git a/modules/schematics/src/selector/schema.ts b/modules/schematics/src/selector/schema.ts index ee7ff3e67a..8e135360f9 100644 --- a/modules/schematics/src/selector/schema.ts +++ b/modules/schematics/src/selector/schema.ts @@ -19,11 +19,6 @@ export interface Schema { */ flat?: boolean; - /** - * When true, does not create test files. - * @deprecated Use skipTests instead - */ - skipTest?: boolean; /** * When true, does not create test files. */ diff --git a/modules/schematics/src/store/schema.json b/modules/schematics/src/store/schema.json index cf126b98c6..67c2f389aa 100644 --- a/modules/schematics/src/store/schema.json +++ b/modules/schematics/src/store/schema.json @@ -29,12 +29,6 @@ "default": true, "description": "Flag to indicate if a dir is created." }, - "skipTest": { - "type": "boolean", - "description": "When true, does not create test files.", - "x-deprecated": "Use skipTests instead.", - "default": false - }, "skipTests": { "type": "boolean", "default": false, diff --git a/modules/schematics/src/store/schema.ts b/modules/schematics/src/store/schema.ts index b2bbbb7011..20cb63769c 100644 --- a/modules/schematics/src/store/schema.ts +++ b/modules/schematics/src/store/schema.ts @@ -17,11 +17,6 @@ export interface Schema { * Flag to indicate if a dir is created. */ flat?: boolean; - /** - * When true, does not create test files. - * @deprecated Use skipTests instead - */ - skipTest?: boolean; /** * When true, does not create test files. */