Skip to content

Releases: neumino/thinky

v.1.15.8

14 Jan 02:14
Compare
Choose a tag to compare
  • Save references of linked documents in setSaved and not in the constructor (without checking if the document is actually saved or not) - Fix #166
  • Partially merge the code path for document.save and Model.save.
    • Fix #162 - Event saving is emitted with Model.save
    • Fix #167 - Points are properly converted to ReQL points with Model.save
  • Enable the syntax Model.ensureIndex(name, options) - Fix #168
  • Added comments and annotations again

v.1.15.7

19 Dec 07:39
Compare
Choose a tag to compare
  • Fix #163 -- Building the query for save should be done after validating the document. In the case of dates, rethinkdbdash can throw an error.
  • Start to add comments/annotations.

v.1.15.6

13 Dec 08:10
Compare
Choose a tag to compare
  • update and replace will execute a partial validation before sending the query, and a complete post validation after the update.
    In case an error happens during the complete validation, the write will be reverted via another query.
    #153

v.1.15.5

06 Dec 06:27
Compare
Choose a tag to compare
  • Merge fixes from @colprog -- #152
  • Attempt to fix #154
  • Add a few tests for regression that happened during the refactoring of schema.js

v.1.15.4

05 Dec 06:58
Compare
Choose a tag to compare
  • String and Number accept ReQL terms - #150
  • Do not use once when queries are run on a model that is not ready - #128
  • Add a sleep for wercker to avoid flakyness
  • Remove a debug statement

Note: While ReQL terms are accepted, they CANNOT be validated as they are evaluated on the server.

v1.15.3

03 Dec 06:24
Compare
Choose a tag to compare
  • Bug fix -- enforce: "remove" should not remove joined documents. -- #149

v.1.15.2

01 Dec 04:22
Compare
Choose a tag to compare
  • Add a new way to declare a schema with chainable types -- #145
  • Unify the schema under the hood
  • Move getVirtualFields/getDefaultFields to type
  • Move validation to type, yielding slightly better performance
  • Add some safety in generating default fields/virtual fields when a parent field is undefined

v1.15.1

26 Nov 03:55
Compare
Choose a tag to compare

Code hygiene::

  • Faster tests -- Tests run in ~30 seconds instead of 3 minutes
  • The biggest methods have been refactored in smaller ones (like save, hooks etc.)

Performance:

  • Generating default fields is done in O(n) where n is the number of fields that can be generated

  • Generating virtual fields is done in O(n) where n is the number of virtual fields

  • Less copying for options and documents. One big difference is copying values for new documents is not done the first time. Meaning:

    var data = {name: "Michel"};
    var doc = new User(data);
    doc === data; // true, used to be false
    var doc2 = new User(data);
    doc === data; // true
    doc2 !== data; // true
    
  • v8 optimizations (try/catch, bind, for of etc.)

Bugs::

  • Fix #133 about date coercions
  • Fix #133 about enforce_extra: "remove"

v.1.15.0

25 Sep 21:10
Compare
Choose a tag to compare

Note: Non backward compatible change:

  • enforce_extra can be "strict"/"remove"/"none". The previous value true should be replace with "strict" and false should be replaced with "none".
  • Update for RethinkDB 1.15
    • New type: "Point"
  • enforce_extra: "remove" will remove extra fields (fields not declared in the schema) when calling validate (or save, which will call validate under the hood).
    One nice use case is the one described by @marshall007 (who also submitted this change) here: #123 (comment)

v.1.14.4

09 Sep 17:19
Compare
Choose a tag to compare
  • Fix the package (includes the fix mentionned in 1.14.3)