hunk.code_window:     resolution: a205383fea322b33b5ae3b18abee0dc2f356ee15
     /lazy-cache/1.0.4: a1d78fc3a50474cb80845d3b3b6e1da49a446e8e
     /lazy-req/2.0.0: c9450a363ecdda2e6f0c70132ad4f37f8f06f2b4
     /levenshtein/1.0.2: cd02e8b32075645ddcf5d059e02efa918f9fb3ec
     /link-dir/2.0.0:
       dependencies:
         '@types/mz': 0.0.30
         '@types/node': 6.0.77
         bole: 3.0.2
  
hunk.labels: keep keep keep keep replace keep keep keep keep
hunk.after_edit:   /link-dir/2.0.1:
  
hunk.file_path: shrinkwrap.yaml
hunk.type: replace
file: import RegClient = require('anonymous-npm-registry-client')
  
  export async function add (pkg: string, version: string, distTag: string) {
    const client = new RegClient()
  
    // just to make verdaccio cache the package
    await new Promise((resolve, reject) => client.distTags.fetch('http://localhost:4873', {package: pkg}, (err: Error) => err ? reject(err) : resolve()))
  
    // the tag has to be removed first because in verdaccio it is an array of versions
    await new Promise((resolve, reject) => client.distTags.rm('http://localhost:4873', {package: pkg, distTag}, (err: Error) => err ? reject(err) : resolve()))
    await new Promise((resolve, reject) => client.distTags.add('http://localhost:4873', {package: pkg, version, distTag}, (err: Error) => err ? reject(err) : resolve()))
  }
  