Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make action compatible with @changesets/cli@2.27.8 #10

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

nedsalk
Copy link

@nedsalk nedsalk commented Sep 30, 2024

A recent dependabot patch bump of the @changesets/cli package in FuelLabs/fuels-ts#3173 caused the subsequent release workflow of fuels to silently fail when creating a GitHub release. This happened because the silently failing logic depended on the published output of this action to be true, but it was false 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 the published variable's setting depended on parsing of the outputs of the pnpm 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:

🦋  info Publishing "@fuel-ts/abi-coder" at "0.94.6"
🦋  info Publishing "@fuel-ts/abi-typegen" at "0.94.6"
...

Now it's taking them from:

🦋  success packages published successfully:
🦋  @fuel-ts/abi-coder@0.94.6
🦋  @fuel-ts/abi-typegen@0.94.6
...

Thus, this regex is now compatible with both the previous and new version of @changesets/cli.

@nedsalk nedsalk self-assigned this Sep 30, 2024
@nedsalk nedsalk added the bug Something isn't working label Sep 30, 2024
@nedsalk nedsalk merged commit 2412320 into main Sep 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix release workflow
2 participants