hunk.code_window:     const parsedBody = <PackageDocument>(await opts.got.getJSON(url))
       const correctPkg = pickVersionFromRegistryDocument(parsedBody, spec, opts.tag)
       return {
         id: createPkgId(correctPkg),
         fetch: createRemoteTarballFetcher({
           shasum: correctPkg.dist.shasum,
           tarball: correctPkg.dist.tarball
  
hunk.labels: keep keep keep add keep keep keep
hunk.after_edit:       pkg: correctPkg,
  
hunk.file_path: src/resolve/npm.ts
hunk.type: add
file: import path = require('path')
  import crossSpawn = require('cross-spawn')
  
  const pnpmBin = path.join(__dirname, '../../src/bin/pnpm.ts')
  
  export default runCli
  
  function runCli (...args: string[]): Promise<void>
  function runCli () {
    const args = Array.prototype.slice.call(arguments)
    return new Promise((resolve, reject) => {
      const proc = crossSpawn.spawn('ts-node', [pnpmBin].concat(args), {stdio: 'inherit'})
  
      proc.on('error', reject)
  
      proc.on('close', (code: number) => {
        if (code > 0) return reject(new Error('Exit code ' + code))
        resolve()
      })
    })
  }
  