feat: upgrade final-form ecosystem to latest major versions#1614
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
final-formv4 → v5,final-form-arraysv3 → v4,react-final-formv6 → v7,react-final-form-arraysv3 → v5final-form-focusv2 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)Type changes
FormPropsgeneric arity reduced from 2 to 0-1UseFieldConfigis no longer genericFormState/FormApinow requireInitialFormValues extends Partial<FormValues>constraintFieldMetaStatefields (valid,validating,active) are now optionalFieldMetaState.errorchanged fromanytounknown— replaced external import with local interface in MUI validation-errorTest plan
npm run build— all 7 projects compile successfullynpx nx run-many --target=lint— passesnpx nx run-many --target=test --coverage— all 7 projects, all tests pass🤖 Generated with Claude Code