Skip to content

feat: validate changeset files - #93

Merged
GuillaumeRx merged 10 commits into
mainfrom
gr/changesets-lint-validation
Oct 21, 2026
Merged

GuillaumeRx merged 10 commits into
mainfrom
gr/changesets-lint-validation

Conversation

@GuillaumeRx

Copy link
Copy Markdown
Contributor

Explanation

Adds Changeset file validation to @metamask/changesets-lint.

The validator reports every problem it can recover from a single file, instead of stopping at the first error. It checks that each package is a workspace package and that each bump type is major, minor, or patch. It delegates summary grammar to @metamask/changesets-utils and converts summary-relative lines to file lines.

The parser recovers from malformed frontmatter so a broken YAML block still produces summary diagnostics. It matches the frontmatter delimiters accepted by the installed Changesets parser, and reports whether that parser accepts the file.

This PR contains no Git file selection, orchestration, or CLI. Those follow in later PRs.

References

  • Follow-up PRs will add Git file selection and orchestration, then the CLI and documentation.

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

@GuillaumeRx
GuillaumeRx marked this pull request as ready for review October 20, 2026 15:50
@GuillaumeRx
GuillaumeRx requested a review from a team as a code owner October 20, 2026 15:50
@GuillaumeRx
GuillaumeRx deployed to default-branch October 20, 2026 15:50 — with GitHub Actions Active
Comment thread packages/changesets-lint/src/validate-changeset-file.ts Outdated

@mcmire mcmire left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Left some suggestions and a question below.

Comment thread packages/changesets-lint/src/parse-changeset-file.ts Outdated
Comment thread packages/changesets-lint/src/parse-changeset-file.ts Outdated
Comment thread packages/changesets-lint/src/parse-changeset-file.ts Outdated
Comment thread packages/changesets-lint/src/parse-changeset-file.ts Outdated
Comment thread packages/changesets-lint/src/parse-changeset-file.ts
Comment thread packages/changesets-lint/src/parse-changeset-file.ts Outdated
Comment thread packages/changesets-lint/src/validate-changeset-file.ts
@GuillaumeRx
GuillaumeRx force-pushed the gr/changesets-lint-validation branch from 20654f7 to 8579efd Compare October 21, 2026 10:29

@mcmire mcmire left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@GuillaumeRx
GuillaumeRx added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit 250719e Oct 21, 2026
51 checks passed
@GuillaumeRx
GuillaumeRx deleted the gr/changesets-lint-validation branch October 21, 2026 13:56
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