Update dependency formik to v2.4.3 #1742

Closed
opened 2026-04-05 16:34:11 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @renovate[bot] on 8/4/2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
formik (source) 2.2.9 -> 2.4.3 age adoption passing confidence

Release Notes

jaredpalmer/formik (formik)

v2.4.3

Compare Source

Patch Changes

v2.4.2

Compare Source

Patch Changes

v2.4.1

Compare Source

Patch Changes
  • 2b194c2 #​3808 Thanks @​NagaiKoki! - fix type of setFieldValue function

  • 708bcb2 #​3813 Thanks @​probablyup! - Revert FieldArray "shouldComponentUpdate" performance optimization. As it turns out, it's a common use case to have JSX controlled via non-Formik state/props inside of FieldArray, so it's not safe to cancel re-renders here.

  • 187e47d #​3815 Thanks @​probablyup! - Revert Yup transform support for the time being, this may be re-introduced in a future release under an opt-in prop.

v2.4.0

Compare Source

Minor Changes

v2.3.3

Compare Source

Patch Changes
  • f075a0c #​3798 Thanks @​probablyup! - Fixed the use of generics for the ArrayHelpers type such that any[] is the default array type and for each individual method the array item type can be overridden if necessary.

v2.3.2

Compare Source

Patch Changes
  • f086b5a #​3237 Thanks @​pieplu! - Changed getIn to return undefined when it can't find a value AND a parent of that value is "falsy" ( "" / 0 / null / false )

  • 6d8f018 #​3792 Thanks @​probablyup! - Update the type for setFieldValue to reflect the returned Promise and potential returned error(s).

v2.3.0

Compare Source

Minor Changes
  • 73de78d #​3788 Thanks @​probablyup! - Added typescript generics to ArrayHelpers interface and its methods so that users who use TypeScript can set the type for their arrays and have type safety on array utils. I have also gone ahead and made supplying a type for the generic optional for the sake of backwards compatibility so any existing TS code that does not give a type for the FieldArray will continue to work as they always have.

  • 39a7bf7 #​3786 Thanks @​probablyup! - Yup by default only allows for cross-field validation within the
    same field object. This is not that useful in most scenarios because
    a sufficiently-complex form will have several yup.object() in the
    schema.

    const deepNestedSchema = Yup.object({
      object: Yup.object({
        nestedField: Yup.number().required(),
      }),
      object2: Yup.object({
        // this doesn't work because `object.nestedField` is outside of `object2`
        nestedFieldWithRef: Yup.number()
          .min(0)
          .max(Yup.ref('object.nestedField')),
      }),
    });
    

    However, Yup offers something called context which can operate across
    the entire schema when using a \$ prefix:

    const deepNestedSchema = Yup.object({
      object: Yup.object({
        nestedField: Yup.number().required(),
      }),
      object2: Yup.object({
        // this works because of the "context" feature, enabled by $ prefix
        nestedFieldWithRef: Yup.number()
          .min(0)
          .max(Yup.ref('$object.nestedField')),
      }),
    });
    

    With this change, you may now validate against any field in the entire schema,
    regardless of position when using the \$ prefix.

v2.2.10

Compare Source

Patch Changes
  • 22e236e #​3784 Thanks @​probablyup! - Improve performance of the FieldArray component by adding a shouldComponentUpdate check; this should help avoid unnecessary re-renders which may affect the performance of a form.

  • bc9cb28 #​3785 Thanks @​probablyup! - Fixed field error state for array fields that have an error and become empty through an API like arrayHelpers.remove.

    The prior behavior resolved the field error to [undefined], now it is simply undefined.

  • 9cbf150 #​3787 Thanks @​probablyup! - Fix infinite loop issue in Field when field helpers (setTouched, etc) are used as an argument in React.useEffect.

  • 9c75a9f #​3780 Thanks @​probablyup! - Fixed an issue with array field errors being incorrectly split into an array of individual characters instead of an array of error strings.

  • 35fa4cc #​3783 Thanks @​probablyup! - Fix validation of deep.dot.path field references when using the validateField API.


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 Mend Renovate. View repository job log here.

*Originally created by @renovate[bot] on 8/4/2023* [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [formik](https://formik.org) ([source](https://togithub.com/jaredpalmer/formik)) | [`2.2.9` -> `2.4.3`](https://renovatebot.com/diffs/npm/formik/2.2.9/2.4.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/formik/2.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/formik/2.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/formik/2.2.9/2.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/formik/2.2.9/2.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>jaredpalmer/formik (formik)</summary> ### [`v2.4.3`](https://togithub.com/jaredpalmer/formik/releases/tag/formik%402.4.3) [Compare Source](https://togithub.com/jaredpalmer/formik/compare/formik@2.4.2...formik@2.4.3) ##### Patch Changes - [`9e0a661`](https://togithub.com/jaredpalmer/formik/commit/9e0a661513af75d1b848e5be7a4916c53b78760f) [#&#8203;3843](https://togithub.com/jaredpalmer/formik/pull/3843) Thanks [@&#8203;bonimba](https://togithub.com/bonimba)! - Fix FormikHelper and FieldHelperProps types ### [`v2.4.2`](https://togithub.com/jaredpalmer/formik/releases/tag/formik%402.4.2) [Compare Source](https://togithub.com/jaredpalmer/formik/compare/formik@2.4.1...formik@2.4.2) ##### Patch Changes - [`96280d3`](https://togithub.com/jaredpalmer/formik/commit/96280d388eaa0f2e9fb84e7fd2aa45450de3a949) [#&#8203;3817](https://togithub.com/jaredpalmer/formik/pull/3817) Thanks [@&#8203;probablyup](https://togithub.com/probablyup)! - Updated internal types to support React 18. ### [`v2.4.1`](https://togithub.com/jaredpalmer/formik/releases/tag/formik%402.4.1) [Compare Source](https://togithub.com/jaredpalmer/formik/compare/formik@2.4.0...formik@2.4.1) ##### Patch Changes - [`2b194c2`](https://togithub.com/jaredpalmer/formik/commit/2b194c287dc281ec2a8ff691d75c6b798ab5f70c) [#&#8203;3808](https://togithub.com/jaredpalmer/formik/pull/3808) Thanks [@&#8203;NagaiKoki](https://togithub.com/NagaiKoki)! - fix type of setFieldValue function - [`708bcb2`](https://togithub.com/jaredpalmer/formik/commit/708bcb24785f1f8fbb5dfd649de3df4fddf7a113) [#&#8203;3813](https://togithub.com/jaredpalmer/formik/pull/3813) Thanks [@&#8203;probablyup](https://togithub.com/probablyup)! - Revert `FieldArray` "shouldComponentUpdate" performance optimization. As it turns out, it's a common use case to have JSX controlled via non-Formik state/props inside of `FieldArray`, so it's not safe to cancel re-renders here. - [`187e47d`](https://togithub.com/jaredpalmer/formik/commit/187e47de0c4289cb279e25d69f8172cfa14369d2) [#&#8203;3815](https://togithub.com/jaredpalmer/formik/pull/3815) Thanks [@&#8203;probablyup](https://togithub.com/probablyup)! - Revert Yup transform support for the time being, this may be re-introduced in a future release under an opt-in prop. ### [`v2.4.0`](https://togithub.com/jaredpalmer/formik/releases/tag/formik%402.4.0) [Compare Source](https://togithub.com/jaredpalmer/formik/compare/formik@2.3.3...formik@2.4.0) ##### Minor Changes - [`2f53b70`](https://togithub.com/jaredpalmer/formik/commit/2f53b70ef9c086a268330fa263390a2edd0164dd) [#&#8203;3796](https://togithub.com/jaredpalmer/formik/pull/3796) Thanks [@&#8203;probablyup](https://togithub.com/probablyup)! - Add support for Yup ["transforms"](https://togithub.com/jquense/yup#parsing-transforms). ### [`v2.3.3`](https://togithub.com/jaredpalmer/formik/releases/tag/formik%402.3.3) [Compare Source](https://togithub.com/jaredpalmer/formik/compare/formik@2.3.2...formik@2.3.3) ##### Patch Changes - [`f075a0c`](https://togithub.com/jaredpalmer/formik/commit/f075a0cf8228c135ff71c58e139246ad24aae529) [#&#8203;3798](https://togithub.com/jaredpalmer/formik/pull/3798) Thanks [@&#8203;probablyup](https://togithub.com/probablyup)! - Fixed the use of generics for the `ArrayHelpers` type such that `any[]` is the default array type and for each individual method the array item type can be overridden if necessary. ### [`v2.3.2`](https://togithub.com/jaredpalmer/formik/releases/tag/formik%402.3.2) [Compare Source](https://togithub.com/jaredpalmer/formik/compare/formik@2.3.0...formik@2.3.2) ##### Patch Changes - [`f086b5a`](https://togithub.com/jaredpalmer/formik/commit/f086b5a3bb6a155b4dc4ac3735c88805f9f5c4e4) [#&#8203;3237](https://togithub.com/jaredpalmer/formik/pull/3237) Thanks [@&#8203;pieplu](https://togithub.com/pieplu)! - Changed `getIn` to return undefined when it can't find a value AND a parent of that value is "falsy" ( "" / 0 / null / false ) - [`6d8f018`](https://togithub.com/jaredpalmer/formik/commit/6d8f018d7f52b863405b2e310be4b4195c2ba39c) [#&#8203;3792](https://togithub.com/jaredpalmer/formik/pull/3792) Thanks [@&#8203;probablyup](https://togithub.com/probablyup)! - Update the type for `setFieldValue` to reflect the returned `Promise` and potential returned error(s). ### [`v2.3.0`](https://togithub.com/jaredpalmer/formik/releases/tag/formik%402.3.0) [Compare Source](https://togithub.com/jaredpalmer/formik/compare/formik@2.2.10...formik@2.3.0) ##### Minor Changes - [`73de78d`](https://togithub.com/jaredpalmer/formik/commit/73de78d169f0bc25bd84dff0beaed3cc7a2cbb11) [#&#8203;3788](https://togithub.com/jaredpalmer/formik/pull/3788) Thanks [@&#8203;probablyup](https://togithub.com/probablyup)! - Added typescript generics to `ArrayHelpers` interface and its methods so that users who use TypeScript can set the type for their arrays and have type safety on array utils. I have also gone ahead and made supplying a type for the generic optional for the sake of backwards compatibility so any existing TS code that does not give a type for the FieldArray will continue to work as they always have. - [`39a7bf7`](https://togithub.com/jaredpalmer/formik/commit/39a7bf7ca31f2ef5b149a8ff02bab64667e19654) [#&#8203;3786](https://togithub.com/jaredpalmer/formik/pull/3786) Thanks [@&#8203;probablyup](https://togithub.com/probablyup)! - Yup by default only allows for cross-field validation within the same field object. This is not that useful in most scenarios because a sufficiently-complex form will have several `yup.object()` in the schema. ```ts const deepNestedSchema = Yup.object({ object: Yup.object({ nestedField: Yup.number().required(), }), object2: Yup.object({ // this doesn't work because `object.nestedField` is outside of `object2` nestedFieldWithRef: Yup.number() .min(0) .max(Yup.ref('object.nestedField')), }), }); ``` However, Yup offers something called `context` which can operate across the entire schema when using a \\$ prefix: ```ts const deepNestedSchema = Yup.object({ object: Yup.object({ nestedField: Yup.number().required(), }), object2: Yup.object({ // this works because of the "context" feature, enabled by $ prefix nestedFieldWithRef: Yup.number() .min(0) .max(Yup.ref('$object.nestedField')), }), }); ``` With this change, you may now validate against any field in the entire schema, regardless of position when using the \\$ prefix. ### [`v2.2.10`](https://togithub.com/jaredpalmer/formik/releases/tag/formik%402.2.10) [Compare Source](https://togithub.com/jaredpalmer/formik/compare/formik@2.2.9...formik@2.2.10) ##### Patch Changes - [`22e236e`](https://togithub.com/jaredpalmer/formik/commit/22e236ed8035c7c5824232202c8ce52193338d5a) [#&#8203;3784](https://togithub.com/jaredpalmer/formik/pull/3784) Thanks [@&#8203;probablyup](https://togithub.com/probablyup)! - Improve performance of the `FieldArray` component by adding a `shouldComponentUpdate` check; this should help avoid unnecessary re-renders which may affect the performance of a form. - [`bc9cb28`](https://togithub.com/jaredpalmer/formik/commit/bc9cb28df7ad07277a499e8301cfd1bb7b230b86) [#&#8203;3785](https://togithub.com/jaredpalmer/formik/pull/3785) Thanks [@&#8203;probablyup](https://togithub.com/probablyup)! - Fixed field error state for array fields that have an error and become empty through an API like `arrayHelpers.remove`. The prior behavior resolved the field error to `[undefined]`, now it is simply `undefined`. - [`9cbf150`](https://togithub.com/jaredpalmer/formik/commit/9cbf150e65d7c5498900f19b4fa1897ca8a2c87f) [#&#8203;3787](https://togithub.com/jaredpalmer/formik/pull/3787) Thanks [@&#8203;probablyup](https://togithub.com/probablyup)! - Fix infinite loop issue in `Field` when field helpers (`setTouched`, etc) are used as an argument in `React.useEffect`. - [`9c75a9f`](https://togithub.com/jaredpalmer/formik/commit/9c75a9f639eb38ad55c351e5e1def8a7e5ebd1f3) [#&#8203;3780](https://togithub.com/jaredpalmer/formik/pull/3780) Thanks [@&#8203;probablyup](https://togithub.com/probablyup)! - Fixed an issue with array field errors being incorrectly split into an array of individual characters instead of an array of error strings. - [`35fa4cc`](https://togithub.com/jaredpalmer/formik/commit/35fa4cc38260d709a5570dd3c9ef82831758a5f5) [#&#8203;3783](https://togithub.com/jaredpalmer/formik/pull/3783) Thanks [@&#8203;probablyup](https://togithub.com/probablyup)! - Fix validation of deep.dot.path field references when using the `validateField` API. </details> --- ### 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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/OneUptime/oneuptime). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4yNy4xIiwidXBkYXRlZEluVmVyIjoiMzYuMjcuMSIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9-->
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/oneuptime#1742