hunk.code_window:   if (!packageJson[saveType]) return packageJson
  
hunk.labels: keep replace keep
hunk.after_edit:   if (saveType) {
       packageJson[saveType] = packageJson[saveType]
  
hunk.file_path: src/removeDeps.ts
hunk.type: replace
file: import path = require('path')
  import link, {linkFromGlobal, linkToGlobal} from '../api/link'
  import {PnpmOptions} from '../types'
  
  export default (input: string[], opts: PnpmOptions & {globalPrefix: string}) => {
    const cwd = opts && opts.prefix || process.cwd()
  
    // pnpm link
    if (!input || !input.length) {
      return linkToGlobal(cwd, opts)
    }
  
    // pnpm link ../foo
    if (input[0].indexOf('.') === 0) {
      const linkFrom = path.join(cwd, input[0])
      return link(linkFrom, cwd, opts)
    }
  
    // pnpm link foo
    return linkFromGlobal(input[0], cwd, opts)
  }
  