Skip to content

Commit 57d93fb

Browse files
alan-agius4clydin
authored andcommitted
fix(@schematics/angular): mark project as required option
While this option is always required it was not marked as such Closes #23848
1 parent 130975c commit 57d93fb

File tree

12 files changed

+13
-13
lines changed

12 files changed

+13
-13
lines changed

packages/schematics/angular/class/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@
4242
"description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\"."
4343
}
4444
},
45-
"required": ["name"]
45+
"required": ["name", "project"]
4646
}

packages/schematics/angular/component/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,5 @@
136136
"x-user-analytics": 19
137137
}
138138
},
139-
"required": ["name"]
139+
"required": ["name", "project"]
140140
}

packages/schematics/angular/directive/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,5 @@
8585
"x-user-analytics": 19
8686
}
8787
},
88-
"required": ["name"]
88+
"required": ["name", "project"]
8989
}

packages/schematics/angular/enum/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@
3636
"description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\"."
3737
}
3838
},
39-
"required": ["name"]
39+
"required": ["name", "project"]
4040
}

packages/schematics/angular/guard/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@
5555
"x-prompt": "Which interfaces would you like to implement?"
5656
}
5757
},
58-
"required": ["name"]
58+
"required": ["name", "project"]
5959
}

packages/schematics/angular/interceptor/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@
4343
"x-user-analytics": 12
4444
}
4545
},
46-
"required": ["name"]
46+
"required": ["name", "project"]
4747
}

packages/schematics/angular/interface/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@
4444
}
4545
}
4646
},
47-
"required": ["name"]
47+
"required": ["name", "project"]
4848
}

packages/schematics/angular/module/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,5 @@
6464
"alias": "m"
6565
}
6666
},
67-
"required": ["name"]
67+
"required": ["name", "project"]
6868
}

packages/schematics/angular/pipe/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,5 @@
6666
"x-user-analytics": 19
6767
}
6868
},
69-
"required": ["name"]
69+
"required": ["name", "project"]
7070
}

packages/schematics/angular/resolver/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@
4343
}
4444
}
4545
},
46-
"required": ["name"]
46+
"required": ["name", "project"]
4747
}

packages/schematics/angular/service/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@
4242
"x-user-analytics": 12
4343
}
4444
},
45-
"required": ["name"]
45+
"required": ["name", "project"]
4646
}

packages/schematics/angular/utility/generate-from-files.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface GenerateFromFilesOptions {
2828
name: string;
2929
path?: string;
3030
prefix?: string;
31-
project?: string;
31+
project: string;
3232
skipTests?: boolean;
3333
}
3434

@@ -37,7 +37,7 @@ export function generateFromFiles(
3737
extraTemplateValues: Record<string, string | ((v: string) => string)> = {},
3838
): Rule {
3939
return async (host: Tree) => {
40-
options.path ??= await createDefaultPath(host, options.project as string);
40+
options.path ??= await createDefaultPath(host, options.project);
4141
options.prefix ??= '';
4242
options.flat ??= true;
4343

0 commit comments

Comments
 (0)