Skip to content

Allow custom publish scripts to complete without a Changesets output file#697

Merged
Andarist merged 1 commit into
mainfrom
fix/no-outputs-custom-scripts
Jul 22, 2026
Merged

Allow custom publish scripts to complete without a Changesets output file#697
Andarist merged 1 commit into
mainfrom
fix/no-outputs-custom-scripts

Conversation

@Andarist

Copy link
Copy Markdown
Member

No description provided.

@Andarist
Andarist requested review from beeequeue and bluwy July 21, 2026 16:20
@changeset-bot

changeset-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0821be0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@changesets/action Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@bluwy bluwy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Was this fixing an issue you were facing?

@beeequeue

beeequeue commented Jul 21, 2026

Copy link
Copy Markdown
Member

it's something i found: https://discord.com/channels/1499011163705573470/1528323111894909029/1528365353732673607

could we always set CHANGESETS_OUTPUT when we call the custom scripts?

@Andarist

Copy link
Copy Markdown
Member Author

could we always set CHANGESETS_OUTPUT when we call the custom scripts?

we could - but a custom script can delegate to Changesets and that can create this file. If we’d pre-create it, it would be harder to distinguish between “there was no output” and “the script is output-unaware”

@Andarist
Andarist added this pull request to the merge queue Jul 22, 2026
Merged via the queue into main with commit 84d78c6 Jul 22, 2026
7 checks passed
@Andarist
Andarist deleted the fix/no-outputs-custom-scripts branch July 22, 2026 06:32
Comment thread src/run.test.ts
Comment on lines +24 to +27
vi.mock("@actions/core", async (importOriginal) => ({
...(await importOriginal<typeof import("@actions/core")>()),
warning: vi.fn(),
}));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we could do this instead, which is cleaner imo

vi.mock("@actions/core", { spy: true })
const mockedWarning = vi.mocked(core.warning)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Nice, i’ll update this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants