hunk.code_window:   const currentModules = path.resolve(cwd, 'node_modules')
     await install(Object.assign({}, opts, { cwd: linkedPkgPath }))
     await mkdirp(currentModules)
     const pkg = await readPkgUp({ cwd: linkedPkgPath })
     await linkDir(linkedPkgPath, path.resolve(currentModules, pkg.pkg.name))
     return linkPkgBins(currentModules, linkedPkgPath, opts.preserveSymlinks)
   }
   export function linkFromGlobal (pkgName: string, maybeOpts?: PnpmOptions) {
  
hunk.labels: keep keep keep keep keep replace keep keep keep
hunk.after_edit:   const bin = path.join(currentModules, '.bin')
     return linkPkgBins(linkedPkgPath, bin, opts.preserveSymlinks)
  
hunk.file_path: src/api/link.ts
hunk.type: replace
file: import path = require('path')
  import {Package} from '../types'
  import mem = require('mem')
  import loadJsonFile = require('load-json-file')
  
  const cachedReadPkg = mem(loadJsonFile)
  
  /**
   * Works identically to require('/path/to/file.json'), but safer.
   */
  export default function requireJson (pkgJsonPath: string): Package {
    pkgJsonPath = path.resolve(pkgJsonPath)
    return cachedReadPkg(pkgJsonPath)
  }
  
  export const ignoreCache: Function = loadJsonFile
  