mathematic-inc / ts-japi

A highly-modular (typescript-friendly)-framework agnostic library for serializing data to the JSON:API specification
Apache License 2.0
202 stars 15 forks source link

[Enhancement & Fix] See description. #3

Closed jrandolf closed 4 years ago

jrandolf commented 4 years ago

It is now possible to directly modify the options of a Serializer by editing its options property. This enhancement allows for circularity within the Serializer <-> Relator companionship, so to accompany this, we have also allowed for circular relations (an example is listed in the examples folder).

Some models were also removed after realizing they weren't required.

codecov[bot] commented 4 years ago

Codecov Report

Merging #3 into master will increase coverage by 1.04%. The diff coverage is 85.24%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #3      +/-   ##
==========================================
+ Coverage   82.94%   83.98%   +1.04%     
==========================================
  Files          18       17       -1     
  Lines         299      306       +7     
  Branches       96       95       -1     
==========================================
+ Hits          248      257       +9     
- Misses          9       11       +2     
+ Partials       42       38       -4     
Impacted Files Coverage Δ
src/utils/get-array.ts 50.00% <50.00%> (-16.67%) :arrow_down:
src/classes/serializer.ts 81.61% <84.00%> (+0.94%) :arrow_up:
src/classes/relator.ts 91.66% <100.00%> (ø)
src/models/relationship.model.ts 57.14% <100.00%> (ø)
src/models/resource-identifier.model.ts 100.00% <100.00%> (ø)
src/models/resource.model.ts 85.71% <100.00%> (ø)
src/classes/paginator.ts 81.81% <0.00%> (+9.09%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9319d12...239608a. Read the comment docs.