hunk.code_window: })
   test('rewrites node_modules created by npm', async function (t) {
     const project = prepare(t)
     await execa('npm', ['install', 'rimraf@2.5.1', '--save'])
     await execPnpm('install')
     const m = project.requireModule('rimraf')
  
hunk.labels: keep keep keep keep keep replace keep keep keep keep
hunk.after_edit:   await execa('npm', ['install', 'rimraf@2.5.1', '@types/node', '--save'])
  
hunk.file_path: test/cli.ts
hunk.type: replace
file: import logger from 'pnpm-logger'
  import path = require('path')
  import isInnerLink = require('is-inner-link')
  import fs = require('mz/fs')
  import mkdirp = require('mkdirp-promise')
  
  export default async function safeIsInnerLink (modules: string, depName: string) {
    try {
      const link = await isInnerLink(modules, depName)
  
      if (link.isInner) return true
  
      logger.info(`${depName} is linked to ${modules} from ${link.target}`)
      return false
    } catch (err) {
      if (err.code === 'ENOENT') return true
  
      logger.warn(`Moving ${depName} that was installed by a different package manager to "node_modules/.ignored`)
      const ignoredDir = path.join(modules, '.ignored')
      await mkdirp(ignoredDir)
      await fs.rename(
        path.join(modules, depName),
        path.join(ignoredDir, depName))
      return true
    }
  }
  