-
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): use correct schematic defaults considering workspace #15041
Conversation
833b495
to
a1d3501
Compare
a1d3501
to
6edcb94
Compare
ffbef51
to
e67470b
Compare
packages/angular_devkit/schematics/tools/workflow/node-workflow_spec.ts
Outdated
Show resolved
Hide resolved
packages/angular_devkit/schematics/tools/workflow/node-workflow.ts
Outdated
Show resolved
Hide resolved
Fix angular#14986 This PR includes some refactoring to simplify the interaction of the `NodeWorkflow` and the `BaseWorkflow` with the registry. We were registering redundant `addPostTransform`s. Some of them in the constructor of the `BaseWorkflow`, which did not allow us to intercept `addUndefinedDefaults`. Additionally, we were setting the `validateOptionsWithSchema` transform multiple times unnecessarily. An issue left to fix is support for the `--project` option in schematic commands. Currently, `getProjectName` does not know about this option, since `createWorkflow` does not know how to parse the command line arguments. The parsing logic is implemented partially by the concrete implementation of the `SchematicCommand` template method.
b89fad9
to
a21d38a
Compare
@@ -6,6 +6,7 @@ | |||
* found in the LICENSE file at https://angular.io/license | |||
*/ | |||
// tslint:disable:no-implicit-dependencies | |||
import { schema } from '@angular-devkit/core'; |
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.
nit: unused import?
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.
I think this should also fix a variety of other open issues regarding defaults not being used for some schematics.
Incorporates fix from angular/angular-cli#15041 which changed the behavior of registering schematic defaults
Incorporates fix from angular/angular-cli#15041 which changed the behavior of registering schematic defaults
Incorporates fix from angular/angular-cli#15041 which changed the behavior of registering schematic defaults
Incorporates fix from angular/angular-cli#15041 which changed the behavior of registering schematic defaults
Incorporates fix from angular/angular-cli#15041 which changed the behavior of registering schematic defaults
Incorporates fix from angular/angular-cli#15041 which changed the behavior of registering schematic defaults
Incorporates fix from angular/angular-cli#15041 which changed the behavior of registering schematic defaults
Incorporates fix from angular/angular-cli#15041 which changed the behavior of registering schematic defaults
Incorporates fix from angular/angular-cli#15041 which changed the behavior of registering schematic defaults
Incorporates fix from angular/angular-cli#15041 which changed the behavior of registering schematic defaults
Incorporates fix from angular/angular-cli#15041 which changed the behavior of registering schematic defaults
Incorporates fix from angular/angular-cli#15041 which changed the behavior of registering schematic defaults
Incorporates fix from angular/angular-cli#15041 which changed the behavior of registering schematic defaults
Incorporates fix from angular/angular-cli#15041 which changed the behavior of registering schematic defaults
Incorporates fix from angular/angular-cli#15041 which changed the behavior of registering schematic defaults
Incorporates fix from angular/angular-cli#15041 which changed the behavior of registering schematic defaults
Incorporates fix from angular/angular-cli#15041 which changed the behavior of registering schematic defaults
Incorporates fix from angular/angular-cli#15041 which changed the behavior of registering schematic defaults
Incorporates fix from angular/angular-cli#15041 which changed the behavior of registering schematic defaults
Incorporates fix from angular/angular-cli#15041 which changed the behavior of registering schematic defaults
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. |
Fix #14986
This PR includes some refactoring to simplify the interaction of the
NodeWorkflow
and theBaseWorkflow
with the registry.We were registering redundant
addPostTransform
s. Some of them in the constructor of theBaseWorkflow
, which did not allow us to interceptaddUndefinedDefaults
.Additionally, we were setting the
validateOptionsWithSchema
transform multiple times unnecessarily.An issue left to fix is support for the
--project
option in schematic commands. Currently,getProjectName
does not know about this option, sincecreateWorkflow
does not know how to parse the command line arguments. The parsing logic is implemented partially by the concrete implementation of theSchematicCommand
template method.