File tree 1 file changed +10
-3
lines changed
packages/schematics/angular/migrations/update-13
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 6
6
* found in the LICENSE file at https://angular.io/license
7
7
*/
8
8
9
- import { join } from '@angular-devkit/core' ;
9
+ import { join , tags } from '@angular-devkit/core' ;
10
10
import { DirEntry , Rule } from '@angular-devkit/schematics' ;
11
11
import { JSONFile } from '../../utility/json-file' ;
12
12
import { allTargetOptions , getWorkspace } from '../../utility/workspace' ;
@@ -36,7 +36,7 @@ export default function (): Rule {
36
36
[ 'lib' , 'umdId' ] ,
37
37
] ;
38
38
39
- return async ( tree ) => {
39
+ return async ( tree , context ) => {
40
40
const workspace = await getWorkspace ( tree ) ;
41
41
const librariesTsConfig = new Set < string > ( ) ;
42
42
const ngPackagrConfig = new Set < string > ( ) ;
@@ -53,7 +53,14 @@ export default function (): Rule {
53
53
}
54
54
55
55
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
+ }
57
64
}
58
65
}
59
66
}
You can’t perform that action at this time.
0 commit comments