From 80bfb8fe5d821a8bf45f32f1bcc327a9799c88af Mon Sep 17 00:00:00 2001 From: vscaiceanu-1a <86055112+vscaiceanu-1a@users.noreply.github.com> Date: Mon, 24 Jun 2024 16:14:30 +0200 Subject: [PATCH] chore: remove NodePackageNgAddTask --- migration-guides/11.0.md | 4 +++ .../@o3r/schematics/src/tasks/ng-add/index.ts | 27 ------------------- 2 files changed, 4 insertions(+), 27 deletions(-) diff --git a/migration-guides/11.0.md b/migration-guides/11.0.md index 8ce2f313a2..f7f5827817 100644 --- a/migration-guides/11.0.md +++ b/migration-guides/11.0.md @@ -6,3 +6,7 @@ ## @ama-sdk/core - `prepareOptions` method has been removed from `ApiClient`. `getRequestOptions` should be used instead. + +## @o3r/schematics + +- `NodePackageNgAddTask` has been removed. `setupDependencies` should be used instead diff --git a/packages/@o3r/schematics/src/tasks/ng-add/index.ts b/packages/@o3r/schematics/src/tasks/ng-add/index.ts index 55993c8b49..ceba1b09ee 100644 --- a/packages/@o3r/schematics/src/tasks/ng-add/index.ts +++ b/packages/@o3r/schematics/src/tasks/ng-add/index.ts @@ -1,7 +1,4 @@ -import { TaskConfiguration, TaskConfigurationGenerator } from '@angular-devkit/schematics'; -import { NodePackageName, NodePackageTaskOptions } from '@angular-devkit/schematics/tasks/package-manager/options'; import type { NodeDependencyType } from '@schematics/angular/utility/dependencies'; -import { getPackageManager } from '../../utility/package-manager-runner'; /** * Options to be passed to the ng add task @@ -30,27 +27,3 @@ export interface NgAddPackageOptions { /** Flag to skip the execution of ng add and only install the package. Used mostly for external packages */ skipNgAddSchematicRun?: boolean; } - -/** @deprecated use {@link setupDependencies} instead, will be removed in V11 */ -export class NodePackageNgAddTask implements TaskConfigurationGenerator { - public quiet = false; - - constructor(public packageName: string, public options?: NgAddPackageOptions) {} - - public toConfiguration(): TaskConfiguration { - const cmdArguments = [ - this.options?.skipConfirmation ? '--skip-confirmation' : '', - this.options?.projectName ? `--projectName=${this.options.projectName}` : '' - ]; - return { - name: NodePackageName, - options: { - command: 'ng add', - quiet: this.quiet, - workingDirectory: this.options?.workingDirectory, - packageName: `ng add ${this.packageName}${this.options?.version ? '@' + this.options.version : ''} ${cmdArguments.join(' ')}`, - packageManager: getPackageManager() - } - } as TaskConfiguration; - } -}