Skip to content

feat: upgrade final-form ecosystem to latest major versions#1614

Merged
Hyperkid123 merged 1 commit into
masterfrom
upgrade/final-form-v5
Jun 23, 2026
Merged

feat: upgrade final-form ecosystem to latest major versions#1614
Hyperkid123 merged 1 commit into
masterfrom
upgrade/final-form-v5

Conversation

@Hyperkid123

@Hyperkid123 Hyperkid123 commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary

  • Bump final-form v4 → v5, final-form-arrays v3 → v4, react-final-form v6 → v7, react-final-form-arrays v3 → v5
  • All upstream packages migrated from Flow to TypeScript — adapted type signatures across the renderer, common, and MUI mapper packages
  • Replaced final-form-focus v2 dependency with an inline focus decorator preserving v1 submit-only focus behavior (v2 introduced a regression where it steals focus during typing by subscribing to errors continuously)
  • No test changes, no behavioral regressions — all existing tests pass as-is

Type changes

  • FormProps generic arity reduced from 2 to 0-1
  • UseFieldConfig is no longer generic
  • FormState/FormApi now require InitialFormValues extends Partial<FormValues> constraint
  • FieldMetaState fields (valid, validating, active) are now optional
  • FieldMetaState.error changed from any to unknown — replaced external import with local interface in MUI validation-error

Test plan

  • npm run build — all 7 projects compile successfully
  • npx nx run-many --target=lint — passes
  • npx nx run-many --target=test --coverage — all 7 projects, all tests pass
  • CI pipeline confirms

🤖 Generated with Claude Code

Bump final-form (v4→v5), final-form-arrays (v3→v4), react-final-form
(v6→v7), and react-final-form-arrays (v3→v5). All packages migrated
from Flow to TypeScript with stricter type signatures.

Key type adaptations:
- FormProps now takes 0-1 generic args (was 2)
- UseFieldConfig is no longer generic
- FormState/FormApi require InitialFormValues extends Partial<FormValues>
- FieldMetaState fields (valid, validating, active) are now optional

Replace final-form-focus v2 with an inline focus decorator that
preserves the v1 submit-only focus behavior. The v2 package introduced
an unintended regression: it subscribes to errors continuously and
steals focus during typing, breaking form interactions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-forms Ready Ready Preview, Comment Jun 23, 2026 10:40am

@Hyperkid123 Hyperkid123 merged commit 5bdcc12 into master Jun 23, 2026
3 checks passed
@Hyperkid123 Hyperkid123 deleted the upgrade/final-form-v5 branch June 23, 2026 12:25
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