File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
packages/schematics/angular/migrations/update-13 Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 66 * found in the LICENSE file at https://angular.io/license
77 */
88
9- import { join } from '@angular-devkit/core' ;
9+ import { join , tags } from '@angular-devkit/core' ;
1010import { DirEntry , Rule } from '@angular-devkit/schematics' ;
1111import { JSONFile } from '../../utility/json-file' ;
1212import { allTargetOptions , getWorkspace } from '../../utility/workspace' ;
@@ -36,7 +36,7 @@ export default function (): Rule {
3636 [ 'lib' , 'umdId' ] ,
3737 ] ;
3838
39- return async ( tree ) => {
39+ return async ( tree , context ) => {
4040 const workspace = await getWorkspace ( tree ) ;
4141 const librariesTsConfig = new Set < string > ( ) ;
4242 const ngPackagrConfig = new Set < string > ( ) ;
@@ -53,7 +53,14 @@ export default function (): Rule {
5353 }
5454
5555 if ( typeof options . project === 'string' ) {
56- ngPackagrConfig . add ( options . project ) ;
56+ if ( options . project . endsWith ( '.json' ) ) {
57+ ngPackagrConfig . add ( options . project ) ;
58+ } else {
59+ context . logger
60+ . warn ( tags . stripIndent `Expected a JSON configuration file but found "${ options . project } ".
61+ You may need to adjust the configuration file to remove invalid options.
62+ For more information, see the breaking changes section within the release notes: https://github.com/ng-packagr/ng-packagr/releases/tag/v13.0.0/.` ) ;
63+ }
5764 }
5865 }
5966 }
You can’t perform that action at this time.
0 commit comments