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

Bump yup from 0.32.9 to 1.4.0 #12

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

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github Oct 16, 2024

Bumps yup from 0.32.9 to 1.4.0.

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.4.0 (2024-03-06)

Bug Fixes

  • add optional message to nonNullable schema methods (#2119) (9e1df49)

Features

1.3.3 (2023-12-14)

Bug Fixes

  • addMethod: allow Schema without making TypeScript upset (f921fe6)

1.3.2 (2023-09-29)

Bug Fixes

1.3.1 (2023-09-26)

Bug Fixes

  • ValidationError extends Error (bc5121b)

1.3.0 (2023-09-23)

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually 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 show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @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)

Bumps [yup](https://github.com/jquense/yup) from 0.32.9 to 1.4.0.
- [Release notes](https://github.com/jquense/yup/releases)
- [Changelog](https://github.com/jquense/yup/blob/master/CHANGELOG.md)
- [Commits](jquense/yup@v0.32.9...v1.4.0)

---
updated-dependencies:
- dependency-name: yup
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Oct 16, 2024
Copy link

Coverage report

Caution

Test run failed

St.
Category Percentage Covered / Total
🔴 Statements
43.89% (-49.85% 🔻)
323/736
🔴 Branches
30.3% (-54.01% 🔻)
60/198
🔴 Functions
50.31% (-42% 🔻)
81/161
🔴 Lines
42.19% (-51% 🔻)
278/659
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / ActionError.ts
0% (-100% 🔻)
100%
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / ThresholdResult.ts
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / getCoverage.ts
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / createRunReport.ts
0% (-100% 🔻)
0% (-75% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / generatePRReport.ts
0% (-100% 🔻)
100%
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / parseCoverage.ts
0% (-100% 🔻)
100%
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / collectCoverage.ts
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / fetchPreviousReport.ts
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / createReport.ts
0% (-88% 🔻)
0% (-50% 🔻)
0% (-100% 🔻)
0% (-86.96% 🔻)
🔴
... / getFileCoverageDetailRow.ts
0% (-100% 🔻)
100%
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / createCoverageAnnotations.ts
0% (-100% 🔻)
0% (-90.91% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
🔴 run.ts
0% (-88.89% 🔻)
0% (-90.63% 🔻)
0% (-100% 🔻)
0% (-88.76% 🔻)
🔴
... / formatCoverageDetails.ts
0% (-100% 🔻)
100%
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / formatCoverageDetailsPart.ts
0% (-91.67% 🔻)
100%
0% (-66.67% 🔻)
0% (-90.91% 🔻)
🔴
... / formatCoverageSummary.ts
0% (-90% 🔻)
100%
0% (-66.67% 🔻)
0% (-88.89% 🔻)
🔴
... / formatThresholdResults.ts
0% (-60% 🔻)
0% 0%
0% (-50% 🔻)
🔴
... / formatCoverage.ts
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / parseSummary.ts
0% (-100% 🔻)
100%
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / formatCoverageAnnotations.ts
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / formatErrors.ts
0% (-87.5% 🔻)
0% (-80% 🔻)
0% (-100% 🔻)
0% (-86.36% 🔻)
🔴
... / formatFailedTestsAnnotations.ts
0% (-100% 🔻)
0% (-66.67% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / getFormattedCoverage.ts
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / getFailedAnnotationsSummary.ts
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / getStatusOfPercents.ts
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
🔴 utils/getPrPatch.ts
0% (-28.57% 🔻)
100% 0%
0% (-28.57% 🔻)
🔴 utils/runStage.ts
0% (-100% 🔻)
100%
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / formatPercentage.ts
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / formatPercentageDelta.ts
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / parseJestConfig.ts
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / accumulateCoverageDetails.ts
0% (-100% 🔻)
100%
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / getCoverageForDirectory.ts
0% (-57.14% 🔻)
100% 0%
0% (-60% 🔻)
🔴
... / tryGetJestThreshold.ts
0% (-71.43% 🔻)
100%
0% (-100% 🔻)
0% (-66.67% 🔻)
🔴
... / DataCollector.ts
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
🔴
... / upsertCheck.ts
0% (-75% 🔻)
0% (-50% 🔻)
0% (-100% 🔻)
0% (-72.73% 🔻)

Test suite run failed

Failed tests: 0/85. Failed suites: 25/55.
  ● Test suite failed to run

    src/utils/i18n.ts:2:17 - error TS7016: Could not find a declaration file for module 'lodash/get'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/get.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/get';`

    2 import get from 'lodash/get';
                      ~~~~~~~~~~~~


  ● Test suite failed to run

    src/constants/getReportTag.ts:3:18 - error TS7016: Could not find a declaration file for module 'lodash/pick'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/pick.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/pick';`

    3 import pick from 'lodash/pick';
                       ~~~~~~~~~~~~~


  ● Test suite failed to run

    src/utils/i18n.ts:2:17 - error TS7016: Could not find a declaration file for module 'lodash/get'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/get.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/get';`

    2 import get from 'lodash/get';
                      ~~~~~~~~~~~~


  ● Test suite failed to run

    src/utils/i18n.ts:2:17 - error TS7016: Could not find a declaration file for module 'lodash/get'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/get.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/get';`

    2 import get from 'lodash/get';
                      ~~~~~~~~~~~~


  ● Test suite failed to run

    src/stages/checkThreshold.ts:3:19 - error TS7016: Could not find a declaration file for module 'lodash/isNil'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/isNil.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/isNil';`

    3 import isNil from 'lodash/isNil';
                        ~~~~~~~~~~~~~~
    src/stages/checkThreshold.ts:105:13 - error TS2345: Argument of type 'SingleThreshold | undefined' is not assignable to parameter of type 'SingleThreshold'.
      Type 'undefined' is not assignable to type 'SingleThreshold'.

    105             threshold.global,
                    ~~~~~~~~~~~~~~~~


  ● Test suite failed to run

    src/utils/i18n.ts:2:17 - error TS7016: Could not find a declaration file for module 'lodash/get'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/get.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/get';`

    2 import get from 'lodash/get';
                      ~~~~~~~~~~~~


  ● Test suite failed to run

    src/constants/getReportTag.ts:3:18 - error TS7016: Could not find a declaration file for module 'lodash/pick'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/pick.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/pick';`

    3 import pick from 'lodash/pick';
                       ~~~~~~~~~~~~~


  ● Test suite failed to run

    src/constants/getReportTag.ts:3:18 - error TS7016: Could not find a declaration file for module 'lodash/pick'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/pick.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/pick';`

    3 import pick from 'lodash/pick';
                       ~~~~~~~~~~~~~


  ● Test suite failed to run

    src/utils/i18n.ts:2:17 - error TS7016: Could not find a declaration file for module 'lodash/get'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/get.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/get';`

    2 import get from 'lodash/get';
                      ~~~~~~~~~~~~


  ● Test suite failed to run

    src/constants/getReportTag.ts:3:18 - error TS7016: Could not find a declaration file for module 'lodash/pick'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/pick.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/pick';`

    3 import pick from 'lodash/pick';
                       ~~~~~~~~~~~~~


  ● Test suite failed to run

    src/utils/i18n.ts:2:17 - error TS7016: Could not find a declaration file for module 'lodash/get'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/get.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/get';`

    2 import get from 'lodash/get';
                      ~~~~~~~~~~~~


  ● Test suite failed to run

    src/utils/i18n.ts:2:17 - error TS7016: Could not find a declaration file for module 'lodash/get'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/get.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/get';`

    2 import get from 'lodash/get';
                      ~~~~~~~~~~~~


  ● Test suite failed to run

    src/utils/i18n.ts:2:17 - error TS7016: Could not find a declaration file for module 'lodash/get'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/get.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/get';`

    2 import get from 'lodash/get';
                      ~~~~~~~~~~~~


  ● Test suite failed to run

    src/utils/i18n.ts:2:17 - error TS7016: Could not find a declaration file for module 'lodash/get'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/get.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/get';`

    2 import get from 'lodash/get';
                      ~~~~~~~~~~~~


  ● Test suite failed to run

    src/utils/i18n.ts:2:17 - error TS7016: Could not find a declaration file for module 'lodash/get'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/get.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/get';`

    2 import get from 'lodash/get';
                      ~~~~~~~~~~~~


  ● Test suite failed to run

    src/utils/i18n.ts:2:17 - error TS7016: Could not find a declaration file for module 'lodash/get'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/get.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/get';`

    2 import get from 'lodash/get';
                      ~~~~~~~~~~~~


  ● Test suite failed to run

    src/utils/i18n.ts:2:17 - error TS7016: Could not find a declaration file for module 'lodash/get'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/get.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/get';`

    2 import get from 'lodash/get';
                      ~~~~~~~~~~~~


  ● Test suite failed to run

    src/utils/i18n.ts:2:17 - error TS7016: Could not find a declaration file for module 'lodash/get'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/get.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/get';`

    2 import get from 'lodash/get';
                      ~~~~~~~~~~~~


  ● Test suite failed to run

    src/utils/i18n.ts:2:17 - error TS7016: Could not find a declaration file for module 'lodash/get'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/get.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/get';`

    2 import get from 'lodash/get';
                      ~~~~~~~~~~~~


  ● Test suite failed to run

    src/utils/i18n.ts:2:17 - error TS7016: Could not find a declaration file for module 'lodash/get'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/get.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/get';`

    2 import get from 'lodash/get';
                      ~~~~~~~~~~~~


  ● Test suite failed to run

    src/utils/i18n.ts:2:17 - error TS7016: Could not find a declaration file for module 'lodash/get'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/get.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/get';`

    2 import get from 'lodash/get';
                      ~~~~~~~~~~~~


  ● Test suite failed to run

    src/utils/i18n.ts:2:17 - error TS7016: Could not find a declaration file for module 'lodash/get'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/get.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/get';`

    2 import get from 'lodash/get';
                      ~~~~~~~~~~~~


  ● Test suite failed to run

    src/utils/i18n.ts:2:17 - error TS7016: Could not find a declaration file for module 'lodash/get'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/get.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/get';`

    2 import get from 'lodash/get';
                      ~~~~~~~~~~~~


  ● Test suite failed to run

    src/utils/i18n.ts:2:17 - error TS7016: Could not find a declaration file for module 'lodash/get'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/get.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/get';`

    2 import get from 'lodash/get';
                      ~~~~~~~~~~~~


  ● Test suite failed to run

    src/utils/i18n.ts:2:17 - error TS7016: Could not find a declaration file for module 'lodash/get'. '/home/runner/work/jest-coverage-report-action/jest-coverage-report-action/node_modules/lodash/get.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/lodash` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash/get';`

    2 import get from 'lodash/get';
                      ~~~~~~~~~~~~

Report generated by 🧪jest coverage report action from ccbe596

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants