hunk.code_window:     return super.reportAnalytics(paths, options, dimensions, metrics);
     }
     private isPackageInstalled(name: string): boolean {
       try {
         resolve(name, {
           checkLocal: true,
           basedir: this.workspace.root,
           resolvePackageJson: true,
         });
         return true;
       } catch (e) {
  
hunk.labels: keep keep keep keep keep replace replace replace replace replace keep keep keep
hunk.after_edit:       require.resolve(join(name, 'package.json'), { paths: [this.workspace.root] });
  
hunk.file_path: packages/angular/cli/commands/add-impl.ts
hunk.type: replace
file: import { getGlobalVariable } from '../../utils/env';
  import { appendToFile } from '../../utils/fs';
  import {
    execAndWaitForOutputToMatch,
    killAllProcesses,
    waitForAnyProcessOutputToMatch,
  } from '../../utils/process';
  
  const webpackGoodRegEx = /: Compiled successfully./;
  
  export default async function() {
    if (process.platform.startsWith('win')) {
      return;
    }
  
    let error;
    try {
      await execAndWaitForOutputToMatch('ng', ['serve', '--prod'], webpackGoodRegEx);
  
        // Should trigger a rebuild.
      await appendToFile('src/environments/environment.prod.ts', `console.log('PROD');`);
      await waitForAnyProcessOutputToMatch(webpackGoodRegEx, 45000);
    } catch (e) {
      error = e;
    }
  
    killAllProcesses();
    if (error) {
      throw error;
    }
  }
  