Skip to content

Commit df70c7a

Browse files
clydinfilipesilva
authored andcommitted
refactor(@angular-devkit/core): remove experimental workspace API
BREAKING CHANGE: The experimental workspace API has been removed from `@angular-devkit/core`. This API was no longer used by the Angular CLI and was replaced with the stable workspace API also found within `@angular-devkit/core`. This change does not affect project code and is related to tooling infrastructure only.
1 parent 6631720 commit df70c7a

10 files changed

Lines changed: 1 addition & 1180 deletions

File tree

etc/api/angular_devkit/core/src/_golden-api.d.ts

Lines changed: 0 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ export declare class AliasHost<StatsT extends object = {}> extends ResolverHost<
1313
protected _resolve(path: Path): Path;
1414
}
1515

16-
export declare class AmbiguousProjectPathException extends BaseException {
17-
readonly path: Path;
18-
readonly projects: ReadonlyArray<string>;
19-
constructor(path: Path, projects: ReadonlyArray<string>);
20-
}
21-
2216
export interface Analytics {
2317
event(category: string, action: string, options?: EventOptions): void;
2418
flush(): Promise<void>;
@@ -784,14 +778,6 @@ export declare class ProjectDefinitionCollection extends DefinitionCollection<Pr
784778
set(name: string, value: ProjectDefinition): this;
785779
}
786780

787-
export declare class ProjectNotFoundException extends BaseException {
788-
constructor(name: string);
789-
}
790-
791-
export declare class ProjectToolNotFoundException extends BaseException {
792-
constructor(name: string);
793-
}
794-
795781
export interface PromptDefinition {
796782
default?: string | string[] | number | boolean | null;
797783
id: string;
@@ -1217,39 +1203,11 @@ export declare type WindowsPath = string & {
12171203
__PRIVATE_DEVKIT_WINDOWS_PATH: void;
12181204
};
12191205

1220-
export declare class Workspace {
1221-
get host(): virtualFs.Host<{}>;
1222-
get newProjectRoot(): string | undefined;
1223-
get root(): Path;
1224-
get version(): number;
1225-
constructor(_root: Path, _host: virtualFs.Host<{}>, registry?: schema.CoreSchemaRegistry);
1226-
getCli(): WorkspaceTool;
1227-
getDefaultProjectName(): string | null;
1228-
getProject(projectName: string): WorkspaceProject;
1229-
getProjectByPath(path: Path): string | null;
1230-
getProjectCli(projectName: string): WorkspaceTool;
1231-
getProjectSchematics(projectName: string): WorkspaceTool;
1232-
getProjectTargets(projectName: string): WorkspaceTool;
1233-
getSchematics(): WorkspaceTool;
1234-
getTargets(): WorkspaceTool;
1235-
listProjectNames(): string[];
1236-
loadWorkspaceFromHost(workspacePath: Path): Observable<this>;
1237-
loadWorkspaceFromJson(json: {}): Observable<this>;
1238-
validateAgainstSchema<T = {}>(contentJson: {}, schemaJson: JsonObject): Observable<T>;
1239-
protected static _workspaceFileNames: string[];
1240-
static findWorkspaceFile(host: virtualFs.Host<{}>, path: Path): Promise<Path | null>;
1241-
static fromPath(host: virtualFs.Host<{}>, path: Path, registry: schema.CoreSchemaRegistry): Promise<Workspace>;
1242-
}
1243-
12441206
export interface WorkspaceDefinition {
12451207
readonly extensions: Record<string, JsonValue | undefined>;
12461208
readonly projects: ProjectDefinitionCollection;
12471209
}
12481210

1249-
export declare class WorkspaceFileNotFoundException extends BaseException {
1250-
constructor(path: Path);
1251-
}
1252-
12531211
export declare enum WorkspaceFormat {
12541212
JSON = 0
12551213
}
@@ -1261,50 +1219,6 @@ export interface WorkspaceHost {
12611219
writeFile(path: string, data: string): Promise<void>;
12621220
}
12631221

1264-
export declare class WorkspaceNotYetLoadedException extends BaseException {
1265-
constructor();
1266-
}
1267-
1268-
export interface WorkspaceProject {
1269-
architect?: WorkspaceTool;
1270-
cli?: WorkspaceTool;
1271-
i18n?: WorkspaceProjectI18n;
1272-
prefix: string;
1273-
projectType: "application" | "library";
1274-
root: string;
1275-
schematics?: WorkspaceTool;
1276-
sourceRoot?: string;
1277-
targets?: WorkspaceTool;
1278-
}
1279-
1280-
export interface WorkspaceProjectI18n {
1281-
locales: Record<string, string>;
1282-
sourceLocale?: string;
1283-
}
1284-
1285-
export interface WorkspaceSchema {
1286-
$schema?: string;
1287-
architect?: WorkspaceTool;
1288-
cli?: WorkspaceTool;
1289-
defaultProject?: string;
1290-
newProjectRoot?: string;
1291-
projects: {
1292-
[k: string]: WorkspaceProject;
1293-
};
1294-
schematics?: WorkspaceTool;
1295-
targets?: WorkspaceTool;
1296-
version: number;
1297-
}
1298-
1299-
export interface WorkspaceTool {
1300-
$schema?: string;
1301-
[k: string]: any;
1302-
}
1303-
1304-
export declare class WorkspaceToolNotFoundException extends BaseException {
1305-
constructor(name: string);
1306-
}
1307-
13081222
export declare function writeWorkspace(workspace: WorkspaceDefinition, host: WorkspaceHost, path?: string, format?: WorkspaceFormat): Promise<void>;
13091223

13101224
export declare const yellow: (x: string) => string;

packages/angular_devkit/core/BUILD.bazel

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,7 @@ ts_library(
5454
name = "core_test_lib",
5555
testonly = True,
5656
srcs = glob(["src/**/*_spec.ts"]),
57-
data = glob(["src/workspace/json/test/**/*.json"]) + [
58-
"src/experimental/workspace/test/test-workspace.json",
59-
"src/experimental/workspace/workspace-schema.json",
60-
],
57+
data = glob(["src/workspace/json/test/**/*.json"]),
6158
# The attribute below is needed in g3 to turn off strict typechecking
6259
# strict_checks = False,
6360
deps = [

packages/angular_devkit/core/src/_golden-api.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88

99
export * from './exception/exception';
1010

11-
// Start experimental namespace
12-
export * from './experimental/workspace/index';
13-
// End experimental namespace
14-
1511
// Start json namespace
1612
export * from './json/interface';
1713
export * from './json/parser';

packages/angular_devkit/core/src/experimental.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88
import * as jobs from './experimental/jobs/index';
9-
import * as workspace from './experimental/workspace/index';
109

1110
export {
1211
jobs,
13-
workspace,
1412
};

packages/angular_devkit/core/src/experimental/workspace/index.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

packages/angular_devkit/core/src/experimental/workspace/test/test-workspace.json

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)