felte
felte copied to clipboard
validator-yup - Add beta version of yup to peer dependencies?
Is your feature request related to a problem? Please describe.
When installing yup 1.0.0-beta.4 alongside @felte/validator-yup, npm complains about peer dependency versions, and I have to use npm install --force.
Yup has been in v1.0.0 beta (currently beta-4) since December 2021, but it is stable for my use case, and it had a feature I needed for a project, so I have been using it for a while.
Describe the solution you'd like
Either remove yup as a peer dependency or do something like:
"peerDependencies": {
"yup": "^0.32.9 || ^1.0.0-beta"
},
I understand if this smells a bit weird, but since it's unclear when yup will hit 1.0.0, and the beta works fine with the validator, I thought I would at least ask how you feel about such a change.
Describe alternatives you've considered
The fix for now is to use npm i --force.
Also could consider:
- Downgrading yup to 0.32.
- Forking and/or copying the felte validator code to my project.
Additional information
Full npm error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @felte/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/yup
npm ERR! yup@"^1.0.0-beta.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer yup@"^0.32.9" from @felte/[email protected]
npm ERR! node_modules/@felte/validator-yup
npm ERR! @felte/validator-yup@"^1.0.8" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/yup
npm ERR! peer yup@"^0.32.9" from @felte/[email protected]
npm ERR! node_modules/@felte/validator-yup
npm ERR! @felte/validator-yup@"^1.0.8" from the root project
Hey! I personally haven't used the beta version of yup. As long as the validate API will not have any breaking changes it should be no issue to add these. What are the plans for 1.0.0?
@pablo-abc Thanks for your quick response and sorry for my lack of response!
There is no official roadmap for 1.0.0 that I can find, but the documentation in the repository is already showing 1.0.0 documentation and there haven't been any updates to the 0.X branch since last year.
I've asked a question on yup.
@pablo-abc Since the yup-validator is just a single file with a very short piece of code, I have now included the validateSchema directly in my project (with a copyright notice of course).
Feel free to close this issue, if you want to wait until yup 1.0.0 is officially released.
Hi @pablo-abc I'm closing this as Yup has been released in version 1.0.0 and this is no longer relevant. Cheers.