All Versions
Latest Version
Avg Release Cycle
14 days
Latest Release
37 days ago

Changelog History
Page 1

  • v0.19

    August 17, 2020

    ๐Ÿ†• New features

    • ๐Ÿ‘ [iOS] Added CocoaPods support - @leninlin
    • [NodeJS] Introducing a new SQLite Adapter based integration to NodeJS. This requires a ๐Ÿ‘ peer dependency on better-sqlite3 ๐Ÿ”ง and should work with the same configuration as iOS/Android - @sidferreira
    • ๐Ÿš€ [Android] exerimentalUseJSI option has been enabled on Android. However, it requires some app-specific setup which is not yet documented - stay tuned for upcoming releases
    • ๐Ÿ— [Schema] [Migrations] You can now pass unsafeSql parameters to schema builder and migration steps to modify SQL generated to set up the database or perform migrations. There's also new unsafeExecuteSql migration step. Please use this only if you know what you're doing โ€” you shouldn't need this in 99% of cases. See Schema and Migrations docs for more details
    • ๐ŸŽ [LokiJS] [Performance] Added experimental onIndexedDBFetchStart and indexedDBSerializer options to LokiJSAdapter. These can be used to improve app launch time. See src/adapters/lokijs/index.js for more details.

    ๐Ÿ”„ Changes

    • ๐ŸŽ [Performance] findAndObserve is now able to emit a value synchronously. By extension, this makes Relations put into withObservables able to render the child component in one shot. Avoiding the extra unnecessary render cycles avoids a lot of DOM and React commit-phase work, which can speed up loading some views by 30%
    • ๐ŸŽ [Performance] LokiJS is now faster (refactored encodeQuery, skipped unnecessary clone operations)
  • v0.18

    June 30, 2020

    ๐Ÿš€ Another WatermelonDB release after just a week? Yup! And it's jam-packed full of features!

    ๐Ÿ†• New features

    • [Query] Q.on queries are now far more flexible. Previously, they could only be placed at the top level of a query. See Docs for more details. Now, you can:

      • Pass multiple conditions on the related query, like so:

          Q.on('projects', [
            Q.where('foo', 'bar'),
            Q.where('bar', 'baz'),
      • You can place Q.on deeper inside the query (nested inside Q.and(), Q.or()). However, you must explicitly list all tables you're joining on at the beginning of a query, using: Q.experimentalJoinTables(['join_table1', 'join_table2']).

      • You can nest Q.on conditions inside Q.on, e.g. to make a condition on a grandchild. To do so, it's required to pass Q.experimentalNestedJoin('parent_table', 'grandparent_table') at the beginning of a query

    • [Query] Q.unsafeSqlExpr() and Q.unsafeLokiExpr() are introduced to allow adding bits of queries that are not supported by the WatermelonDB query language without having to use unsafeFetchRecordsWithSQL(). See docs for more details

    • [Query] Q.unsafeLokiFilter((rawRecord, loki) => boolean) can now be used as an escape hatch to make queries with LokiJSAdapter that are not otherwise possible (e.g. multi-table column comparisons). See docs for more details

    ๐Ÿ”„ Changes

    • ๐ŸŽ [Performance] [LokiJS] Improved performance of queries containing query comparisons on LokiJSAdapter
    • ๐Ÿ“„ [Docs] Added Contributing guide for Query language improvements
    • ๐Ÿ—„ [Deprecation] Query.hasJoins is deprecated
    • [DX] Queries with bad associations now show more helpful error message
    • [Query] Counting queries that contain Q.experimentalTake / Q.experimentalSkip is currently broken - previously it would return incorrect results, but now it will throw an error to avoid confusion. Please contribute to fix the root cause!

    ๐Ÿ›  Fixes

    • ๐Ÿ›  [Typescript] Fixed types of Relation


    • QueryDescription structure has been changed.
  • v0.17.1

    June 24, 2020
    • ๐Ÿ›  Fixed broken iOS build - @mlecoq
  • v0.17

    June 22, 2020

    ๐Ÿ†• New features

    • ๐Ÿ”€ [Sync] Introducing Migration Syncs - this allows fully consistent synchronization when migrating between schema versions. Previously, there was no mechanism to incrementally fetch all remote changes in new tables and columns after a migration - so local copy was likely inconsistent, requiring a re-login. After adopting migration syncs, Watermelon Sync will request from backend all missing information. See Sync docs for more details.
    • [iOS] Introducing a new native SQLite database integration, rewritten from scratch in C++, based on React Native's JSI (JavaScript Interface). It is to be considered experimental, however we intend to make it the default (and eventually, the only) implementation. In a later release, Android version will be introduced.

      The new adapter is up to 3x faster than the previously fastest synchronous: true option, however this speedup is only achieved with some unpublished React Native patches.

      To try out JSI, add experimentalUseJSI: true to SQLiteAdapter constructor.

    • [Query] Added Q.experimentalSortBy(sortColumn, sortOrder), Q.experimentalTake(count), Q.experimentalSkip(count) methods (only availble with SQLiteAdapter) - @Kenneth-KT

    • Database.batch() can now be called with a single array of models

    • [DX] Database.get(tableName) is now a shortcut for Database.collections.get(tableName)

    • [DX] Query is now thenable - you can now use await query and await query.count instead of await query.fetch() and await query.fetchCount()

    • [DX] Relation is now thenable - you can now use await relation instead of await relation.fetch()

    • [DX] Exposed collection.db and model.db as shortcuts to get to their Database object

    ๐Ÿ”„ Changes

    • [Hardening] Column and table names starting with __, Object property names (e.g. constructor), and some reserved keywords are now forbidden
    • ๐Ÿ— [DX] [Hardening] QueryDescription builder methods do tighter type checks, catching more bugs, and preventing users from unwisely passing unsanitized user data into Query builder methods
    • [DX] [Hardening] Adapters check early if table names are valid
    • [DX] Collection.find reports an error more quickly if an obviously invalid ID is passed
    • [DX] Intializing Database with invalid model classes will now show a helpful error
    • [DX] DatabaseProvider shows a more helpful error if used improperly
    • ๐Ÿ— [Sync] Sync no longer fails if pullChanges returns collections that don't exist on the frontend - shows a warning instead. This is to make building backwards-compatible backends less error-prone
    • ๐Ÿ“š [Sync] [Docs] Sync documentation has been rewritten, and is now closer in detail to a formal specification
    • ๐Ÿ‘ [Hardening] database.collections.get() better validates passed value
    • [Hardening] Prevents unsafe strings from being passed as column name/table name arguments in QueryDescription

    ๐Ÿ›  Fixes

    • ๐Ÿ”€ [Sync] Fixed RangeError: Maximum call stack size exceeded when syncing large amounts of data - @leninlin
    • ๐Ÿ›  [iOS] Fixed a bug that could cause a database operation to fail with an (6) SQLITE_LOCKED error
    • ๐Ÿ— [iOS] Fixed 'jsi/jsi.h' file not found when building at the consumer level. Added path $(SRCROOT)/../../../../../ios/Pods/Headers/Public/React-jsi to Header Search Paths (issue #691) - @victorbutler
    • [Native] SQLite keywords used as table or column names no longer crash
    • ๐Ÿ›  Fixed potential issues when subscribing to database, collection, model, queries passing a subscriber function with the same identity more than once


    • ๐Ÿ›  Fixed broken adapter tests
  • v0.17.0-7

    June 18, 2020
  • v0.17.0-6

    June 18, 2020
  • v0.17.0-4

    June 10, 2020
  • v0.17.0-3

    June 03, 2020
  • v0.17.0-2

    May 26, 2020
  • v0.17.0-1

    May 20, 2020