loro-crdt 1.7.0 → 1.7.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 6d308d1: fix: use null when export json update with undefined value
8
+ - 1aad1d5: Add toJSON to LoroCounter
9
+
3
10
  ## 1.7.0
4
11
 
5
12
  ### Minor Changes
package/base64/index.js CHANGED
@@ -1122,6 +1122,13 @@ class LoroCounter {
1122
1122
  const ret = wasm.lorocounter_getShallowValue(this.__wbg_ptr);
1123
1123
  return ret;
1124
1124
  }
1125
+ /**
1126
+ * @returns {number}
1127
+ */
1128
+ toJSON() {
1129
+ const ret = wasm.lorocounter_toJSON(this.__wbg_ptr);
1130
+ return ret;
1131
+ }
1125
1132
  }
1126
1133
 
1127
1134
  const LoroDocFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -7153,7 +7160,7 @@ var imports = /*#__PURE__*/Object.freeze({
7153
7160
  // Without this patch, Cloudflare Worker would raise issue like: "Uncaught TypeError: wasm2.__wbindgen_start is not a function"
7154
7161
 
7155
7162
  if (!('Bun' in globalThis))
7156
- import loro_wasm_bg_js from './loro_wasm_bg-ce6cdb00.js';
7163
+ import loro_wasm_bg_js from './loro_wasm_bg-512df4ec.js';
7157
7164
  const instance = new WebAssembly.Instance(loro_wasm_bg_js(), {
7158
7165
  "./loro_wasm_bg.js": imports,
7159
7166
  });
@@ -1640,6 +1640,7 @@ export class LoroCounter {
1640
1640
  * Get the value of the counter.
1641
1641
  */
1642
1642
  getShallowValue(): number;
1643
+ toJSON(): number;
1643
1644
  /**
1644
1645
  * The container id of this handler.
1645
1646
  */