Bookshelf v0.14.0 Release Notes

Release Date: 2018-12-09 // over 5 years ago
  • 0.14.0 Dec 09, 2018 - Diff

    ๐Ÿ’ฅ Breaking changes

    • The previous() and previousAttributes() methods were changed so that whenever a model is saved or destroyed the previous attributes are no longer reset to the current attributes. Since the old behavior wasn't very useful it's likely this won't cause issues for many people. There's a migration guide in case you are affected by this change. #1848
    • ๐Ÿ›  Fix incorrect results in collection when models have duplicate ids. Checkout the migration guide in case you are affected by this. #1846
    • Empty hasOne relation will now return null instead of {} when serialized: #1839. There's a migration guide in the rare event this causes you problems.
    • โž• Add more helpful error messages on bad or insufficient morphTo data: #1824. There's a migration guide in case you are affected by this.
    • โšก๏ธ Changed the existing functionality so that saving a model that hasn't changed will not update its updated_at attribute: #1798. Checkout the migration guide in case you are affected by this.

    โœจ Enhancements

    • ๐Ÿ‘‰ Make collections iterable using for ... of loops: #1830
    • โž• Add row-level locking options: #1810

    ๐Ÿ› Bug fixes

    • ๐Ÿ‘ฏ Return clones of nested objects in previousAttributes(): #1876
    • ๐Ÿ›  Fix incorrect rowCount value when using groupBy with fetchPage(): #1852
    • ๐Ÿ›  Fix eager loading of relations when using parse/format: #1838
    • ๐Ÿ›  Fix inability to install bookshelf from git commit: #1835
    • ๐Ÿ›  Fix timestamp() setting a key named "null" in some cases: #1820
    • ๐Ÿ›  Fix performance of including relationships: #1800

    โœ… Test Suite

    • โž• Add test to check for adding withRelated inside events: #1853
    • โž• Add Node.js 10 to the Travis config: #1829
    • ๐Ÿ›  Fix incorrect output ordering in tests in some cases: #1825

    ๐Ÿ“š Documentation

    • ๐Ÿš€ Change the JSDoc theme to add a Guides section (this was already released): #1909
    • ๐Ÿ›  Fix hasOne's doc: #1890
    • ๐Ÿ›  Fix many-to-many tutorial code: #1888
    • โž• Add code syntax highlighting for tutorials: #1850
    • ๐Ÿ›  Fix a few issues with the collection documentation: #1836
    • ๐Ÿ›  Fix Model.load() relations param: #1834
    • ๐Ÿ›  Fix incorrect docs for collection:fetching event: #1831
    • โž• Add note on needing the Pagination plugin to use fetchPage(): #1803
    • ๐Ÿ›  Fix incorrect data types and undocumented Model property: #1797

    Dependencies

    • Replace turbocolor with colorette: #1904
    • ๐Ÿ‘‰ Use prettier to format all js and json files: #1883
    • Replace chalk with turbocolor: #1878
    • โšก๏ธ Update some insecure dependencies: #1841
    • Replace Babel with Node 4 compatible JavaScript: #1835
    • โšก๏ธ Update sinon to the latest version: #1833