openedx / frontend-app-discussions

A React-based micro frontend for the Open edX discussion forums.
GNU Affero General Public License v3.0
6 stars 61 forks source link

fix(deps): update dependency formik to v2.4.5 #619

Closed renovate[bot] closed 7 months ago

renovate[bot] commented 8 months ago

Mend Renovate

This PR contains the following updates:

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

Release Notes

jaredpalmer/formik (formik) ### [`v2.4.5`](https://togithub.com/jaredpalmer/formik/releases/tag/formik%402.4.5) [Compare Source](https://togithub.com/jaredpalmer/formik/compare/formik@2.4.4...formik@2.4.5) ##### Patch Changes - [`d7db9cd`](https://togithub.com/jaredpalmer/formik/commit/d7db9cddba9008714f2853013d5d4e82c8c94558) [#​3860](https://togithub.com/jaredpalmer/formik/pull/3860) Thanks [@​patik](https://togithub.com/patik)! - Add missing dependency `@types/hoist-non-react-statics`, closes [#​3837](https://togithub.com/jaredpalmer/formik/issues/3837) - [`fe4ed7e`](https://togithub.com/jaredpalmer/formik/commit/fe4ed7e048b14331a75e40cabf48e4787d9b2b71) [#​3501](https://togithub.com/jaredpalmer/formik/pull/3501) Thanks [@​markspolakovs](https://togithub.com/markspolakovs)! - Mark `formik` as side-effect free in `package.json` ### [`v2.4.4`](https://togithub.com/jaredpalmer/formik/releases/tag/formik%402.4.4) [Compare Source](https://togithub.com/jaredpalmer/formik/compare/formik@2.4.3...formik@2.4.4) ##### Patch Changes - [`41720c2`](https://togithub.com/jaredpalmer/formik/commit/41720c2f69407e41c27b325923bce63436b07f45) [#​3862](https://togithub.com/jaredpalmer/formik/pull/3862) Thanks [@​yazaldefilimonepinto](https://togithub.com/yazaldefilimonepinto)! - Forward `className` for custom components used with `Field` - [`da58b29`](https://togithub.com/jaredpalmer/formik/commit/da58b292c9c0b6029ae21ab4b5edff09dd877c1b) [#​3858](https://togithub.com/jaredpalmer/formik/pull/3858) Thanks [@​alaanescobedo](https://togithub.com/alaanescobedo)! - Remove use of deprecated `StatelessComponent` type in favor of `FunctionComponent` - [`5c01ee7`](https://togithub.com/jaredpalmer/formik/commit/5c01ee77b312ff6c375d43f841fe9fbe5846ebd9) [#​3872](https://togithub.com/jaredpalmer/formik/pull/3872) Thanks [@​rajpatelbot](https://togithub.com/rajpatelbot)! - FIX: Fixed resetForm function dependency issue ### [`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) [#​3843](https://togithub.com/jaredpalmer/formik/pull/3843) Thanks [@​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) [#​3817](https://togithub.com/jaredpalmer/formik/pull/3817) Thanks [@​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) [#​3808](https://togithub.com/jaredpalmer/formik/pull/3808) Thanks [@​NagaiKoki](https://togithub.com/NagaiKoki)! - fix type of setFieldValue function - [`708bcb2`](https://togithub.com/jaredpalmer/formik/commit/708bcb24785f1f8fbb5dfd649de3df4fddf7a113) [#​3813](https://togithub.com/jaredpalmer/formik/pull/3813) Thanks [@​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) [#​3815](https://togithub.com/jaredpalmer/formik/pull/3815) Thanks [@​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) [#​3796](https://togithub.com/jaredpalmer/formik/pull/3796) Thanks [@​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) [#​3798](https://togithub.com/jaredpalmer/formik/pull/3798) Thanks [@​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) [#​3237](https://togithub.com/jaredpalmer/formik/pull/3237) Thanks [@​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) [#​3792](https://togithub.com/jaredpalmer/formik/pull/3792) Thanks [@​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) [#​3788](https://togithub.com/jaredpalmer/formik/pull/3788) Thanks [@​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) [#​3786](https://togithub.com/jaredpalmer/formik/pull/3786) Thanks [@​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) [#​3784](https://togithub.com/jaredpalmer/formik/pull/3784) Thanks [@​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) [#​3785](https://togithub.com/jaredpalmer/formik/pull/3785) Thanks [@​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) [#​3787](https://togithub.com/jaredpalmer/formik/pull/3787) Thanks [@​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) [#​3780](https://togithub.com/jaredpalmer/formik/pull/3780) Thanks [@​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) [#​3783](https://togithub.com/jaredpalmer/formik/pull/3783) Thanks [@​probablyup](https://togithub.com/probablyup)! - Fix validation of deep.dot.path field references when using the `validateField` API.

Configuration

📅 Schedule: Branch creation - "before 4am on Monday" in timezone America/New_York, Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

â™» 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.



This PR has been generated by Mend Renovate. View repository job log here.

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (9761787) 92.41% compared to head (1386fbb) 92.41%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #619 +/- ## ======================================= Coverage 92.41% 92.41% ======================================= Files 169 169 Lines 3468 3468 Branches 900 900 ======================================= Hits 3205 3205 Misses 243 243 Partials 20 20 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.