hyoo_sync_client 0.0.50 → 0.0.52

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.
package/node.test.js CHANGED
@@ -24,7 +24,7 @@ $.$$ = $
24
24
  //hyoo/hyoo.ts
25
25
  ;
26
26
  "use strict";
27
- let $hyoo_sync_revision = "d9c542d";
27
+ let $hyoo_sync_revision = "3406820";
28
28
  //hyoo/sync/-meta.tree/revision.meta.tree.ts
29
29
  ;
30
30
  "use strict";
@@ -2066,6 +2066,8 @@ var $;
2066
2066
  result = compare_map(left, right);
2067
2067
  else if (ArrayBuffer.isView(left))
2068
2068
  result = compare_buffer(left, right);
2069
+ else if (Symbol.iterator in left)
2070
+ result = compare_iterator(left[Symbol.iterator](), right[Symbol.iterator]());
2069
2071
  else if (Symbol.toPrimitive in left)
2070
2072
  result = compare_primitive(left, right);
2071
2073
  else
@@ -2592,8 +2594,8 @@ var $;
2592
2594
  "use strict";
2593
2595
  var $;
2594
2596
  (function ($) {
2595
- async function $hyoo_sync_peer(path) {
2596
- let serial = $mol_state_local.value('$hyoo_sync_peer');
2597
+ async function $hyoo_sync_peer(path, next) {
2598
+ let serial = $mol_state_local.value('$hyoo_sync_peer', next);
2597
2599
  if (typeof serial === 'string') {
2598
2600
  return await $hyoo_crowd_peer.restore(serial);
2599
2601
  }
@@ -3711,8 +3713,8 @@ var $;
3711
3713
  log_pack(data) {
3712
3714
  return data;
3713
3715
  }
3714
- peer() {
3715
- return $mol_wire_sync($hyoo_sync_peer)(this + '.peer()');
3716
+ peer(next) {
3717
+ return $mol_wire_sync($hyoo_sync_peer)(this + '.peer()', next);
3716
3718
  }
3717
3719
  world() {
3718
3720
  $mol_wire_solid();
@@ -4920,7 +4922,7 @@ var $;
4920
4922
  $mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
4921
4923
  $mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
4922
4924
  },
4923
- 'Custom comparator'() {
4925
+ 'Serializale'() {
4924
4926
  class User {
4925
4927
  name;
4926
4928
  rand;
@@ -4935,6 +4937,11 @@ var $;
4935
4937
  $mol_assert_ok($mol_compare_deep(new User('Jin'), new User('Jin')));
4936
4938
  $mol_assert_not($mol_compare_deep(new User('Jin'), new User('John')));
4937
4939
  },
4940
+ 'Iterable'() {
4941
+ $mol_assert_ok($mol_compare_deep(new URLSearchParams({ foo: 'bar' }), new URLSearchParams({ foo: 'bar' })));
4942
+ $mol_assert_not($mol_compare_deep(new URLSearchParams({ foo: 'xxx' }), new URLSearchParams({ foo: 'yyy' })));
4943
+ $mol_assert_not($mol_compare_deep(new URLSearchParams({ foo: 'xxx', bar: 'yyy' }), new URLSearchParams({ bar: 'yyy', foo: 'xxx' })));
4944
+ },
4938
4945
  });
4939
4946
  })($ || ($ = {}));
4940
4947
  //mol/compare/deep/deep.test.tsx