@iebh/tera-fy 2.0.21 → 2.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  isEmpty,
3
+ isEqual,
3
4
  cloneDeep,
4
5
  random,
5
6
  sample,
@@ -538,13 +539,14 @@ export default class Syncro {
538
539
 
539
540
  /**
540
541
  * Merge a single or multiple values into a Syncro data object
542
+ * NOTE: Default behaviour is to flush (if any changes apply), use direct object mutation or disable with `flush:false` to disable
541
543
  *
542
544
  * @param {String|Object} key Either the single named key to set OR the object to merge
543
545
  * @param {*} [value] The value to set if `key` is a string
544
546
  *
545
547
  * @param {Object} [options] Additional options to mutate behaviour
546
548
  * @param {Boolean} [options.delta=true] Only merge keys that differ, skipping flush if no changes are made
547
- * @param {Boolean} [options.flush=false] Send a flush signal that Firebase should sync to Supabase on changes
549
+ * @param {Boolean} [options.flush=true] Send a flush signal that Firebase should sync to Supabase on changes
548
550
  * @param {Boolean} [options.forceFlush=false] Flush even if no changes were made
549
551
  * @param {Boolean} [options.flushDestroy=false] Destroy the Syncro after flushing
550
552
  *
@@ -564,7 +566,7 @@ export default class Syncro {
564
566
 
565
567
  let settings = {
566
568
  delta: true,
567
- flush: false,
569
+ flush: true,
568
570
  forceFlush: false,
569
571
  flushDestroy: false,
570
572
  ...options,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iebh/tera-fy",
3
- "version": "2.0.21",
3
+ "version": "2.0.22",
4
4
  "description": "TERA website worker",
5
5
  "scripts": {
6
6
  "dev": "esbuild --platform=browser --format=esm --bundle lib/terafy.client.js --outfile=dist/terafy.js --minify --serve --servedir=.",