Skip to content

feat: orchestrate Changeset validation - #101

Merged
GuillaumeRx merged 11 commits into
mainfrom
gr/changesets-lint-orchestration
Oct 22, 2026
Merged

GuillaumeRx merged 11 commits into
mainfrom
gr/changesets-lint-orchestration

Conversation

@GuillaumeRx

@GuillaumeRx GuillaumeRx commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Explanation

The package can validate one Changeset file, but consumers still have to find and read every Changeset themselves. This PR adds repository-level orchestration:

lintChangesets
  discover direct .changeset/*.md files
  read each file in deterministic order
  validateChangesetFile
  return structured diagnostics

lintChangesets validates every pending Changeset in a repository. It skips README.md, non-Markdown files, and nested directories. It fails clearly if .changeset/ or a Changeset file cannot be read.

This PR adds only the library API. The CLI and CI integration remain separate.

References

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 22, 2026 09:57
@GuillaumeRx
GuillaumeRx requested a review from a team as a code owner October 22, 2026 09:57
@GuillaumeRx
GuillaumeRx deployed to default-branch October 22, 2026 09:57 — with GitHub Actions Active

@cryptodev-2s cryptodev-2s 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.

One minor nit otherwise looks good to me8

import path from 'node:path';

const CHANGESET_DIRECTORY = '.changeset';
const IGNORED_FILES = new Set(['README.md']);

@cryptodev-2s cryptodev-2s Oct 22, 2026 •

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.

Nit: nit do we want to Mirror https://github.com/changesets/changesets/blob/main/packages/read/src/index.ts#L9 at least AGENTS.md I believe we would want to leave instructions here on how agents can write changesets ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We can add it late if it's really a problem but I would expect us to store this outside of this folder

@GuillaumeRx
GuillaumeRx added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit 37db663 Oct 22, 2026
55 checks passed
@GuillaumeRx
GuillaumeRx deleted the gr/changesets-lint-orchestration branch October 22, 2026 12:07

This branch was successfully deployed

1 active deployment
default-branch — 0825976c Deployed Oct 22, 2026 by GuillaumeRx via Determine whether this PR is a release PR #136
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.

2 participants