Release 0.16.0
Refactor:
- refactor(query-builder): move query attributes into its own object
- This slightly reduces size and looks better when logging a model out
- refactor(model)(BREAKING CHANGE): remove non-static
find
method- If the model is instantiated it is likely to have been hydrated with data.
If it has then, nothing to find. If it hasn't then the static method is enough.
- If the model is instantiated it is likely to have been hydrated with data.
- refactor(internal): moved existence check up the class chain
- refactor(model)(BREAKING CHANGE): remove
findMany
non-static method - refactor(model)(BREAKING CHANGE): removed
when
andunless
non-static methods - refactor(model): move 'when
and
unless` methods to the model - refactor(internal): rename withouts query parameter to without
Feature:
- feat(helpers): added
value
function - feat(api-calls): add
setModelEndpoint
helper method - feat(model): added
tap
method - feat(model): added function resolving to
when
andunless
methods
Fix:
- fix(relations): added existence check for
load
method - fix(api-calls): improved
get
method's type argument/return - fix(relations): fix
morphTo
relation- Endpoint was not set correctly for the next request
- fix(model): add missing lastSyncedAt copy in the
clone
method
Chore:
- chore: increment version
- chore: add optional peer dependencies
- chore(deps-dev): updated dependencies
Documentation
- docs(model): fix heading for
make
section - docs(helpers): documented
value
function - docs(timestamps): removed invalid todo comment
Testing
- test(model): improved
tap
's test - test(relations): fix morphTo test
Full Changelog: v0.15.1...v0.16.0