Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
await addDistTag('foo', '100.0.0', 'latest')
const opts = await testDefaults({prefix: process.cwd()})
await installPkgs(['foo'], opts)
process.chdir('..')
await writeJsonFile('foo/package.json', {
name: 'foo',
version: '100.0.0',
})
await link(['foo'], path.join('project', 'node_modules'), opts)
await addDistTag('foo', '100.1.0', 'latest')
process.chdir('project')
await unlinkPkgs(['foo'], opts)
t.equal(project.requireModule('foo/package.json').version, '100.0.0', 'foo not updated after unlink')
})