Skip to content

Schematics class name validation #23485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 21, 2022
Merged

Conversation

alan-agius4
Copy link
Collaborator

fix(@angular-devkit/core): classify string util should concat string without using a .

. is not a valid character in ES6 class names.

Prior to this change foo.module before used to be incorrectly classified to Foo.Module instead of FooModule.

Closes #13824


fix(@schematics/angular): prevent numbers from class names

With this change we prevent creating classes with invalid characters.

Closes #12868


Combined into a single PR as they are dependent on each other.

@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release 2022Q3 Fixit Candidates for the Q3 2022 fix-it labels Jul 1, 2022
@alan-agius4 alan-agius4 force-pushed the class-name-validation branch 2 times, most recently from d271e42 to 8d8faec Compare July 1, 2022 11:41
@alan-agius4 alan-agius4 changed the title Class name validation Schematics class name validation Jul 1, 2022
@alan-agius4 alan-agius4 requested a review from clydin July 1, 2022 11:43
@alan-agius4 alan-agius4 force-pushed the class-name-validation branch from 8d8faec to 0fc7b05 Compare July 3, 2022 11:44
@alan-agius4 alan-agius4 added the needs: discussion On the agenda for team meeting to determine next steps label Jul 3, 2022
…g without using a `.`

`.` is not a valid character in ES6 class names.

Prior to this change `foo.module` before used to be incorrectly classified to `Foo.Module` instead of `FooModule`.

Closes angular#13824
With this change we prevent creating classes with invalid characters.

Closes angular#12868
@alan-agius4 alan-agius4 force-pushed the class-name-validation branch from 0fc7b05 to 487f639 Compare July 21, 2022 16:56
@alan-agius4 alan-agius4 requested a review from clydin July 21, 2022 17:20
@alan-agius4 alan-agius4 removed the needs: discussion On the agenda for team meeting to determine next steps label Jul 21, 2022
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jul 21, 2022
@clydin clydin merged commit e995bda into angular:main Jul 21, 2022
@alan-agius4 alan-agius4 deleted the class-name-validation branch July 22, 2022 05:52
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
2022Q3 Fixit Candidates for the Q3 2022 fix-it action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve name validation with component schematic (and others) Prevent numbers in module/pipe names
2 participants