From b12aad7147d205cb1a9c33d66622e5713de1b779 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 26 May 2023 15:44:55 -0400 Subject: [PATCH] Version Packages (#3791) Co-authored-by: github-actions[bot] --- .changeset/kind-camels-wait.md | 5 ---- .changeset/lemon-crabs-explain.md | 38 ------------------------ packages/formik-native/CHANGELOG.md | 7 +++++ packages/formik-native/package.json | 4 +-- packages/formik/CHANGELOG.md | 45 +++++++++++++++++++++++++++++ packages/formik/package.json | 2 +- 6 files changed, 55 insertions(+), 46 deletions(-) delete mode 100644 .changeset/kind-camels-wait.md delete mode 100644 .changeset/lemon-crabs-explain.md diff --git a/.changeset/kind-camels-wait.md b/.changeset/kind-camels-wait.md deleted file mode 100644 index d03f2ed7a..000000000 --- a/.changeset/kind-camels-wait.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'formik': minor ---- - -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. diff --git a/.changeset/lemon-crabs-explain.md b/.changeset/lemon-crabs-explain.md deleted file mode 100644 index c12f5fee6..000000000 --- a/.changeset/lemon-crabs-explain.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -'formik': minor ---- - -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. diff --git a/packages/formik-native/CHANGELOG.md b/packages/formik-native/CHANGELOG.md index 0babc57b1..b410db725 100644 --- a/packages/formik-native/CHANGELOG.md +++ b/packages/formik-native/CHANGELOG.md @@ -1,5 +1,12 @@ # formik-native +## 2.1.19 + +### Patch Changes + +- Updated dependencies [[`73de78d`](https://github.com/jaredpalmer/formik/commit/73de78d169f0bc25bd84dff0beaed3cc7a2cbb11), [`39a7bf7`](https://github.com/jaredpalmer/formik/commit/39a7bf7ca31f2ef5b149a8ff02bab64667e19654)]: + - formik@2.3.0 + ## 2.1.18 ### Patch Changes diff --git a/packages/formik-native/package.json b/packages/formik-native/package.json index 8978fcaf6..857e16b41 100644 --- a/packages/formik-native/package.json +++ b/packages/formik-native/package.json @@ -1,6 +1,6 @@ { "name": "formik-native", - "version": "2.1.18", + "version": "2.1.19", "license": "Apache-2.0", "author": "Jared Palmer ", "repository": "formium/formik", @@ -31,7 +31,7 @@ "react": ">=16.8.0" }, "dependencies": { - "formik": "2.2.10" + "formik": "2.3.0" }, "devDependencies": { "@react-native-community/eslint-config": "^0.0.5", diff --git a/packages/formik/CHANGELOG.md b/packages/formik/CHANGELOG.md index ab36663c1..99d395cf1 100644 --- a/packages/formik/CHANGELOG.md +++ b/packages/formik/CHANGELOG.md @@ -1,5 +1,50 @@ # formik +## 2.3.0 + +### Minor Changes + +- [`73de78d`](https://github.com/jaredpalmer/formik/commit/73de78d169f0bc25bd84dff0beaed3cc7a2cbb11) [#3788](https://github.com/jaredpalmer/formik/pull/3788) Thanks [@probablyup](https://github.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://github.com/jaredpalmer/formik/commit/39a7bf7ca31f2ef5b149a8ff02bab64667e19654) [#3786](https://github.com/jaredpalmer/formik/pull/3786) Thanks [@probablyup](https://github.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. + ## 2.2.10 ### Patch Changes diff --git a/packages/formik/package.json b/packages/formik/package.json index 56523f4ea..56a3278b5 100644 --- a/packages/formik/package.json +++ b/packages/formik/package.json @@ -1,7 +1,7 @@ { "name": "formik", "description": "Build forms in React, without the tears", - "version": "2.2.10", + "version": "2.3.0", "license": "Apache-2.0", "author": "Jared Palmer (https://jaredpalmer.com)", "repository": "formium/formik",