Skip to content

Release 0.16.0

Compare
Choose a tag to compare
@nandi95 nandi95 released this 11 Feb 09:14
· 8 commits to main since this release
bf88cab

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.
  • refactor(internal): moved existence check up the class chain
  • refactor(model)(BREAKING CHANGE): remove findMany non-static method
  • refactor(model)(BREAKING CHANGE): removed when and unless non-static methods
  • refactor(model): move 'whenandunless` 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 and unless 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