Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Bump property-expr and yup in /tms #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Apr 15, 2023

Bumps property-expr to 2.0.5 and updates ancestor dependency yup. These dependencies need to be updated together.

Updates property-expr from 1.3.2 to 2.0.5

Commits

Updates yup from 0.25.1 to 1.1.1

Release notes

Sourced from yup's releases.

v1 Because I finally got around to it

jquense/yup#1906

v1.0.0-beta.7

Fixes published artifacts for the main field

v1.0.0-beta.5 - partial fixes and cast migration path

Beta 5 fixes partial and deepPartial making it work correctly with lazy schema. Specifically the optionality is added after lazy is evaluated but before any other when conditions are added. This makes it consistent with other conditional schema, where runtime conditions always supersede previous schema configuration. This allows for optional overrides if necessary.

const person = object({
  name: string().required(),
  age: number().required(),
  legalGuardian:  string().when('age', {
    is: (age) => age != null && age < 18,
    then: (schema) => schema.required(),
  }),
});
const optionalPerson = person.partial()
person.cast({name: 'James', age: 6 }) // => TypeError legalGuardian required
// age is still required b/c it's applied after the partial
optionalPerson.cast({name: 'James',  age: 6 }) // => TypeError legalGuardian required

This works slightly differently for lazy which have no schema to "start" with:

const config = object({
  nameOrIdNumber:  lazy((value) => {
     if (typeof value === 'number') return number().required()
     return string().required()
  }),
});
const opti = config.partial()
config.cast({}) // => TypeError nameOrIdNumber is required
config.partial().cast({}) // => {}

Cast optionality migration path

A larger breaking change in v1 is the assertion of optionality during cast, making previous patterns like string().nullable().required() no longer possible. Generally this pattern is used when deserialized data is not valid to start, but will become valid through user input such as with an HTML form. v1 no longer allows this, but in order to make migration easier we've added an option to cast that mimics the previous behavior (not exactly but closely).

const name = string().required()
</tr></table> 

... (truncated)

Changelog

Sourced from yup's changelog.

1.1.1 (2023-04-14)

Bug Fixes

  • docs: Broken anchores (#1979) (4ed4576)
  • make null validation errors consistent across schema (#1982) (f999497)
  • object: excluded edges are merged when concating schema (c07b08f), closes #1969

1.1.0 (2023-04-12)

Bug Fixes

Features

  • only resolve "strip()" for schema when used as an object field (#1977) (2ba1104)
  • respect context for object's children (#1971) (edfe6ac)

1.0.2 (2023-02-27)

Bug Fixes

  • fix array describe not including conditions (4040592), closes #1920

1.0.1 (2023-02-25)

1.0.0 (2023-02-08)

Migrating from 0.x to 1.0.0: #1906

... (truncated)

Commits

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.
> **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

Bumps [property-expr](https://github.com/jquense/expr) to 2.0.5 and updates ancestor dependency [yup](https://github.com/jquense/yup). These dependencies need to be updated together.


Updates `property-expr` from 1.3.2 to 2.0.5
- [Release notes](https://github.com/jquense/expr/releases)
- [Changelog](https://github.com/jquense/expr/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jquense/expr/commits)

Updates `yup` from 0.25.1 to 1.1.1
- [Release notes](https://github.com/jquense/yup/releases)
- [Changelog](https://github.com/jquense/yup/blob/master/CHANGELOG.md)
- [Commits](jquense/yup@v0.25.1...v1.1.1)

---
updated-dependencies:
- dependency-name: property-expr
  dependency-type: indirect
- dependency-name: yup
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Apr 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants