hunk.code_window: import cbRimraf = require('rimraf')
   import path = require('path')
   import getContext, {PnpmContext} from './getContext'
   import getSaveType from '../getSaveType'
   import removeDeps from '../removeDeps'
  
hunk.labels: replace keep keep keep keep keep
hunk.after_edit: import rimraf = require('rimraf-then')
  
hunk.file_path: src/api/uninstall.ts
hunk.type: replace
file: import requireJson from './fs/requireJson'
  import writeJson from './fs/writeJson'
  import {DependenciesType} from './getSaveType'
  
  export default async function (pkgJsonPath: string, removedPackages: string[], saveType: DependenciesType) {
    const packageJson = requireJson(pkgJsonPath)
    packageJson[saveType] = packageJson[saveType]
    if (!packageJson[saveType]) return
  
    removedPackages.forEach(dependency => {
      delete packageJson[saveType][dependency]
    })
  
    return writeJson(pkgJsonPath, packageJson)
  }
  