From c6c0a3905a7cb47c2aef19b8f61dbd60f5a877c5 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Thu, 16 May 2024 09:50:43 -0700 Subject: [PATCH] refactor(types): references for ambients --- packages/ERTP/src/index.js | 1 + packages/cache/src/main.js | 4 +--- packages/casting/src/main.js | 2 +- packages/governance/src/index.js | 6 ++---- packages/inter-protocol/src/auction/auctionBook.js | 5 +++-- packages/inter-protocol/src/auction/auctioneer.js | 2 +- packages/inter-protocol/src/econCommitteeCharter.js | 2 +- packages/inter-protocol/src/index.js | 1 + packages/inter-protocol/src/psm/psm.js | 2 +- packages/inter-protocol/src/vaultFactory/vaultDirector.js | 3 +-- packages/inter-protocol/src/vaultFactory/vaultFactory.js | 2 +- packages/notifier/src/index.js | 4 +--- packages/orchestration/index.js | 6 ++++++ .../src/proposals/upgrade-wallet-factory2-proposal.js | 5 ++--- packages/vats/src/core/core-eval-env.d.ts | 2 +- packages/zoe/src/zoeService/zoe.js | 6 ++---- 16 files changed, 26 insertions(+), 27 deletions(-) diff --git a/packages/ERTP/src/index.js b/packages/ERTP/src/index.js index 7e0eefc6aa9..67348c97035 100644 --- a/packages/ERTP/src/index.js +++ b/packages/ERTP/src/index.js @@ -1,4 +1,5 @@ // @jessie-check +/// export * from './amountMath.js'; export * from './issuerKit.js'; diff --git a/packages/cache/src/main.js b/packages/cache/src/main.js index f13abd7ef3f..3c648aa4159 100644 --- a/packages/cache/src/main.js +++ b/packages/cache/src/main.js @@ -1,7 +1,5 @@ // @jessie-check - -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/internal/exported.js'; +/// // eslint-disable-next-line import/export export * from './types.js'; diff --git a/packages/casting/src/main.js b/packages/casting/src/main.js index c4ea270603c..6b0eee6ec01 100644 --- a/packages/casting/src/main.js +++ b/packages/casting/src/main.js @@ -1,6 +1,6 @@ // @jessie-check -import '@agoric/internal/exported.js'; +/// // eslint-disable-next-line import/export export * from './types.js'; // no named exports diff --git a/packages/governance/src/index.js b/packages/governance/src/index.js index b3e2cc5a24d..68ee491623f 100644 --- a/packages/governance/src/index.js +++ b/packages/governance/src/index.js @@ -1,10 +1,8 @@ +/// +/// // XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/internal/exported.js'; -import '@agoric/ertp/exported.js'; import '@agoric/zoe/exported.js'; -/// - export { ChoiceMethod, ElectionType, diff --git a/packages/inter-protocol/src/auction/auctionBook.js b/packages/inter-protocol/src/auction/auctionBook.js index 46f63f03666..348692166b5 100644 --- a/packages/inter-protocol/src/auction/auctionBook.js +++ b/packages/inter-protocol/src/auction/auctionBook.js @@ -1,6 +1,7 @@ +/// +/// + // XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/internal/exported.js'; -import '@agoric/governance/exported.js'; import '@agoric/zoe/exported.js'; import '@agoric/zoe/src/contracts/exported.js'; diff --git a/packages/inter-protocol/src/auction/auctioneer.js b/packages/inter-protocol/src/auction/auctioneer.js index 88ace013d94..fbed644898b 100644 --- a/packages/inter-protocol/src/auction/auctioneer.js +++ b/packages/inter-protocol/src/auction/auctioneer.js @@ -1,4 +1,4 @@ -import '@agoric/governance/exported.js'; +/// import '@agoric/zoe/exported.js'; import '@agoric/zoe/src/contracts/exported.js'; diff --git a/packages/inter-protocol/src/econCommitteeCharter.js b/packages/inter-protocol/src/econCommitteeCharter.js index 6fc146cb167..632ea5beb43 100644 --- a/packages/inter-protocol/src/econCommitteeCharter.js +++ b/packages/inter-protocol/src/econCommitteeCharter.js @@ -1,6 +1,6 @@ // @jessie-check +/// -import '@agoric/governance/exported.js'; import { M, mustMatch } from '@agoric/store'; import { TimestampShape } from '@agoric/time'; import { prepareExo, provideDurableMapStore } from '@agoric/vat-data'; diff --git a/packages/inter-protocol/src/index.js b/packages/inter-protocol/src/index.js index 6afa8fdbdfe..4708dc05b7c 100644 --- a/packages/inter-protocol/src/index.js +++ b/packages/inter-protocol/src/index.js @@ -1,3 +1,4 @@ // @jessie-check +/// export { calculateCurrentDebt } from './interest-math.js'; diff --git a/packages/inter-protocol/src/psm/psm.js b/packages/inter-protocol/src/psm/psm.js index fbd44b7d496..74ba3c7364c 100644 --- a/packages/inter-protocol/src/psm/psm.js +++ b/packages/inter-protocol/src/psm/psm.js @@ -1,7 +1,7 @@ // @jessie-check +/// // XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/governance/exported.js'; import '@agoric/zoe/exported.js'; import '@agoric/zoe/src/contracts/exported.js'; diff --git a/packages/inter-protocol/src/vaultFactory/vaultDirector.js b/packages/inter-protocol/src/vaultFactory/vaultDirector.js index 701dc0ac80c..4c85139b209 100644 --- a/packages/inter-protocol/src/vaultFactory/vaultDirector.js +++ b/packages/inter-protocol/src/vaultFactory/vaultDirector.js @@ -1,8 +1,7 @@ +/// import '@agoric/zoe/exported.js'; import '@agoric/zoe/src/contracts/exported.js'; -import '@agoric/governance/exported.js'; - import { AmountMath, AmountShape, BrandShape, IssuerShape } from '@agoric/ertp'; import { GovernorFacetShape, diff --git a/packages/inter-protocol/src/vaultFactory/vaultFactory.js b/packages/inter-protocol/src/vaultFactory/vaultFactory.js index 2ee4f2001ae..f3942a3576f 100644 --- a/packages/inter-protocol/src/vaultFactory/vaultFactory.js +++ b/packages/inter-protocol/src/vaultFactory/vaultFactory.js @@ -1,7 +1,7 @@ // @jessie-check +/// // XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/governance/exported.js'; import '@agoric/zoe/exported.js'; import '@agoric/zoe/src/contracts/exported.js'; diff --git a/packages/notifier/src/index.js b/packages/notifier/src/index.js index 2a5f7fd6723..4033aad55bc 100644 --- a/packages/notifier/src/index.js +++ b/packages/notifier/src/index.js @@ -1,7 +1,5 @@ // @jessie-check - -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/internal/exported.js'; +/// export { makePublishKit, diff --git a/packages/orchestration/index.js b/packages/orchestration/index.js index d5173404ac0..89ffac18b7e 100644 --- a/packages/orchestration/index.js +++ b/packages/orchestration/index.js @@ -1,3 +1,9 @@ +/// +/// + +// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 +import '@agoric/zoe/exported.js'; + export * from './src/types.js'; export * from './src/service.js'; export * from './src/typeGuards.js'; diff --git a/packages/smart-wallet/src/proposals/upgrade-wallet-factory2-proposal.js b/packages/smart-wallet/src/proposals/upgrade-wallet-factory2-proposal.js index 2ebb86e3fc5..a4750423d07 100644 --- a/packages/smart-wallet/src/proposals/upgrade-wallet-factory2-proposal.js +++ b/packages/smart-wallet/src/proposals/upgrade-wallet-factory2-proposal.js @@ -1,10 +1,9 @@ // @ts-check +/// + import { E } from '@endo/far'; import { makeStorageNodeChild } from '@agoric/internal/src/lib-chainStorage.js'; -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/vats/src/core/types-ambient.js'; - /** * @param {BootstrapPowers & ChainBootstrapSpace} powers * @param {object} options diff --git a/packages/vats/src/core/core-eval-env.d.ts b/packages/vats/src/core/core-eval-env.d.ts index f8df6a43e16..cb1f87b419b 100644 --- a/packages/vats/src/core/core-eval-env.d.ts +++ b/packages/vats/src/core/core-eval-env.d.ts @@ -2,7 +2,7 @@ /** * @file typesdef for the CoreEval environment * - * To use add this to the top of the proposal + * To use add this to the top of the proposal: * * /// * diff --git a/packages/zoe/src/zoeService/zoe.js b/packages/zoe/src/zoeService/zoe.js index 5a83d08bf0a..71abd32ce46 100644 --- a/packages/zoe/src/zoeService/zoe.js +++ b/packages/zoe/src/zoeService/zoe.js @@ -11,6 +11,8 @@ * validate that. */ +/// +/// /// import { E } from '@endo/eventual-send'; @@ -26,10 +28,6 @@ import { getZcfBundleCap } from './createZCFVat.js'; import { defaultFeeIssuerConfig, prepareFeeMint } from './feeMint.js'; import { ZoeServiceI } from '../typeGuards.js'; -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/internal/exported.js'; -import '@agoric/notifier/exported.js'; - /** @import {Baggage} from '@agoric/vat-data' */ const { Fail } = assert;