From e40c72a8dc46d4879f200a01d766f788f8b9663b Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 13 Aug 2020 18:46:40 +0200 Subject: [PATCH] feat(@angular-devkit/architect-cli): show warning when using deprecated options --- packages/angular/cli/models/architect-command.ts | 1 + packages/angular_devkit/architect_cli/bin/architect.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/angular/cli/models/architect-command.ts b/packages/angular/cli/models/architect-command.ts index efca2bf3dedd..aabefae8ee4f 100644 --- a/packages/angular/cli/models/architect-command.ts +++ b/packages/angular/cli/models/architect-command.ts @@ -42,6 +42,7 @@ export abstract class ArchitectCommand< this._registry = new json.schema.CoreSchemaRegistry(); this._registry.addPostTransform(json.schema.transforms.addUndefinedDefaults); + this._registry.useXDeprecatedProvider(msg => this.logger.warn(msg)); const { workspace } = await workspaces.readWorkspace( this.workspace.root, diff --git a/packages/angular_devkit/architect_cli/bin/architect.ts b/packages/angular_devkit/architect_cli/bin/architect.ts index 5e554408ee84..f2c7bb87a02c 100644 --- a/packages/angular_devkit/architect_cli/bin/architect.ts +++ b/packages/angular_devkit/architect_cli/bin/architect.ts @@ -202,6 +202,9 @@ async function main(args: string[]): Promise { const registry = new schema.CoreSchemaRegistry(); registry.addPostTransform(schema.transforms.addUndefinedDefaults); + // Show usage of deprecated options + registry.useXDeprecatedProvider(msg => logger.warn(msg)); + const { workspace } = await workspaces.readWorkspace( configFilePath, workspaces.createWorkspaceHost(new NodeJsSyncHost()),