Skip to content

Commit

Permalink
fix: include peerDependenciesMeta in manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Oct 29, 2019
1 parent 89c16f6 commit 7a400d3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/finalize-manifest.js
Expand Up @@ -83,6 +83,7 @@ function Manifest (pkg, fromTarball, fullMetadata) {
this.os = pkg.os || fromTarball.os
this.dependencies = pkg.dependencies || {}
this.optionalDependencies = pkg.optionalDependencies || {}
this.peerDependenciesMeta = pkg.peerDependenciesMeta || {}
this.devDependencies = pkg.devDependencies || {}
const bundled = (
pkg.bundledDependencies ||
Expand Down
1 change: 1 addition & 0 deletions test/directory.js
Expand Up @@ -56,6 +56,7 @@ test('supports directory deps', t => {
devDependencies: {},
bundleDependencies: false,
peerDependencies: {},
peerDependenciesMeta: {},
deprecated: false,
_resolved: path.resolve(PKG).replace(/\\/g, '/'),
_shasum: null,
Expand Down
4 changes: 4 additions & 0 deletions test/finalize-manifest.js
Expand Up @@ -40,6 +40,7 @@ test('returns a manifest with the right fields', t => {
optionalDependencies: {},
bundleDependencies: [],
peerDependencies: {},
peerDependenciesMeta: {},
bin: './foo.js',
_resolved: 'resolved.to.this',
_integrity: 'sha1-deadbeefc0ffeebad1dea',
Expand All @@ -59,6 +60,7 @@ test('returns a manifest with the right fields', t => {
optionalDependencies: {},
bundleDependencies: [],
peerDependencies: {},
peerDependenciesMeta: {},
bin: {
testing: './foo.js'
},
Expand Down Expand Up @@ -93,6 +95,7 @@ test('defaults all field to expected types + values', t => {
optionalDependencies: {},
bundleDependencies: false, // because npm does boolean checks on this
peerDependencies: {},
peerDependenciesMeta: {},
bin: null,
_resolved: base._resolved,
_integrity: base._integrity,
Expand Down Expand Up @@ -264,6 +267,7 @@ test('uses package.json as base if passed null', t => {
devDependencies: {},
bundleDependencies: false,
peerDependencies: {},
peerDependenciesMeta: {},
_resolved: OPTS.registry + tarballPath,
deprecated: false,
_integrity: ssri.fromData(tarData, { algorithms: ['sha512'] }).toString(),
Expand Down

0 comments on commit 7a400d3

Please sign in to comment.