@fireproof/core-test 0.24.15 → 0.24.19

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,27 @@
1
+ import { describe, it, expect, afterEach } from "vitest";
2
+ import { fireproof } from "@fireproof/core-base";
3
+ describe("Uint8Array document field round-trip", () => {
4
+ let db;
5
+ afterEach(async () => {
6
+ await db.close();
7
+ await db.destroy();
8
+ });
9
+ it("preserves Uint8Array through put/get", async () => {
10
+ db = fireproof(`u8rt-basic-${Date.now()}`);
11
+ const data = new Uint8Array([1, 2, 3, 255, 0, 128]);
12
+ const { id } = await db.put({ type: "bin", payload: data });
13
+ const doc = await db.get(id);
14
+ expect(doc.payload).toBeInstanceOf(Uint8Array);
15
+ expect(new Uint8Array(doc.payload)).toEqual(data);
16
+ });
17
+ it("preserves Uint8Array nested inside an object", async () => {
18
+ db = fireproof(`u8rt-nested-${Date.now()}`);
19
+ const data = new Uint8Array([10, 20, 30]);
20
+ const { id } = await db.put({ type: "nested", inner: { label: "test", data } });
21
+ const doc = await db.get(id);
22
+ expect(doc.inner.data).toBeInstanceOf(Uint8Array);
23
+ expect(new Uint8Array(doc.inner.data)).toEqual(data);
24
+ expect(doc.inner.label).toBe("test");
25
+ });
26
+ });
27
+ //# sourceMappingURL=uint8array-roundtrip.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uint8array-roundtrip.test.js","sourceRoot":"","sources":["../../jsr/fireproof/uint8array-roundtrip.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,QAAQ,CAAC,sCAAsC,EAAE,GAAG,EAAE;IACpD,IAAI,EAAY,CAAC;IAEjB,SAAS,CAAC,KAAK,IAAI,EAAE;QACnB,MAA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,CAAC,CAAC;QAC3F,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QAClD,MAAM,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACrD,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fireproof/core-test",
3
- "version": "0.24.15",
3
+ "version": "0.24.19",
4
4
  "description": "Live ledger for the web.",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -39,37 +39,37 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@adviser/cement": "~0.5.34",
42
- "@fireproof/core": "0.24.15",
43
- "@fireproof/core-base": "0.24.15",
44
- "@fireproof/core-blockstore": "0.24.15",
45
- "@fireproof/core-device-id": "0.24.15",
46
- "@fireproof/core-gateways-base": "0.24.15",
47
- "@fireproof/core-gateways-cloud": "0.24.15",
48
- "@fireproof/core-gateways-file": "0.24.15",
49
- "@fireproof/core-gateways-indexeddb": "0.24.15",
50
- "@fireproof/core-gateways-memory": "0.24.15",
51
- "@fireproof/core-keybag": "0.24.15",
52
- "@fireproof/core-protocols-cloud": "0.24.15",
53
- "@fireproof/core-protocols-dashboard": "0.24.15",
54
- "@fireproof/core-runtime": "0.24.15",
55
- "@fireproof/core-svc-api": "0.24.15",
56
- "@fireproof/core-svc-host": "0.24.15",
57
- "@fireproof/core-svc-protocol": "0.24.15",
58
- "@fireproof/core-types-base": "0.24.15",
59
- "@fireproof/core-types-blockstore": "0.24.15",
60
- "@fireproof/core-types-protocols-cloud": "0.24.15",
61
- "@fireproof/core-types-protocols-dashboard": "0.24.15",
62
- "@fireproof/core-types-runtime": "0.24.15",
63
- "@fireproof/vendor": "0.24.15",
64
- "@ipld/car": "~5.4.2",
65
- "@ipld/dag-cbor": "~9.2.5",
66
- "@ipld/dag-json": "~10.2.6",
67
- "@types/node": "~25.5.0",
68
- "cborg": "~4.5.8",
42
+ "@fireproof/core": "0.24.19",
43
+ "@fireproof/core-base": "0.24.19",
44
+ "@fireproof/core-blockstore": "0.24.19",
45
+ "@fireproof/core-device-id": "0.24.19",
46
+ "@fireproof/core-gateways-base": "0.24.19",
47
+ "@fireproof/core-gateways-cloud": "0.24.19",
48
+ "@fireproof/core-gateways-file": "0.24.19",
49
+ "@fireproof/core-gateways-indexeddb": "0.24.19",
50
+ "@fireproof/core-gateways-memory": "0.24.19",
51
+ "@fireproof/core-keybag": "0.24.19",
52
+ "@fireproof/core-protocols-cloud": "0.24.19",
53
+ "@fireproof/core-protocols-dashboard": "0.24.19",
54
+ "@fireproof/core-runtime": "0.24.19",
55
+ "@fireproof/core-svc-api": "0.24.19",
56
+ "@fireproof/core-svc-host": "0.24.19",
57
+ "@fireproof/core-svc-protocol": "0.24.19",
58
+ "@fireproof/core-types-base": "0.24.19",
59
+ "@fireproof/core-types-blockstore": "0.24.19",
60
+ "@fireproof/core-types-protocols-cloud": "0.24.19",
61
+ "@fireproof/core-types-protocols-dashboard": "0.24.19",
62
+ "@fireproof/core-types-runtime": "0.24.19",
63
+ "@fireproof/vendor": "0.24.19",
64
+ "@ipld/car": "~5.4.3",
65
+ "@ipld/dag-cbor": "~9.2.6",
66
+ "@ipld/dag-json": "~10.2.7",
67
+ "@types/node": "~25.6.0",
68
+ "cborg": "~5.1.0",
69
69
  "charwise": "~3.0.1",
70
- "jose": "~6.2.1",
71
- "use-fireproof": "0.24.15",
72
- "uuidv7": "~1.1.0",
70
+ "jose": "~6.2.2",
71
+ "use-fireproof": "0.24.19",
72
+ "uuidv7": "~1.2.1",
73
73
  "zod": "~4.3.6"
74
74
  }
75
75
  }