From 35e09e93261e8d28ffc6dc76bb5bcde30cd99fa6 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Sun, 13 Oct 2024 17:59:38 -0700 Subject: [PATCH 1/3] Improve error message when attempting to publish without publish script defined --- .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..1ad58eed 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 publish script found"); return; case !hasChangesets && hasPublishScript: { core.info( - "No changesets found, attempting to publish any unpublished packages to npm" + "Attempting to publish any unpublished packages to npm" ); let userNpmrcPath = `${process.env.HOME}/.npmrc`; From 02f85775b073d2742cd48f985bbfde99656b8c2d Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Mon, 14 Oct 2024 06:39:00 -0700 Subject: [PATCH 2/3] Update src/index.ts --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 1ad58eed..fa2bbe19 100644 --- a/src/index.ts +++ b/src/index.ts @@ -52,7 +52,7 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined; return; case !hasChangesets && hasPublishScript: { core.info( - "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`; From 22e3ab17d4ce0f30ba3b5a8db9cda50d8638b0b2 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Mon, 14 Oct 2024 06:52:00 -0700 Subject: [PATCH 3/3] Update src/index.ts --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index fa2bbe19..194204dc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -48,7 +48,7 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined; switch (true) { case !hasChangesets && !hasPublishScript: - core.info("No publish script 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(