objection.js icon indicating copy to clipboard operation
objection.js copied to clipboard

Adding ajv-formats package

Open TigerC10 opened this issue 3 years ago • 1 comments

Adding the ajv-formats package so people stop complaining about missing date formats. Solves #2142, #2146, #2147, #2170

TigerC10 avatar Feb 06 '22 21:02 TigerC10

Hi, just wondered if there was any chance of getting this reviewed and merged?

LordA98 avatar Oct 12 '22 19:10 LordA98

@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:

vichle avatar Jan 26 '23 09:01 vichle

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…

lehni avatar Apr 15 '23 09:04 lehni

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

falkenhawk avatar Apr 17 '23 15:04 falkenhawk