Skip to content

Commit

Permalink
Version Packages (#3791)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] committed May 26, 2023
1 parent dd80282 commit b12aad7
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 46 deletions.
5 changes: 0 additions & 5 deletions .changeset/kind-camels-wait.md

This file was deleted.

38 changes: 0 additions & 38 deletions .changeset/lemon-crabs-explain.md

This file was deleted.

7 changes: 7 additions & 0 deletions 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
Expand Down
4 changes: 2 additions & 2 deletions 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 <jared@palmer.net>",
"repository": "formium/formik",
Expand Down Expand Up @@ -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",
Expand Down
45 changes: 45 additions & 0 deletions 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
Expand Down
2 changes: 1 addition & 1 deletion 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 <jared@palmer.net> (https://jaredpalmer.com)",
"repository": "formium/formik",
Expand Down

1 comment on commit b12aad7

@vercel
Copy link

@vercel vercel bot commented on b12aad7 May 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

formik-docs – ./website

formik-docs-jared.vercel.app
formik-docs-git-master-jared.vercel.app
www.formik.org
formik-docs.vercel.app
formik.org

Please sign in to comment.