Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions packages/angular_devkit/core/src/workspace/json/reader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,7 @@ function parseProject(

const projectNodeValue = getNodeValue(projectNode);
if (!('root' in projectNodeValue)) {
// TODO(alan-agius4): change this to error in v15.
context.warn(
`Project "${projectName}" is missing a required property "root". This will become an error in the next major version.`,
projectNodeValue,
);
throw new Error(`Project "${projectName}" is missing a required property "root".`);
}

for (const [name, value] of Object.entries<JsonValue>(projectNodeValue)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,8 @@ describe('readJsonWorkpace Parsing', () => {
}
`);

const consoleWarnSpy = spyOn(console, 'warn').and.callFake(() => undefined);
await expectAsync(readJsonWorkspace('', host));

expect(consoleWarnSpy).toHaveBeenCalledWith(
`Project "foo" is missing a required property "root". This will become an error in the next major version.`,
await expectAsync(readJsonWorkspace('', host)).toBeRejectedWithError(
/Project "foo" is missing a required property "root"/,
);
});
});
Expand Down