Skip to content

fix(@schematics/angular): show routing module suffixes in findModule error - #34374

Merged
dgp1130 merged 1 commit into
angular:mainfrom
MeAkib:fix/find-module-routing-suffix
Oct 16, 2026
Merged

dgp1130 merged 1 commit into
angular:mainfrom
MeAkib:fix/find-module-routing-suffix

Conversation

@MeAkib

@MeAkib MeAkib commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

When only routing modules are found, the error message printed the optional routingModuleExt parameter, which no schematic passes, so users saw "Modules with suffix 'undefined' are strictly reserved for routing.". Since 0b7d48c the lookup checks both -routing-module.ts and -routing.module.ts, so list the suffixes that are actually used.

…` error

When only routing modules are found, the error message printed the optional
`routingModuleExt` parameter, which no schematic passes, so users saw
"Modules with suffix 'undefined' are strictly reserved for routing.". Since
0b7d48c the lookup checks both `-routing-module.ts` and `-routing.module.ts`,
so list the suffixes that are actually used.
@alan-agius4 alan-agius4 added the target: patch This PR is targeted for the next patch release label Oct 16, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the error message in find-module.ts to dynamically list all reserved routing module suffixes, and adds a corresponding unit test in find-module_spec.ts to verify the error message format. There are no review comments, and we have no feedback to provide.

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: merge The PR is ready for merge by the caretaker labels Oct 16, 2026

@alan-agius4 alan-agius4 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@dgp1130
dgp1130 merged commit 490a6fe into angular:main Oct 16, 2026
42 of 43 checks passed
@dgp1130

dgp1130 commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants