Skip to content

Conversation

@peterj
Copy link
Collaborator

@peterj peterj commented Aug 14, 2025

snyk-top-banner

Snyk has created this PR to upgrade react-hook-form from 7.58.1 to 7.61.0.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 4 versions ahead of your current version.

  • The recommended version was released 21 days ago.

Release notes
Package name: react-hook-form
  • 7.61.0 - 2025-07-23

    🧮 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;
    }

    <span class="pl-k">return</span> <span class="pl-s">''</span><span class="pl-kos">;</span>
    

    },
    });

    • 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

  • 7.60.0 - 2025-07-04

    🦘 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 })
  • 7.60.0-next.0 - 2025-07-01

    🦘 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 })
  • 7.59.0 - 2025-06-28

    🪱 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

  • 7.58.1 - 2025-06-17

    🔧 check window.crypto undefined (#12893)

from react-hook-form GitHub release notes

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

Copilot AI review requested due to automatic review settings August 14, 2025 08:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades the react-hook-form dependency from version 7.58.1 to 7.61.0, bringing 4 new versions worth of updates including new features, bug fixes, and performance improvements.

Key changes include:

  • Addition of new compute prop for useWatch subscription functionality
  • New keepFieldsRef option for the reset function
  • Various bug fixes for form data handling and subscription behavior
Files not reviewed (1)
  • ui/package-lock.json: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@peterj peterj force-pushed the snyk-upgrade-ee9d1a82859ca3f9d8f51314c0dd527f branch from d3eb6f0 to 5561376 Compare August 15, 2025 07:03
Snyk has created this PR to upgrade react-hook-form from 7.58.1 to 7.61.0.

See this package in npm:
react-hook-form

See this project in Snyk:
https://app.snyk.io/org/kagent/project/3a1ab099-8f8f-43a5-81e6-e07ff34c96dc?utm_source=github&utm_medium=referral&page=upgrade-pr

Signed-off-by: Peter Jausovec <[email protected]>
@peterj peterj force-pushed the snyk-upgrade-ee9d1a82859ca3f9d8f51314c0dd527f branch from 5561376 to 2201ac8 Compare August 15, 2025 14:59
@EItanya EItanya merged commit 0543a2c into main Aug 15, 2025
13 checks passed
@EItanya EItanya deleted the snyk-upgrade-ee9d1a82859ca3f9d8f51314c0dd527f branch August 15, 2025 15:52
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.

4 participants