fix: make action compatible with @changesets/cli@2.27.8
#10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A recent dependabot patch bump of the
@changesets/cli
package in FuelLabs/fuels-ts#3173 caused the subsequent release workflow offuels
to silently fail when creating a GitHub release. This happened because the silently failing logic depended on thepublished
output of this action to betrue
, but it wasfalse
even though the publish to the npm registry happened.Upon inspection, I found the problem to be the PR changesets/changesets#1417 which was released in
@changesets/cli@2.27.8
, which caused the outputted logs to contain coloring escape codes whereas previously they weren't there (uncolored and successful run, colored and silently failing run). Because thepublished
variable's setting depended on parsing of the outputs of thepnpm changeset
cli run, and these outputs have become intertwined with escape codes, the parsing failed even though the publishing itself was successful.This PR updates the regex with which the parsing is done, so that now the necessary info is extract from another place in the logs which remained unchanged after the version bump. Previously it was taking the published package names from:
Now it's taking them from:
Thus, this regex is now compatible with both the previous and new version of
@changesets/cli
.