When an `externalSchematic` rule was used, the input tree was branched but never merged back into the input tree. This resulted in a different tree instance being returned from the rule. The `externalSchematic` rule now behaves like the `schematic` rule which merges the trees.
This change ensures correct merge behavior when a `HostTree` is wrapped in a `ScopedTree` or `DelegateTree`. Previously the ancestry of the HostTree was not available to the merge.
In this context this is not a breaking change for two reasons.
- `NodePackageInstallTaskOptions` is not exported.
- `NodePackageInstallTask` is using `NodePackageInstallTaskOptions` with `Partial` type which would cause the Class to become an object literal. This can be seen here: efb97c87f0/packages/schematics/angular/ng-new/index.ts (L81-L84)
This change allows option transforms to be directly provided to the NodeWorkflow instead of needing to access the engine host inside the workflow after creation. This also allows option transforms to affect the options prior to schema validation (if enabled).
The manager that is being used to perform the package installation will now be shown during the installation. This provides more insight to the user as well as providing additional troubleshooting information in the event of a failure.
This change provides an additional NodeWorkflow option `schemaValidation`. When enabled, this new option will setup schema-based validation of a schematics options prior to schematic execution. The schema registry provided with the NodeWorkflow is used to perform the validation. This new option removes the need to manually configure validation of schematic options when initializing a schematic runtime.
This change allows the creation of a NodeWorkflow class with a path string instead of requiring a fully configured filesystem host object. This reduces the amount of code necessary to setup a schematics runtime for common cases.
This change first attempts to resolve a schematic referenced via the external schematic rule from the requesting schematic collection. This allows schematic packages that are direct dependencies of another schematic package to be used with the external schematic rule without manual package resolution code within the schematic.
Closes#18098Closes#11026
This allows a rule to conditionally not return a followup rule when asynchronous. This is useful to handle error conditions where no further action should be taken and returning void best expresses this case.
This commit makes a few minor changes to enable syncing the CLI repository
into google3.
1. mark pkg_tar and pkg_npm as external
2. remove dependencies (marked as comment) which are stale in google3
3. remove TS files generated from JSON schema in BUILD files since these
files are compiled and added to the g3 codebase at sync time
4. Some minor typing changes
5. Remove duplicate licenses
6. mark dependencies which are not available in g3 as external
7. Immediately type the result of JSON.parse() as required by g3 linter.
Otherwise, the type defaults to `any`.
BREAKING CHANGE
Deprecated `SchematicTestRunner.runSchematic` and `SchematicTestRunner.runExternalSchematic` have been removed. Use `SchematicTestRunner.runSchematicAsync` or `SchematicTestRunner.runExternalSchematicAsync` instead.
Note: this change only effects direct `@angular-devkit/schematics` users and not the application developers.
Contains fixes related to the symlink behaviour inside of bazel. Without it, webpack needs to be configured to be aware of symlinks and preserve the paths.
BREAKING CHANGE
Deprecated `FileSystemHost` has been removed. Use `Host` directly instead.
Note: this change only effects direct `@angular-devkit/schematics` users and not the application developers.
Without this change, module names will be computed with incorrect paths containing duplicate path fragments (e.g. `@angular-devkit/architect/testing/testing/test-logger`).