Skip to content

Commit bfd63ca

Browse files
alan-agius4Keen Yee Liau
authored and
Keen Yee Liau
committed
refactor(@schematics/angular): remove deprecated guard spec option
BREAKING CHANGE Deprecated guard schematic option `spec` has been removed. Please use `skipTests` instead.
1 parent bad6447 commit bfd63ca

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

packages/schematics/angular/guard/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ export default function (options: GuardOptions): Rule {
4848
options.name = parsedPath.name;
4949
options.path = parsedPath.path;
5050

51-
// todo remove these when we remove the deprecations
52-
options.skipTests = options.skipTests || !options.spec;
53-
5451
const templateSource = apply(url('./files'), [
5552
options.skipTests ? filter(path => !path.endsWith('.spec.ts.template')) : noop(),
5653
applyTemplates({

packages/schematics/angular/guard/schema.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@
1414
},
1515
"x-prompt": "What name would you like to use for the guard?"
1616
},
17-
"spec": {
18-
"type": "boolean",
19-
"description": "When true (the default), generates a \"spec.ts\" test file for the new guard.",
20-
"default": true,
21-
"x-deprecated": "Use \"skipTests\" instead."
22-
},
2317
"skipTests": {
2418
"type": "boolean",
2519
"description": "When true, does not create \"spec.ts\" test files for the new guard.",

packages/schematics/angular/migrations/migration-collection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@
7474
"version": "10.0.0-beta.2",
7575
"factory": "./update-10/remove-es5-browser-support",
7676
"description": "Remove deprecated 'es5BrowserSupport' browser builder option. The inclusion for ES5 polyfills will be determined from the browsers listed in the browserslist configuration."
77+
},
78+
"schematic-options-10": {
79+
"version": "10.0.0-beta.2",
80+
"factory": "./update-9/schematic-options",
81+
"description": "Replace deprecated 'styleext' and 'spec' Angular schematic options."
7782
}
7883
}
7984
}

0 commit comments

Comments
 (0)