Closed ChALkeR closed 4 years ago
Merging #110 into master will decrease coverage by
0.12%
. The diff coverage is94.73%
.
Impacted Files | Coverage Δ | |
---|---|---|
src/index.js | 98.82% <94.73%> (-0.21%) |
:arrow_down: |
I think it will be time to move compile
into a separate file after this.
This allows us to add top-level preparation separately, instead of repeating it on every subschema ref compilation or having to use hacks to exclude preparation code from re-running.
I.e. buildSchemas is now called only once, and json check is now explicitly moved to a wrapping function.
That will likely be used to add some other common preparation steps that we will need to run only at top-level.
Makes all schemas be compiled with the exact same option set (as cleanup is now done outside of
compile
), otherwise things could have been bad in case of complex references between schemas.This also comes with
error()
function cleanup asjsonCheck
doesn't use it anymore, which gives a ~10x speedup onverboseErrors
(withoutjsonCheck
).