Skip to content

Commit

Permalink
chore: remove NodePackageNgAddTask (#1918)
Browse files Browse the repository at this point in the history
## Proposed change

remove deprecated  `NodePackageNgAddTask`
  • Loading branch information
vscaiceanu-1a authored Jun 25, 2024
2 parents d0f62d9 + 80bfb8f commit 4d1028f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 27 deletions.
4 changes: 4 additions & 0 deletions migration-guides/11.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
27 changes: 0 additions & 27 deletions packages/@o3r/schematics/src/tasks/ng-add/index.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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<NodePackageTaskOptions> {
public quiet = false;

constructor(public packageName: string, public options?: NgAddPackageOptions) {}

public toConfiguration(): TaskConfiguration<NodePackageTaskOptions> {
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<NodePackageTaskOptions>;
}
}

0 comments on commit 4d1028f

Please sign in to comment.