From 57ab80c61104c270bebc125910ae32da3a5aca46 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Mon, 14 Oct 2024 09:44:02 -0700 Subject: [PATCH] Improve error message when attempting to publish without publish script defined (#415) * Improve error message when attempting to publish without publish script defined * Update src/index.ts * Update src/index.ts --- .changeset/breezy-garlics-bathe.md | 5 +++++ src/index.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/breezy-garlics-bathe.md diff --git a/.changeset/breezy-garlics-bathe.md b/.changeset/breezy-garlics-bathe.md new file mode 100644 index 00000000..8b21384f --- /dev/null +++ b/.changeset/breezy-garlics-bathe.md @@ -0,0 +1,5 @@ +--- +"@changesets/action": patch +--- + +Improve error message when attempting to publish without publish script defined diff --git a/src/index.ts b/src/index.ts index 31aef207..194204dc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -48,11 +48,11 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined; switch (true) { case !hasChangesets && !hasPublishScript: - core.info("No changesets found"); + core.info("No changesets present or were removed by merging release PR. Not publishing because no publish script found."); return; case !hasChangesets && hasPublishScript: { core.info( - "No changesets found, attempting to publish any unpublished packages to npm" + "No changesets found. Attempting to publish any unpublished packages to npm" ); let userNpmrcPath = `${process.env.HOME}/.npmrc`;