Skip to content

Commit

Permalink
feat(@angular-devkit/schematics): remove deprecated tslint APIs
Browse files Browse the repository at this point in the history
BREAKING CHANGE:

With this change we remove the following deprecated APIs
- `TslintFixTask`
- `TslintFixTaskOptions`

**Note:** this only effects schematics developers.
  • Loading branch information
alan-agius4 authored and filipesilva committed Aug 2, 2021
1 parent e82eef9 commit 053b7d6
Show file tree
Hide file tree
Showing 13 changed files with 5 additions and 580 deletions.
15 changes: 0 additions & 15 deletions goldens/public-api/angular_devkit/schematics/tasks/index.md
Expand Up @@ -4,8 +4,6 @@
```ts

import { JsonObject } from '@angular-devkit/core';

// @public (undocumented)
export class NodePackageInstallTask implements TaskConfigurationGenerator<NodePackageTaskOptions> {
constructor(workingDirectory?: string);
Expand Down Expand Up @@ -62,19 +60,6 @@ export class RunSchematicTask<T> implements TaskConfigurationGenerator<RunSchema
toConfiguration(): TaskConfiguration<RunSchematicTaskOptions<T>>;
}

// @public @deprecated (undocumented)
export class TslintFixTask implements TaskConfigurationGenerator<TslintFixTaskOptions> {
constructor(config: JsonObject, options: TslintFixTaskOptionsBase);
constructor(options: TslintFixTaskOptionsBase);
constructor(path: string, options: TslintFixTaskOptionsBase);
// (undocumented)
protected _configOrPath: null | string | JsonObject;
// (undocumented)
protected _options: TslintFixTaskOptionsBase;
// (undocumented)
toConfiguration(): TaskConfiguration<TslintFixTaskOptions>;
}

// (No @packageDocumentation comment for this package)

```
41 changes: 0 additions & 41 deletions packages/angular_devkit/schematics/tasks/BUILD.bazel
@@ -1,4 +1,3 @@
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
load("//tools:defaults.bzl", "ts_library")

# Copyright Google Inc. All Rights Reserved.
Expand All @@ -17,7 +16,6 @@ ts_library(
"node/**/*.ts",
"**/*_spec.ts",
"**/*_benchmark.ts",
"tslint-fix/test/**/*",
],
),
data = ["package.json"],
Expand All @@ -32,45 +30,6 @@ ts_library(
"@npm//@types/node",
"@npm//ora",
"@npm//rxjs",
"@npm//tslint",
"@npm//typescript",
],
)

ts_library(
name = "tasks_test_lib",
testonly = True,
srcs = glob(
include = [
"**/*_spec.ts",
"tslint-fix/test/**/*.ts",
],
exclude = [
"node/**/*.ts",
],
),
data = [
"tslint-fix/test/collection.json",
"tslint-fix/test/rules/customRuleRule.js",
],
# The attribute below is needed in g3 to turn off strict typechecking
# strict_checks = False,
deps = [
":tasks",
"//packages/angular_devkit/core",
"//packages/angular_devkit/core/node",
"//packages/angular_devkit/core/node/testing",
"//packages/angular_devkit/schematics",
"//packages/angular_devkit/schematics/testing",
"@npm//rxjs",
],
)

jasmine_node_test(
name = "tasks_test",
srcs = [":tasks_test_lib"],
deps = [
"@npm//jasmine",
"@npm//source-map",
],
)
1 change: 0 additions & 1 deletion packages/angular_devkit/schematics/tasks/index.ts
Expand Up @@ -10,4 +10,3 @@ export { NodePackageInstallTask } from './package-manager/install-task';
export { NodePackageLinkTask } from './package-manager/link-task';
export { RepositoryInitializerTask } from './repo-init/init-task';
export { RunSchematicTask } from './run-schematic/task';
export { TslintFixTask } from './tslint-fix/task';
15 changes: 5 additions & 10 deletions packages/angular_devkit/schematics/tasks/node/index.ts
Expand Up @@ -13,7 +13,6 @@ import {
RepositoryInitializerTaskFactoryOptions,
} from '../repo-init/options';
import { RunSchematicName } from '../run-schematic/options';
import { TslintFixName } from '../tslint-fix/options';

export class BuiltinTaskExecutor {
static readonly NodePackage: TaskExecutorFactory<NodePackageTaskFactoryOptions> = {
Expand All @@ -23,18 +22,14 @@ export class BuiltinTaskExecutor {
TaskExecutor<{}>
>,
};
static readonly RepositoryInitializer: TaskExecutorFactory<RepositoryInitializerTaskFactoryOptions> = {
name: RepositoryInitializerName,
create: (options) => import('../repo-init/executor').then((mod) => mod.default(options)),
};
static readonly RepositoryInitializer: TaskExecutorFactory<RepositoryInitializerTaskFactoryOptions> =
{
name: RepositoryInitializerName,
create: (options) => import('../repo-init/executor').then((mod) => mod.default(options)),
};
static readonly RunSchematic: TaskExecutorFactory<{}> = {
name: RunSchematicName,
create: () =>
import('../run-schematic/executor').then((mod) => mod.default()) as Promise<TaskExecutor<{}>>,
};
/** @deprecated since version 11. Use `ng lint --fix` directly instead. */
static readonly TslintFix: TaskExecutorFactory<{}> = {
name: TslintFixName,
create: () => import('../tslint-fix/executor').then((mod) => mod.default()),
};
}
186 changes: 0 additions & 186 deletions packages/angular_devkit/schematics/tasks/tslint-fix/executor.ts

This file was deleted.

0 comments on commit 053b7d6

Please sign in to comment.