objection.js
objection.js copied to clipboard
Adding ajv-formats package
Adding the ajv-formats package so people stop complaining about missing date formats. Solves #2142, #2146, #2147, #2170
Hi, just wondered if there was any chance of getting this reviewed and merged?
@kibertoad Sorry to bother you, I get that you have a lot on your plate, but I saw you have approved and merged other changes.
This is a fix for an undocumented breaking change that has been in limbo for almost a year, it would be very appreciated if it could be reviewed and merged :pray:
Sorry for pinging you :heart:
The code is a bit convoluted. Since the PR adds ajv-formats
as a dependency, the require checks in getAjvFormats()
aren't needed at all. It can just be imported normally.
If the dependency was optional, then the check would be useful…
I agree, it should be a normal, direct dependency. Ajv used to include formats, but they extracted them to a separate package, starting from v7. re: https://github.com/Vincit/objection.js/issues/2146#issuecomment-974137873