hunk.code_window:     nodeVersion: string,
       optional: boolean,
       pnpmVersion: string,
     },
   ): Promise<boolean> {
     const warn = await installChecks.checkPlatform(pkg) || await installChecks.checkEngine(pkg, {
       nodeVersion: options.nodeVersion,
       pnpmVersion: options.pnpmVersion,
     })
     if (!warn) return true
     installCheckLogger.warn(warn)
  
hunk.labels: keep keep keep keep keep replace replace replace replace keep keep keep keep keep
hunk.after_edit:   const warn = await installChecks.checkPlatform({
         _id: pkgId,
         cpu: pkg.cpu,
         os: pkg.os,
       }) ||
       await installChecks.checkEngine({
         _id: pkgId,
         engines: pkg.engines,
       }, {
         nodeVersion: options.nodeVersion,
         pnpmVersion: options.pnpmVersion,
       })
  
hunk.file_path: src/install/getIsInstallable.ts
hunk.type: replace
file: import {PackageJson} from '@pnpm/types'
  import loadJsonFile = require('load-json-file')
  import writePkg = require('write-pkg')
  import {DependenciesType, dependenciesTypes} from './getSaveType'
  import {packageJsonLogger} from './loggers'
  
  export default async function (
    pkgJsonPath: string,
    removedPackages: string[],
    saveType?: DependenciesType,
  ): Promise<PackageJson> {
    const packageJson = await loadJsonFile(pkgJsonPath)
  
    if (saveType) {
      packageJson[saveType] = packageJson[saveType]
  
      if (!packageJson[saveType]) return packageJson
  
      removedPackages.forEach((dependency) => {
        delete packageJson[saveType][dependency]
      })
    } else {
      dependenciesTypes
        .filter((deptype) => packageJson[deptype])
        .forEach((deptype) => {
          removedPackages.forEach((dependency) => {
            delete packageJson[deptype][dependency]
          })
        })
    }
  
    await writePkg(pkgJsonPath, packageJson)
    packageJsonLogger.debug({ updated: packageJson })
    return packageJson
  }
  