hunk.code_window:     "read-pkg-up": "1.0.1",
       "registry-auth-token": "3.0.1",
       "registry-url": "3.1.0",
       "retry": "0.10.0",
       "rimraf": "2.5.4",
       "semver": "5.3.0",
       "sorted-object": "2.0.1",
       "supports-color": "3.1.2",
       "tar-fs": "1.13.2",
  
hunk.labels: keep keep keep keep replace keep keep keep keep
hunk.after_edit:     "rimraf-then": "1.0.0",
  
hunk.file_path: package.json
hunk.type: replace
file: import isexe = require('isexe')
  import fs = require('fs')
  import {Test} from 'tape'
  import semver = require('semver')
  
  const isWindows = process.platform === 'win32'
  const preserveSymlinks = semver.satisfies(process.version, '>=6.3.0')
  
  export default function isExecutable (t: Test, filePath: string) {
    if (!isWindows && !preserveSymlinks) {
      const lstat = fs.lstatSync(filePath)
      t.ok(lstat.isSymbolicLink(), filePath + ' symlink is available')
  
      const stat = fs.statSync(filePath)
      t.equal(stat.mode, parseInt('100755', 8), filePath + ' is executable')
      t.ok(stat.isFile(), filePath + ' refers to a file')
      return
    }
    t.ok(isexe(filePath), filePath + ' is executable')
  }
  