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(deps): Update dependency @hookform/resolvers to v3 #50

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 29, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@hookform/resolvers (source) 2.0.0-beta.3 -> 3.9.1 age adoption passing confidence

Release Notes

react-hook-form/resolvers (@​hookform/resolvers)

v3.9.1

Compare Source

v3.9.0

Compare Source

Features
  • fluentvalidation-ts: add fluentvalidation-ts resolver (#​702) (5fc1e63)

v3.8.0

Compare Source

v3.7.0

Compare Source

Bug Fixes
  • zodResolver: cannot read properties of undefined (reading 'length') (a3e50c6)
Features

v3.6.0

Compare Source

Features

v3.5.0

Compare Source

Features

v3.4.2

Compare Source

Bug Fixes

v3.4.1

Compare Source

Bug Fixes

v3.4.0

Compare Source

v3.3.4

Compare Source

Bug Fixes
  • error handling for array errors with root error (1bfc6ab)

v3.3.3

Compare Source

Bug Fixes

v3.3.2

Compare Source

Bug Fixes

v3.3.1

Compare Source

Bug Fixes

v3.3.0

Compare Source

Bug Fixes
Features
  • add support for root errors for field array (#​621) (5f1a622)
  • pass field names and a context as arguments to a Vest suite (#​584) (3519701)
  • valibot: add more tests, support of criteriaMode and reduce size (#​620) (a9d319d)

v3.2.0

Compare Source

Features

v3.1.1

Compare Source

BREAKING CHANGES

Bug Fixes

You don't need to explicitly provide the type when using the useForm function because it automatically infers the types from the Yup schema.

Before

const schema = Yup.shape({ name: string });

const { register } = useForm<{name: string}>({ resolver: yupResolver(schema) });

After

const schema = Yup.shape({ name: string });

const { register } = useForm({ resolver: yupResolver(schema) });

v3.1.0

Compare Source

Features

v3.0.1

Compare Source

Bug Fixes

v3.0.0

Compare Source

BREAKING CHANGES
  • Yup resolver require Yup v1
  • rename rawValues option to raw
  • classValidationResolver: schema options now includes validator and transformer options
  • Please note that ajv and ajv-errors need to be installed separately, as they are not bundled with resolvers

Before:

schemaOptions?: ValidatorOptions,

After:

schemaOptions?: {
    validator?: ValidatorOptions;
    transformer?: ClassTransformOptions;
  }
Bug Fixes
Features
import { useForm } from 'react-hook-form';
import { typeboxResolver } from '@&#8203;hookform/resolvers/typebox';
import { Type } from '@&#8203;sinclair/typebox';

const schema = Type.Object({
  username: Type.String({ minLength: 1 }),
  password: Type.String({ minLength: 1 }),
});

const App = () => {
  const { register, handleSubmit } = useForm({
    resolver: typeboxResolver(schema),
  });

  return (
    <form onSubmit={handleSubmit((d) => console.log(d))}>
      <input {...register('username')} />
      <input type="password" {...register('password')} />
      <input type="submit" />
    </form>
  );
};
Performance Improvements

v2.9.11

Compare Source

Bug Fixes

v2.9.10

Compare Source

Bug Fixes

v2.9.9

Compare Source

Bug Fixes

v2.9.8

Compare Source

Bug Fixes

v2.9.7

Compare Source

Bug Fixes

v2.9.6

Compare Source

Bug Fixes
  • yup: yup wrong import statement assuming default export (#​427) (928afae)

v2.9.5

Compare Source

Bug Fixes
  • renamed private packages to avoid ambiguity with existing official packages. (#​424) (18ae921)

v2.9.4

Compare Source

Bug Fixes

v2.9.3

Compare Source

Breaking Change
  • compile error with UnpackNestedValue

BREAKING CHANGE: This change will update package dependency with react-hook-form to 7.33.0 above (52a6e07)

v2.9.2

Compare Source

Bug Fixes

v2.9.1

Compare Source

Bug Fixes
  • ajv resolver to work with unlimited layers of nesting (#​412) (692fe65)

v2.9.0

Compare Source

Features
import { useForm } from 'react-hook-form';
import { ajvResolver } from '@&#8203;hookform/resolvers/ajv';

// must use `minLength: 1` to implement required field
const schema = {
  type: 'object',
  properties: {
    username: {
      type: 'string',
      minLength: 1,
      errorMessage: { minLength: 'username field is required' },
    },
    password: {
      type: 'string',
      minLength: 1,
      errorMessage: { minLength: 'password field is required' },
    },
  },
  required: ['username', 'password'],
  additionalProperties: false,
};

const App = () => {
  const {
    register,
    handleSubmit,
    formState: { errors },
  } = useForm({
    resolver: ajvResolver(schema),
  });

  return (
    <form onSubmit={handleSubmit((data) => console.log(data))}>
      <input {...register('username')} />
      {errors.username && <span>{errors.username.message}</span>}
      <input {...register('password')} />
      {errors.password && <span>{errors.password.message}</span>}
      <button type="submit">submit</button>
    </form>
  );
};

v2.8.10

Compare Source

Bug Fixes

v2.8.9

Compare Source

Bug Fixes

v2.8.8

Compare Source

Bug Fixes

v2.8.7

Compare Source

Bug Fixes

v2.8.6

Compare Source

Bug Fixes

v2.8.5

Compare Source

Bug Fixes

v2.8.4

Compare Source

Bug Fixes

v2.8.3

Compare Source

Bug Fixes
  • zodResolver: no exported member ParseParamsNoData (#​264) (14683e5)

v2.8.2

Compare Source

Bug Fixes
  • TypeScript issues with the latest react-hook-form version (66182f8)

v2.8.1

Compare Source

Bug Fixes

v2.8.0

Compare Source

BREAKING CHANGES

v2.7.1

Compare Source

Performance Improvements

v2.7.0

Compare Source

Features
import { useForm } from 'react-hook-form';
import { typanionResolver } from '@&#8203;hookform/resolvers/typanion';
import * as t from 'typanion';

const isUser = t.isObject({
  username: t.applyCascade(t.isString(), [t.hasMinLength(1)]),
  age: t.applyCascade(t.isNumber(), [t.isInteger(), t.isInInclusiveRange(1, 100)]),
});

const App = () => {
  const {
    register,
    handleSubmit,
    formState: { errors },
  } = useForm({
    resolver: typanionResolver(isUser),
  });

  return (
    <form onSubmit={handleSubmit((d) => console.log(d))}>
      <input {...register('name')} />
      {errors.name?.message && <p>{errors.name?.message}</p>}
      <input type="number" {...register('age')} />
      {errors.age?.message && <p>{errors.age?.message}</p>}
      <input type="submit" />
    </form>
  );
};

v2.6.1

Compare Source

Bug Fixes

v2.6.0

Compare Source

Features

v2.5.2

Compare Source

Bug Fixes

v2.5.1

Compare Source

Bug Fixes

v2.5.0

Compare Source

Features
import React from 'react';
import { useForm } from 'react-hook-form';
import { computedTypesResolver } from '@&#8203;hookform/resolvers/computed-types';
import Schema, { number, string } from 'computed-types';

const schema = Schema({
  username: string.min(1).error('username field is required'),
  password: string.min(1).error('password field is required'),
  password: number,
});

const App = () => {
  const {
    register,
    handleSubmit,
    formState: { errors },
  } = useForm({
    resolver: computedTypesResolver(schema),
  });

  return (
    <form onSubmit={handleSubmit((d) => console.log(d))}>
      <input {...register('name')} />
      {errors.name?.message && <p>{errors.name?.message}</p>}
      <input type="number" {...register('age', { valueAsNumber: true })} />
      {errors.age?.message && <p>{errors.age?.message}</p>}
      <input type="submit" />
    </form>
  );
};

export default App;

v2.4.0

Compare Source

Features
import React from 'react';
import { useForm } from 'react-hook-form';
import { nopeResolver } from '@&#8203;hookform/resolvers/nope';
import Nope from 'nope-validator';

const schema = Nope.object().shape({
  name: Nope.string().required(),
  age: Nope.number().required(),
});

const App = () => {
  const { register, handleSubmit } = useForm({
    resolver: nopeResolver(schema),
  });

  return (
    <form onSubmit={handleSubmit((d) => console.log(d))}>
      <input name="name" ref={register} />
      <input name="age" type="number" ref={register} />
      <input type="submit" />
    </form>
  );
};

export default App;

v2.3.2

Compare Source

Bug Fixes

v2.3.1

Compare Source

Bug Fixes

v2.3.0

Compare Source

Features
import React from 'react';
import { useForm } from 'react-hook-form';
import { ioTsResolver } from '@&#8203;hookform/resolvers/io-ts';
import t from 'io-ts';
// you don't have to use io-ts-types but it's very useful
import tt from 'io-ts-types';

const schema = t.type({
  username: t.string,
  age: tt.NumberFromString,
});

const App = () => {
  const { register, handleSubmit } = useForm({
    resolver: ioTsResolver(schema),
  });

  return (
    <form onSubmit={handleSubmit((d) => console.log(d))}>
      <input name="username" ref={register} />
      <input name="age" type="number" ref={register} />
      <input type="submit" />
    </form>
  );
};

export default App;

v2.2.0

Compare Source

Features
Bug Fixes
Performance Improvements

v2.1.0

Compare Source

Features
import 'reflect-metadata';
import React from 'react';
import { useForm } from 'react-hook-form';
import { classValidatorResolver } from '@&#8203;hookform/resolvers/class-validator';
import { Length, Min, IsEmail } from 'class-validator';

class User {
  @&#8203;Length(2, 30)
  username: string;

  @&#8203;Min(18)
  age: number;

  @&#8203;IsEmail()
  email: string;
}

const App = () => {
  const {
    register,
    handleSubmit,
    formState: { errors },
  } = useForm<User>({ resolver:  classValidatorResolver(User) });

  return (
      <form onSubmit={handleSubmit((data) => console.log(data))} >
        <input type="text" {...register('username')} />
        {errors.username && <span>{errors.username.message}</span>}

        <input type="text" {...register('email')} />
        {errors.email && <span>{errors.email.message}</span>}

        <input type="number" {...register('age', { valueAsNumber: true })} />
        {errors.age && <span>{errors.age.message}</span>}

        <input type="submit" value="Submit" />
      </form>
  );
};

export default App;

v2.0.1

Compare Source

Bug Fixes

v2.0.0

Compare Source

BREAKING CHANGES
  • Require react-hook-form >= 7
Features
Bug Fixes
Performance Improvements

V2 🚀 (#​108) (fe53179), closes #​108 #​97 #​114 #​116 #​115 #​117 #​123 #​125 #​124 #​126 #​127 #​128 #​129 #​131 #​130 #​132 #​134 #​136

v2.0.0-rc.1

Compare Source

v2.0.0-beta.17

Compare Source

v2.0.0-beta.15

Compare Source

Bug Fixes
  • types: add Lazy schema support to resolver (3e69799)

v2.0.0-beta.14

Compare Source

Bug Fixes

v2.0.0-beta.13

Compare Source

Performance Improvements

v2.0.0-beta.12

Compare Source

Performance Improvements

v2.0.0-beta.11

Compare Source

Performance Improvements

v2.0.0-beta.10

Compare Source

Features

v2.0.0-beta.9

Compare Source

Bug Fixes

v2.0.0-beta.8

Compare Source

Bug Fixes

v2.0.0-beta.7

Compare Source

Features
  • update to react-hook-form v7 (5fdc7f9)
BREAKING CHANGES
  • Require react-hook-form >= 7

v2.0.0-beta.6

Compare Source

Features

v2.0.0-beta.5

Compare Source

Features

v2.0.0-beta.4

Compare Source

Features

Configuration

📅 Schedule: Branch creation - "before 3am on Monday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

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 has been generated by Mend Renovate using a curated preset maintained by Sanity. View repository job log here

@socket-security
Copy link

socket-security bot commented May 29, 2023

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

@renovate renovate bot force-pushed the renovate/hookform-resolvers-3.x branch from b260075 to cf08971 Compare June 12, 2023 20:48
@renovate renovate bot changed the title fix(deps): update dependency @hookform/resolvers to v3 fix(deps): Update dependency @hookform/resolvers to v3 Aug 4, 2023
@renovate renovate bot force-pushed the renovate/hookform-resolvers-3.x branch from cf08971 to bd668ee Compare August 6, 2023 15:44
@renovate renovate bot force-pushed the renovate/hookform-resolvers-3.x branch 2 times, most recently from 89b136b to 2dc1a9c Compare August 28, 2023 23:12
@renovate renovate bot force-pushed the renovate/hookform-resolvers-3.x branch from 2dc1a9c to f76bf6f Compare October 11, 2023 22:56
@renovate renovate bot force-pushed the renovate/hookform-resolvers-3.x branch from f76bf6f to e5c2ae9 Compare December 26, 2023 10:42
@renovate renovate bot force-pushed the renovate/hookform-resolvers-3.x branch from e5c2ae9 to 85f03af Compare January 4, 2024 09:31
@renovate renovate bot force-pushed the renovate/hookform-resolvers-3.x branch 2 times, most recently from 587ab87 to 3a15195 Compare May 21, 2024 03:33
@renovate renovate bot force-pushed the renovate/hookform-resolvers-3.x branch 2 times, most recently from 0578aa9 to 5609da4 Compare June 6, 2024 04:50
@renovate renovate bot force-pushed the renovate/hookform-resolvers-3.x branch 3 times, most recently from 7fa2eec to 01b6c6b Compare July 6, 2024 00:48
Copy link

socket-security bot commented Jul 6, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@hookform/[email protected] None 0 712 kB bluebill1049

🚮 Removed packages: npm/@hookform/[email protected]

View full report↗︎

@renovate renovate bot force-pushed the renovate/hookform-resolvers-3.x branch from 01b6c6b to 8e8b73a Compare October 29, 2024 01:53
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