Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: publish of tarballs includes README in packument #4480

Merged
merged 1 commit into from
Mar 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/commands/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions test/lib/commands/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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'
)
Expand Down