fix(@angular/cli): handle format path in invoked schematics#23198
fix(@angular/cli): handle format path in invoked schematics#23198alan-agius4 wants to merge 1 commit into
path in invoked schematics#23198Conversation
2aa035b to
41fb78b
Compare
| if (property['format'] === 'path') { | ||
| (options as Record<string, unknown>)[key] = workingDir; | ||
| } |
There was a problem hiding this comment.
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.
#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.