diff --git a/lib/commands/publish.js b/lib/commands/publish.js index d1f0ee743cfcc..9a7eab9303a12 100644 --- a/lib/commands/publish.js +++ b/lib/commands/publish.js @@ -195,7 +195,11 @@ class Publish extends BaseCommand { if (spec.type === 'directory') { return readJson(`${spec.fetchSpec}/package.json`) } - return pacote.manifest(spec, { ...opts, fullMetadata: true }) + return pacote.manifest(spec, { + ...opts, + fullMetadata: true, + fullReadJson: true, + }) } } module.exports = Publish diff --git a/test/lib/commands/publish.js b/test/lib/commands/publish.js index 0a7f961bfbdc9..0acce8b001921 100644 --- a/test/lib/commands/publish.js +++ b/test/lib/commands/publish.js @@ -290,6 +290,7 @@ t.test('can publish a tarball', async t => { name: 'my-cool-tarball', version: '1.2.3', }), + 'README.md': 'This is my readme', }, }) const tar = require('tar') @@ -311,6 +312,9 @@ t.test('can publish a tarball', async t => { { name: 'my-cool-tarball', version: '1.2.3', + readme: 'This is my readme', + description: 'This is my readme', + readmeFilename: 'README.md', }, 'sent manifest to lib pub' )