hunk.code_window:   await install(testDefaults())
     await project.hasNot('not-compatible-with-any-os')
     await project.storeHasNot('not-compatible-with-any-os', '1.0.0')
     t.notOk(await exists(path.resolve('node_modules', '.localhost+4873', 'dep-of-optional-pkg', '1.0.0')), "isn't linked into node_modules")
     const shr = await project.loadShrinkwrap()
     t.ok(shr.packages['/not-compatible-with-any-os/1.0.0'], 'shrinkwrap contains optional dependency')
     t.ok(shr.packages['/dep-of-optional-pkg/1.0.0'], 'shrinkwrap contains dependency of optional dependency')
  
hunk.labels: keep keep keep replace keep keep keep keep keep
hunk.after_edit:   await project.storeHas('not-compatible-with-any-os', '1.0.0')
  
hunk.file_path: test/install/optionalDependencies.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}`)
      }
    })
  }
  