GithubHelp home page GithubHelp logo

Comments (7)

leonbloy avatar leonbloy commented on June 16, 2024

Additionally: if instead of using validate we use validateSync , the problematic statements also fail, differently:

    // the following does not throw error, but returns undefined 
    res = yupSchemaFull.validateSync({ text: 's', ab: { a: 'x', b: 'z' } });  
    // same: should throw exception, but returns undefined
    res = expect(() => yupSchemaFull.validateSync({ text: 's', ab: { a: 'x', b: 'too long' } })).toThrow(Error);

from json-schema-yup-transform.

leonbloy avatar leonbloy commented on June 16, 2024

Update: it all works as expected if I revert yup to version "0.29.1"

Update2: it works until yup 0.29.3 , it breaks at yup 0.30.0
(the culprit -wild guess- might be jquense/yup@dcae108 )

from json-schema-yup-transform.

ritchieanesco avatar ritchieanesco commented on June 16, 2024

@leonbloy v0.29.3 introduced breaking changes that are incompatible with this library.

from json-schema-yup-transform.

leonbloy avatar leonbloy commented on June 16, 2024

@leonbloy v0.29.3 introduced breaking changes that are incompatible with this library.

(You probably meant v 0.30.0 - released in Nov 2020)
Well, then what? If this library is incompatible with the latest yup releases (that should documented prominently), are there plans to fix that?

from json-schema-yup-transform.

ritchieanesco avatar ritchieanesco commented on June 16, 2024

Added the yup version this package supports in README here.
I may look to rewrite this library to be forward compatible, but that requires time and frankly, this was written for a work project in which I am no longer involved.

Feel free to raise a PR to make it compatible or fork the code and make changes to suit your needs.

from json-schema-yup-transform.

ritchieanesco avatar ritchieanesco commented on June 16, 2024

@leonbloy 2.0.0-beta.0 has just been published that supports yup v0.32.11.

from json-schema-yup-transform.

leonbloy avatar leonbloy commented on June 16, 2024

2.0.0-beta.0 has just been published that supports yup v0.32.11.

It's been 11 months since that beta. Meanwhile several fixes have been released to the main branch (which, it seems, were not merged to that beta branch). Also, a few days ago yup has released version 1.0. Are there any plans to merge and release a non beta version, compatible with yup latest version?

from json-schema-yup-transform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.