@agoric/vat-data 0.5.3-dev-03b6420.0 → 0.5.3-dev-f1638f9.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/vat-data",
3
- "version": "0.5.3-dev-03b6420.0+03b6420",
3
+ "version": "0.5.3-dev-f1638f9.0+f1638f9",
4
4
  "description": "Safe access to VatData global",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/Agoric/agoric-sdk",
@@ -19,12 +19,12 @@
19
19
  "author": "Agoric",
20
20
  "license": "Apache-2.0",
21
21
  "dependencies": {
22
- "@agoric/assert": "0.6.1-dev-03b6420.0+03b6420",
23
- "@agoric/base-zone": "0.1.1-dev-03b6420.0+03b6420",
24
- "@agoric/internal": "0.3.3-dev-03b6420.0+03b6420",
25
- "@agoric/store": "0.9.3-dev-03b6420.0+03b6420",
26
- "@agoric/swingset-liveslots": "0.10.3-dev-03b6420.0+03b6420",
27
- "@agoric/vow": "0.1.1-dev-03b6420.0+03b6420",
22
+ "@agoric/assert": "0.6.1-dev-f1638f9.0+f1638f9",
23
+ "@agoric/base-zone": "0.1.1-dev-f1638f9.0+f1638f9",
24
+ "@agoric/internal": "0.3.3-dev-f1638f9.0+f1638f9",
25
+ "@agoric/store": "0.9.3-dev-f1638f9.0+f1638f9",
26
+ "@agoric/swingset-liveslots": "0.10.3-dev-f1638f9.0+f1638f9",
27
+ "@agoric/vow": "0.1.1-dev-f1638f9.0+f1638f9",
28
28
  "@endo/exo": "^1.3.0",
29
29
  "@endo/patterns": "^1.3.0"
30
30
  },
@@ -52,5 +52,5 @@
52
52
  "typeCoverage": {
53
53
  "atLeast": 98.74
54
54
  },
55
- "gitHead": "03b6420649be77d010bc783efc5aaee5c7ed45e7"
55
+ "gitHead": "f1638f95424a0f3851e6e1d880c2a38dd14eca3d"
56
56
  }
@@ -3,7 +3,9 @@
3
3
  import { Fail } from '@agoric/assert';
4
4
  import { provideLazy } from '@agoric/store';
5
5
 
6
- /** @type {import('@agoric/swingset-liveslots').VatData} */
6
+ /** @import {Baggage, PickFacet, VatData} from '@agoric/swingset-liveslots' */
7
+
8
+ /** @type {VatData} */
7
9
  let VatDataGlobal;
8
10
  if ('VatData' in globalThis) {
9
11
  globalThis.VatData || Fail`VatData defined in global as null or undefined`;
@@ -62,7 +64,7 @@ export const {
62
64
  *
63
65
  * const makeFoo = pickFacet(makeFooBase, 'self');
64
66
  *
65
- * @type {import('@agoric/swingset-liveslots').PickFacet}
67
+ * @type {PickFacet}
66
68
  */
67
69
  export const pickFacet =
68
70
  (maker, facetName) =>
@@ -83,33 +85,8 @@ export const partialAssign = (target, source) => {
83
85
  };
84
86
  harden(partialAssign);
85
87
 
86
- // XXX copied from @agoric/store types
87
- // UNTIL https://github.com/Agoric/agoric-sdk/issues/4560
88
- /**
89
- * @typedef {object} StoreOptions
90
- * Of the dimensions on which KeyedStores can differ, we only represent a few
91
- * of them as standard options. A given store maker should document which
92
- * options it supports, as well as its positions on dimensions for which it
93
- * does not support options.
94
- * @property {boolean} [longLived=true] Which way to optimize a weak store. True means
95
- * that we expect this weak store to outlive most of its keys, in which
96
- * case we internally may use a JavaScript `WeakMap`. Otherwise we internally
97
- * may use a JavaScript `Map`.
98
- * Defaults to true, so please mark short lived stores explicitly.
99
- * @property {boolean} [durable=false] The contents of this store survive termination
100
- * of its containing process, allowing for restart or upgrade but at the cost
101
- * of forbidding storage of references to ephemeral data. Defaults to false.
102
- * @property {boolean} [fakeDurable=false] This store pretends to be a durable store
103
- * but does not enforce that the things stored in it actually be themselves
104
- * durable (whereas an actual durable store would forbid storage of such
105
- * items). This is in service of allowing incremental transition to use of
106
- * durable stores, to enable normal operation and testing when some stuff
107
- * intended to eventually be durable has not yet been made durable. A store
108
- * marked as fakeDurable will appear to operate normally but any attempt to
109
- * upgrade its containing vat will fail with an error.
110
- * @property {import('@agoric/swingset-liveslots').Pattern} [keyShape]
111
- * @property {import('@agoric/swingset-liveslots').Pattern} [valueShape]
112
- */
88
+ /** @import {StoreOptions} from '@agoric/store/exported.js' */
89
+
113
90
  /**
114
91
  * Unlike `provideLazy`, `provide` should be called at most once
115
92
  * within any vat incarnation with a given `baggage`,`key` pair.
@@ -138,12 +115,12 @@ harden(partialAssign);
138
115
 
139
116
  export const provide =
140
117
  // XXX cast because provideLazy is `any` due to broken type import
141
- /** @type {<K, V>(baggage: import('@agoric/swingset-liveslots').Baggage, key: K, makeValue: (key: K) => V) => V} */ (
118
+ /** @type {<K, V>(baggage: Baggage, key: K, makeValue: (key: K) => V) => V} */ (
142
119
  provideLazy
143
120
  );
144
121
 
145
122
  // TODO: Find a good home for this function used by @agoric/vat-data and testing code
146
- /** @param {import('@agoric/swingset-liveslots').VatData} VatData */
123
+ /** @param {VatData} VatData */
147
124
  export const makeStoreUtils = VatData => {
148
125
  const {
149
126
  // eslint-disable-next-line no-shadow -- these literally do shadow the globals
@@ -157,7 +134,7 @@ export const makeStoreUtils = VatData => {
157
134
  } = VatData;
158
135
 
159
136
  /**
160
- * @param {import('@agoric/swingset-liveslots').Baggage} baggage
137
+ * @param {Baggage} baggage
161
138
  * @param {string} name
162
139
  * @param {Omit<StoreOptions, 'durable'>} options
163
140
  */
@@ -168,7 +145,7 @@ export const makeStoreUtils = VatData => {
168
145
  harden(provideDurableMapStore);
169
146
 
170
147
  /**
171
- * @param {import('@agoric/swingset-liveslots').Baggage} baggage
148
+ * @param {Baggage} baggage
172
149
  * @param {string} name
173
150
  * @param {Omit<StoreOptions, 'durable'>} options
174
151
  */
@@ -179,7 +156,7 @@ export const makeStoreUtils = VatData => {
179
156
  harden(provideDurableWeakMapStore);
180
157
 
181
158
  /**
182
- * @param {import('@agoric/swingset-liveslots').Baggage} baggage
159
+ * @param {Baggage} baggage
183
160
  * @param {string} name
184
161
  * @param {Omit<StoreOptions, 'durable'>} options
185
162
  */
@@ -190,7 +167,7 @@ export const makeStoreUtils = VatData => {
190
167
  harden(provideDurableSetStore);
191
168
 
192
169
  /**
193
- * @param {import('@agoric/swingset-liveslots').Baggage} baggage
170
+ * @param {Baggage} baggage
194
171
  * @param {string} name
195
172
  * @param {Omit<StoreOptions, 'durable'>} options
196
173
  */
package/vow.js CHANGED
@@ -36,9 +36,8 @@ export const defaultPowers = harden({
36
36
  export const prepareVowTools = (zone, powers = {}) =>
37
37
  rawPrepareVowTools(zone, { ...defaultPowers, ...powers });
38
38
 
39
- export const { watch, when, makeVowKit, allVows } = prepareVowTools(
40
- makeHeapZone(),
41
- );
39
+ export const { watch, when, makeVowKit, allVows } =
40
+ prepareVowTools(makeHeapZone());
42
41
 
43
42
  /**
44
43
  * An vow-shortening E. CAVEAT: This produces long-lived ephemeral