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

Version Packages #3791

Merged
merged 1 commit into from
May 26, 2023
Merged

Version Packages #3791

merged 1 commit into from
May 26, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented May 26, 2023

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.

Releases

formik@2.3.0

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.

formik-native@2.1.19

Patch Changes

@vercel
Copy link

vercel bot commented May 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
formik-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 26, 2023 7:42pm

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 26, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit e68aadc:

Sandbox Source
Formik TypeScript Playground Configuration

@github-actions
Copy link
Contributor Author

Size Change: 0 B

Total Size: 40.3 kB

ℹ️ View Unchanged
Filename Size
packages/formik-native/dist/formik-native.cjs.development.js 306 B
packages/formik-native/dist/formik-native.cjs.production.min.js 242 B
packages/formik-native/dist/formik-native.esm.js 238 B
packages/formik-native/dist/index.js 150 B
packages/formik/dist/formik.cjs.development.js 16.1 kB
packages/formik/dist/formik.cjs.production.min.js 7.03 kB
packages/formik/dist/formik.esm.js 16 kB
packages/formik/dist/index.js 143 B

compressed-size-action

@jaredpalmer jaredpalmer merged commit b12aad7 into master May 26, 2023
@jaredpalmer jaredpalmer deleted the changeset-release/master branch May 26, 2023 19:44
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.

1 participant