hunk.code_window:     const depsToRemove = new Set([
         ...opts.removePackages || [],
         ...R.difference(oldPkgs, newPkgs).map(([depName]) => depName),
       ])
       if (opts.pruneDirectDependencies) {
  
hunk.labels: keep replace keep keep keep
hunk.after_edit:       ...(opts.removePackages || []).filter((removePackage) => allCurrentPackages.has(removePackage)),
  
hunk.file_path: packages/modules-cleaner/src/prune.ts
hunk.type: replace
file: import prepare from '@pnpm/prepare'
  import {
    installPkgs,
  } from 'supi'
  import tape = require('tape')
  import promisifyTape from 'tape-promise'
  import { testDefaults } from './utils'
  
  const test = promisifyTape(tape)
  
  test('packageImportMethod can be set to copy', async (t: tape.Test) => {
    const project = prepare(t)
  
    await installPkgs(['is-negative'], await testDefaults({}, {}, {}, { packageImportMethod: 'copy' }))
  
    const m = project.requireModule('is-negative')
    t.ok(m, 'is-negative is available with packageImportMethod = copy')
  })
  
  test('copy does not fail on package that self-requires itself', async (t: tape.Test) => {
    const project = prepare(t)
  
    await installPkgs(['requires-itself'], await testDefaults({}, {}, {}, { packageImportMethod: 'copy' }))
  
    const m = project.requireModule('requires-itself/package.json')
    t.ok(m, 'requires-itself is available with packageImportMethod = copy')
  
    const shr = await project.loadShrinkwrap()
    t.deepEqual(shr.packages['/requires-itself/1.0.0'].dependencies, { 'is-positive': '1.0.0' })
  })
  