We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cbce3d3 commit 66230b3Copy full SHA for 66230b3
packages/angular_devkit/core/src/workspace/definitions.ts
@@ -201,8 +201,8 @@ export class ProjectDefinitionCollection extends DefinitionCollection<ProjectDef
201
}
202
203
private _validateName(name: string): void {
204
- if (typeof name !== 'string' || !/^[a-zA-Z][.0-9a-zA-Z]*(-[.0-9a-zA-Z]*)*$/.test(name)) {
205
- throw new Error('Project name must be a valid npm package name without a scope.');
+ if (typeof name !== 'string' || !/^(?:@\w[\w\.-]*\/)?\w[\w\.-]*$/.test(name)) {
+ throw new Error('Project name must be a valid npm package name.');
206
207
208
0 commit comments