hunk.code_window:   return lock(
       ctx.storePath,
       () => installInContext(installType, packagesToInstall, optionalDependencies, ctx, installCtx, opts),
       {stale: opts.lockStaleDuration}
     )
   }
  
hunk.labels: keep keep replace keep keep keep
hunk.after_edit:     () => installInContext(
         installType,
         R.uniqBy(spec => spec.name, packagesToInstall.concat(currentSpecs)),
         R.uniq(optionalDependencies.concat(R.keys(ctx.pkg && ctx.pkg.optionalDependencies))),
         packagesToInstall.map(spec => spec.name),
         ctx,
         installCtx,
         opts),
  
hunk.file_path: src/api/install.ts
hunk.type: replace
file: import {Log} from 'pnpm-logger'
  
  export default (streamParser: {on: Function}) => {
    streamParser.on('data', (obj: Log) => {
      if (obj.level !== 'error') return
  
      console.log(obj['err'] && obj['err'].message || obj['message'])
      if (obj['err'] && obj['err'] && obj['err'].stack) {
        console.log(`\n${obj['err'].stack}`)
      }
    })
  }
  