Skip to content

Commit b22202c

Browse files
clydinalexeagle
authored andcommitted
refactor(@angular-devkit/core): adjust readWorkspace type to support eventual diagnostics
1 parent fda683b commit b22202c

File tree

1 file changed

+3
-2
lines changed
  • packages/angular_devkit/core/src/workspace

1 file changed

+3
-2
lines changed

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ export async function readWorkspace(
3535
path: string,
3636
host: WorkspaceHost,
3737
format?: WorkspaceFormat,
38-
): Promise<WorkspaceDefinition> {
38+
// return type will eventually have a `diagnostics` property as well
39+
): Promise<{ workspace: WorkspaceDefinition }> {
3940
if (await host.isDirectory(path)) {
4041
// TODO: Warn if multiple found (requires diagnostics support)
4142
const directory = normalize(path);
@@ -78,7 +79,7 @@ export async function readWorkspace(
7879

7980
formatLookup.set(workspace, WorkspaceFormat.JSON);
8081

81-
return workspace;
82+
return { workspace };
8283
}
8384

8485
export async function writeWorkspace(

0 commit comments

Comments
 (0)