From c3d75499cfd4e3601c6ca31621b2f693af466c4d Mon Sep 17 00:00:00 2001 From: Gar Date: Mon, 12 Sep 2022 09:03:31 -0700 Subject: [PATCH] fix: add tag to publish log message --- lib/commands/publish.js | 5 ++++- tap-snapshots/test/lib/commands/publish.js.test.cjs | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/commands/publish.js b/lib/commands/publish.js index 3d17866a684a4..64b6dfc513c95 100644 --- a/lib/commands/publish.js +++ b/lib/commands/publish.js @@ -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)) diff --git a/tap-snapshots/test/lib/commands/publish.js.test.cjs b/tap-snapshots/test/lib/commands/publish.js.test.cjs index d85a1164e22bf..3b215960fa37e 100644 --- a/tap-snapshots/test/lib/commands/publish.js.test.cjs +++ b/tap-snapshots/test/lib/commands/publish.js.test.cjs @@ -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)", ], ] ` @@ -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", ], ] ` @@ -165,7 +165,7 @@ Array [ ], Array [ "", - "Publishing to https://registry.npmjs.org/", + "Publishing to https://registry.npmjs.org/ with tag latest", ], ] `