Skip to content

Conversation

@crisbeto
Copy link
Member

@crisbeto crisbeto commented Apr 4, 2025

Currently the server schematic assumes that the app component is called App and it's places in ./app/app. This will fail if the user renamed it or moved it to a different file.

These changes add a utility function to resolve the component name and path from the source the source code, and they use the new function to produce a more accurate result.

@crisbeto crisbeto requested a review from clydin April 4, 2025 11:52
@crisbeto crisbeto added the action: review The PR is still awaiting reviews from at least one requested reviewer label Apr 4, 2025
@crisbeto crisbeto marked this pull request as ready for review April 4, 2025 11:52
@clydin clydin added the target: major This PR is targeted for the next major release label Apr 4, 2025
@crisbeto crisbeto force-pushed the server-schematic-name branch from 597af7f to 2397b22 Compare April 4, 2025 18:28
@crisbeto
Copy link
Member Author

crisbeto commented Apr 4, 2025

I've pushed some more code to properly handle NgModule-based apps as well. It's ready for another review.

@crisbeto crisbeto force-pushed the server-schematic-name branch from 2397b22 to 75f1500 Compare April 7, 2025 07:25
… schematic

Currently the `server` schematic assumes that the app component is called `App` and it's places in `./app/app`. This will fail if the user renamed it or moved it to a different file.

These changes add a utility function to resolve the component name and path from the source the source code, and they use the new function to produce a more accurate result.
@crisbeto crisbeto force-pushed the server-schematic-name branch from 75f1500 to d9af817 Compare April 7, 2025 07:27
Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alan-agius4 alan-agius4 removed the request for review from clydin April 7, 2025 11:53
@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 Apr 7, 2025
@clydin clydin merged commit ea1143d into angular:main Apr 7, 2025
31 checks passed
@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 May 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: @schematics/angular target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants