Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: enforce type safety for deps property in RegisterOptions #11969

Merged

Conversation

IdoBouskila
Copy link
Contributor

Overview

This PR restricts the deps property within RegisterOptions to accept only field names or an array of field names instead of string | string[].
This change improves type safety and prevents potential issues. Fixes #11968

@bluebill1049
Copy link
Member

thanks for the improvement.

@bluebill1049 bluebill1049 merged commit e90d264 into react-hook-form:master Jun 6, 2024
6 checks passed
martylukyy added a commit to autobrr/autobrr that referenced this pull request Jul 9, 2024
zze0s pushed a commit to autobrr/autobrr that referenced this pull request Jul 16, 2024
* build(deps): bump the npm group in /web with 14 updates

Bumps the npm group in /web with 14 updates:

| Package | From | To |
| --- | --- | --- |
| [@headlessui/react](https://github.com/tailwindlabs/headlessui/tree/HEAD/packages/@headlessui-react) | `2.0.4` | `2.1.1` |
| [@heroicons/react](https://github.com/tailwindlabs/heroicons) | `2.1.3` | `2.1.4` |
| [@tanstack/react-query](https://github.com/TanStack/query/tree/HEAD/packages/react-query) | `5.40.1` | `5.49.2` |
| [@tanstack/react-router](https://github.com/TanStack/router/tree/HEAD/packages/react-router) | `1.34.9` | `1.43.4` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.14.1` | `20.14.9` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `7.12.0` | `7.14.1` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `7.12.0` | `7.14.1` |
| [postcss](https://github.com/postcss/postcss) | `8.4.38` | `8.4.39` |
| [react-hook-form](https://github.com/react-hook-form/react-hook-form) | `7.51.5` | `7.52.0` |
| [tailwindcss](https://github.com/tailwindlabs/tailwindcss) | `3.4.3` | `3.4.4` |
| [@tanstack/router-devtools](https://github.com/TanStack/router/tree/HEAD/packages/router-devtools) | `1.34.9` | `1.43.4` |
| [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) | `7.34.2` | `7.34.3` |
| [typescript](https://github.com/Microsoft/TypeScript) | `5.4.5` | `5.5.2` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `5.2.12` | `5.3.2` |


Updates `@headlessui/react` from 2.0.4 to 2.1.1
- [Release notes](https://github.com/tailwindlabs/headlessui/releases)
- [Changelog](https://github.com/tailwindlabs/headlessui/blob/main/packages/@headlessui-react/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/headlessui/commits/@headlessui/react@v2.1.1/packages/@headlessui-react)

Updates `@heroicons/react` from 2.1.3 to 2.1.4
- [Release notes](https://github.com/tailwindlabs/heroicons/releases)
- [Changelog](https://github.com/tailwindlabs/heroicons/blob/master/CHANGELOG.md)
- [Commits](tailwindlabs/heroicons@v2.1.3...v2.1.4)

Updates `@tanstack/react-query` from 5.40.1 to 5.49.2
- [Release notes](https://github.com/TanStack/query/releases)
- [Commits](https://github.com/TanStack/query/commits/v5.49.2/packages/react-query)

Updates `@tanstack/react-router` from 1.34.9 to 1.43.4
- [Release notes](https://github.com/TanStack/router/releases)
- [Commits](https://github.com/TanStack/router/commits/v1.43.4/packages/react-router)

Updates `@types/node` from 20.14.1 to 20.14.9
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@typescript-eslint/eslint-plugin` from 7.12.0 to 7.14.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.14.1/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 7.12.0 to 7.14.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.14.1/packages/parser)

Updates `postcss` from 8.4.38 to 8.4.39
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](postcss/postcss@8.4.38...8.4.39)

Updates `react-hook-form` from 7.51.5 to 7.52.0
- [Release notes](https://github.com/react-hook-form/react-hook-form/releases)
- [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md)
- [Commits](react-hook-form/react-hook-form@v7.51.5...v7.52.0)

Updates `tailwindcss` from 3.4.3 to 3.4.4
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v3.4.4/CHANGELOG.md)
- [Commits](tailwindlabs/tailwindcss@v3.4.3...v3.4.4)

Updates `@tanstack/router-devtools` from 1.34.9 to 1.43.4
- [Release notes](https://github.com/TanStack/router/releases)
- [Commits](https://github.com/TanStack/router/commits/v1.43.4/packages/router-devtools)

Updates `eslint-plugin-react` from 7.34.2 to 7.34.3
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](jsx-eslint/eslint-plugin-react@v7.34.2...v7.34.3)

Updates `typescript` from 5.4.5 to 5.5.2
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](microsoft/TypeScript@v5.4.5...v5.5.2)

Updates `vite` from 5.2.12 to 5.3.2
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.3.2/packages/vite)

---
updated-dependencies:
- dependency-name: "@headlessui/react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@heroicons/react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@tanstack/react-query"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@tanstack/react-router"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: postcss
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: react-hook-form
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: tailwindcss
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@tanstack/router-devtools"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(web): types
ref react-hook-form/react-hook-form#11969

* fix(web): set explicit types for eventType

* chore(web): bump pnpm

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
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.

issue: deps property in RegisterOptions should only accept field names
2 participants