@agoric/store 0.9.3-dev-1eed398.0 → 0.9.3-dev-20dd848.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/store",
3
- "version": "0.9.3-dev-1eed398.0+1eed398",
3
+ "version": "0.9.3-dev-20dd848.0+20dd848",
4
4
  "description": "Wrapper for JavaScript map",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -30,14 +30,14 @@
30
30
  },
31
31
  "homepage": "https://github.com/Agoric/agoric-sdk#readme",
32
32
  "dependencies": {
33
- "@agoric/assert": "0.6.1-dev-1eed398.0+1eed398",
33
+ "@agoric/assert": "0.6.1-dev-20dd848.0+20dd848",
34
34
  "@endo/exo": "^0.2.3",
35
35
  "@endo/marshal": "^0.8.6",
36
36
  "@endo/pass-style": "^0.1.4",
37
37
  "@endo/patterns": "^0.2.3"
38
38
  },
39
39
  "devDependencies": {
40
- "@agoric/time": "0.3.3-dev-1eed398.0+1eed398",
40
+ "@agoric/time": "0.3.3-dev-20dd848.0+20dd848",
41
41
  "@endo/init": "^0.5.57",
42
42
  "@endo/ses-ava": "^0.2.41",
43
43
  "ava": "^5.3.0"
@@ -59,5 +59,5 @@
59
59
  ],
60
60
  "timeout": "2m"
61
61
  },
62
- "gitHead": "1eed3986cd191d3aa36302a3d1037263d3ea7857"
62
+ "gitHead": "20dd84862b8d625d0fe5c935c307b9762a347df9"
63
63
  }
@@ -1,6 +1,8 @@
1
1
  import { Far } from '@endo/marshal';
2
2
  import { M, matches } from '@endo/patterns';
3
3
 
4
+ /** @typedef {import('@endo/marshal').RankCompare} RankCompare */
5
+
4
6
  const { Fail, quote: q } = assert;
5
7
 
6
8
  // TODO: Undate `@endo/patterns` to export the original, and delete the
package/src/types.js CHANGED
@@ -1,118 +1,44 @@
1
1
  /// <reference types="ses"/>
2
2
 
3
- /** @typedef {import('@endo/marshal').Passable} Passable */
4
- /** @typedef {import('@endo/marshal').PassStyle} PassStyle */
5
- /** @typedef {import('@endo/marshal').CopyTagged} CopyTagged */
6
- /** @template T @typedef {import('@endo/marshal').CopyRecord<T>} CopyRecord */
7
- /** @template T @typedef {import('@endo/marshal').CopyArray<T>} CopyArray */
8
- /** @typedef {import('@endo/marshal').Checker} Checker */
9
- /** @typedef {import('@endo/marshal/src/rankOrder').RankCompare} RankCompare */
10
- /** @typedef {import('@endo/marshal/src/rankOrder').RankComparison} RankComparison */
11
-
12
- // /////////////////////////////////////////////////////////////////////////////
13
- // Placeholder redundant types, to be imported from `@endo/patterns` instead.
14
-
15
- // TODO placeholder. Figure out how to import from `@endo/patterns` instead
16
- /** @typedef {Passable} Key */
17
-
18
- // TODO placeholder. Figure out how to import from `@endo/patterns` instead
19
- /** @typedef {Passable} Pattern */
20
-
21
- // TODO placeholder. Figure out how to import from `@endo/patterns` instead
22
3
  /**
23
- * @template {Key} [K=Key]
24
- * @typedef {CopyTagged & {
25
- * [Symbol.toStringTag]: 'copySet';
26
- * payload: K[];
27
- * }} CopySet
4
+ * Note TODO https://github.com/endojs/endo/issues/1488
5
+ *
6
+ * @typedef {import('@endo/pass-style').Passable} Passable
28
7
  */
29
-
30
- // TODO placeholder. Figure out how to import from `@endo/patterns` instead
8
+ /** @typedef {import('@endo/pass-style').CopyTagged} CopyTagged */
9
+ /** @typedef {import('@endo/patterns').Pattern} Pattern */
10
+ /** @typedef {import('@endo/patterns').Key} Key */
31
11
  /**
32
12
  * @template {Key} [K=Key]
33
- * @typedef {CopyTagged & {
34
- * [Symbol.toStringTag]: 'copyBag';
35
- * payload: [K, bigint][];
36
- * }} CopyBag
13
+ * @typedef {import('@endo/patterns').CopySet<K>} CopySet
37
14
  */
38
-
39
- // TODO placeholder. Figure out how to import from `@endo/patterns` instead
40
15
  /**
41
16
  * @template {Key} [K=Key]
42
17
  * @template {Passable} [V=Passable]
43
- * @typedef {CopyTagged & {
44
- * [Symbol.toStringTag]: 'copyMap';
45
- * payload: { keys: K[]; values: V[] };
46
- * }} CopyMap
47
- */
48
-
49
- // TODO placeholder. Figure out how to import from `@endo/patterns` instead
50
- /**
51
- * @typedef {object} GuardMakers
52
- * @property {<M extends Record<any, any>>(
53
- * interfaceName: string,
54
- * methodGuards: M,
55
- * options?: { sloppy?: boolean },
56
- * ) => InterfaceGuard} interface
57
- * @property {(...argGuards: ArgGuard[]) => MethodGuardMaker} call Guard a
58
- * synchronous call
59
- * @property {(...argGuards: ArgGuard[]) => MethodGuardMaker} callWhen Guard an
60
- * async call
61
- * @property {(argGuard: ArgGuard) => ArgGuard} await Guard an await
18
+ * @typedef {import('@endo/patterns').CopyMap<K, V>} CopyMap
62
19
  */
63
20
 
64
- // TODO placeholder. Figure out how to import from `@endo/patterns` instead
65
- /** @typedef {(...args: any[]) => any} Method */
66
-
67
- // TODO placeholder. Figure out how to import from `@endo/patterns` instead
68
- /**
69
- * @typedef {{
70
- * klass: 'Interface';
71
- * interfaceName: string;
72
- * methodGuards: Record<string | symbol, MethodGuard>;
73
- * sloppy?: boolean;
74
- * }} InterfaceGuard
75
- */
76
-
77
- // TODO placeholder. Figure out how to import from `@endo/patterns` instead
78
- /** @typedef {any} MethodGuardMaker */
79
-
80
- // TODO placeholder. Figure out how to import from `@endo/patterns` instead
81
- /**
82
- * @typedef {{
83
- * klass: 'methodGuard';
84
- * callKind: 'sync' | 'async';
85
- * returnGuard: unknown;
86
- * }} MethodGuard
87
- */
88
-
89
- // TODO placeholder. Figure out how to import from `@endo/patterns` instead
90
- /** @typedef {any} ArgGuard */
91
-
92
- // /////////////////////////////////////////////////////////////////////////////
93
-
94
21
  /**
95
22
  * @typedef {object} StoreOptions Of the dimensions on which KeyedStores can
96
23
  * differ, we only represent a few of them as standard options. A given store
97
24
  * maker should document which options it supports, as well as its positions
98
25
  * on dimensions for which it does not support options.
99
- * @property {boolean} [longLived=true] Which way to optimize a weak store. True
26
+ * @property {boolean} [longLived] Which way to optimize a weak store. True
100
27
  * means that we expect this weak store to outlive most of its keys, in which
101
28
  * case we internally may use a JavaScript `WeakMap`. Otherwise we internally
102
29
  * may use a JavaScript `Map`. Defaults to true, so please mark short lived
103
30
  * stores explicitly.
104
- * @property {boolean} [durable=false] The contents of this store survive
105
- * termination of its containing process, allowing for restart or upgrade but
106
- * at the cost of forbidding storage of references to ephemeral data. Defaults
107
- * to false.
108
- * @property {boolean} [fakeDurable=false] This store pretends to be a durable
109
- * store but does not enforce that the things stored in it actually be
110
- * themselves durable (whereas an actual durable store would forbid storage of
111
- * such items). This is in service of allowing incremental transition to use
112
- * of durable stores, to enable normal operation and testing when some stuff
31
+ * @property {boolean} [durable] The contents of this store survive termination
32
+ * of its containing process, allowing for restart or upgrade but at the cost
33
+ * of forbidding storage of references to ephemeral data. Defaults to false.
34
+ * @property {boolean} [fakeDurable] This store pretends to be a durable store
35
+ * but does not enforce that the things stored in it actually be themselves
36
+ * durable (whereas an actual durable store would forbid storage of such
37
+ * items). This is in service of allowing incremental transition to use of
38
+ * durable stores, to enable normal operation and testing when some stuff
113
39
  * intended to eventually be durable has not yet been made durable. A store
114
40
  * marked as fakeDurable will appear to operate normally but any attempt to
115
- * upgrade its containing vat will fail with an error.
41
+ * upgrade its containing vat will fail with an error. Defaults to false.
116
42
  * @property {Pattern} [keyShape]
117
43
  * @property {Pattern} [valueShape]
118
44
  */