diff --git a/packages/base-zone/package.json b/packages/base-zone/package.json index 909a45c8bfe..cff5dca8a95 100644 --- a/packages/base-zone/package.json +++ b/packages/base-zone/package.json @@ -19,6 +19,7 @@ }, "exports": { ".": "./src/index.js", + "./zone-helpers.js": "./zone-helpers.js", "./heap.js": "./heap.js", "./tools/*": "./tools/*" }, @@ -27,6 +28,7 @@ "license": "Apache-2.0", "dependencies": { "@agoric/store": "^0.9.2", + "@endo/common": "^1.1.0", "@endo/exo": "^1.2.1", "@endo/far": "^1.0.4", "@endo/pass-style": "^1.2.0", @@ -34,6 +36,7 @@ }, "devDependencies": { "@endo/init": "^1.0.4", + "@endo/ses-ava": "^1.1.2", "ava": "^5.3.0" }, "publishConfig": { diff --git a/packages/zoe/src/contractSupport/prepare-revocable.js b/packages/base-zone/src/prepare-revocable.js similarity index 96% rename from packages/zoe/src/contractSupport/prepare-revocable.js rename to packages/base-zone/src/prepare-revocable.js index 8d0aaab85eb..a5163e00e60 100644 --- a/packages/zoe/src/contractSupport/prepare-revocable.js +++ b/packages/base-zone/src/prepare-revocable.js @@ -46,8 +46,9 @@ const { Fail, quote: q } = assert; /** * Make an exo class kit for wrapping an underlying exo class, - * where the wrapper is a revocable forwarder + * where the wrapper is a revocable forwarder. * + * @deprecated Change to `prepareRevocableMakerKit` once #8977 happens * @template {any} [U=any] * @param {import('@agoric/base-zone').Zone} zone * @param {string} uKindName diff --git a/packages/base-zone/test/prepare-test-env-ava.js b/packages/base-zone/test/prepare-test-env-ava.js index c9b920471df..12d026b2408 100644 --- a/packages/base-zone/test/prepare-test-env-ava.js +++ b/packages/base-zone/test/prepare-test-env-ava.js @@ -1,5 +1,4 @@ -// eslint-disable-next-line import/no-extraneous-dependencies +import { wrapTest } from '@endo/ses-ava'; +import rawTest from 'ava'; -import test from 'ava'; - -export { test }; +export const test = wrapTest(rawTest); diff --git a/packages/zoe/test/unitTests/contractSupport/test-prepare-revocable.js b/packages/base-zone/test/test-prepare-revocable.js similarity index 92% rename from packages/zoe/test/unitTests/contractSupport/test-prepare-revocable.js rename to packages/base-zone/test/test-prepare-revocable.js index 6a2d6067c2c..9bd2a7744d0 100644 --- a/packages/zoe/test/unitTests/contractSupport/test-prepare-revocable.js +++ b/packages/base-zone/test/test-prepare-revocable.js @@ -1,11 +1,11 @@ // Modeled on test-heap-classes.js -import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js'; +import { test } from './prepare-test-env-ava.js'; // eslint-disable-next-line import/order import { M } from '@endo/patterns'; -import { makeHeapZone } from '@agoric/base-zone/heap.js'; -import { prepareRevocableKit } from '../../../src/contractSupport/prepare-revocable.js'; +import { makeHeapZone } from '../src/heap.js'; +import { prepareRevocableKit } from '../src/prepare-revocable.js'; const UpCounterI = M.interface('UpCounter', { incr: M.call() diff --git a/packages/base-zone/zone-helpers.js b/packages/base-zone/zone-helpers.js new file mode 100644 index 00000000000..40ada25c3f7 --- /dev/null +++ b/packages/base-zone/zone-helpers.js @@ -0,0 +1 @@ +export * from './src/prepare-revocable.js'; diff --git a/packages/zoe/src/contractSupport/index.js b/packages/zoe/src/contractSupport/index.js index 4ffd8d5c1a0..df970d839a4 100644 --- a/packages/zoe/src/contractSupport/index.js +++ b/packages/zoe/src/contractSupport/index.js @@ -55,7 +55,6 @@ export { export * from './durability.js'; export * from './prepare-ownable.js'; -export * from './prepare-revocable.js'; export * from './priceAuthority.js'; export * from './priceQuote.js'; export * from './statistics.js'; diff --git a/packages/zoe/src/contractSupport/prepare-ownable.js b/packages/zoe/src/contractSupport/prepare-ownable.js index 867bb31b75a..b6088369eee 100644 --- a/packages/zoe/src/contractSupport/prepare-ownable.js +++ b/packages/zoe/src/contractSupport/prepare-ownable.js @@ -1,6 +1,6 @@ import { M } from '@endo/patterns'; +import { prepareRevocableKit } from '@agoric/base-zone/zone-helpers.js'; import { OfferHandlerI } from '../typeGuards.js'; -import { prepareRevocableKit } from './prepare-revocable.js'; const TransferProposalShape = M.splitRecord({ give: {},