👷 improve check-schemas script #4123
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
There is some confusion around the
check-schemasjob. The job is failing and contributors assume they need to re-generate the types, which is not alway the right call. In some cases, they updated the submodule inadvertently, without the PR requiring rum-events-format changes. In another case, this job was failing not because of event-schemas but just because there was an unrelated formatting issue.Changes
This PR adjusts the script to output to guide the contributor.
It also removes the
yarn format -wcall. Generated files should be already formatted correctly. There was an issue related to this, caused byjson-schemas-to-typescriptusing prettier v2 whereas the SDK repo using v3. So this PR also upgradesjson-schemas-to-typescriptso it uses prettier v3.Test instructions
Checklist