SDK Setup Guides
...
JavaScript
Release Notes

Ditto v1 for JavaScript

JavaScript Version 1.1.11

Released: Fri Sep 9th 2022, 4:11 pm

Release Notes:

  • Fixed: a very rare deadlock when running on Node/macOS and starting sync immediately after creating the Ditto instance.

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.1.10

Released: Thu Jul 7th 2022, 12:53 pm

Release Notes:

  • Changed: reduced total memory overhead during sync.

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.1.9

Released: Wed Jun 15th 2022, 6:27 pm

Release Notes:

  • Changed: reduced CRDT memory overhead.
  • Changed: HTTP/WebSocket service now allows any origin for CORS, so it may be used from a webapp on localhost.
  • Fixed: a peer using an online identity would fail to sync peer-to-peer after app restarts.
  • Changed: P2P transports were disabled by default for the JS SDK, while enabled for all other SDKs. Starting with this release, all P2P transports, that are available in the current environment, are enabled by default (i.e. on Node/Electron running on macOS, no P2P transports when running in the browser).

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.1.9-alpha1

Released: Wed Jun 8th 2022, 8:12 pm

Release Notes:

  • Synchronized version bump release

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.1.8

Released: Fri Jun 3rd 2022, 12:13 am

Release Notes:

  • Fixed: Ditto with onlinePlaygroundV2 identity would fail to sync with the Big Peer if internet access isn't available at the time when Ditto is instantiated.
  • Fixed: memory leak when observing collections.
  • Fixed: memory leak when observing peers.

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.1.7

Released: Fri May 13th 2022, 7:18 am

Release Notes:

  • Fixed: module not found warnings when bundling for the Web (via Webpack & other bundlers).

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.1.6

Released: Mon May 9th 2022, 5:04 am

Release Notes:

  • Fixed: a correctness issue in replication when peer permissions changed in the middle of a replication exchange.
  • Fixed: error when querying a collection and there was a type mismatch for a field being used in a comparison in the query.
  • Fixed: restarting an app too quickly could lead to multiple connection attempts to rejoin peers in the mesh.
  • Fixed: apps using
  • Fixed: compatibility with packagers that perform static analysis to locate native Node modules, such as
  • Fixed: issues when inserting a value at a specific index in an array via
  • Changed: improvements to Ditto mesh performance via fastest-available-transport prioritization.

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.1.5

Released: Fri Apr 8th 2022, 1:00 am

Release Notes:

  • Synchronized version bump release

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.1.4

Released: Thu Apr 7th 2022, 11:25 pm

Release Notes:

  • Changed: improved replication performance in some scenarios.

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.1.3

Released: Tue Mar 22nd 2022, 3:13 am

Release Notes:

  • Added: onlinePlaygroundV2 identity type and corresponding IdentityOnlinePlaygroundV2 allowing for basic authentication for playgrounds
  • Deprecated: onlinePlayground identity type and corresponding IdentityOnlinePlayground, use newly added ONLINE_PLAYGROUND_V2 and IdentityOnlinePlaygroundV2 instead
  • Fixed: multiple retain cycles preventing Ditto instances from being properly garbage collected
  • Fixed: document IDs are now validated when synced and removed if invalid (some of our early versions of the SDK stored malformed IDs under certain circumstances)

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.1.2

Released: Mon Feb 28th 2022, 6:36 am

Release Notes:

  • Added: method
  • Deprecated: method

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.1.1

Released: Fri Feb 11th 2022, 9:38 pm

Release Notes:

  • Changed: Optimized the performance of accessing the value of a
  • Changed: Make
  • Added:
  • Added: Support for observing transport condition of websocket connections
  • Fixed: Node process from exiting prematurely
  • Fixed: Obscure exception if

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.1.0

Released: Fri Jan 28th 2022, 3:21 am

Release Notes:

  • Changed: improved peer-to-peer algorithms to create meshes that are more efficient and diverse.
  • Changed: improved routing algorithms for more efficiency.
  • Changed: improved performance of query parsing.
  • Added: property
  • Added: method
  • Added: set of APIs to observe authentication status (see API reference for
  • Added: method
  • Fixed: crashes when many insertions or removals were in flight (only WebAssembly were affected, i.e. when running in the browser).
  • Fixed: high memory consumption and main thread blocking in certain edge cases.
  • Fixed: type signature and API documentation for methods
  • Deprecated: property
  • Deprecated: properties
  • Deprecated: method

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.0.19

Released: Thu Dec 23rd 2021, 12:42 pm

Release Notes:

  • Fixed: collections were not appearing in the data browser under certain permission configurations.
  • Fixed: race condition when subscriptions were configured from multiple threads in parallel (sometimes leading to a crash).
  • Fixed: missing canonicalization step for IDs of inserted documents leading to multiple instances of documents with the "same" ID being stored in the DB.

IMPORTANT: This fix only applies to newly inserted documents, documents inserted with an older version of the JavaScript SDK may still have multiple instances in the DB and replicated to other peers. We'll provide a proper migration for these in follow-up releases.

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.0.18

Released: Mon Dec 20th 2021, 5:22 am

Release Notes:

  • Reduced the opportunity for rapid memory growth in some scenarios.

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.0.18-alpha2

Released: Tue Dec 14th 2021, 8:32 am

Release Notes:

  • Improve attachment sync performance.

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.0.18-alpha1

Released: Wed Dec 8th 2021, 9:25 am

Release Notes:

  • Fixed a bug where Ditto Cloud sync was not enabled by default for
  • Fixed an issue where document IDs that were specified inside the document's value as opposed to being specified explicitly (as a separate argument to

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.0.17

Released: Thu Nov 25th 2021, 4:11 pm

Release Notes:

  • Fix an issue with write strategies not working correctly. Unexpected results could occur when performing sequences of operations on documents.
  • Removed the
  • Fixed the

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.0.16

Released: Fri Nov 19th 2021, 2:39 pm

Release Notes:

  • Fix an issue with live queries that involved a limit, no offset, at least one document being deleted, and some other conditions being met. Live queries that met these conditions could report incorrect sets of matching documents.
  • Fix an issue that could potentially lead to an infinite loop in the replication system, meaning no sync progress would be made.
  • Expose

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.0.15

Released: Fri Nov 5th 2021, 3:03 pm

Release Notes:

  • Ensure that when performing a
  • Fix a potential deadlock in relation to logging.

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.0.15-alpha1

Released: Wed Oct 27th 2021, 3:33 am

Release Notes:

  • Synchronized version bump release

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.0.14

Released: Mon Oct 25th 2021, 1:31 am

Release Notes:

  • Add support for array projections to DittoQL.
  • Deprecate the
  • Deprecate the
  • Add validation of all queries specified as part of

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.0.13

Released: Mon Oct 18th 2021, 10:02 am

Release Notes:

  • Fixed serialization errors during authentication when running in the browser.

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.0.12

Released: Mon Oct 18th 2021, 3:00 am

Release Notes:

  • Added
  • Fixed issues with key-paths containing dashes.
  • Fixed issues with key-paths containing multiple subscript operators.

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.0.11

Released: Thu Oct 7th 2021, 10:09 pm

Release Notes:

  • Fixed exception when creating a
  • Added
  • Added option
  • Added Node support for macOS/x86_64, Linux/x86_64 and Linux/ARMhf. Support for more OS/arch combinations will follow.
  • Added method
  • Added static method
  • Added static method
  • Added static method
  • Added
  • Changed
  • Changed
  • Changed property
  • Deprecated
  • Deprecated
  • Deprecated option

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.0.10

Released: Fri Sep 10th 2021, 9:21 am

Release Notes:

  • Fix to stop a change in site ID from leading to an unnecessary error.
  • Improve handling of persisted authentication data. Note that this might lead to a one-off change to a peer's site ID if you weren't and continue to not be specifying an explicit site ID when creating your identity.

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.0.9

Released: Fri Sep 3rd 2021, 3:38 pm

Release Notes:

  • Added support for attachments.
  • When calling
  • Similarly, when using
  • Enabled support for loading
  • Allow passing a "raw" primitive type, instead of requiring a
  • Added support for getting information about all of the collections that the device is aware of. This is achieved by accessing
  • Added multicast as a transport option to the
  • Added new identity types:
  • The
  • Added an
  • Similarly, added an
  • Report an error if more than one Ditto instance is started using the same working directory.

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]

JavaScript Version 1.0.8

Released: Mon Aug 2nd 2021, 9:19 am

Release Notes:

  • Initial public Beta release of the JS SDK with the following constraints:
    • Web only for now. Node & Electron support will follow shortly.
    • Counters work only partially. Full support is in development.
    • No support for batch operations yet.
    • No support for attachments yet.
  • Known bugs and issues:
    • runGarbageCollection()
    • observeWithNextSignal()
    • Longer running queries might block the JS event loop.

Installation:

npm install --save @dittolive/[email protected]

If you have yarn:

yarn add @dittolive/[email protected]