Files
pnpm/packages/shrinkwrap-utils/test/pkgSnapshotToResolution.ts
Zoltan Kochan d0818d8b0a feat: shrinkwrap.yaml is registry-agnostic
PR #1613

* feat: shrinkwrap.yaml is registry-agnostic

BREAKING CHANGE:

The shrinkwrap.yaml file contains no info about the registry URL

close #1353

* feat(shrinkwrap): don't set id for packages from npm registries

* feat: bump shrinkwrap file version to 5

BREAKING CHANGE: shrinkwrap file version is 5

* fix: don't use ! in dependency paths inside node_modules

close #1601

* fix: installing package from scope with non-scoped deps

* feat(shrinkwrap): use underscore in dep path with peers
2019-01-22 20:26:06 +02:00

17 lines
445 B
TypeScript

import { pkgSnapshotToResolution } from '@pnpm/shrinkwrap-utils'
import test = require('tape')
test('pkgSnapshotToResolution()', (t) => {
t.deepEqual(pkgSnapshotToResolution('/foo/1.0.0', {
resolution: {
integrity: 'AAAA',
},
}, { default: 'https://registry.npmjs.org/' }), {
integrity: 'AAAA',
registry: 'https://registry.npmjs.org/',
tarball: 'https://registry.npmjs.org/foo/-/foo-1.0.0.tgz',
})
t.end()
})