Add an autofix CLI for invalid format versions #22

Merged
smell-of-curry merged 1 commit from feature/format-version-autofix into main 2026-10-15 01:43:45 +00:00

Summary

Adds npm run fix:formatVersions. It scans the same assets as npm run validate:formatVersions and bumps outdated format_version values in place.

  • Groups outdated files by category (models, animations, animation controllers, render controllers, particles, entities, attachables, sounds).
  • Prints each path with its current version and the required version.
  • Asks once per category before writing. Declining a category leaves those files unchanged.
  • Replaces only the first format_version string, so the rest of the file stays as it is.
  • After accepting every category, npm run validate:formatVersions should pass. Files with no format_version, or a legacy geometry.* root, are skipped and still need a manual edit.

Replaces #15. That branch's Forgejo diff was still rooted at the old merge base, so it showed files that are already on main.

Test plan

  • npm run validate:formatVersions is green on this branch
  • Lower one animation format_version, run npm run fix:formatVersions, accept that category, confirm the string bumped and validate is green again
  • Decline a category and confirm those files stay unchanged
## Summary Adds `npm run fix:formatVersions`. It scans the same assets as `npm run validate:formatVersions` and bumps outdated `format_version` values in place. - Groups outdated files by category (models, animations, animation controllers, render controllers, particles, entities, attachables, sounds). - Prints each path with its current version and the required version. - Asks once per category before writing. Declining a category leaves those files unchanged. - Replaces only the first `format_version` string, so the rest of the file stays as it is. - After accepting every category, `npm run validate:formatVersions` should pass. Files with no `format_version`, or a legacy `geometry.*` root, are skipped and still need a manual edit. Replaces #15. That branch's Forgejo diff was still rooted at the old merge base, so it showed files that are already on `main`. ## Test plan - [ ] `npm run validate:formatVersions` is green on this branch - [ ] Lower one animation `format_version`, run `npm run fix:formatVersions`, accept that category, confirm the string bumped and validate is green again - [ ] Decline a category and confirm those files stay unchanged
Add an interactive CLI to bump outdated format_version values.
All checks were successful
Auto Assign / run (pull_request_target) Successful in 2s
CI / build-and-test (20.x) (pull_request) Successful in 29s
Model Preview / model-preview (pull_request) Successful in 1m3s
928b90908e
validate: formatVersions already reports them. fix:formatVersions asks once per category and rewrites only the version string.
Co-authored-by: Cursor <cursoragent@cursor.com>
smell-of-curry was assigned by forgejo-actions 2026-10-13 13:15:35 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pokebedrock/pokebedrock-res!22
No description provided.