fix(angular): normalize project name and don't default to npmScope as prefix when it's not a valid html selector #10116
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Current Behavior
Numbers are stripped out automatically from project names, and the
npmScope
is always used as the default prefix regardless of whether it is a valid HTML selector. Angular requires a valid HTML selector as a prefix.Expected Behavior
Project names should support numbers and they shouldn't be stripped out of the name. The
npmScope
should be used as the default prefix as long as it is valid. When thenpmScope
is not a valid HTML selector, we don't provide a default value for it, the developer should provide one if needed or use whatever the Angular CLI schematic defaults to.Related Issue(s)
Fixes #10067