Skip to content

Remove published-packages output in favor of publish-output#689

Open
Andarist wants to merge 2 commits into
mainfrom
remove-published-packages
Open

Remove published-packages output in favor of publish-output#689
Andarist wants to merge 2 commits into
mainfrom
remove-published-packages

Conversation

@Andarist

@Andarist Andarist commented Jul 1, 2026

Copy link
Copy Markdown
Member

No description provided.

@Andarist Andarist requested review from bluwy and emmatown as code owners July 1, 2026 20:16
@changeset-bot

changeset-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f7c426c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Comment thread src/publish/index.ts

if (result.published) {
core.setOutput("published", "true");
core.setOutput(

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.

Why I'd like to propose changing this? Currently, we interpret "git-tag" events as "releases". But with --no-git-tag and other customizations that's not exactly particularly accurate.

We should be emitting some other events for npm-only releases and allow the action to interpret them as releases. That's something to fix on the CLI side of things.

But even once we do it... the user wouldn't be able to tell exactly what and how got released. We'd have to "interpret" a mix of tag/npm releases into this array of published-packages. So my thinking is that by allowing the user to interpret the NDJSON output we can just satisfy more use cases without hardcoding some decisions into the action's core.

@beeequeue beeequeue Jul 2, 2026

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.

i think we should have both.

having to parse and handle the CLI output requires quite a lot more than just checking if the published value is true, especially in CI flows.

since we also have the output file now, we can change the meaning of published:

published: was any package published

we could also add tagged
tagged: was any package tagged

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.

I quite like having published and tagged separated. Then we could let them decide how to handle it. Maybe also if publish passes but tag failed (or vice versa) it would be clearer which packages is affected

Comment thread publish/action.yml
A JSON array to present the published packages. The format is `[{"name": "@xx/xx", "version": "1.2.0"}, {"name": "@xx/xy", "version": "0.8.9"}]`
description: A boolean value to indicate whether any release was published
output:
description: The path to the Changesets publish output file in NDJSON format

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.

Suggested change
description: The path to the Changesets publish output file in NDJSON format
description: The path to the publish output NDJSON file

@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.

I'm a bit concerned of the DX this would affect. Now because it's a path, they'd need an extra step to parse it in order to use the values, eg using this value in an if condition will be slightly annoying to set up.

Plus, it's not clear what the values of the ndjson are. We currently don't document it in core either (I assume it'll be stable but internal-ish) so this would result people to trail-and-error the process, which isn't nice.

I think I still prefer keeping the old output though, exposing a simplified structure for now.

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