Releases: DavidDuwaer/Coloquent
Releases · DavidDuwaer/Coloquent
v3.0.1-beta
New major version 3.x
- All configuration now happens with static properties, making it more uniform and reducing runtime memory usage
- The Model.httpClient is now a property that one can override
Breaking changes | How to upgrade from v2.x
- The configuratioof your models, namely setting the
jsonApiBaseUrl
and settingjsonApiType
has been slightly altered, moving to exclusive use of static properties. Check the readme to see for how they are set now.
v2.4.1
Fixes
- It now becomes possible to wrap Coloquent models in proxies
v2.4.0
v2.3.0
Improvements
- #79 Better cross-platform automatic relation name detection by using
error-stack-parser
under the hood - #80 Possibility to specify generics on relationships and models, that will enable Typescript to infer which model types are returned by all query methods
- #80 Whether the .get() method returns a
SingularResponse
or aPluralResponse
is now known by the type system, so no more casting is needed
v2.2.0
v2.1.0
- A
.fresh()
method has been added, which can be called on anyModel
instance to obtain a fresh version of that model from the API - A
.limit()
method has been added to the query builder, which allows you to limit the number of results returned by a query.
Updated all dependencies
v2.0.2 Updated all dependencies & bumped version
Added .query() method to get a query builder from a model instance
v2.0.1 Updated version number
Immutable API
- Query building method chain is now immutable
For instance, from now on we can do this:In versionconst allStudentsQuery = Student .with('university'); const firstYearStudentsQuery = allStudentsQuery .where('year', 1);
<2
, the second statement would have mutatedallStudentsQuery
as well, and both queries would have been exactly the same. From this release, bothallStudentsQuery
andfirstYearStudentsQuery
are what their names describe them to be.
v1.2.8
- Fixed: wrong URL was generated when querying relations