Skip to content

run changeset version + format via pnpm script#11

Merged
alexpate merged 1 commit intomainfrom
chore/fix-changeset-release
Apr 17, 2026
Merged

run changeset version + format via pnpm script#11
alexpate merged 1 commit intomainfrom
chore/fix-changeset-release

Conversation

@alexpate
Copy link
Copy Markdown
Contributor

No description provided.

@alexpate alexpate marked this pull request as ready for review April 17, 2026 09:51
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 17, 2026

Greptile Summary

This PR fixes a formatting mismatch in the release pipeline by introducing a version-packages script in package.json that chains changeset version with pnpm format. The workflow is updated to call this script instead of running pnpm changeset version directly.

Motivation: The changesets library writes package.json and CHANGELOG.md using its own JSON writer, which disagrees with Biome's formatting rules. Without re-running pnpm format after the version bump, the "Version Packages" PR fails pnpm lint on the subsequent release run.

Changes:

  • package.json: Adds version-packages script (changeset version && pnpm format), keeping the same script reachable via pnpm run version-packages from the workflow.
  • .github/workflows/release.yml: Changes the version step of changesets/action from the likely previous direct invocation to pnpm run version-packages, and adds an explanatory comment documenting the rationale.

Confidence Score: 5/5

Safe to merge — a minimal, well-explained fix for a real CI breakage with no side effects.

The change is small and focused: one new script in package.json and one line changed in the workflow. The motivation is clearly documented, the implementation is correct (&& ensures format only runs on a successful version bump), and biome format --write . is idempotent so running it across the whole tree introduces no risk. All existing checks (lint, type-check, test, bundle guards) remain in place.

No files require special attention.

Important Files Changed

Filename Overview
package.json Adds version-packages script that runs changeset version && pnpm format — clean and correct; format is idempotent so running it on the whole tree is safe.
.github/workflows/release.yml Updates changesets/action version parameter to pnpm run version-packages; comment explains the Biome formatting rationale; all other steps (lint, test, build, publish) are unchanged.

Sequence Diagram

sequenceDiagram
    participant GH as GitHub (push to main)
    participant WF as release.yml
    participant CS as changesets/action
    participant Script as version-packages script
    participant Biome as pnpm format (Biome)
    participant NPM as npm registry

    GH->>WF: trigger on push to main
    WF->>WF: pnpm install / build / lint / test / checks
    WF->>CS: run changesets/action
    alt Pending changesets exist
        CS->>Script: version: pnpm run version-packages
        Script->>Script: changeset version (bumps package.json, CHANGELOG.md)
        Script->>Biome: pnpm format (biome format --write .)
        Biome-->>Script: reformatted files
        CS-->>GH: open/update "Version Packages" PR (lint-clean)
    else Version Packages PR already merged
        CS->>NPM: publish: pnpm changeset publish
        NPM-->>GH: package published
    end
Loading

Reviews (1): Last reviewed commit: "run changeset version + format via pnpm ..." | Re-trigger Greptile

@alexpate alexpate merged commit 2b968d7 into main Apr 17, 2026
6 checks passed
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.

1 participant