File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed
packages/angular_devkit/core/src/workspace/json Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -190,11 +190,7 @@ function parseProject(
190190
191191 const projectNodeValue = getNodeValue ( projectNode ) ;
192192 if ( ! ( 'root' in projectNodeValue ) ) {
193- // TODO(alan-agius4): change this to error in v15.
194- context . warn (
195- `Project "${ projectName } " is missing a required property "root". This will become an error in the next major version.` ,
196- projectNodeValue ,
197- ) ;
193+ throw new Error ( `Project "${ projectName } " is missing a required property "root".` ) ;
198194 }
199195
200196 for ( const [ name , value ] of Object . entries < JsonValue > ( projectNodeValue ) ) {
Original file line number Diff line number Diff line change @@ -148,11 +148,8 @@ describe('readJsonWorkpace Parsing', () => {
148148 }
149149 ` ) ;
150150
151- const consoleWarnSpy = spyOn ( console , 'warn' ) . and . callFake ( ( ) => undefined ) ;
152- await expectAsync ( readJsonWorkspace ( '' , host ) ) ;
153-
154- expect ( consoleWarnSpy ) . toHaveBeenCalledWith (
155- `Project "foo" is missing a required property "root". This will become an error in the next major version.` ,
151+ await expectAsync ( readJsonWorkspace ( '' , host ) ) . toBeRejectedWithError (
152+ / P r o j e c t " f o o " i s m i s s i n g a r e q u i r e d p r o p e r t y " r o o t " / ,
156153 ) ;
157154 } ) ;
158155} ) ;
You can’t perform that action at this time.
0 commit comments