Skip to content

⬆️ upgrade react-hook-form to v7.72.1#843

Open
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/react-hook-form-7.x-lockfile
Open

⬆️ upgrade react-hook-form to v7.72.1#843
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/react-hook-form-7.x-lockfile

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Mar 29, 2025

This PR contains the following updates:

Package Change Age Confidence
react-hook-form (source) 7.54.27.72.1 age confidence

Release Notes

react-hook-form/react-hook-form (react-hook-form)

v7.72.1: Version 7.72.1

Compare Source

🐞 test: add isDirty check for numeric string keys in defaultValues (issue #​13346) (#​13347)
🐞 fix: prevent setValue with shouldDirty from polluting unrelated dirty fields (#​13326)
🐞 fix: memoize control in HookFormControlContext to prevent render conflicts (#​13272) (#​13312)
🐞 fix: isNameInFieldArray should check all ancestor paths for nested field arrays (#​13318)
🐞 fix: #​13320 formState.isValid incorrect on Controller re-mount (#​13324)

thanks to @​6810779s, @​candymask0712, @​olagokemills, @​shahmir-oscilar & @​bae080311

v7.72.0: Version 7.72.0

Compare Source

⚓️ feat: built-in form level validate (#​13195)

const { register, formState: { errors } } = useForm({
  validate: async (formValue) => {
    if (formValue.test1.length > formValue.test.length) {
      return {
        type: 'formError',
        message: 'something is wrong here',
      };
    }

    if (formValue.test === 'test') {
      return 'direct error message';
    }

    return true;
  },
});

🐞 fix: prevent useFieldArray from marking unrelated fields as dirty (#​13299)
🐞 fix #​13300 checkbox form validation ignored with native validation (#​13310)
🌉 allow subscribe formState to track submit state (#​13319)

v7.71.2: Version 7.71.2

Compare Source

🕵️‍♂️ fix: use DeepPartialSkipArrayKey for WatchObserver value parameter (#​13278)
🧹 fix(clearErrors): emit name signal for targeted field updates (#​13280)

thanks to @​veeceey, @​kaigritun, @​pgoslatara & @​seongbiny

v7.71.1

Compare Source

v7.71.0: Version 7.71.0

Compare Source

⚡ perf: memoize FormProvider context value to prevent unnecessary rerenders (#​13235)
🚄 perf: separate control context to prevent unnecessary rerenders (#​13234)
🐞 fix: update isValid when field disabled state changes (#​13231)
👌 chore: optimize bundle size via safe terser options (#​13243) (#​13244)

thanks to @​kamja44, @​a28689604 & @​newsiberian

v7.70.0

Compare Source

v7.69.0: 🎄 Version 7.69.0

Compare Source

📏 feat: align API with useWatch (#​13192)
🤦🏻‍♂️ chore: update @​deprecated names prop on (#​13198)
🏥 chore: safely call function methods on elements (#​13190)
🪖 chore: cve-2025-67779 (#​13196)
🪖 chore: cve-2025-55184 & cve-2025-55183 (#​13194)
🪖 chore: CVE-2025-55182 Critical RCE vulnerabilty (#​13175)
🔬 test: add regression tests for #​12837 and #​13136 (#​13187)
🐞 fix(reset): preserve isValid state when keepIsValid option is used (#​13173)
🐞 fix: ensure each createFormControl.subscribe subscription listens only to the changes it subscribes to (#​12968)
🐞 fix(validation): batch isValidating state updates with validation result (#​13181)
🐞 fix(createFormControl): resolve race condition between setError and setFocus (#​13138) (#​13169)
🧿 fix control prop type (#​13189)
🔔 chore: clean cloneObject logic (#​13179)

thanks to @​PierreCrb, @​a28689604, @​AnuragM7666, @​ap0nia, @​dusan233 & @​hlongc

v7.68.0

Compare Source

v7.67.0: Version 7.67.0

Compare Source

🎯 feat: add exact to useController props (#​13154)

useForm({
  defaultValues: {
    user: {
      name: ''
    }
  }
})

<Controller control={control} name="user" exact={false} /> // subscribe to all user object

✨ fix(types): allow undefined value with async defaultValues in Contr… (#​13160)
🐞 fix(types): correct PathValueImpl type inference (#​13150)

v7.66.1

Compare Source

v7.66.0

Compare Source

v7.65.0: Version 7.65.0

Compare Source

🧿 feat: <Watch /> component (#​12986)

import { useForm, Watch } from 'react-hook-form';

const App = () => {
  const { register, control } = useForm();

  return (
    <div>
      <form>
        <input {...register('foo')} />
        <input {...register('bar')} />
      </form>
      {/* re-render only when value of `foo` changes */}
      <Watch
        control={control}
        names={['foo']}
        render={([foo]) => <span>{foo}</span>}
      />
    </div>
  );
};

🐞 fix: respect parent-provided useFieldArray rules (#​13082) (#​13083
🐞 fix: getDirtyFields submit fields with null values when using useForm (#​13079)

thanks to @​tesseractjh, @​Han5991 & @​jonathanarnault

v7.64.0: Version 7.64.0

Compare Source

🚏 Support optional array fields in PathValueImpl type (#​13057)
🐞 fix: preserve Controller's defaultValue with shouldUnregister prop (#​13063)
✂ chore: remove unused field ids ref in useFieldArray (#​13066)

thanks to @​MPrieur-chaps, @​gynekolog & @​uk960214

v7.63.0: Version 7.63.0

Compare Source

🥢 feat: extract form values by form state (#​12936)

getValues(undefined, { dirtyFields: true }); // return only dirty fields 
getValues(undefined, { touchedFields: true });  // return only touched fields 

🦍 feat: improve get dirty fields logic (#​13049)
🐿️ chore: remove duplicated function isMessage (#​13050)
🐞 fix: use field name to update isValidating fields (#​13000)
🐞 fix: unregister previous field when switching conditional Controllers (#​13041)
🐞 fix: only excuse trigger function when deps has a valid array (#​13056)

thanks to @​candymask0712, @​GorkemKir, @​kimtaejin3, @​m2na7 & @​abnud11

v7.62.0: Version 7.62.0

Compare Source

👨‍🔧 prevent onBlur for readOnly fields (#​12971)
🐞 fix #​12988 sync two defaultValues after reset with new defaultValues (#​12990)
🐞 fix: do not override prototype of data in cloneObject (#​12985)
🐞 fix field name type conflict in nested FieldErrors (#​12972)

thanks to @​candymask0712, @​Adityapradh, @​Ty3uK & @​kichikawa57

v7.61.1: Version 7.61.1

Compare Source

Revert "⌨️ fix: watch return type based on defaultValue (#​12896)"

v7.61.0: Version 7.61.0

Compare Source

🧮 feat: compute prop for useWatch subscription (#​12503)

  • subscribe to the entire form but only return updated value with certain condition
type FormValue = {
  test: string;
}

const watchedValue = useWatch({
  control: methods.control,
  compute: (data: FormValue) => {
    if (data.test?.length) {
      return data.test;
    }

    return '';
  },
});
  • subscribe to a specific form value state
type FormValue = {
  test: string;
}

const watchedValue = useWatch({
  control: methods.control,
  name: 'test',
  compute: (data: string) => {
      return data.length > 3 ? data : '';
  },
});

👨‍🔧 trigger watch callbacks in response to value changes only (#​12945)
🙏 track name with setValue subscription callbacks (#​12946)
⌨️ fix: watch return type based on defaultValue (#​12896)
🐞 fix #​12959 subscribe with latest defaultValues #​12961
🐞 fix: handle explicit "multipart/form-data" encType in Form Component (#​12948)
🐞 fix(build): Remove React wildcard import to resolve ESM build issues (#​12942)
🦭 chore: improve exclude patterns (#​12935)
🐿️ chore: remove unused omit function (#​12958)

Big thanks to @​joshkel for helping with some of the subscription bugs! and also @​kamja44, @​mrazauskas, @​codepunkt, @​afontcu and @​rururux

v7.60.0: Version 7.60.0

Compare Source

🦘 feat: reset new keepFieldsRef options keep fields reference (#​12923)

// This option will skip input reference gets reset and avoid re-register input reference after reset
reset(data, { keepFieldsRef: true })

v7.59.0: Version 7.59.0

Compare Source

🪱 feat: support deep equality checking with circular references (#​12914)
🐞 fix #​12900 issue with formData reference clone (#​12906)
🐞 fix #​12873 issue with undefined value for submit data (#​12905)
🐞 fix case when useWatch accept object variable param (#​12897)
🐞 fix: typo in UseFormSubscribe and missing event type for callback data in subscribe (#​12904)
Revert "⌨️ rename to UseFormResetFieldOptions for type consistency" (#​12907)

thanks to @​aspirisen @​n8pjl @​SKOLZ @​pushys & @​candymask0712

v7.58.1: Version 7.58.1

Compare Source

🔧 check window.crypto undefined (#​12893)

v7.58.0: Version 7.58.0

Compare Source

⌨️ feat: add FieldArrayPathByValue type (#​12481)
📇 feat #​12813 use stringToPath to prevent error at field name with quotes (#​12858)
🧧 default to crypto.randomUUID in generateId (#​12890)
🐞 close #​12857 incorrect formControl return from useForm (#​12878)
🐞 fix Initial useFieldArray fields (#​12847)
🥷 chore: improve type import (#​12879)
📇 chore: Added displayName to useFormContext (#​11448)
✍️ chore: fix typo in assert-esm-exports.mjs (#​12860)

thanks to @​mastermatt, @​clonemycode, @​dusan233, @​candymask0712, @​tran-simon & @​adnanalbeda

v7.57.0: Version 7.57.0

Compare Source

🫚 feat: root errors count in schema error lookup (#​12839)
👁️ feat: focus form field for errors supplied by errors prop (#​12805)
⌨️ feat: add and export options config for resetField api (#​12819)
🐞 close #​12707 useController focus function runtime issue (#​12843)
🐞 fix: add proper types to form.subscribe (#​12850)
🐞 fix: add type info for callback args in subscribe (#​12859)
🔄 close #​12835 revert original fix on errors empty object check (#​12846)

thanks to @​candymask0712, @​CertainlyAria, @​jkbach, @​chrisgarber and @​evgeniyworkbel

v7.56.4: Version 7.56.4

Compare Source

🐞 fix: Changes setValue to skip values that are not in ownProperties to prevent infinite call stack (#​12731)
🐞 fix: checkbox duplication handling in useFieldArray (#​12793)
🐞 fix: make mode and reValidateMode reactive (#​12803)

v7.56.3: Version 7.56.3

Compare Source

Revert "📭 close #​12773 pass input ref instead partial (#​12775)"

v7.56.2: Version 7.56.2

Compare Source

🐞 fix #​12785 regression on default value gets overwritten by values props (#​12790)
🐞 fix: use layoutEffect in useWatch for subscription similar to useForm (#​12786)
🐞 fix #​12772 reset form useWatch to utilize ref for defaultValue and … (#​12780)
📭 close #​12773 pass input ref instead partial (#​12775)

v7.56.1: Version 7.56.1

Compare Source

🐞 fix #​12761 #​12762 issue with usage reset isReady formState (#​12765)
🐞 fix #​12763 import warning with named exports (#​12764)

v7.56.0: Version 7.56.0

Compare Source

⏰ feat: introduce isReady state for subscription (#​12568)

const { formState: { isReady }, setValue } = useForm()

useEffect(() => {
  // form subscription setup is ready
  if (isReady) setValue('test', 'value')
}, [isReady])

🌗 feat: support reactive mode and reValidateMode (#​12743)
🐞 fix #​12741 regression on move/swap on useFieldArray input update (#​12749)
🐞 fix: use useIsomorphicLayoutEffect to address warning in SSR (#​12738)

v7.55.0: Version 7.55.0

Compare Source

⚡️ createFormControl

  • Allow us to start subscribing outside of the React component
const { formControl, control } = createFormControl(props)

function App() {
  const { register } = useForm({
    formControl,
  })

  return <form />
}

function Test() {
  useFormState({
    control // no longer need context api
  })
}

⚡️ subscribe

  • subscribe form state update without re-render
  • subscribe outside of the react component
const { formControl } = createFormControl(props)

formControl.subscribe({
  formState: { isDirty: true },
  callback: (formState) => {
    if (formState.isDirty) {
      // do something here
    }
  }
})

function App() {
  const { register } = useForm({
    formControl,
  })

  return <form />
}

🪲 fix #​12680: Update Fieldarray Unmount Status (#​12690)
🫡 fix: improve type inference for useFormContext (#​12689)
👮‍♂️ feat: infer resolver output types (#​12638)
🐞 fix(useForm): make values and defaultValues work correctly with createFormControl and useMemo (#​12675)
🥹 close #​12665 issue with values not populate form
🐞 fix #​12665 regression on values over take default values
🫡 allow use of handleSubmit with native events (#​12645)
🐞 fix #​12631 revalidateMode issue with useFieldArray validation (#​12646)
🦥 close #​12634 allow components with useController hook be memoized (#​12635)
🐞 fix #​12580 setError in useEffect does not work when used inside the FormProvider context (#​12642)
🛟 fix: add the condition to prevent infinite render with errors prop (#​12622)
🐞 fix #​12580 valid state update with onBlur mode (#​12612)
🐞 fix #​12572 disabled field value not get undefined in resolver (#​12573)
🦾 feat: reference stable for useWatch defaultValue (#​12564)
⏰ chore: remove typetest folder from build (#​12555)
🐞 fix #​12532 useController should unregister issue with strict mode (#​12538)
👁️ feat: improve reference update with useWatch (#​12537)
🦥 close #​12531 disabled state issue with touched and dirty (#​12536)

thanks to @​jtomaszewski, @​joshkel, @​candymask0712, @​kotarella1110, @​jorisre, @​jtomaszewski, @​controversial and @​jedahu


Configuration

📅 Schedule: Branch creation - "every weekend" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 29, 2025

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

Project Deployment Actions Updated (UTC)
kitchn-docs Error Error Apr 3, 2026 9:45am
kitchn-workshop Error Error Apr 3, 2026 9:45am

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 29, 2025

⚠️ No Changeset found

Latest commit: 55f6674

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@renovate renovate bot force-pushed the renovate/react-hook-form-7.x-lockfile branch from 354d29f to 2ccc39a Compare April 1, 2025 11:20
@renovate renovate bot force-pushed the renovate/react-hook-form-7.x-lockfile branch from 2ccc39a to 7eaba80 Compare April 8, 2025 14:44
@renovate renovate bot force-pushed the renovate/react-hook-form-7.x-lockfile branch from 7eaba80 to d6f7ce1 Compare April 20, 2025 10:36
@renovate renovate bot changed the title ⬆️ upgrade react-hook-form to v7.55.0 ⬆️ upgrade react-hook-form to v7.56.0 Apr 20, 2025
@renovate renovate bot force-pushed the renovate/react-hook-form-7.x-lockfile branch from d6f7ce1 to 3102759 Compare April 23, 2025 03:24
@renovate renovate bot changed the title ⬆️ upgrade react-hook-form to v7.56.0 ⬆️ upgrade react-hook-form to v7.56.1 Apr 23, 2025
@renovate renovate bot force-pushed the renovate/react-hook-form-7.x-lockfile branch from 3102759 to 91990b4 Compare April 24, 2025 06:49
@renovate renovate bot force-pushed the renovate/react-hook-form-7.x-lockfile branch 2 times, most recently from 1e13e75 to bedd306 Compare April 26, 2025 15:35
@renovate renovate bot force-pushed the renovate/react-hook-form-7.x-lockfile branch from bedd306 to f5f7374 Compare May 4, 2025 02:25
@renovate renovate bot changed the title ⬆️ upgrade react-hook-form to v7.56.1 ⬆️ upgrade react-hook-form to v7.56.2 May 4, 2025
@renovate renovate bot force-pushed the renovate/react-hook-form-7.x-lockfile branch from 41ee89c to fc9f912 Compare May 19, 2025 11:49
@renovate renovate bot force-pushed the renovate/react-hook-form-7.x-lockfile branch from fc9f912 to 4ddc624 Compare May 28, 2025 13:29
@renovate renovate bot force-pushed the renovate/react-hook-form-7.x-lockfile branch from 4ddc624 to 689a821 Compare June 2, 2025 01:34
@renovate renovate bot changed the title ⬆️ upgrade react-hook-form to v7.56.4 ⬆️ upgrade react-hook-form to v7.57.0 Jun 2, 2025
@renovate renovate bot force-pushed the renovate/react-hook-form-7.x-lockfile branch from 689a821 to 05a52ac Compare June 4, 2025 06:45
@renovate renovate bot force-pushed the renovate/react-hook-form-7.x-lockfile branch from 05a52ac to a8125e9 Compare June 15, 2025 13:28
@renovate renovate bot changed the title ⬆️ upgrade react-hook-form to v7.57.0 ⬆️ upgrade react-hook-form to v7.58.0 Jun 15, 2025
@renovate renovate bot force-pushed the renovate/react-hook-form-7.x-lockfile branch from a8125e9 to 328c5b2 Compare June 17, 2025 17:24
@renovate renovate bot changed the title ⬆️ upgrade react-hook-form to v7.58.0 ⬆️ upgrade react-hook-form to v7.58.1 Jun 17, 2025
@renovate renovate bot force-pushed the renovate/react-hook-form-7.x-lockfile branch from 328c5b2 to e962e60 Compare June 22, 2025 15:03
@renovate renovate bot force-pushed the renovate/react-hook-form-7.x-lockfile branch from e962e60 to d601ded Compare June 28, 2025 05:54
@renovate renovate bot changed the title ⬆️ upgrade react-hook-form to v7.58.1 ⬆️ upgrade react-hook-form to v7.59.0 Jun 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants