-
Notifications
You must be signed in to change notification settings - Fork 12k
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
fix(@angular/cli): handle format path
in invoked schematics
#23198
Conversation
2aa035b
to
41fb78b
Compare
if (property['format'] === 'path') { | ||
(options as Record<string, unknown>)[key] = workingDir; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the logic previously set the default to the workingDir for only properties named path
but this overrides the value with the workDir for all properties with a path
format. I think we might want to keep the path
name condition to prevent accidentally breaking third-party schematics that could be using the path
format for other purposes.
We should probably add in a Schematics specific workingDirectory
concept (on the context maybe?) so we can avoid this whole workaround in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#23212 is a different approach to this change.
41fb78b
to
0291541
Compare
With this change we change the how we handle `"format": "path"` schematic property option. Previously, in version 14 this format was only being applied on parent schematics that were registered as commands. With this change we apply the formatter on all options, even those who are called programmatically using APIs like `externalSchematic`.
0291541
to
2a2f20a
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
With this change we change the how we handle
"format": "path"
schematic property option. Previously, in version 14 this format was only being applied on parent schematics that were registered as commands. With this change we apply the formatter on all options, even those who are called programmatically using APIs likeexternalSchematic
.