Skip to content

Add validate command#44

Open
parksb wants to merge 5 commits intomainfrom
validate-command
Open

Add validate command#44
parksb wants to merge 5 commits intomainfrom
validate-command

Conversation

@parksb
Copy link
Copy Markdown
Member

@parksb parksb commented Apr 1, 2026

Validation used to happen implicitly during yarn install through the validateWorkspace hook, which could block installs on strict or restrict violations. This PR moves that logic into an explicit yarn catalogs validate command so users can run it in CI on their own terms.

The install hook still fires but everything is downgraded to warnings now. It also checks that catalogs.yml exists, that validation rules are actually configured, and that .yarnrc.yml is in sync before doing anything, so you don't get false positives from stale state.

@parksb parksb self-assigned this Apr 1, 2026
});

it("should error when no catalogs.yml exists", async () => {
workspace = await createTestWorkspace();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What about using RAII pattern with await using ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Addressed in 545a4b3

@parksb parksb marked this pull request as ready for review April 6, 2026 04:16
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