Skip to content

Commit 649417c

Browse files
committed
refactor(@angular-devkit/core): deprecate deps parameter in SchemaRegistry transforms
The deps parameter in addPreTransform and addPostTransform is deprecated. Consumers should ensure that transforms are added in the desired execution order instead of relying on the dependency tracking system, which will be removed in a future version.
1 parent 9a313d3 commit 649417c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

packages/angular_devkit/core/src/json/schema/interface.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export interface SchemaRegistry {
8585
/**
8686
* Add a transformation step before the validation of any Json.
8787
* @param {JsonVisitor} visitor The visitor to transform every value.
88-
* @param {JsonVisitor[]} deps A list of other visitors to run before.
88+
* @param {JsonVisitor[]} deps [Deprecated] A list of other visitors to run before.
8989
*/
9090
addPreTransform(visitor: JsonVisitor, deps?: JsonVisitor[]): void;
9191

@@ -94,7 +94,7 @@ export interface SchemaRegistry {
9494
* after the POST, so if transformations are not compatible with the Schema it will not result
9595
* in an error.
9696
* @param {JsonVisitor} visitor The visitor to transform every value.
97-
* @param {JsonVisitor[]} deps A list of other visitors to run before.
97+
* @param {JsonVisitor[]} deps [Deprecated] A list of other visitors to run before.
9898
*/
9999
addPostTransform(visitor: JsonVisitor, deps?: JsonVisitor[]): void;
100100
}

packages/angular_devkit/core/src/json/schema/registry.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export class CoreSchemaRegistry implements SchemaRegistry {
171171
/**
172172
* Add a transformation step before the validation of any Json.
173173
* @param {JsonVisitor} visitor The visitor to transform every value.
174-
* @param {JsonVisitor[]} deps A list of other visitors to run before.
174+
* @param {JsonVisitor[]} deps [Deprecated] A list of other visitors to run before.
175175
*/
176176
addPreTransform(visitor: JsonVisitor, deps?: JsonVisitor[]): void {
177177
this._pre.add(visitor, deps);
@@ -182,7 +182,7 @@ export class CoreSchemaRegistry implements SchemaRegistry {
182182
* after the POST, so if transformations are not compatible with the Schema it will not result
183183
* in an error.
184184
* @param {JsonVisitor} visitor The visitor to transform every value.
185-
* @param {JsonVisitor[]} deps A list of other visitors to run before.
185+
* @param {JsonVisitor[]} deps [Deprecated] A list of other visitors to run before.
186186
*/
187187
addPostTransform(visitor: JsonVisitor, deps?: JsonVisitor[]): void {
188188
this._post.add(visitor, deps);

0 commit comments

Comments
 (0)