Skip to content

chore(pre-commit): add local schema generation sync check#231

Open
sakinaroufid wants to merge 1 commit intoUniversal-Commerce-Protocol:mainfrom
sakinaroufid:pr-b-precommit-hook
Open

chore(pre-commit): add local schema generation sync check#231
sakinaroufid wants to merge 1 commit intoUniversal-Commerce-Protocol:mainfrom
sakinaroufid:pr-b-precommit-hook

Conversation

@sakinaroufid
Copy link

Description

Adds a pre-commit hook that runs node generate_ts_schema_types.js and checks git diff --exit-code -- generated/schema-types.ts to catch schema desync locally before committing, giving instant feedback instead of waiting for CI.

This complements the CI workflow added in part 1 — CI remains as a safety net for contributors who bypass or don't have pre-commit installed.

Depends on part 1 (#230) being merged first, which fixes the generator's source path so the hook produces correct output.

This is part 2 of 3 from #13, split per maintainer request.

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

@sakinaroufid sakinaroufid requested a review from a team as a code owner March 1, 2026 16:20
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