File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
packages/schematics/angular/application Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -399,6 +399,9 @@ export default function (options: ApplicationOptions): Rule {
399399 } ) ,
400400 mergeWith (
401401 apply ( url ( './other-files' ) , [
402+ options . strict
403+ ? noop ( )
404+ : filter ( path => path !== '/package.json.template' ) ,
402405 componentOptions . inlineTemplate
403406 ? filter ( path => ! path . endsWith ( '.html.template' ) )
404407 : noop ( ) ,
Original file line number Diff line number Diff line change @@ -310,13 +310,12 @@ describe('Application Schematic', () => {
310310 expect ( content . sideEffects ) . toBe ( false ) ;
311311 } ) ;
312312
313- it ( 'sideEffects property should be false when not in strict mode' , async ( ) => {
313+ it ( 'sideEffects package.json should not exist when not in strict mode' , async ( ) => {
314314 const options = { ...defaultOptions , projectRoot : '' , strict : false } ;
315315
316316 const tree = await schematicRunner . runSchematicAsync ( 'application' , options , workspaceTree )
317317 . toPromise ( ) ;
318- const content = JSON . parse ( tree . readContent ( '/src/app/package.json' ) ) ;
319- expect ( content . sideEffects ) . toBe ( true ) ;
318+ expect ( tree . exists ( '/src/app/package.json' ) ) . toBeFalse ( ) ;
320319 } ) ;
321320
322321 describe ( 'custom projectRoot' , ( ) => {
You can’t perform that action at this time.
0 commit comments