Skip to content

Commit 88c952e

Browse files
authored
FIXED | Schematics to work with angular 12 (#466)
1 parent 168b1f3 commit 88c952e

File tree

9 files changed

+5
-63
lines changed

9 files changed

+5
-63
lines changed

projects/spectator/schematics/src/spectator/component-schema.json

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
},
4747
"viewEncapsulation": {
4848
"description": "The view encapsulation strategy to use in the new component.",
49-
"enum": ["Emulated", "Native", "None", "ShadowDom"],
49+
"enum": ["Emulated", "None", "ShadowDom"],
5050
"type": "string",
5151
"alias": "v"
5252
},
@@ -71,12 +71,6 @@
7171
}
7272
]
7373
},
74-
"styleext": {
75-
"description": "The file extension to use for style files.",
76-
"type": "string",
77-
"default": "css",
78-
"x-deprecated": "Use \"style\" instead."
79-
},
8074
"style": {
8175
"description": "The file extension or preprocessor to use for style files.",
8276
"type": "string",
@@ -89,12 +83,6 @@
8983
"styl"
9084
]
9185
},
92-
"spec": {
93-
"type": "boolean",
94-
"description": "When true (the default), generates a \"spec.ts\" test file for the new component.",
95-
"default": true,
96-
"x-deprecated": "Use \"skipTests\" instead."
97-
},
9886
"skipTests": {
9987
"type": "boolean",
10088
"description": "When true, does not create \"spec.ts\" test files for the new component.",

projects/spectator/schematics/src/spectator/directive-schema.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@
4141
}
4242
]
4343
},
44-
"spec": {
45-
"type": "boolean",
46-
"description": "When true (the default), generates a \"spec.ts\" test file for the new directive.",
47-
"default": true,
48-
"x-deprecated": "Use \"skipTests\" instead."
49-
},
5044
"skipTests": {
5145
"type": "boolean",
5246
"description": "When true, does not create \"spec.ts\" test files for the new class.",

projects/spectator/schematics/src/spectator/index.js

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

projects/spectator/schematics/src/spectator/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

projects/spectator/schematics/src/spectator/index.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export function spectatorComponentSchematic(options: ComponentOptions): Rule {
2323
externalSchematic('@schematics/angular', 'component', {
2424
...omit(options, ['jest', 'withHost', 'withCustomHost']),
2525
skipTests: true,
26-
spec: false,
2726
}),
2827
async (tree: Tree, _context: SchematicContext): Promise<Rule> => {
2928
if (options.skipTests) {
@@ -52,9 +51,8 @@ export function spectatorComponentSchematic(options: ComponentOptions): Rule {
5251
export function spectatorServiceSchematic(options: ServiceOptions): Rule {
5352
return chain([
5453
externalSchematic('@schematics/angular', 'service', {
55-
...omit(options, ['jest']),
54+
...omit(options, ['jest', 'isDataService']),
5655
skipTests: true,
57-
spec: false,
5856
}),
5957
async (tree: Tree, _context: SchematicContext): Promise<Rule> => {
6058
if (options.skipTests) {
@@ -81,7 +79,6 @@ export function spectatorDirectiveSchematic(options: DirectiveOptions): Rule {
8179
externalSchematic('@schematics/angular', 'directive', {
8280
...omit(options, ['jest']),
8381
skipTests: true,
84-
spec: false,
8582
}),
8683
async (tree: Tree, _context: SchematicContext): Promise<Rule> => {
8784
if (options.skipTests) {
@@ -108,7 +105,6 @@ export function spectatorPipeSchematic(options: DirectiveOptions): Rule {
108105
externalSchematic('@schematics/angular', 'pipe', {
109106
...omit(options, ['jest']),
110107
skipTests: true,
111-
spec: false,
112108
}),
113109
async (tree: Tree, _context: SchematicContext): Promise<Rule> => {
114110
if (options.skipTests) {

projects/spectator/schematics/src/spectator/pipe-schema.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@
2727
"$source": "projectName"
2828
}
2929
},
30-
"spec": {
31-
"type": "boolean",
32-
"description": "When true (the default), generates a \"spec.ts\" test file for the new pipe.",
33-
"default": true,
34-
"x-deprecated": "Use \"skipTests\" instead."
35-
},
3630
"skipTests": {
3731
"type": "boolean",
3832
"description": "When true, does not create \"spec.ts\" test files for the new class.",

projects/spectator/schematics/src/spectator/schema.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

projects/spectator/schematics/src/spectator/schema.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,10 @@ export class ComponentOptions {
4545
* When true, does not create test files.
4646
*/
4747
skipTests?: boolean;
48-
/**
49-
* Specifies if a spec file is generated.
50-
*/
51-
spec?: boolean;
5248
/**
5349
* The file extension or preprocessor to use for style files.
5450
*/
5551
style?: any;
56-
/**
57-
* The file extension to be used for style files.
58-
*/
59-
styleext?: string;
6052
/**
6153
* Specifies the view encapsulation strategy.
6254
*/
@@ -81,10 +73,6 @@ export class ServiceOptions {
8173
/**
8274
* Specifies if a spec file is generated.
8375
*/
84-
spec?: boolean;
85-
/**
86-
* Specifies if Jest is to be used for mocking
87-
*/
8876
jest?: boolean;
8977
}
9078
export class DirectiveOptions {
@@ -118,10 +106,6 @@ export class DirectiveOptions {
118106
* When true, does not create test files.
119107
*/
120108
skipTests?: boolean;
121-
/**
122-
* Specifies if a spec file is generated.
123-
*/
124-
spec?: boolean;
125109
/**
126110
* Specifies if Jest is to be used for mocking
127111
*/
@@ -150,10 +134,6 @@ export class PipeOptions {
150134
* When true, does not create test files.
151135
*/
152136
skipTests?: boolean;
153-
/**
154-
* Specifies if a spec file is generated.
155-
*/
156-
spec?: boolean;
157137
/**
158138
* Specifies if Jest is to be used for mocking
159139
*/

projects/spectator/schematics/src/spectator/service-schema.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@
3232
"default": true,
3333
"description": "When true (the default), creates files at the top level of the project."
3434
},
35-
"spec": {
36-
"type": "boolean",
37-
"default": true,
38-
"description": "When true (the default), generates a \"spec.ts\" test file for the new service.",
39-
"x-deprecated": "Use \"skipTests\" instead."
40-
},
4135
"skipTests": {
4236
"type": "boolean",
4337
"description": "When true, does not create \"spec.ts\" test files for the new service.",

0 commit comments

Comments
 (0)