@agoric/swing-store 0.10.0-upgrade-18-dev-aaebae4.0 → 0.10.0-upgrade-18-dev-bd8fd54.0
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 +9 -0
- package/package.json +12 -12
- package/src/exporter.js +1 -2
- package/src/hasher.js +0 -1
- package/src/internal.js +1 -0
- package/src/kvStore.js +1 -0
- package/src/swingStore.js +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.10.0-u18.1](https://github.com/Agoric/agoric-sdk/compare/@agoric/swing-store@0.10.0-u18.0...@agoric/swing-store@0.10.0-u18.1) (2024-12-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **cosmic-swingset:** Allow `launch` to accept an already-open swingStore ([c65e5b1](https://github.com/Agoric/agoric-sdk/commit/c65e5b1c531c08026f5f11cf5d5dcdbe238b05ee))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
6
15
|
## [0.10.0-u18.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/swing-store@0.9.1...@agoric/swing-store@0.10.0-u18.0) (2024-10-31)
|
|
7
16
|
|
|
8
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/swing-store",
|
|
3
|
-
"version": "0.10.0-upgrade-18-dev-
|
|
3
|
+
"version": "0.10.0-upgrade-18-dev-bd8fd54.0+bd8fd54",
|
|
4
4
|
"description": "Persistent storage for SwingSet",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "exit 0",
|
|
15
15
|
"test": "ava",
|
|
16
|
-
"test:c8": "c8 $C8_OPTIONS ava
|
|
16
|
+
"test:c8": "c8 --all $C8_OPTIONS ava",
|
|
17
17
|
"test:xs": "exit 0",
|
|
18
18
|
"lint-fix": "yarn lint:eslint --fix",
|
|
19
19
|
"lint": "run-s --continue-on-error lint:*",
|
|
@@ -21,19 +21,19 @@
|
|
|
21
21
|
"lint:eslint": "eslint ."
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@agoric/internal": "0.4.0-upgrade-18-dev-
|
|
25
|
-
"@endo/base64": "^1.0.
|
|
26
|
-
"@endo/bundle-source": "^3.
|
|
27
|
-
"@endo/check-bundle": "^1.0.
|
|
28
|
-
"@endo/errors": "^1.2.
|
|
29
|
-
"@endo/nat": "^5.0.
|
|
24
|
+
"@agoric/internal": "0.4.0-upgrade-18-dev-bd8fd54.0+bd8fd54",
|
|
25
|
+
"@endo/base64": "^1.0.9",
|
|
26
|
+
"@endo/bundle-source": "^3.5.0",
|
|
27
|
+
"@endo/check-bundle": "^1.0.12",
|
|
28
|
+
"@endo/errors": "^1.2.8",
|
|
29
|
+
"@endo/nat": "^5.0.13",
|
|
30
30
|
"better-sqlite3": "^9.1.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@endo/init": "^1.1.
|
|
33
|
+
"@endo/init": "^1.1.7",
|
|
34
34
|
"@types/better-sqlite3": "^7.6.9",
|
|
35
35
|
"ava": "^5.3.0",
|
|
36
|
-
"c8": "^
|
|
36
|
+
"c8": "^10.1.2",
|
|
37
37
|
"tmp": "^0.2.1"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"timeout": "2m"
|
|
50
50
|
},
|
|
51
51
|
"typeCoverage": {
|
|
52
|
-
"atLeast": 79.
|
|
52
|
+
"atLeast": 79.04
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "bd8fd545c40400566a6ff3838b1499173fcf9aaf"
|
|
55
55
|
}
|
package/src/exporter.js
CHANGED
|
@@ -133,7 +133,6 @@ export function makeSwingStoreExporter(dirPath, options = {}) {
|
|
|
133
133
|
* section
|
|
134
134
|
*/
|
|
135
135
|
function getHostKV(key) {
|
|
136
|
-
typeof key === 'string' || Fail`key must be a string`;
|
|
137
136
|
getKeyType(key) === 'host' || Fail`getHostKV requires host keys`;
|
|
138
137
|
// @ts-expect-error unknown
|
|
139
138
|
return sqlKVGet.get(key);
|
|
@@ -176,7 +175,7 @@ export function makeSwingStoreExporter(dirPath, options = {}) {
|
|
|
176
175
|
function getArtifactNames() {
|
|
177
176
|
if (artifactMode !== 'debug') {
|
|
178
177
|
// synchronously throw if this DB will not be able to yield all the desired artifacts
|
|
179
|
-
const internal = { snapStore, bundleStore, transcriptStore };
|
|
178
|
+
const internal = { dirPath, snapStore, bundleStore, transcriptStore };
|
|
180
179
|
assertComplete(internal, artifactMode);
|
|
181
180
|
}
|
|
182
181
|
return generateArtifactNames();
|
package/src/hasher.js
CHANGED
|
@@ -16,7 +16,6 @@ import { createHash } from 'crypto';
|
|
|
16
16
|
function createSHA256(initial = undefined) {
|
|
17
17
|
const hash = createHash('sha256');
|
|
18
18
|
let done = false;
|
|
19
|
-
// eslint-disable-next-line no-use-before-define
|
|
20
19
|
const self = harden({ add, finish, sample });
|
|
21
20
|
function add(more) {
|
|
22
21
|
!done || Fail`hash already finished`;
|
package/src/internal.js
CHANGED
|
@@ -6,6 +6,7 @@ import { Fail, q } from '@endo/errors';
|
|
|
6
6
|
* @typedef { import('./bundleStore.js').BundleStoreInternal } BundleStoreInternal
|
|
7
7
|
*
|
|
8
8
|
* @typedef {{
|
|
9
|
+
* dirPath: string | null,
|
|
9
10
|
* transcriptStore: TranscriptStoreInternal,
|
|
10
11
|
* snapStore: SnapStoreInternal,
|
|
11
12
|
* bundleStore: BundleStoreInternal,
|
package/src/kvStore.js
CHANGED
package/src/swingStore.js
CHANGED
|
@@ -337,7 +337,6 @@ export function makeSwingStore(dirPath, forceReset, options = {}) {
|
|
|
337
337
|
const kernelKVStore = {
|
|
338
338
|
...kvStore,
|
|
339
339
|
set(key, value) {
|
|
340
|
-
typeof key === 'string' || Fail`key must be a string`;
|
|
341
340
|
const keyType = getKeyType(key);
|
|
342
341
|
keyType !== 'host' || Fail`kernelKVStore refuses host keys`;
|
|
343
342
|
kvStore.set(key, value);
|
|
@@ -352,7 +351,6 @@ export function makeSwingStore(dirPath, forceReset, options = {}) {
|
|
|
352
351
|
}
|
|
353
352
|
},
|
|
354
353
|
delete(key) {
|
|
355
|
-
typeof key === 'string' || Fail`key must be a string`;
|
|
356
354
|
const keyType = getKeyType(key);
|
|
357
355
|
keyType !== 'host' || Fail`kernelKVStore refuses host keys`;
|
|
358
356
|
kvStore.delete(key);
|
|
@@ -505,6 +503,7 @@ export function makeSwingStore(dirPath, forceReset, options = {}) {
|
|
|
505
503
|
|
|
506
504
|
/** @type {import('./internal.js').SwingStoreInternal} */
|
|
507
505
|
const internal = harden({
|
|
506
|
+
dirPath,
|
|
508
507
|
snapStore,
|
|
509
508
|
transcriptStore,
|
|
510
509
|
bundleStore,
|