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

Renovate Update dependency react-hook-form to v7.51.0 #20

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

Conversation

ziegler-daniel
Copy link
Contributor

@ziegler-daniel ziegler-daniel commented Mar 13, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
react-hook-form (source) 7.40.0 -> 7.51.0 age adoption passing confidence

Release Notes

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

v7.51.0

Compare Source

Added
  • added 'validateFields' to formState
const { formState: { validateFields } } = useForm();

v7.50.1: Version v7.50.1

Compare Source

🥲 Regression: Revert "⌨️ fix #​10734 watch and useWatch without parameters return type (#​11359)"

v7.50.0: Versions 7.50.0

Compare Source

🔧 fix data param in handleSubmit when TTransformedValues is a union type (#​11420)
👷 build(Engines): remove pnpm dependency (#​11425)
🐞 fixes #​11386 get new dirtyFields when reset keeping defaults and dirty values (#​11401)
🏷️ improve CustomElement type (#​11309)
💫 feat(useForm): leave formState flags in a consistent state when throwing in handleSubmit onValid (#​11214)
⌨️ fix: change DeepPartial to account for object union types & unknown (#​11385)
✨ feat(values): priorities values over defaultvalues (#​11399)
🐞 close #​11246 skip root validation on action when mode and revalidate mode is onSubmit (#​11395)
💩 fix #​11322 trigger extra re-render with useWatch plus shouldUnregister (#​11394)
⌨️ fix #​10734 watch and useWatch without parameters return type (#​11359)
🧑‍✈️ fix #​11281 issue with upgrade node version (#​11392)
🐞 fix #​11368 keep form state mounted when keeping values (#​11384)
🐞 fix #​11374: Nested deep partial with unknown (#​11373)

thanks to @​Moshyfawn, @​jonahallibone, @​eladattias1996, @​RulerOfCakes, @​anonkey, @​Ar4ys, @​IanVS and @​r-kataoka11

v7.49.3: Version 7.49.3

Compare Source

🐛 fix(formState, disabled): infer controlled disabled form state (#​11361)
🐛 fix(reset): remove global reset option flag (#​11355)
🐛 fix(useController): check if disabled state was set by user (#​11353)
🖨️ fix: Change DeepPartial type definition to be compatible with unknown (#​11333)
🐞 fix #​11328 resetField with object as defaultValue (#​11329)

thanks to @​Moshyfawn, @​geeee and @​RulerOfCakes

v7.49.2: Version 7.49.2

Compare Source

🐞 fix #​11292 issue with controller validation prop (#​11294)

v7.49.1: Version 7.49.1

Compare Source

🐞 fix #​11276 issue with disabled omit on Controller (#​11277)
🐞 fix #​11287 disabled prop cause const dirtyFields update (#​11291)

v7.49.0

Compare Source

Added
  • add reactive errors prop at useForm
useForm({
  errors, // Server errors
});

v7.48.2: Version 7.48.2

Compare Source

🐞 #​11106 fix disabled prop not update dirty formState (#​11143)
🐞 fix controller update with disabled prop from useForm (#​11142)

v7.48.1: Version 7.48.1

Compare Source

🐞 fix controller update with disabled prop from useForm

v7.48.0

Compare Source

Added
  • added new disabled prop for useForm to disable the entire form
const App = () => {
  const [disabled, setDisabled] = useState(false);
  const { handleSubmit } = useForm({ disabled });

  return (
    <form
      onSubmit={handleSubmit(async () => {
        setDisabled(true);
        await sleep(100);
        setDisabled(false);
      })}
    / >
  );
}

v7.47.0

Compare Source

Added
  • reset api with keepIsSubmitSuccessful option, keep successfully submitted form state.
<Form
  onSubmit={() => {
    reset(formValues, {
      keepIsSubmitSuccessful: true,
    });
  }}
/>

v7.46.2: Version 7.46.2

Compare Source

🐞 fix implicit type coercion (#​10949)
🙄 close #​10932 omit disabled prop when not defined (#​10937)
🔧 fix controller test is dirty (#​10899)

thanks to @​samimakicc & @​pierluigigiancola

v7.46.1: Version 7.46.1

Compare Source

🐞 fix #​10878 return disabled field state (#​10879)

thanks to @​Moshyfawn

v7.46.0

Compare Source

Added
  • Controller disabled prop
const [disabled, setDisabled] = useState(false);
useController({
  disabled,
});
  • Trigger passed names to construct resolver options
  • Add exact option for array name in useWatch
Changed
  • Update isDirty when setting disabled in register

v7.45.4: Version 7.45.4

Compare Source

🐞 fix #​10767 dep issue with replayio (#​10768)
🐞 fix #​10762 async submit with Form component (#​10766)
🫖 add test case for issue #​10744 to avoid future regressions (#​10759)

thanks to @​eg-bernardo

v7.45.3: Version 7.45.3

Compare Source

📼 add Replay Test Suites (#​10681)
Revert "🧑‍🎓 close #​10585 update controller value on each render (#​10586)"
🐞 close #​10682 make sure action flag gets reset after useEffect (#​10732)

thanks to @​jasonLaster

v7.45.2: Version 7.45.2

Compare Source

🧾 fix(types): async defaultValues await promise value (#​10637)
🥲 revert strict type check on Controller onChange (#​10609)
📖 docs(changelog 7.45.0): typo and format (#​10624)
📖 fix:test-spelling-error (#​10629)

thanks to @​anton-g, @​milhamm, @​moshfeu & @​OlliePrentice

v7.45.1: Version 7.45.1

Compare Source

🐞 fix #​10602 issue with reactive values props update (#​10606)
🧑‍🎓 close #​10585 update controller value on each render (#​10586)
🧪 test(generated-id): setting window performance undefined without ts-ignore (#​10584)

thanks to @​mateoguzmana

v7.45.0

Compare Source

Changed
  • Controller with type check on onChange
- onChange: (...event: any[]) => void;
+ onChange: (event: ChangeEvent | FieldPathValue<TFieldValues, TName>) => void;
  • Include missing generic for useFormContext
- export const useFormContext: <TFieldValues extends FieldValues, TransformedValues extends FieldValues | undefined = undefined>() => UseFormReturn<TFieldValues>;
+ export const useFormContext: <TFieldValues extends FieldValues, TContext = any, TransformedValues extends FieldValues | undefined = undefined>() => UseFormReturn<TFieldValues, TContext, TransformedValues>;

v7.44.3: Version 7.44.3

Compare Source

🦉 fix: add named component export (#​10486)
💭 fix React import inconsistency (#​10479)
🏙️ fix: removed code from the README updater which was trying to read a non-existent docs/Helpers.yaml
📝 fix doc: update urls from /api to /docs (#​10468)

thanks to @​Moshyfawn @​@​protofarer @​farfromrest

v7.44.2: Version 7.44.2

Compare Source

🪟 fix #​10456 object.hasown replaced with hasOwnProperty (#​10458)

v7.44.1: Version 7.44.1

Compare Source

🐞 fix <Form /> component content-type json type missing (#​10454)

v7.44.0

Compare Source

Added
  • New <Form /> component
// Send post request with formData
<Form
  action="/api"
  control={control}
  onSuccess={() => {
    alert("Great");
  }}
/>

// Send post request with json form data
<Form action="/api" encType="application/json" headers={{ accessToken: 'test' }}>
  {errors.root?.server.type === 500 && 'Error message'}
  {errors.root?.server.type === 400 && 'Error message'}
</Form>

// Send post request with formData with fetch
<Form
  onSubmit={async ({ formData, data, formDataJson, event }) => {
    await fetch("api", {
      method: "post",
      body: formData,
    });
  }}
/>
  • support TransformedValues with useFormContext

useFormContext<FormValue, TransformedValues>()

  • added TTransformedValues to FormProvider

FormProviderProps<TFieldValues, TContext, TTransformedValues>

v7.43.9: Version 7.43.9

Compare Source

🍄 close #​10195 close async defaultValues not load (#​10203)
Revert "🐞 fix #​10139 useFieldArray array error not updating in some cases (#​10150)"

v7.43.8: Version 7.43.8

Compare Source

🪡 related #​10143 did not update dirty until interacted (#​10157)
🐞 fix #​10139 useFieldArray array error not updating in some cases (#​10150)

thanks to @​kylemclean

v7.43.7: Version 7.43.7

Compare Source

🐞 fix #​10131 regression on NaN data type (#​10132)
🐞 fix #​10129 useFieldArray unmount fieldArray wihtout register (#​10130)
🦶 upgrade to TS 5.0.0 (#​9834)

v7.43.6: Version 7.43.6

Compare Source

🐞 fix(appendErrors): incorrect type, it can take an array of errors (#​10125)
✍️ close #​10096 react strict mode with mounted field value (#​10102)
🦮 fix: isLoading form state (#​10095)
📝 fix: typos in tsdoc (#​10088)
🩴 close #​10078 prevent stabled aysnc validation (#​10082)
🐞 fix #​10064 native validation when subscribe to isValid (#​10072)
📝 correct typo in field array type declaration (#​10066)

thanks to @​jorisre @​chrisbarless @​mjw-isp and @​adamtowle

v7.43.5: Version 7.43.5

Compare Source

🐰 prevent runtime error with subscribe function (#​10052)
🪔 close #​10045 improve useController defaultValue restore under strict mode with double useEffect (#​10049)
📷 improve form values state update (#​10029)

v7.43.4: Version 7.43.4

Compare Source

🐞 fix #​10021 issue with .next runtime error and fix cypress action (#​10026)

v7.43.3: Version 7.43.3

Compare Source

📐 fix resetField defaultValue type and reduce any type (#​10024)
🐞 fix #​9997 issue on the mounted state is updated with values prop (#​10001)
Revert "🏍 delete dirty fields node instead of marking as false (#​9156)" (#​9996)
💅 improve state subscription consistency (#​9984)

v7.43.2: Version 7.43.2

Compare Source

🐞 fix #​9972 input focus with submitted form (#​9978)
💉 improve perf & save some bytes (#​9968)
🐞 fix #​9955 useForm values prop keepDirtyValues not update isDirty (#​9959)
🗑️ remove JSX message check (#​9921)

v7.43.1: Version 7.43.1

Compare Source

🐞 fix #​9871 issue with error type (#​9873)
🐞 fix #​9842 clearErrors method does not support global error (#​9843)

v7.43.0

Compare Source

Added
  • support global error type
const onSubmit = async () => {
  setError('root.serverError', {
    type: response.statusCode,
  });
};
const onClick = () => {
  setError('root.random', {
    type: 'random',
  });
};

return (
  <>
    {errors.root.serverError.type === 400 && <p>server response message</p>}
    <p>{errors.root?.random?.message}</p>
  </>
);

v7.42.1: Version 7.42.1

Compare Source

🐞 fix #​9773 useFormState missing state update (#​9777)
🐞 fix #​9765 fix issue with strictMode with isValid state (#​9771)

v7.42.0

Compare Source

Added
  • build in validation validate support second argument for form values
// Making exported validate function isolated for validation
export function validateNumber(_: number, formValus: FormValues) {
  return formValus.number1 + formValus.number2 === 3;
}

<input
  type="number"
  {...register('number1', {
    validate: validateNumber,
    valueAsNumber: true,
  })}
/>;
Changed
  • handleSubmit no longer catch onSubmit callback error
  • Remove deprecated for fieldState.invalid

v7.41.5: Version 7.41.5

Compare Source

🐞 fix #​9713 regression on validate function with react native (#​9714)

thanks @​Moshyfawn

v7.41.4: Version 7.41.4

Compare Source

🐞 fix #​9709 calling setValue breaks future onChange calls from a Controller (#​9710)

thanks @​Moshyfawn

v7.41.3: Version 7.41.3

Compare Source

💁‍♂️ close #​9684 revert UnPackAsyncDefaultValues to avoid TS breaking change

v7.41.2: Version 7.41.2

Compare Source

🤦🏻‍♂️fix #​9661 regression on required valueAsNumber (#​9662)

v7.41.1: 🎅 Version 7.41.1

Compare Source

🐞 fix #​9659 NaN prevent validation update (#​9660)
🕯️ close #​9524 useWatch return undefined value (#​9653)
📖 adjust contributing document (#​9641)
💆🏻 fix #​9621 with the inline default value (#​9622)
🩻 docs: update contribution guidelines (#​9605)

thanks to @​Mini-ghost and @​stefanpl

v7.41.0

Compare Source

Added
  • useForm added values props
const values = await fetch('API');

useForm({
  values, // will reset the form when values updates
  // resetOptions: {
  //   keepDirtyValues: true
  // }
});
  • new isLoading formState for async defaultValues
const {
  formState: { isLoading },
} = useForm();
Changed
  • useForm support async defaultValues props
const {
  formState: { isLoading },
} = useForm({
  defaultValues: fetch('API'),
  // resetOptions: {
  //   keepDirtyValues: true
  // }
});

Configuration

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

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

Rebasing: Whenever PR becomes conflicted, 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 Renovate Bot.

@ziegler-daniel ziegler-daniel changed the title Update dependency react-hook-form to v7.51.0 Renovate Update dependency react-hook-form to v7.51.0 Mar 13, 2024
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.

2 participants