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: add tag to publish log message #5494

Merged
merged 1 commit into from Sep 14, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/commands/publish.js
Expand Up @@ -114,7 +114,10 @@ class Publish extends BaseCommand {
}
}

log.notice('', `Publishing to ${outputRegistry}${dryRun ? ' (dry-run)' : ''}`)
log.notice(
'',
`Publishing to ${outputRegistry} with tag ${defaultTag}${dryRun ? ' (dry-run)' : ''}`
)

if (!dryRun) {
await otplease(this.npm, opts, opts => libpub(manifest, tarballData, opts))
Expand Down
6 changes: 3 additions & 3 deletions tap-snapshots/test/lib/commands/publish.js.test.cjs
Expand Up @@ -51,7 +51,7 @@ Array [
],
Array [
"",
"Publishing to https://registry.npmjs.org/ (dry-run)",
"Publishing to https://registry.npmjs.org/ with tag latest (dry-run)",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can the tag names be quoted or backticked?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can update that in a subsequent PR

],
]
`
Expand All @@ -72,7 +72,7 @@ exports[`test/lib/commands/publish.js TAP json > must match snapshot 1`] = `
Array [
Array [
"",
"Publishing to https://registry.npmjs.org/",
"Publishing to https://registry.npmjs.org/ with tag latest",
],
]
`
Expand Down Expand Up @@ -165,7 +165,7 @@ Array [
],
Array [
"",
"Publishing to https://registry.npmjs.org/",
"Publishing to https://registry.npmjs.org/ with tag latest",
],
]
`
Expand Down