From 0029140f264f9dd60205f6cbe8959b6e882c6522 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 17 May 2024 12:02:49 -0700 Subject: [PATCH 01/26] docs: .d.ts benefits --- docs/typescript.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/typescript.md b/docs/typescript.md index 1fa33c587fa..fc4403b2377 100644 --- a/docs/typescript.md +++ b/docs/typescript.md @@ -8,12 +8,16 @@ Our use of TypeScript has to accomodate both .js development in agoric-sdk (whic - package entrypoint(s) exports explicit types - for packages upon which other packages expect ambient types: - `exported.js` exports the explicit types and ambient re-exports +- don't use runtime imports to get types ([issue](https://github.com/Agoric/agoric-sdk/issues/6512)) ## .d.ts modules -We cannot use `.ts` files any modules that are transitively imported into an Endo bundle. The reason is that the Endo bundler doesn't understand `.ts` syntax and we don't want it to until we have sufficient auditability of the transformation. Moreover we've tried to avoid a build step in order to import a module. (The one exception so far is `@agoric/cosmic-proto` because we codegen the types. Those modules are written in `.ts` syntax and build to `.js` by a build step that creates `dist`, which is the package export.) +We cannot use `.ts` files in any modules that are transitively imported into an Endo bundle. The reason is that the Endo bundler doesn't understand `.ts` syntax and we don't want it to until we have sufficient auditability of the transformation. Moreover we've tried to avoid a build step in order to import a module. (The one exception so far is `@agoric/cosmic-proto` because we codegen the types. Those modules are written in `.ts` syntax and build to `.js` by a build step that creates `dist`, which is the package export.) -A `.d.ts` module allows defining the type in `.ts` syntax, without any risk that it will be included in runtime code. The `.js` is what actually gets imported. +### Benefits + +- A `.d.ts` module allows defining the type in `.ts` syntax, without any risk that it will be included in runtime code. The `.js` is what actually gets imported. +- Only `.d.ts` files can be used in [triple-slash reference types](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-types-) The are some consequences to this approach. From 24897154d2303658c864577aa79c11255b38ce61 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 17 May 2024 10:56:31 -0700 Subject: [PATCH 02/26] chore(types): rm empty 'exported' module --- packages/SwingSet/exported.js | 0 packages/agoric-cli/src/init.js | 1 - packages/pegasus/exported.js | 1 - packages/zoe/exported.js | 1 - 4 files changed, 3 deletions(-) delete mode 100644 packages/SwingSet/exported.js diff --git a/packages/SwingSet/exported.js b/packages/SwingSet/exported.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/packages/agoric-cli/src/init.js b/packages/agoric-cli/src/init.js index e2e3a0b5110..5b68937bb7c 100644 --- a/packages/agoric-cli/src/init.js +++ b/packages/agoric-cli/src/init.js @@ -2,7 +2,6 @@ import chalk from 'chalk'; import { makePspawn } from './helpers.js'; /// -/// /// // Use either an absolute template URL, or find it relative to DAPP_URL_BASE. diff --git a/packages/pegasus/exported.js b/packages/pegasus/exported.js index 54086a2c401..7ef1e0f6c8c 100644 --- a/packages/pegasus/exported.js +++ b/packages/pegasus/exported.js @@ -2,4 +2,3 @@ import './src/types.js'; import '@agoric/notifier/exported.js'; import '@agoric/ertp/exported.js'; import '@agoric/store/exported.js'; -import '@agoric/swingset-vat/exported.js'; diff --git a/packages/zoe/exported.js b/packages/zoe/exported.js index 7f0c9e62f9c..c18d9ea525d 100644 --- a/packages/zoe/exported.js +++ b/packages/zoe/exported.js @@ -8,4 +8,3 @@ import './src/types-ambient.js'; import '@agoric/notifier/exported.js'; import '@agoric/ertp/exported.js'; import '@agoric/store/exported.js'; -import '@agoric/swingset-vat/exported.js'; From a8f0167c16f69ecbc66c267aef0b4fa7d34eebb2 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 17 May 2024 12:18:18 -0700 Subject: [PATCH 03/26] chore: update type-coverage --- packages/async-flow/package.json | 2 +- packages/governance/package.json | 2 +- packages/orchestration/package.json | 2 +- packages/pegasus/package.json | 2 +- packages/solo/package.json | 2 +- packages/spawner/package.json | 2 +- packages/telemetry/package.json | 2 +- packages/vats/package.json | 2 +- packages/vow/package.json | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/async-flow/package.json b/packages/async-flow/package.json index e364d41a20e..a76f7500c19 100644 --- a/packages/async-flow/package.json +++ b/packages/async-flow/package.json @@ -61,6 +61,6 @@ "workerThreads": false }, "typeCoverage": { - "atLeast": 96.68 + "atLeast": 77.83 } } diff --git a/packages/governance/package.json b/packages/governance/package.json index 453f8fec221..26c0c8d1c0f 100644 --- a/packages/governance/package.json +++ b/packages/governance/package.json @@ -77,6 +77,6 @@ "access": "public" }, "typeCoverage": { - "atLeast": 89.32 + "atLeast": 89.31 } } diff --git a/packages/orchestration/package.json b/packages/orchestration/package.json index f8daacf2d4b..4f5802f9ada 100644 --- a/packages/orchestration/package.json +++ b/packages/orchestration/package.json @@ -83,6 +83,6 @@ "access": "public" }, "typeCoverage": { - "atLeast": 97.25 + "atLeast": 97.38 } } diff --git a/packages/pegasus/package.json b/packages/pegasus/package.json index 9c08eec73cc..eaf090b4050 100644 --- a/packages/pegasus/package.json +++ b/packages/pegasus/package.json @@ -72,6 +72,6 @@ "access": "public" }, "typeCoverage": { - "atLeast": 90.61 + "atLeast": 90.6 } } diff --git a/packages/solo/package.json b/packages/solo/package.json index 228609bcf02..d0796e2c4a7 100644 --- a/packages/solo/package.json +++ b/packages/solo/package.json @@ -79,6 +79,6 @@ "workerThreads": false }, "typeCoverage": { - "atLeast": 73.13 + "atLeast": 73.11 } } diff --git a/packages/spawner/package.json b/packages/spawner/package.json index a0996aca7d9..06354d6a31c 100644 --- a/packages/spawner/package.json +++ b/packages/spawner/package.json @@ -63,6 +63,6 @@ "timeout": "2m" }, "typeCoverage": { - "atLeast": 55.05 + "atLeast": 54.79 } } diff --git a/packages/telemetry/package.json b/packages/telemetry/package.json index babd96dac9c..7f43d37b307 100644 --- a/packages/telemetry/package.json +++ b/packages/telemetry/package.json @@ -64,6 +64,6 @@ "workerThreads": false }, "typeCoverage": { - "atLeast": 87.04 + "atLeast": 87.03 } } diff --git a/packages/vats/package.json b/packages/vats/package.json index 27a41df47cb..723a985f19d 100644 --- a/packages/vats/package.json +++ b/packages/vats/package.json @@ -79,6 +79,6 @@ "workerThreads": false }, "typeCoverage": { - "atLeast": 91.26 + "atLeast": 91.27 } } diff --git a/packages/vow/package.json b/packages/vow/package.json index 890c2eafd66..22fe5d37373 100755 --- a/packages/vow/package.json +++ b/packages/vow/package.json @@ -52,6 +52,6 @@ "access": "public" }, "typeCoverage": { - "atLeast": 89.34 + "atLeast": 89.6 } } From 53f8f9321a3c37ae36c34864dcc72c6ca0c17e7f Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 17 May 2024 11:01:16 -0700 Subject: [PATCH 04/26] refactor(types): .d.ts for exported --- packages/zoe/exported.d.ts | 8 ++++++++ packages/zoe/exported.js | 11 +---------- packages/zoe/src/types-ambient.js | 12 ++++++------ 3 files changed, 15 insertions(+), 16 deletions(-) create mode 100644 packages/zoe/exported.d.ts diff --git a/packages/zoe/exported.d.ts b/packages/zoe/exported.d.ts new file mode 100644 index 00000000000..d0ec99702d1 --- /dev/null +++ b/packages/zoe/exported.d.ts @@ -0,0 +1,8 @@ +import './src/contractFacet/types-ambient.js'; +import './src/zoeService/types-ambient.js'; +import './src/contractSupport/types-ambient.js'; +import './src/contracts/exported.js'; +import './src/types-ambient.js'; +import '@agoric/notifier/exported.js'; +import '@agoric/ertp/exported.js'; +import '@agoric/store/exported.js'; diff --git a/packages/zoe/exported.js b/packages/zoe/exported.js index c18d9ea525d..469002eeeed 100644 --- a/packages/zoe/exported.js +++ b/packages/zoe/exported.js @@ -1,10 +1 @@ -// @jessie-check - -import './src/contractFacet/types-ambient.js'; -import './src/zoeService/types-ambient.js'; -import './src/contractSupport/types-ambient.js'; -import './src/contracts/exported.js'; -import './src/types-ambient.js'; -import '@agoric/notifier/exported.js'; -import '@agoric/ertp/exported.js'; -import '@agoric/store/exported.js'; +// Dummy file for .d.ts twin to declare ambients diff --git a/packages/zoe/src/types-ambient.js b/packages/zoe/src/types-ambient.js index b986b272c06..1435fc29791 100644 --- a/packages/zoe/src/types-ambient.js +++ b/packages/zoe/src/types-ambient.js @@ -1,7 +1,5 @@ // @jessie-check -/// - /** * @template {string} H - the name of the handle * @typedef {import("@endo/marshal").RemotableObject} Handle Alias for RemotableObject @@ -11,7 +9,7 @@ * @typedef {string} Keyword * @typedef {Handle<'Invitation'>} InvitationHandle - an opaque handle for an invitation * @typedef {Record>} IssuerKeywordRecord - * @typedef {Record>>} IssuerPKeywordRecord + * @typedef {Record>>} IssuerPKeywordRecord * @typedef {Record>} BrandKeywordRecord */ @@ -25,7 +23,7 @@ * @typedef {StandardTerms & Record} AnyTerms * * @typedef {object} InstanceRecord - * @property {Installation} installation + * @property {import('./zoeService/utils.js').Installation} installation * @property {import("./zoeService/utils.js").Instance} instance * @property {AnyTerms} terms - contract parameters */ @@ -38,6 +36,8 @@ * @property {Issuer} issuer * @property {K} assetKind * @property {DisplayInfo} [displayInfo] - * - * @typedef {AmountKeywordRecord} Allocation + */ + +/** + * @typedef {Record} Allocation */ From c80fca2bf324592b6515a0dbd351d3375ca2202b Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 17 May 2024 11:43:14 -0700 Subject: [PATCH 05/26] chore(types): reduce zoe runtime imports --- packages/benchmark/src/benchmarkerator.js | 1 - packages/governance/src/index.js | 3 +-- packages/governance/src/types.js | 1 + packages/governance/test/unitTests/binaryballotCount.test.js | 4 +--- packages/governance/test/unitTests/committee.test.js | 3 --- .../governance/test/unitTests/paramChangePositions.test.js | 2 +- packages/governance/test/unitTests/paramGovernance.test.js | 1 - 7 files changed, 4 insertions(+), 11 deletions(-) diff --git a/packages/benchmark/src/benchmarkerator.js b/packages/benchmark/src/benchmarkerator.js index 499717b6046..f8c5af2052c 100644 --- a/packages/benchmark/src/benchmarkerator.js +++ b/packages/benchmark/src/benchmarkerator.js @@ -7,7 +7,6 @@ import '@endo/init'; // XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 import '@agoric/vats/exported.js'; import '@agoric/inter-protocol/exported.js'; -import '@agoric/zoe/exported.js'; import '@agoric/cosmic-swingset/src/launch-chain.js'; import { Fail } from '@agoric/assert'; diff --git a/packages/governance/src/index.js b/packages/governance/src/index.js index 68ee491623f..25873d7ec7e 100644 --- a/packages/governance/src/index.js +++ b/packages/governance/src/index.js @@ -1,7 +1,6 @@ /// /// -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/zoe/exported.js'; +/// export { ChoiceMethod, diff --git a/packages/governance/src/types.js b/packages/governance/src/types.js index c47b567dc0d..023b6af0907 100644 --- a/packages/governance/src/types.js +++ b/packages/governance/src/types.js @@ -699,6 +699,7 @@ export {}; * @param {ERef} zoe * @param {Instance} allegedGovernor * @param {Instance} allegedElectorate + * @returns {Promise} */ /** diff --git a/packages/governance/test/unitTests/binaryballotCount.test.js b/packages/governance/test/unitTests/binaryballotCount.test.js index b726078fe58..e54903f55b5 100644 --- a/packages/governance/test/unitTests/binaryballotCount.test.js +++ b/packages/governance/test/unitTests/binaryballotCount.test.js @@ -1,8 +1,6 @@ /* eslint @typescript-eslint/no-floating-promises: "warn" */ -import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js'; -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/zoe/exported.js'; +import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import { E } from '@endo/eventual-send'; import buildManualTimer from '@agoric/zoe/tools/manualTimer.js'; diff --git a/packages/governance/test/unitTests/committee.test.js b/packages/governance/test/unitTests/committee.test.js index 6228d9267f5..6dcada18ffc 100644 --- a/packages/governance/test/unitTests/committee.test.js +++ b/packages/governance/test/unitTests/committee.test.js @@ -1,8 +1,5 @@ import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js'; -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/zoe/exported.js'; - import { makeMockChainStorageRoot } from '@agoric/internal/src/storage-test-utils.js'; import { eventLoopIteration } from '@agoric/internal/src/testing-utils.js'; import buildManualTimer from '@agoric/zoe/tools/manualTimer.js'; diff --git a/packages/governance/test/unitTests/paramChangePositions.test.js b/packages/governance/test/unitTests/paramChangePositions.test.js index ebdba172c66..5c166b4e3d4 100644 --- a/packages/governance/test/unitTests/paramChangePositions.test.js +++ b/packages/governance/test/unitTests/paramChangePositions.test.js @@ -1,5 +1,5 @@ import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js'; -import '@agoric/zoe/exported.js'; + import { AmountMath, AssetKind, makeIssuerKit } from '@agoric/ertp'; import { makeRatio } from '@agoric/zoe/src/contractSupport/index.js'; diff --git a/packages/governance/test/unitTests/paramGovernance.test.js b/packages/governance/test/unitTests/paramGovernance.test.js index 0d277e86156..ed0fc3f1817 100644 --- a/packages/governance/test/unitTests/paramGovernance.test.js +++ b/packages/governance/test/unitTests/paramGovernance.test.js @@ -1,4 +1,3 @@ -import '@agoric/zoe/exported.js'; import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import { makeMockChainStorageRoot } from '@agoric/internal/src/storage-test-utils.js'; From fc01e938001d6f5167d5199036f84e02c2939078 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 17 May 2024 11:51:36 -0700 Subject: [PATCH 06/26] chore(types): reduce zoe runtime imports --- packages/inter-protocol/src/auction/auctionBook.js | 5 +---- packages/inter-protocol/src/auction/auctioneer.js | 2 +- packages/inter-protocol/src/econCommitteeCharter.js | 3 +-- packages/inter-protocol/src/psm/psm.js | 5 +---- packages/inter-protocol/src/vaultFactory/burn.js | 3 +-- packages/inter-protocol/src/vaultFactory/type-imports.js | 4 ++-- packages/inter-protocol/src/vaultFactory/vault.js | 3 --- packages/inter-protocol/src/vaultFactory/vaultDirector.js | 3 ++- packages/inter-protocol/src/vaultFactory/vaultFactory.js | 5 +---- packages/inter-protocol/src/vaultFactory/vaultKit.js | 2 +- packages/inter-protocol/src/vaultFactory/vaultManager.js | 2 +- packages/inter-protocol/test/auction/auctionContract.test.js | 2 -- .../inter-protocol/test/auction/proportionalDist.test.js | 2 -- packages/inter-protocol/test/auction/scheduleMath.test.js | 1 - packages/inter-protocol/test/interest-labeled.test.js | 1 - packages/inter-protocol/test/interest.test.js | 1 - packages/inter-protocol/test/psm/psm.test.js | 1 - packages/inter-protocol/test/vaultFactory/driver.js | 2 -- .../test/vaultFactory/prioritizedVaults.test.js | 1 - packages/inter-protocol/test/vaultFactory/proceeds.test.js | 1 - .../test/vaultFactory/replacePriceAuthority.test.js | 1 - packages/inter-protocol/test/vaultFactory/storage.test.js | 1 - .../inter-protocol/test/vaultFactory/vault-interest.test.js | 1 - packages/inter-protocol/test/vaultFactory/vault.test.js | 1 - .../inter-protocol/test/vaultFactory/vaultFactory.test.js | 1 - .../inter-protocol/test/vaultFactory/vaultFactoryUtils.js | 2 -- .../test/vaultFactory/vaultLiquidation.test.js | 1 - 27 files changed, 12 insertions(+), 45 deletions(-) diff --git a/packages/inter-protocol/src/auction/auctionBook.js b/packages/inter-protocol/src/auction/auctionBook.js index 348692166b5..15fbf84574d 100644 --- a/packages/inter-protocol/src/auction/auctionBook.js +++ b/packages/inter-protocol/src/auction/auctionBook.js @@ -1,9 +1,6 @@ /// /// - -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/zoe/exported.js'; -import '@agoric/zoe/src/contracts/exported.js'; +/// import { AmountMath, RatioShape } from '@agoric/ertp'; import { mustMatch } from '@agoric/store'; diff --git a/packages/inter-protocol/src/auction/auctioneer.js b/packages/inter-protocol/src/auction/auctioneer.js index fbed644898b..44b8c86c456 100644 --- a/packages/inter-protocol/src/auction/auctioneer.js +++ b/packages/inter-protocol/src/auction/auctioneer.js @@ -1,5 +1,5 @@ /// -import '@agoric/zoe/exported.js'; +/// import '@agoric/zoe/src/contracts/exported.js'; import { AmountMath, AmountShape, BrandShape } from '@agoric/ertp'; diff --git a/packages/inter-protocol/src/econCommitteeCharter.js b/packages/inter-protocol/src/econCommitteeCharter.js index 632ea5beb43..7c5913a91e9 100644 --- a/packages/inter-protocol/src/econCommitteeCharter.js +++ b/packages/inter-protocol/src/econCommitteeCharter.js @@ -1,11 +1,10 @@ // @jessie-check /// +/// import { M, mustMatch } from '@agoric/store'; import { TimestampShape } from '@agoric/time'; import { prepareExo, provideDurableMapStore } from '@agoric/vat-data'; -import '@agoric/zoe/exported.js'; -import '@agoric/zoe/src/contracts/exported.js'; import { InstallationShape, InstanceHandleShape, diff --git a/packages/inter-protocol/src/psm/psm.js b/packages/inter-protocol/src/psm/psm.js index 74ba3c7364c..eebcd9da605 100644 --- a/packages/inter-protocol/src/psm/psm.js +++ b/packages/inter-protocol/src/psm/psm.js @@ -1,9 +1,6 @@ // @jessie-check /// - -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/zoe/exported.js'; -import '@agoric/zoe/src/contracts/exported.js'; +/// import { AmountMath, AmountShape, BrandShape, RatioShape } from '@agoric/ertp'; import { diff --git a/packages/inter-protocol/src/vaultFactory/burn.js b/packages/inter-protocol/src/vaultFactory/burn.js index c8e5aee9f48..80141b73088 100644 --- a/packages/inter-protocol/src/vaultFactory/burn.js +++ b/packages/inter-protocol/src/vaultFactory/burn.js @@ -1,7 +1,6 @@ // @jessie-check -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/zoe/exported.js'; +/// import { E } from '@endo/eventual-send'; diff --git a/packages/inter-protocol/src/vaultFactory/type-imports.js b/packages/inter-protocol/src/vaultFactory/type-imports.js index e2055cd7249..8224d5a1df9 100644 --- a/packages/inter-protocol/src/vaultFactory/type-imports.js +++ b/packages/inter-protocol/src/vaultFactory/type-imports.js @@ -1,4 +1,4 @@ // @jessie-check -import '@agoric/zoe/exported.js'; -/// +/// +/// diff --git a/packages/inter-protocol/src/vaultFactory/vault.js b/packages/inter-protocol/src/vaultFactory/vault.js index 4a36efccfc3..2216ad24f16 100644 --- a/packages/inter-protocol/src/vaultFactory/vault.js +++ b/packages/inter-protocol/src/vaultFactory/vault.js @@ -13,9 +13,6 @@ import { calculateCurrentDebt, reverseInterest } from '../interest-math.js'; import { calculateDebtCosts } from './math.js'; import { prepareVaultKit } from './vaultKit.js'; -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/zoe/exported.js'; - const { quote: q, Fail } = assert; const trace = makeTracer('Vault', true); diff --git a/packages/inter-protocol/src/vaultFactory/vaultDirector.js b/packages/inter-protocol/src/vaultFactory/vaultDirector.js index 4c85139b209..e2aed5bfe19 100644 --- a/packages/inter-protocol/src/vaultFactory/vaultDirector.js +++ b/packages/inter-protocol/src/vaultFactory/vaultDirector.js @@ -1,5 +1,5 @@ /// -import '@agoric/zoe/exported.js'; +/// import '@agoric/zoe/src/contracts/exported.js'; import { AmountMath, AmountShape, BrandShape, IssuerShape } from '@agoric/ertp'; @@ -89,6 +89,7 @@ const shortfallInvitationKey = 'shortfallInvitation'; * @param {ERef} marshaller * @param {import('@agoric/zoe/src/contractSupport/recorder.js').MakeRecorderKit} makeRecorderKit * @param {import('@agoric/zoe/src/contractSupport/recorder.js').MakeERecorderKit} makeERecorderKit + * @param managerParams */ const prepareVaultDirector = ( baggage, diff --git a/packages/inter-protocol/src/vaultFactory/vaultFactory.js b/packages/inter-protocol/src/vaultFactory/vaultFactory.js index f3942a3576f..595fdc84e20 100644 --- a/packages/inter-protocol/src/vaultFactory/vaultFactory.js +++ b/packages/inter-protocol/src/vaultFactory/vaultFactory.js @@ -1,9 +1,6 @@ // @jessie-check /// - -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/zoe/exported.js'; -import '@agoric/zoe/src/contracts/exported.js'; +/// // The vaultFactory owns a number of VaultManagers and a mint for Minted. // diff --git a/packages/inter-protocol/src/vaultFactory/vaultKit.js b/packages/inter-protocol/src/vaultFactory/vaultKit.js index 4b6721d3bc7..aef32038c6c 100644 --- a/packages/inter-protocol/src/vaultFactory/vaultKit.js +++ b/packages/inter-protocol/src/vaultFactory/vaultKit.js @@ -1,6 +1,6 @@ // @jessie-check -import '@agoric/zoe/exported.js'; +/// import { makeTracer } from '@agoric/internal'; import { prepareVaultHolder } from './vaultHolder.js'; diff --git a/packages/inter-protocol/src/vaultFactory/vaultManager.js b/packages/inter-protocol/src/vaultFactory/vaultManager.js index c3f74b98bb0..95f5b86376e 100644 --- a/packages/inter-protocol/src/vaultFactory/vaultManager.js +++ b/packages/inter-protocol/src/vaultFactory/vaultManager.js @@ -16,7 +16,7 @@ * liquidated. If the auction is unsuccessful, the liquidation may be * reverted. */ -import '@agoric/zoe/exported.js'; +/// import { AmountMath, diff --git a/packages/inter-protocol/test/auction/auctionContract.test.js b/packages/inter-protocol/test/auction/auctionContract.test.js index cf3720e6bca..d3715590bd2 100644 --- a/packages/inter-protocol/test/auction/auctionContract.test.js +++ b/packages/inter-protocol/test/auction/auctionContract.test.js @@ -1,7 +1,5 @@ import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; -import '@agoric/zoe/exported.js'; - import { AmountMath, makeIssuerKit } from '@agoric/ertp'; import { documentStorageSchema } from '@agoric/governance/tools/storageDoc.js'; import { deeplyFulfilledObject, makeTracer } from '@agoric/internal'; diff --git a/packages/inter-protocol/test/auction/proportionalDist.test.js b/packages/inter-protocol/test/auction/proportionalDist.test.js index 8583d205f57..e9969f5958c 100644 --- a/packages/inter-protocol/test/auction/proportionalDist.test.js +++ b/packages/inter-protocol/test/auction/proportionalDist.test.js @@ -1,7 +1,5 @@ import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; -import '@agoric/zoe/exported.js'; - import { makeIssuerKit } from '@agoric/ertp'; import { makeTracer } from '@agoric/internal'; diff --git a/packages/inter-protocol/test/auction/scheduleMath.test.js b/packages/inter-protocol/test/auction/scheduleMath.test.js index 18c6e673607..3358591d004 100644 --- a/packages/inter-protocol/test/auction/scheduleMath.test.js +++ b/packages/inter-protocol/test/auction/scheduleMath.test.js @@ -2,7 +2,6 @@ import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import { TimeMath } from '@agoric/time'; import { Far } from '@endo/marshal'; -import '@agoric/zoe/exported.js'; import { NonNullish } from '@agoric/assert'; import { diff --git a/packages/inter-protocol/test/interest-labeled.test.js b/packages/inter-protocol/test/interest-labeled.test.js index ac63dbac354..c1ca9c7cac9 100644 --- a/packages/inter-protocol/test/interest-labeled.test.js +++ b/packages/inter-protocol/test/interest-labeled.test.js @@ -1,5 +1,4 @@ import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js'; -import '@agoric/zoe/exported.js'; import { makeIssuerKit } from '@agoric/ertp'; import { makeRatio } from '@agoric/zoe/src/contractSupport/ratio.js'; diff --git a/packages/inter-protocol/test/interest.test.js b/packages/inter-protocol/test/interest.test.js index 91370248038..0fbc01ad525 100644 --- a/packages/inter-protocol/test/interest.test.js +++ b/packages/inter-protocol/test/interest.test.js @@ -1,5 +1,4 @@ import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js'; -import '@agoric/zoe/exported.js'; import { AmountMath, AssetKind, makeIssuerKit } from '@agoric/ertp'; import { diff --git a/packages/inter-protocol/test/psm/psm.test.js b/packages/inter-protocol/test/psm/psm.test.js index 57a99dea2a6..47159fa359d 100644 --- a/packages/inter-protocol/test/psm/psm.test.js +++ b/packages/inter-protocol/test/psm/psm.test.js @@ -1,6 +1,5 @@ import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; -import '@agoric/zoe/exported.js'; import '../../src/vaultFactory/types-ambient.js'; import { AmountMath, makeIssuerKit } from '@agoric/ertp'; diff --git a/packages/inter-protocol/test/vaultFactory/driver.js b/packages/inter-protocol/test/vaultFactory/driver.js index bfb55c502c0..c119cf20387 100644 --- a/packages/inter-protocol/test/vaultFactory/driver.js +++ b/packages/inter-protocol/test/vaultFactory/driver.js @@ -1,5 +1,3 @@ -import '@agoric/zoe/exported.js'; - import { AmountMath, AssetKind, makeIssuerKit } from '@agoric/ertp'; import { allValues, makeTracer, objectMap } from '@agoric/internal'; import { makeNotifierFromSubscriber } from '@agoric/notifier'; diff --git a/packages/inter-protocol/test/vaultFactory/prioritizedVaults.test.js b/packages/inter-protocol/test/vaultFactory/prioritizedVaults.test.js index 081ab88d2da..18dcfc0b53d 100644 --- a/packages/inter-protocol/test/vaultFactory/prioritizedVaults.test.js +++ b/packages/inter-protocol/test/vaultFactory/prioritizedVaults.test.js @@ -1,4 +1,3 @@ -import '@agoric/zoe/exported.js'; import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import { AmountMath, makeIssuerKit } from '@agoric/ertp'; diff --git a/packages/inter-protocol/test/vaultFactory/proceeds.test.js b/packages/inter-protocol/test/vaultFactory/proceeds.test.js index 67034e29884..bab8822109e 100644 --- a/packages/inter-protocol/test/vaultFactory/proceeds.test.js +++ b/packages/inter-protocol/test/vaultFactory/proceeds.test.js @@ -1,4 +1,3 @@ -import '@agoric/zoe/exported.js'; import { test as unknownTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import { makeIssuerKit } from '@agoric/ertp'; diff --git a/packages/inter-protocol/test/vaultFactory/replacePriceAuthority.test.js b/packages/inter-protocol/test/vaultFactory/replacePriceAuthority.test.js index b54697e6d40..11e762d8652 100644 --- a/packages/inter-protocol/test/vaultFactory/replacePriceAuthority.test.js +++ b/packages/inter-protocol/test/vaultFactory/replacePriceAuthority.test.js @@ -1,4 +1,3 @@ -import '@agoric/zoe/exported.js'; import { test as unknownTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import { AmountMath, makeIssuerKit } from '@agoric/ertp'; diff --git a/packages/inter-protocol/test/vaultFactory/storage.test.js b/packages/inter-protocol/test/vaultFactory/storage.test.js index a5f579afeaf..ff823594bbf 100644 --- a/packages/inter-protocol/test/vaultFactory/storage.test.js +++ b/packages/inter-protocol/test/vaultFactory/storage.test.js @@ -1,4 +1,3 @@ -import '@agoric/zoe/exported.js'; import { test as unknownTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import { makeTracer } from '@agoric/internal'; diff --git a/packages/inter-protocol/test/vaultFactory/vault-interest.test.js b/packages/inter-protocol/test/vaultFactory/vault-interest.test.js index ce2c938f430..01ac44e96dd 100644 --- a/packages/inter-protocol/test/vaultFactory/vault-interest.test.js +++ b/packages/inter-protocol/test/vaultFactory/vault-interest.test.js @@ -1,5 +1,4 @@ import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js'; -import '@agoric/zoe/exported.js'; import { E } from '@endo/eventual-send'; import { setUpZoeForTest } from '@agoric/zoe/tools/setup-zoe.js'; diff --git a/packages/inter-protocol/test/vaultFactory/vault.test.js b/packages/inter-protocol/test/vaultFactory/vault.test.js index 9cdeb7fae50..77e03690c57 100644 --- a/packages/inter-protocol/test/vaultFactory/vault.test.js +++ b/packages/inter-protocol/test/vaultFactory/vault.test.js @@ -1,4 +1,3 @@ -import '@agoric/zoe/exported.js'; import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import { setUpZoeForTest } from '@agoric/zoe/tools/setup-zoe.js'; diff --git a/packages/inter-protocol/test/vaultFactory/vaultFactory.test.js b/packages/inter-protocol/test/vaultFactory/vaultFactory.test.js index 7c6362cb14a..da03c8defb5 100644 --- a/packages/inter-protocol/test/vaultFactory/vaultFactory.test.js +++ b/packages/inter-protocol/test/vaultFactory/vaultFactory.test.js @@ -1,4 +1,3 @@ -import '@agoric/zoe/exported.js'; import { test as unknownTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import { AmountMath, AssetKind, makeIssuerKit } from '@agoric/ertp'; diff --git a/packages/inter-protocol/test/vaultFactory/vaultFactoryUtils.js b/packages/inter-protocol/test/vaultFactory/vaultFactoryUtils.js index e8da6989960..b73dadbcda9 100644 --- a/packages/inter-protocol/test/vaultFactory/vaultFactoryUtils.js +++ b/packages/inter-protocol/test/vaultFactory/vaultFactoryUtils.js @@ -1,5 +1,3 @@ -import '@agoric/zoe/exported.js'; - import { AmountMath, AssetKind, makeIssuerKit } from '@agoric/ertp'; import { makeNotifierFromSubscriber } from '@agoric/notifier'; import { makeRatio } from '@agoric/zoe/src/contractSupport/index.js'; diff --git a/packages/inter-protocol/test/vaultFactory/vaultLiquidation.test.js b/packages/inter-protocol/test/vaultFactory/vaultLiquidation.test.js index a762ad9f86c..3b06bc64c5b 100644 --- a/packages/inter-protocol/test/vaultFactory/vaultLiquidation.test.js +++ b/packages/inter-protocol/test/vaultFactory/vaultLiquidation.test.js @@ -1,4 +1,3 @@ -import '@agoric/zoe/exported.js'; import { test as unknownTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import { AmountMath, makeIssuerKit } from '@agoric/ertp'; From 0c30c370bc94ddc44323df230c77e279925c0bee Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 17 May 2024 11:55:07 -0700 Subject: [PATCH 07/26] chore(types): end zoe/exported.js runtime import --- packages/boot/test/bootstrapTests/zcfProbe.js | 3 --- packages/orchestration/index.js | 4 +--- packages/pegasus/src/contract.js | 2 -- packages/pegasus/src/pegasus.js | 1 - packages/smart-wallet/src/invitations.js | 3 --- packages/smart-wallet/src/smartWallet.js | 3 --- packages/swingset-runner/demo/exchangeBenchmark/exchanger.js | 2 -- packages/swingset-runner/demo/exchangeBenchmark/helpers.js | 2 -- packages/swingset-runner/demo/swapBenchmark/exchanger.js | 2 -- packages/swingset-runner/demo/swapBenchmark/helpers.js | 2 -- packages/vats/test/bootstrapPayment.test.js | 4 +--- packages/wallet/api/src/lib-wallet.js | 1 - packages/wallet/api/test/continuingInvitationExample.js | 2 -- 13 files changed, 2 insertions(+), 29 deletions(-) diff --git a/packages/boot/test/bootstrapTests/zcfProbe.js b/packages/boot/test/bootstrapTests/zcfProbe.js index 0addf85a667..5089ebdd659 100644 --- a/packages/boot/test/bootstrapTests/zcfProbe.js +++ b/packages/boot/test/bootstrapTests/zcfProbe.js @@ -1,6 +1,3 @@ -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/zoe/exported.js'; - import { makeTracer } from '@agoric/internal'; import { E } from '@endo/far'; import { diff --git a/packages/orchestration/index.js b/packages/orchestration/index.js index 89ffac18b7e..c5ba4292ecb 100644 --- a/packages/orchestration/index.js +++ b/packages/orchestration/index.js @@ -1,8 +1,6 @@ /// /// - -// 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'; diff --git a/packages/pegasus/src/contract.js b/packages/pegasus/src/contract.js index 06868d49710..3a686c5e4e7 100644 --- a/packages/pegasus/src/contract.js +++ b/packages/pegasus/src/contract.js @@ -3,8 +3,6 @@ import { prepareVowTools } from '@agoric/vow/vat.js'; import { makeDurableZone } from '@agoric/zone/durable.js'; import { makePegasus } from './pegasus.js'; -import '@agoric/zoe/exported.js'; - import '../exported.js'; /** diff --git a/packages/pegasus/src/pegasus.js b/packages/pegasus/src/pegasus.js index 649eb4d40e7..f46916cbd04 100644 --- a/packages/pegasus/src/pegasus.js +++ b/packages/pegasus/src/pegasus.js @@ -10,7 +10,6 @@ import { import { makeSubscriptionKit } from '@agoric/notifier'; import '@agoric/network/exported.js'; -import '@agoric/zoe/exported.js'; import '../exported.js'; import { IBCSourceTraceDenomTransformer } from './ibc-trace.js'; diff --git a/packages/smart-wallet/src/invitations.js b/packages/smart-wallet/src/invitations.js index 729686f6718..33483b8f7ac 100644 --- a/packages/smart-wallet/src/invitations.js +++ b/packages/smart-wallet/src/invitations.js @@ -4,9 +4,6 @@ import { InvitationHandleShape } from '@agoric/zoe/src/typeGuards.js'; import { E } from '@endo/far'; import { shape } from './typeGuards.js'; -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/zoe/exported.js'; - const { Fail } = assert; // A safety limit diff --git a/packages/smart-wallet/src/smartWallet.js b/packages/smart-wallet/src/smartWallet.js index 34aa63d6593..f86c66f1ee9 100644 --- a/packages/smart-wallet/src/smartWallet.js +++ b/packages/smart-wallet/src/smartWallet.js @@ -42,9 +42,6 @@ import { shape } from './typeGuards.js'; import { objectMapStoragePath } from './utils.js'; import { prepareOfferWatcher, watchOfferOutcomes } from './offerWatcher.js'; -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/zoe/exported.js'; - const { Fail, quote: q } = assert; const trace = makeTracer('SmrtWlt'); diff --git a/packages/swingset-runner/demo/exchangeBenchmark/exchanger.js b/packages/swingset-runner/demo/exchangeBenchmark/exchanger.js index c36abe77a38..6343e247eae 100755 --- a/packages/swingset-runner/demo/exchangeBenchmark/exchanger.js +++ b/packages/swingset-runner/demo/exchangeBenchmark/exchanger.js @@ -7,8 +7,6 @@ import { claim } from '@agoric/ertp/src/legacy-payment-helpers.js'; import { showPurseBalance, setupPurses } from './helpers.js'; import { makePrintLog } from './printLog.js'; -import '@agoric/zoe/exported.js'; - const log = makePrintLog(); /** diff --git a/packages/swingset-runner/demo/exchangeBenchmark/helpers.js b/packages/swingset-runner/demo/exchangeBenchmark/helpers.js index bf663010ce4..f17ad876042 100644 --- a/packages/swingset-runner/demo/exchangeBenchmark/helpers.js +++ b/packages/swingset-runner/demo/exchangeBenchmark/helpers.js @@ -1,8 +1,6 @@ import { E } from '@endo/eventual-send'; import { AmountMath } from '@agoric/ertp'; -import '@agoric/zoe/exported.js'; - export async function showPurseBalance(purseP, name, log) { try { const amount = await E(purseP).getCurrentAmount(); diff --git a/packages/swingset-runner/demo/swapBenchmark/exchanger.js b/packages/swingset-runner/demo/swapBenchmark/exchanger.js index 69bc385e87f..422dc108bce 100755 --- a/packages/swingset-runner/demo/swapBenchmark/exchanger.js +++ b/packages/swingset-runner/demo/swapBenchmark/exchanger.js @@ -7,8 +7,6 @@ import { claim } from '@agoric/ertp/src/legacy-payment-helpers.js'; import { showPurseBalance, setupPurses } from './helpers.js'; import { makePrintLog } from './printLog.js'; -import '@agoric/zoe/exported.js'; - const log = makePrintLog(); /** diff --git a/packages/swingset-runner/demo/swapBenchmark/helpers.js b/packages/swingset-runner/demo/swapBenchmark/helpers.js index 5cb0d1f48a4..9883cb1557e 100644 --- a/packages/swingset-runner/demo/swapBenchmark/helpers.js +++ b/packages/swingset-runner/demo/swapBenchmark/helpers.js @@ -1,8 +1,6 @@ import { E } from '@endo/eventual-send'; import { AmountMath } from '@agoric/ertp'; -import '@agoric/zoe/exported.js'; - export async function showPurseBalance(purseP, name, log) { try { const amount = await E(purseP).getCurrentAmount(); diff --git a/packages/vats/test/bootstrapPayment.test.js b/packages/vats/test/bootstrapPayment.test.js index b59f636df00..d0212fc136b 100644 --- a/packages/vats/test/bootstrapPayment.test.js +++ b/packages/vats/test/bootstrapPayment.test.js @@ -1,9 +1,7 @@ import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js'; + import { E } from '@endo/far'; import { deeplyFulfilled } from '@endo/marshal'; - -import '@agoric/zoe/exported.js'; - import { setUpZoeForTest } from '@agoric/zoe/tools/setup-zoe.js'; import { AmountMath } from '@agoric/ertp'; import { claim } from '@agoric/ertp/src/legacy-payment-helpers.js'; diff --git a/packages/wallet/api/src/lib-wallet.js b/packages/wallet/api/src/lib-wallet.js index 50793f3fc3e..231992c399f 100644 --- a/packages/wallet/api/src/lib-wallet.js +++ b/packages/wallet/api/src/lib-wallet.js @@ -44,7 +44,6 @@ import { bigintStringify } from './bigintStringify.js'; import { makePaymentActions } from './actions.js'; import '@agoric/store/exported.js'; -import '@agoric/zoe/exported.js'; import './internal-types.js'; /// diff --git a/packages/wallet/api/test/continuingInvitationExample.js b/packages/wallet/api/test/continuingInvitationExample.js index 8f3094667f9..83c348bfc5e 100644 --- a/packages/wallet/api/test/continuingInvitationExample.js +++ b/packages/wallet/api/test/continuingInvitationExample.js @@ -3,8 +3,6 @@ import { makeNotifierFromSubscriber, makePublishKit } from '@agoric/notifier'; import { Far } from '@endo/marshal'; -import '@agoric/zoe/exported.js'; - export const start = zcf => { const { subscriber, publisher } = makePublishKit(); const notifier = makeNotifierFromSubscriber(subscriber); From 1289650b2aa92d04b8c06b9109bb242bf5c67ade Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 17 May 2024 11:58:46 -0700 Subject: [PATCH 08/26] lint(types): drop maxNodeModuleJsDepth to 1 --- packages/SwingSet/tsconfig.json | 2 +- packages/agoric-cli/tsconfig.json | 2 +- packages/base-zone/tsconfig.json | 2 +- packages/benchmark/tsconfig.json | 2 +- packages/boot/tsconfig.json | 2 +- packages/builders/tsconfig.json | 2 +- packages/casting/tsconfig.json | 2 +- packages/deploy-script-support/tsconfig.json | 2 +- packages/governance/tsconfig.json | 2 +- packages/inter-protocol/tsconfig.json | 2 +- packages/internal/tsconfig.json | 2 +- packages/kmarshal/tsconfig.json | 2 +- packages/notifier/tsconfig.json | 2 +- packages/pegasus/tsconfig.json | 2 +- packages/smart-wallet/tsconfig.json | 2 +- packages/swingset-xsnap-supervisor/tsconfig.json | 2 +- packages/telemetry/tsconfig.json | 2 +- packages/wallet/api/tsconfig.json | 2 +- packages/xsnap-lockdown/tsconfig.json | 2 +- packages/zoe/tsconfig.json | 2 +- packages/zone/tsconfig.json | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/packages/SwingSet/tsconfig.json b/packages/SwingSet/tsconfig.json index 3c5a272f2aa..28817d5ce42 100644 --- a/packages/SwingSet/tsconfig.json +++ b/packages/SwingSet/tsconfig.json @@ -2,7 +2,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "maxNodeModuleJsDepth": 2, + "maxNodeModuleJsDepth": 1, }, "include": [ "exported.js", diff --git a/packages/agoric-cli/tsconfig.json b/packages/agoric-cli/tsconfig.json index a868e475a73..d0b95159797 100644 --- a/packages/agoric-cli/tsconfig.json +++ b/packages/agoric-cli/tsconfig.json @@ -3,7 +3,7 @@ "extends": "../../tsconfig.json", "compilerOptions": { "checkJs": false, - "maxNodeModuleJsDepth": 2, + "maxNodeModuleJsDepth": 1, }, "include": [ "*.js", diff --git a/packages/base-zone/tsconfig.json b/packages/base-zone/tsconfig.json index 028175d9012..70a866b38be 100644 --- a/packages/base-zone/tsconfig.json +++ b/packages/base-zone/tsconfig.json @@ -2,7 +2,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "maxNodeModuleJsDepth": 2, + "maxNodeModuleJsDepth": 1, }, "include": [ "*.js", diff --git a/packages/benchmark/tsconfig.json b/packages/benchmark/tsconfig.json index acfb9ce0fa4..490b5fb6ed8 100644 --- a/packages/benchmark/tsconfig.json +++ b/packages/benchmark/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "allowImportingTsExtensions": true, "checkJs": true, - "maxNodeModuleJsDepth": 2, + "maxNodeModuleJsDepth": 1, }, "include": [ "*.js", diff --git a/packages/boot/tsconfig.json b/packages/boot/tsconfig.json index 8f583b8df2b..e197aade9e3 100644 --- a/packages/boot/tsconfig.json +++ b/packages/boot/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "allowImportingTsExtensions": true, "checkJs": true, - "maxNodeModuleJsDepth": 2, + "maxNodeModuleJsDepth": 1, }, "include": [ "*.js", diff --git a/packages/builders/tsconfig.json b/packages/builders/tsconfig.json index d26320f9177..5364b88312e 100644 --- a/packages/builders/tsconfig.json +++ b/packages/builders/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.json", "compilerOptions": { "checkJs": true, - "maxNodeModuleJsDepth": 2, + "maxNodeModuleJsDepth": 1, }, "include": [ "*.js", diff --git a/packages/casting/tsconfig.json b/packages/casting/tsconfig.json index 14adcecb9a2..ca49f81fc66 100644 --- a/packages/casting/tsconfig.json +++ b/packages/casting/tsconfig.json @@ -2,7 +2,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "maxNodeModuleJsDepth": 2, + "maxNodeModuleJsDepth": 1, }, "include": [ "*.js", diff --git a/packages/deploy-script-support/tsconfig.json b/packages/deploy-script-support/tsconfig.json index 0202393849f..9059b73f7c8 100644 --- a/packages/deploy-script-support/tsconfig.json +++ b/packages/deploy-script-support/tsconfig.json @@ -2,7 +2,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "maxNodeModuleJsDepth": 2, + "maxNodeModuleJsDepth": 1, }, "include": [ "*.js", diff --git a/packages/governance/tsconfig.json b/packages/governance/tsconfig.json index 4d55b6427bf..6e6441a9322 100644 --- a/packages/governance/tsconfig.json +++ b/packages/governance/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "maxNodeModuleJsDepth": 2, + "maxNodeModuleJsDepth": 1, }, "include": [ // omit exported.js because 1) it need not be included in the typecheck of diff --git a/packages/inter-protocol/tsconfig.json b/packages/inter-protocol/tsconfig.json index 2c28a83a3c5..65b0376a714 100644 --- a/packages/inter-protocol/tsconfig.json +++ b/packages/inter-protocol/tsconfig.json @@ -2,7 +2,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "maxNodeModuleJsDepth": 2, + "maxNodeModuleJsDepth": 1, }, "include": [ "globals.d.ts", diff --git a/packages/internal/tsconfig.json b/packages/internal/tsconfig.json index 69865103cc3..c32a7d118d2 100644 --- a/packages/internal/tsconfig.json +++ b/packages/internal/tsconfig.json @@ -2,7 +2,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "maxNodeModuleJsDepth": 2, // as in jsconfig's default + "maxNodeModuleJsDepth": 1, // as in jsconfig's default // Disable b/c @endo/init can't pass noImplicitAny "checkJs": false, "noImplicitAny": true, diff --git a/packages/kmarshal/tsconfig.json b/packages/kmarshal/tsconfig.json index c44d25daf74..b93fc349a54 100644 --- a/packages/kmarshal/tsconfig.json +++ b/packages/kmarshal/tsconfig.json @@ -2,7 +2,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "maxNodeModuleJsDepth": 2, + "maxNodeModuleJsDepth": 1, }, "include": [ "src/**/*.js", diff --git a/packages/notifier/tsconfig.json b/packages/notifier/tsconfig.json index 1e246e687b1..d21c8e734e3 100644 --- a/packages/notifier/tsconfig.json +++ b/packages/notifier/tsconfig.json @@ -2,7 +2,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "maxNodeModuleJsDepth": 2, + "maxNodeModuleJsDepth": 1, }, "include": [ "src/**/*.js", diff --git a/packages/pegasus/tsconfig.json b/packages/pegasus/tsconfig.json index b3bd6700aba..8691cdbdc79 100644 --- a/packages/pegasus/tsconfig.json +++ b/packages/pegasus/tsconfig.json @@ -3,7 +3,7 @@ "extends": "../../tsconfig.json", "compilerOptions": { "checkJs": false, - "maxNodeModuleJsDepth": 2, + "maxNodeModuleJsDepth": 1, }, "include": [ "*.js", diff --git a/packages/smart-wallet/tsconfig.json b/packages/smart-wallet/tsconfig.json index f4b84d4723f..02b1d415a32 100644 --- a/packages/smart-wallet/tsconfig.json +++ b/packages/smart-wallet/tsconfig.json @@ -2,7 +2,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "maxNodeModuleJsDepth": 2, + "maxNodeModuleJsDepth": 1, }, "include": [ "*.js", diff --git a/packages/swingset-xsnap-supervisor/tsconfig.json b/packages/swingset-xsnap-supervisor/tsconfig.json index aa2d4597963..fcc0c01a115 100644 --- a/packages/swingset-xsnap-supervisor/tsconfig.json +++ b/packages/swingset-xsnap-supervisor/tsconfig.json @@ -2,7 +2,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "maxNodeModuleJsDepth": 2, + "maxNodeModuleJsDepth": 1, }, "include": [ "*.js", diff --git a/packages/telemetry/tsconfig.json b/packages/telemetry/tsconfig.json index 91e501c39d1..080335dd6c7 100644 --- a/packages/telemetry/tsconfig.json +++ b/packages/telemetry/tsconfig.json @@ -2,7 +2,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "maxNodeModuleJsDepth": 2, + "maxNodeModuleJsDepth": 1, }, "include": [ "*.js", diff --git a/packages/wallet/api/tsconfig.json b/packages/wallet/api/tsconfig.json index 1cf2064c20d..54cf60eac5b 100644 --- a/packages/wallet/api/tsconfig.json +++ b/packages/wallet/api/tsconfig.json @@ -2,7 +2,7 @@ { "extends": "../../../tsconfig.json", "compilerOptions": { - "maxNodeModuleJsDepth": 2, + "maxNodeModuleJsDepth": 1, }, "include": [ "*.js", diff --git a/packages/xsnap-lockdown/tsconfig.json b/packages/xsnap-lockdown/tsconfig.json index aa2d4597963..fcc0c01a115 100644 --- a/packages/xsnap-lockdown/tsconfig.json +++ b/packages/xsnap-lockdown/tsconfig.json @@ -2,7 +2,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "maxNodeModuleJsDepth": 2, + "maxNodeModuleJsDepth": 1, }, "include": [ "*.js", diff --git a/packages/zoe/tsconfig.json b/packages/zoe/tsconfig.json index 29af8ccc2dc..6230997c739 100644 --- a/packages/zoe/tsconfig.json +++ b/packages/zoe/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "maxNodeModuleJsDepth": 2, + "maxNodeModuleJsDepth": 1, }, "include": [ "contractFacet.js", diff --git a/packages/zone/tsconfig.json b/packages/zone/tsconfig.json index 028175d9012..70a866b38be 100644 --- a/packages/zone/tsconfig.json +++ b/packages/zone/tsconfig.json @@ -2,7 +2,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "maxNodeModuleJsDepth": 2, + "maxNodeModuleJsDepth": 1, }, "include": [ "*.js", From d3273a5c3b0d0638763a0feb9ff403a9cde4fe9c Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 17 May 2024 12:08:20 -0700 Subject: [PATCH 09/26] lint(types): drop maxNodeModuleJsDepth (to zero) --- packages/ERTP/tsconfig.json | 4 +--- packages/SwingSet/tsconfig.json | 4 +--- packages/agoric-cli/tsconfig.json | 1 - packages/base-zone/tsconfig.json | 4 +--- packages/benchmark/tsconfig.json | 1 - packages/boot/tsconfig.json | 1 - packages/builders/tsconfig.json | 1 - packages/cache/tsconfig.json | 4 +--- packages/casting/tsconfig.json | 4 +--- packages/cosmic-swingset/tsconfig.json | 1 - packages/deploy-script-support/tsconfig.json | 4 +--- packages/governance/tsconfig.json | 4 +--- packages/inter-protocol/tsconfig.json | 4 +--- packages/internal/tsconfig.json | 1 - packages/kmarshal/tsconfig.json | 4 +--- packages/network/tsconfig.json | 1 - packages/notifier/tsconfig.json | 4 +--- packages/pegasus/tsconfig.json | 1 - packages/smart-wallet/tsconfig.json | 4 +--- packages/swing-store/tsconfig.json | 4 +--- packages/swingset-liveslots/tsconfig.json | 4 +--- packages/swingset-xsnap-supervisor/tsconfig.json | 4 +--- packages/telemetry/tsconfig.json | 4 +--- packages/time/tsconfig.json | 4 +--- packages/vat-data/tsconfig.json | 1 - packages/vats/tsconfig.json | 4 +--- packages/vow/tsconfig.json | 1 - packages/wallet/api/tsconfig.json | 4 +--- packages/xsnap-lockdown/tsconfig.json | 4 +--- packages/xsnap/tsconfig.json | 4 +--- packages/zoe/tsconfig.json | 4 +--- packages/zone/tsconfig.json | 4 +--- 32 files changed, 22 insertions(+), 76 deletions(-) diff --git a/packages/ERTP/tsconfig.json b/packages/ERTP/tsconfig.json index 6ae6211ef04..62c316e25b6 100644 --- a/packages/ERTP/tsconfig.json +++ b/packages/ERTP/tsconfig.json @@ -1,9 +1,7 @@ // This file can contain .js-specific Typescript compiler config. { "extends": "../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ // omit exported.js because 1) it need not be included in the typecheck of // this package because it's only consumed by other packages and 2) diff --git a/packages/SwingSet/tsconfig.json b/packages/SwingSet/tsconfig.json index 28817d5ce42..71696286351 100644 --- a/packages/SwingSet/tsconfig.json +++ b/packages/SwingSet/tsconfig.json @@ -1,9 +1,7 @@ // This file can contain .js-specific Typescript compiler config. { "extends": "../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ "exported.js", "demo/**/*.js", diff --git a/packages/agoric-cli/tsconfig.json b/packages/agoric-cli/tsconfig.json index d0b95159797..392e85ad58f 100644 --- a/packages/agoric-cli/tsconfig.json +++ b/packages/agoric-cli/tsconfig.json @@ -3,7 +3,6 @@ "extends": "../../tsconfig.json", "compilerOptions": { "checkJs": false, - "maxNodeModuleJsDepth": 1, }, "include": [ "*.js", diff --git a/packages/base-zone/tsconfig.json b/packages/base-zone/tsconfig.json index 70a866b38be..19ef3d93512 100644 --- a/packages/base-zone/tsconfig.json +++ b/packages/base-zone/tsconfig.json @@ -1,9 +1,7 @@ // This file can contain .js-specific Typescript compiler config. { "extends": "../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ "*.js", "scripts", diff --git a/packages/benchmark/tsconfig.json b/packages/benchmark/tsconfig.json index 490b5fb6ed8..537a877842a 100644 --- a/packages/benchmark/tsconfig.json +++ b/packages/benchmark/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "allowImportingTsExtensions": true, "checkJs": true, - "maxNodeModuleJsDepth": 1, }, "include": [ "*.js", diff --git a/packages/boot/tsconfig.json b/packages/boot/tsconfig.json index e197aade9e3..1287d783ae1 100644 --- a/packages/boot/tsconfig.json +++ b/packages/boot/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "allowImportingTsExtensions": true, "checkJs": true, - "maxNodeModuleJsDepth": 1, }, "include": [ "*.js", diff --git a/packages/builders/tsconfig.json b/packages/builders/tsconfig.json index 5364b88312e..24d7d74ca57 100644 --- a/packages/builders/tsconfig.json +++ b/packages/builders/tsconfig.json @@ -2,7 +2,6 @@ "extends": "../../tsconfig.json", "compilerOptions": { "checkJs": true, - "maxNodeModuleJsDepth": 1, }, "include": [ "*.js", diff --git a/packages/cache/tsconfig.json b/packages/cache/tsconfig.json index ca49f81fc66..b24e1c5d9f3 100644 --- a/packages/cache/tsconfig.json +++ b/packages/cache/tsconfig.json @@ -1,9 +1,7 @@ // This file can contain .js-specific Typescript compiler config. { "extends": "../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ "*.js", "public/**/*.js", diff --git a/packages/casting/tsconfig.json b/packages/casting/tsconfig.json index ca49f81fc66..b24e1c5d9f3 100644 --- a/packages/casting/tsconfig.json +++ b/packages/casting/tsconfig.json @@ -1,9 +1,7 @@ // This file can contain .js-specific Typescript compiler config. { "extends": "../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ "*.js", "public/**/*.js", diff --git a/packages/cosmic-swingset/tsconfig.json b/packages/cosmic-swingset/tsconfig.json index 1155d5c9688..993dde391d7 100644 --- a/packages/cosmic-swingset/tsconfig.json +++ b/packages/cosmic-swingset/tsconfig.json @@ -3,7 +3,6 @@ "extends": "../../tsconfig.json", "compilerOptions": { "checkJs": false, - "maxNodeModuleJsDepth": 1, }, "include": [ "calc-*.js", diff --git a/packages/deploy-script-support/tsconfig.json b/packages/deploy-script-support/tsconfig.json index 9059b73f7c8..0801b2f0296 100644 --- a/packages/deploy-script-support/tsconfig.json +++ b/packages/deploy-script-support/tsconfig.json @@ -1,9 +1,7 @@ // This file can contain .js-specific Typescript compiler config. { "extends": "../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ "*.js", "src/**/*.js", diff --git a/packages/governance/tsconfig.json b/packages/governance/tsconfig.json index 6e6441a9322..7dab2e0a52d 100644 --- a/packages/governance/tsconfig.json +++ b/packages/governance/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ // omit exported.js because 1) it need not be included in the typecheck of // this package because it's only consumed by other packages and 2) diff --git a/packages/inter-protocol/tsconfig.json b/packages/inter-protocol/tsconfig.json index 65b0376a714..7112905d773 100644 --- a/packages/inter-protocol/tsconfig.json +++ b/packages/inter-protocol/tsconfig.json @@ -1,9 +1,7 @@ // This file can contain .js-specific Typescript compiler config. { "extends": "../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ "globals.d.ts", "scripts/**/*.js", diff --git a/packages/internal/tsconfig.json b/packages/internal/tsconfig.json index c32a7d118d2..f4bccfe777f 100644 --- a/packages/internal/tsconfig.json +++ b/packages/internal/tsconfig.json @@ -2,7 +2,6 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "maxNodeModuleJsDepth": 1, // as in jsconfig's default // Disable b/c @endo/init can't pass noImplicitAny "checkJs": false, "noImplicitAny": true, diff --git a/packages/kmarshal/tsconfig.json b/packages/kmarshal/tsconfig.json index b93fc349a54..6c53d56694e 100644 --- a/packages/kmarshal/tsconfig.json +++ b/packages/kmarshal/tsconfig.json @@ -1,9 +1,7 @@ // This file can contain .js-specific Typescript compiler config. { "extends": "../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ "src/**/*.js", "test/**/*.js" diff --git a/packages/network/tsconfig.json b/packages/network/tsconfig.json index 325db156bdc..369a34eb383 100644 --- a/packages/network/tsconfig.json +++ b/packages/network/tsconfig.json @@ -2,7 +2,6 @@ "extends": "../../tsconfig.json", "compilerOptions": { "checkJs": false, - "maxNodeModuleJsDepth": 1, }, "include": [ "*.js", diff --git a/packages/notifier/tsconfig.json b/packages/notifier/tsconfig.json index d21c8e734e3..6affe6ed970 100644 --- a/packages/notifier/tsconfig.json +++ b/packages/notifier/tsconfig.json @@ -1,9 +1,7 @@ // This file can contain .js-specific Typescript compiler config. { "extends": "../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ "src/**/*.js", // exclude exported.js so that stub doesn't overwrite exportd.d.ts diff --git a/packages/pegasus/tsconfig.json b/packages/pegasus/tsconfig.json index 8691cdbdc79..6a4403ec003 100644 --- a/packages/pegasus/tsconfig.json +++ b/packages/pegasus/tsconfig.json @@ -3,7 +3,6 @@ "extends": "../../tsconfig.json", "compilerOptions": { "checkJs": false, - "maxNodeModuleJsDepth": 1, }, "include": [ "*.js", diff --git a/packages/smart-wallet/tsconfig.json b/packages/smart-wallet/tsconfig.json index 02b1d415a32..f19444fed28 100644 --- a/packages/smart-wallet/tsconfig.json +++ b/packages/smart-wallet/tsconfig.json @@ -1,9 +1,7 @@ // This file can contain .js-specific Typescript compiler config. { "extends": "../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ "*.js", "scripts/**/*.js", diff --git a/packages/swing-store/tsconfig.json b/packages/swing-store/tsconfig.json index f7c04ed01c9..4a8091d83af 100644 --- a/packages/swing-store/tsconfig.json +++ b/packages/swing-store/tsconfig.json @@ -1,9 +1,7 @@ // This file can contain .js-specific Typescript compiler config. { "extends": "../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ "src/**/*.js", "test/**/*.js", diff --git a/packages/swingset-liveslots/tsconfig.json b/packages/swingset-liveslots/tsconfig.json index 8a944fcfec0..e5bc0d46912 100644 --- a/packages/swingset-liveslots/tsconfig.json +++ b/packages/swingset-liveslots/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ "*.js", "scripts/**/*.js", diff --git a/packages/swingset-xsnap-supervisor/tsconfig.json b/packages/swingset-xsnap-supervisor/tsconfig.json index fcc0c01a115..e9f463436f8 100644 --- a/packages/swingset-xsnap-supervisor/tsconfig.json +++ b/packages/swingset-xsnap-supervisor/tsconfig.json @@ -1,9 +1,7 @@ // This file can contain .js-specific Typescript compiler config. { "extends": "../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ "*.js", "lib/**/*.js", diff --git a/packages/telemetry/tsconfig.json b/packages/telemetry/tsconfig.json index 080335dd6c7..512440b9f13 100644 --- a/packages/telemetry/tsconfig.json +++ b/packages/telemetry/tsconfig.json @@ -1,9 +1,7 @@ // This file can contain .js-specific Typescript compiler config. { "extends": "../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ "*.js", "scripts", diff --git a/packages/time/tsconfig.json b/packages/time/tsconfig.json index ef7a34a7f1b..0f03194f9ea 100644 --- a/packages/time/tsconfig.json +++ b/packages/time/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ "build", "index.js", diff --git a/packages/vat-data/tsconfig.json b/packages/vat-data/tsconfig.json index 7cd3aa422ca..2f7134f28c5 100644 --- a/packages/vat-data/tsconfig.json +++ b/packages/vat-data/tsconfig.json @@ -2,7 +2,6 @@ "extends": "../../tsconfig.json", "compilerOptions": { // XXX to resolve the swingset-liveslots types - "maxNodeModuleJsDepth": 1, // "strict": true, // disabled for compat with >0 module depth // "noImplicitAny": false, // for compat with peer packages using ambient types }, diff --git a/packages/vats/tsconfig.json b/packages/vats/tsconfig.json index 53a6a31fd0a..3f369afd4d1 100644 --- a/packages/vats/tsconfig.json +++ b/packages/vats/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ "*.js", "scripts", diff --git a/packages/vow/tsconfig.json b/packages/vow/tsconfig.json index 84f72427c7b..ce21a7790cc 100644 --- a/packages/vow/tsconfig.json +++ b/packages/vow/tsconfig.json @@ -2,7 +2,6 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "maxNodeModuleJsDepth": 1, "checkJs": false }, "include": [ diff --git a/packages/wallet/api/tsconfig.json b/packages/wallet/api/tsconfig.json index 54cf60eac5b..404ebb0dc15 100644 --- a/packages/wallet/api/tsconfig.json +++ b/packages/wallet/api/tsconfig.json @@ -1,9 +1,7 @@ // This file can contain .js-specific Typescript compiler config. { "extends": "../../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ "*.js", "scripts/**/*.js", diff --git a/packages/xsnap-lockdown/tsconfig.json b/packages/xsnap-lockdown/tsconfig.json index fcc0c01a115..e9f463436f8 100644 --- a/packages/xsnap-lockdown/tsconfig.json +++ b/packages/xsnap-lockdown/tsconfig.json @@ -1,9 +1,7 @@ // This file can contain .js-specific Typescript compiler config. { "extends": "../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ "*.js", "lib/**/*.js", diff --git a/packages/xsnap/tsconfig.json b/packages/xsnap/tsconfig.json index 33a8212f172..8cd5de65002 100644 --- a/packages/xsnap/tsconfig.json +++ b/packages/xsnap/tsconfig.json @@ -1,9 +1,7 @@ // This file can contain .js-specific Typescript compiler config. { "extends": "../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ "*.js", "lib", diff --git a/packages/zoe/tsconfig.json b/packages/zoe/tsconfig.json index 6230997c739..a2922a31637 100644 --- a/packages/zoe/tsconfig.json +++ b/packages/zoe/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ "contractFacet.js", "scripts", diff --git a/packages/zone/tsconfig.json b/packages/zone/tsconfig.json index 70a866b38be..19ef3d93512 100644 --- a/packages/zone/tsconfig.json +++ b/packages/zone/tsconfig.json @@ -1,9 +1,7 @@ // This file can contain .js-specific Typescript compiler config. { "extends": "../../tsconfig.json", - "compilerOptions": { - "maxNodeModuleJsDepth": 1, - }, + "compilerOptions": {}, "include": [ "*.js", "scripts", From 5bfe5cc6ed55ad0b5976837659ee1a5a5c7b16f5 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 18 May 2024 06:18:11 -0700 Subject: [PATCH 10/26] chore(types): rm unused module --- packages/inter-protocol/src/vaultFactory/type-imports.js | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 packages/inter-protocol/src/vaultFactory/type-imports.js diff --git a/packages/inter-protocol/src/vaultFactory/type-imports.js b/packages/inter-protocol/src/vaultFactory/type-imports.js deleted file mode 100644 index 8224d5a1df9..00000000000 --- a/packages/inter-protocol/src/vaultFactory/type-imports.js +++ /dev/null @@ -1,4 +0,0 @@ -// @jessie-check - -/// -/// From f1112c57bb0ebd79ff18fb5447cd45336011dfd8 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 18 May 2024 06:32:20 -0700 Subject: [PATCH 11/26] chore(types): no runtime imports from /store --- packages/ERTP/src/paymentLedger.js | 5 ++--- packages/SwingSet/src/vats/plugin-manager.js | 2 -- packages/base-zone/src/index.js | 3 +-- packages/cache/src/types.js | 3 ++- packages/network/src/network.js | 3 ++- packages/network/src/router.js | 7 ++++--- packages/pegasus/exported.js | 2 +- packages/swingset-liveslots/src/index.js | 3 +-- packages/vats/src/bridge.js | 1 - packages/vats/src/ibc.js | 1 - packages/wallet/api/src/lib-wallet.js | 3 --- packages/zoe/exported.d.ts | 1 - packages/zoe/src/zoeService/offer/offer.js | 1 - 13 files changed, 13 insertions(+), 22 deletions(-) diff --git a/packages/ERTP/src/paymentLedger.js b/packages/ERTP/src/paymentLedger.js index 33ae4c658f0..681ddd2eb20 100644 --- a/packages/ERTP/src/paymentLedger.js +++ b/packages/ERTP/src/paymentLedger.js @@ -1,5 +1,7 @@ // @jessie-check +/// + /* eslint-disable no-use-before-define */ import { isPromise } from '@endo/promise-kit'; import { mustMatch, M, keyEQ } from '@agoric/store'; @@ -7,9 +9,6 @@ import { AmountMath } from './amountMath.js'; import { preparePaymentKind } from './payment.js'; import { preparePurseKind } from './purse.js'; -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/store/exported.js'; - import { BrandI, makeIssuerInterfaces } from './typeGuards.js'; /** diff --git a/packages/SwingSet/src/vats/plugin-manager.js b/packages/SwingSet/src/vats/plugin-manager.js index 1ce5e0c10ec..d16d76e33e1 100644 --- a/packages/SwingSet/src/vats/plugin-manager.js +++ b/packages/SwingSet/src/vats/plugin-manager.js @@ -5,8 +5,6 @@ import { HandledPromise } from '@endo/eventual-send'; import { Remotable } from '@endo/marshal'; import { Far, E } from '@endo/far'; -import '@agoric/store/exported.js'; - /** * @template T * @typedef {T | PromiseLike} ERef diff --git a/packages/base-zone/src/index.js b/packages/base-zone/src/index.js index 7a137f7d54f..36d25a5f5b9 100644 --- a/packages/base-zone/src/index.js +++ b/packages/base-zone/src/index.js @@ -1,7 +1,6 @@ // @jessie-check -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/store/exported.js'; +/// // eslint-disable-next-line import/export export * from './exports.js'; diff --git a/packages/cache/src/types.js b/packages/cache/src/types.js index 60ca5d89edc..3d784bd3ac5 100644 --- a/packages/cache/src/types.js +++ b/packages/cache/src/types.js @@ -1,8 +1,9 @@ // @jessie-check +/// + // XXX package factoring debt import '@agoric/notifier/exported.js'; -import '@agoric/store/exported.js'; // Ensure this is a module. export {}; diff --git a/packages/network/src/network.js b/packages/network/src/network.js index 5d5d6ac46e0..d2dbcd30c6c 100644 --- a/packages/network/src/network.js +++ b/packages/network/src/network.js @@ -1,12 +1,13 @@ // @ts-check +/// + import { E } from '@endo/far'; import { M } from '@endo/patterns'; import { Fail } from '@agoric/assert'; import { toBytes } from './bytes.js'; import { Shape } from './shapes.js'; -import '@agoric/store/exported.js'; /// /** * @import {AttemptDescription, Bytes, Closable, CloseReason, Connection, ConnectionHandler, Endpoint, ListenHandler, Port, Protocol, ProtocolHandler, ProtocolImpl} from './types.js'; diff --git a/packages/network/src/router.js b/packages/network/src/router.js index 477a23f4f35..b18d1c06407 100644 --- a/packages/network/src/router.js +++ b/packages/network/src/router.js @@ -1,13 +1,14 @@ // @ts-check + +/// +/// + import { E as defaultE } from '@endo/far'; import { M } from '@endo/patterns'; import { Fail } from '@agoric/assert'; import { ENDPOINT_SEPARATOR, prepareNetworkProtocol } from './network.js'; import { Shape } from './shapes.js'; -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/store/exported.js'; -/// /** * @import {AttemptDescription, Bytes, Closable, CloseReason, Connection, ConnectionHandler, Endpoint, ListenHandler, Port, Protocol, ProtocolHandler, ProtocolImpl} from './types.js'; * @import {PromiseVow, Remote, VowKit, VowResolver, VowTools} from '@agoric/vow'; diff --git a/packages/pegasus/exported.js b/packages/pegasus/exported.js index 7ef1e0f6c8c..779cf442ed6 100644 --- a/packages/pegasus/exported.js +++ b/packages/pegasus/exported.js @@ -1,4 +1,4 @@ +/// import './src/types.js'; import '@agoric/notifier/exported.js'; import '@agoric/ertp/exported.js'; -import '@agoric/store/exported.js'; diff --git a/packages/swingset-liveslots/src/index.js b/packages/swingset-liveslots/src/index.js index 14f3b84af5d..ac3a9ddb0e6 100644 --- a/packages/swingset-liveslots/src/index.js +++ b/packages/swingset-liveslots/src/index.js @@ -1,5 +1,4 @@ -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/store/exported.js'; +/// /* eslint-disable import/export -- types files have no named runtime exports */ export { makeLiveSlots, makeMarshaller } from './liveslots.js'; diff --git a/packages/vats/src/bridge.js b/packages/vats/src/bridge.js index 6cf236e6c7d..b6cacd0bb2c 100644 --- a/packages/vats/src/bridge.js +++ b/packages/vats/src/bridge.js @@ -1,5 +1,4 @@ import { M } from '@agoric/store'; -import '@agoric/store/exported.js'; import { E } from '@endo/far'; const { Fail, details: X } = assert; diff --git a/packages/vats/src/ibc.js b/packages/vats/src/ibc.js index 504104801c3..d3d5f47bc60 100644 --- a/packages/vats/src/ibc.js +++ b/packages/vats/src/ibc.js @@ -5,7 +5,6 @@ import { E } from '@endo/far'; import { dataToBase64, base64ToBytes } from '@agoric/network'; -import '@agoric/store/exported.js'; import '@agoric/network/exported.js'; import { localAddrToPortID, diff --git a/packages/wallet/api/src/lib-wallet.js b/packages/wallet/api/src/lib-wallet.js index 231992c399f..72182095bc5 100644 --- a/packages/wallet/api/src/lib-wallet.js +++ b/packages/wallet/api/src/lib-wallet.js @@ -43,10 +43,7 @@ import { makeId, findOrMakeInvitation } from './findOrMakeInvitation.js'; import { bigintStringify } from './bigintStringify.js'; import { makePaymentActions } from './actions.js'; -import '@agoric/store/exported.js'; - import './internal-types.js'; -/// // does nothing const noActionStateChangeHandler = _newState => {}; diff --git a/packages/zoe/exported.d.ts b/packages/zoe/exported.d.ts index d0ec99702d1..b16dba05154 100644 --- a/packages/zoe/exported.d.ts +++ b/packages/zoe/exported.d.ts @@ -5,4 +5,3 @@ import './src/contracts/exported.js'; import './src/types-ambient.js'; import '@agoric/notifier/exported.js'; import '@agoric/ertp/exported.js'; -import '@agoric/store/exported.js'; diff --git a/packages/zoe/src/zoeService/offer/offer.js b/packages/zoe/src/zoeService/offer/offer.js index bda08444ec5..4665726ce5d 100644 --- a/packages/zoe/src/zoeService/offer/offer.js +++ b/packages/zoe/src/zoeService/offer/offer.js @@ -9,7 +9,6 @@ import { burnInvitation } from './burnInvitation.js'; import { makeInvitationQueryFns } from '../invitationQueries.js'; import '@agoric/ertp/exported.js'; -import '@agoric/store/exported.js'; import '../internal-types.js'; const { quote: q, Fail } = assert; From 661042df08e9f61944bedc73d23827bb6c8a9e7d Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 18 May 2024 06:34:01 -0700 Subject: [PATCH 12/26] chore(types): no runtime imports from /ertp --- packages/pegasus/exported.js | 1 - packages/pegasus/test/peg.test.js | 1 - packages/vats/src/virtual-purse.js | 1 - packages/zoe/exported.d.ts | 1 - packages/zoe/src/zoeService/offer/offer.js | 1 - 5 files changed, 5 deletions(-) diff --git a/packages/pegasus/exported.js b/packages/pegasus/exported.js index 779cf442ed6..de6b4fa365e 100644 --- a/packages/pegasus/exported.js +++ b/packages/pegasus/exported.js @@ -1,4 +1,3 @@ /// import './src/types.js'; import '@agoric/notifier/exported.js'; -import '@agoric/ertp/exported.js'; diff --git a/packages/pegasus/test/peg.test.js b/packages/pegasus/test/peg.test.js index 6ea74c5e7f4..b446106d1bd 100644 --- a/packages/pegasus/test/peg.test.js +++ b/packages/pegasus/test/peg.test.js @@ -14,7 +14,6 @@ import { makeZoeForTest } from '@agoric/zoe/tools/setup-zoe.js'; import { makeSubscription } from '@agoric/notifier'; import { prepareVowTools } from '@agoric/vow/vat.js'; -import '@agoric/ertp/exported.js'; import { makePromiseKit } from '@endo/promise-kit'; import { makeScalarMapStore } from '@agoric/vat-data'; import { makeDurableZone } from '@agoric/zone/durable.js'; diff --git a/packages/vats/src/virtual-purse.js b/packages/vats/src/virtual-purse.js index 34064e1acfe..ba0ab760fc5 100644 --- a/packages/vats/src/virtual-purse.js +++ b/packages/vats/src/virtual-purse.js @@ -10,7 +10,6 @@ import { PaymentShape, } from '@agoric/ertp/src/typeGuards.js'; -import '@agoric/ertp/exported.js'; import '@agoric/notifier/exported.js'; import { getInterfaceGuardPayload } from '@endo/patterns'; diff --git a/packages/zoe/exported.d.ts b/packages/zoe/exported.d.ts index b16dba05154..65b130a4b6a 100644 --- a/packages/zoe/exported.d.ts +++ b/packages/zoe/exported.d.ts @@ -4,4 +4,3 @@ import './src/contractSupport/types-ambient.js'; import './src/contracts/exported.js'; import './src/types-ambient.js'; import '@agoric/notifier/exported.js'; -import '@agoric/ertp/exported.js'; diff --git a/packages/zoe/src/zoeService/offer/offer.js b/packages/zoe/src/zoeService/offer/offer.js index 4665726ce5d..3e91ff977a9 100644 --- a/packages/zoe/src/zoeService/offer/offer.js +++ b/packages/zoe/src/zoeService/offer/offer.js @@ -8,7 +8,6 @@ import { cleanProposal } from '../../cleanProposal.js'; import { burnInvitation } from './burnInvitation.js'; import { makeInvitationQueryFns } from '../invitationQueries.js'; -import '@agoric/ertp/exported.js'; import '../internal-types.js'; const { quote: q, Fail } = assert; From 1f02b5c5e7f8cdec42119fe4c20b11cd846534cd Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 18 May 2024 06:35:47 -0700 Subject: [PATCH 13/26] chore(types): no runtime imports from /notifier --- packages/ERTP/exported.d.ts | 2 ++ packages/cache/src/types.js | 1 - packages/pegasus/exported.js | 1 - packages/smart-wallet/src/utils.js | 1 - packages/vats/src/vat-bank.js | 2 -- packages/vats/src/virtual-purse.js | 1 - packages/zoe/exported.d.ts | 1 - 7 files changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/ERTP/exported.d.ts b/packages/ERTP/exported.d.ts index 176ac2c51b9..31053fed03a 100644 --- a/packages/ERTP/exported.d.ts +++ b/packages/ERTP/exported.d.ts @@ -5,6 +5,8 @@ // XXX also explicit exports because `@agoric/ertp` top level confuses the type and value of `AssetKind` export * from './src/types.js'; +import '@agoric/notifier/exported.js'; + import { Amount as _Amount, Brand as _Brand, diff --git a/packages/cache/src/types.js b/packages/cache/src/types.js index 3d784bd3ac5..e4e2a2aa543 100644 --- a/packages/cache/src/types.js +++ b/packages/cache/src/types.js @@ -3,7 +3,6 @@ /// // XXX package factoring debt -import '@agoric/notifier/exported.js'; // Ensure this is a module. export {}; diff --git a/packages/pegasus/exported.js b/packages/pegasus/exported.js index de6b4fa365e..09b30a91105 100644 --- a/packages/pegasus/exported.js +++ b/packages/pegasus/exported.js @@ -1,3 +1,2 @@ /// import './src/types.js'; -import '@agoric/notifier/exported.js'; diff --git a/packages/smart-wallet/src/utils.js b/packages/smart-wallet/src/utils.js index 39dee3cbbd2..4572bb24149 100644 --- a/packages/smart-wallet/src/utils.js +++ b/packages/smart-wallet/src/utils.js @@ -4,7 +4,6 @@ import { E } from '@endo/far'; // XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 import '@agoric/internal/exported.js'; -import '@agoric/notifier/exported.js'; export const NO_SMART_WALLET_ERROR = 'no smart wallet'; diff --git a/packages/vats/src/vat-bank.js b/packages/vats/src/vat-bank.js index 8025f269d45..3df9259a4af 100644 --- a/packages/vats/src/vat-bank.js +++ b/packages/vats/src/vat-bank.js @@ -19,8 +19,6 @@ import { prepareVirtualPurse, } from './virtual-purse.js'; -import '@agoric/notifier/exported.js'; - /** * @import {Guarded} from '@endo/exo') * @import {Passable, RemotableObject} from '@endo/pass-style') diff --git a/packages/vats/src/virtual-purse.js b/packages/vats/src/virtual-purse.js index ba0ab760fc5..5f4d9db397b 100644 --- a/packages/vats/src/virtual-purse.js +++ b/packages/vats/src/virtual-purse.js @@ -10,7 +10,6 @@ import { PaymentShape, } from '@agoric/ertp/src/typeGuards.js'; -import '@agoric/notifier/exported.js'; import { getInterfaceGuardPayload } from '@endo/patterns'; const { Fail } = assert; diff --git a/packages/zoe/exported.d.ts b/packages/zoe/exported.d.ts index 65b130a4b6a..a22bb5136d4 100644 --- a/packages/zoe/exported.d.ts +++ b/packages/zoe/exported.d.ts @@ -3,4 +3,3 @@ import './src/zoeService/types-ambient.js'; import './src/contractSupport/types-ambient.js'; import './src/contracts/exported.js'; import './src/types-ambient.js'; -import '@agoric/notifier/exported.js'; From a381b6a4fe7765075db5c2dfe22cc0e98443a7e7 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 18 May 2024 06:38:27 -0700 Subject: [PATCH 14/26] chore(types): no runtime imports of /zoe/contracts --- packages/inter-protocol/src/auction/auctioneer.js | 1 - packages/inter-protocol/src/vaultFactory/vaultDirector.js | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/inter-protocol/src/auction/auctioneer.js b/packages/inter-protocol/src/auction/auctioneer.js index 44b8c86c456..b0f231826ce 100644 --- a/packages/inter-protocol/src/auction/auctioneer.js +++ b/packages/inter-protocol/src/auction/auctioneer.js @@ -1,6 +1,5 @@ /// /// -import '@agoric/zoe/src/contracts/exported.js'; import { AmountMath, AmountShape, BrandShape } from '@agoric/ertp'; import { handleParamGovernance } from '@agoric/governance'; diff --git a/packages/inter-protocol/src/vaultFactory/vaultDirector.js b/packages/inter-protocol/src/vaultFactory/vaultDirector.js index e2aed5bfe19..ce271d626b9 100644 --- a/packages/inter-protocol/src/vaultFactory/vaultDirector.js +++ b/packages/inter-protocol/src/vaultFactory/vaultDirector.js @@ -1,6 +1,5 @@ /// /// -import '@agoric/zoe/src/contracts/exported.js'; import { AmountMath, AmountShape, BrandShape, IssuerShape } from '@agoric/ertp'; import { From a44411d19a833ccca68e0b00b512a7f00f489f3c Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 18 May 2024 06:40:23 -0700 Subject: [PATCH 15/26] chore(types): no runtime imports of /network --- packages/orchestration/src/exos/chainAccountKit.js | 3 --- packages/orchestration/src/service.js | 3 --- packages/pegasus/src/pegasus.js | 2 -- packages/vats/src/ibc.js | 1 - 4 files changed, 9 deletions(-) diff --git a/packages/orchestration/src/exos/chainAccountKit.js b/packages/orchestration/src/exos/chainAccountKit.js index 4af29428257..1781cfdc65a 100644 --- a/packages/orchestration/src/exos/chainAccountKit.js +++ b/packages/orchestration/src/exos/chainAccountKit.js @@ -1,8 +1,5 @@ /** @file ChainAccount exo */ -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/network/exported.js'; - import { NonNullish } from '@agoric/assert'; import { makeTracer } from '@agoric/internal'; import { V as E } from '@agoric/vow/vat.js'; diff --git a/packages/orchestration/src/service.js b/packages/orchestration/src/service.js index ae38835da58..be46cdd0288 100644 --- a/packages/orchestration/src/service.js +++ b/packages/orchestration/src/service.js @@ -1,8 +1,5 @@ /** @file Orchestration service */ -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/network/exported.js'; - import { V as E } from '@agoric/vow/vat.js'; import { M } from '@endo/patterns'; import { Shape as NetworkShape } from '@agoric/network'; diff --git a/packages/pegasus/src/pegasus.js b/packages/pegasus/src/pegasus.js index f46916cbd04..c892ed3d791 100644 --- a/packages/pegasus/src/pegasus.js +++ b/packages/pegasus/src/pegasus.js @@ -9,8 +9,6 @@ import { } from '@agoric/zoe/src/contractSupport/index.js'; import { makeSubscriptionKit } from '@agoric/notifier'; -import '@agoric/network/exported.js'; - import '../exported.js'; import { IBCSourceTraceDenomTransformer } from './ibc-trace.js'; import { ICS20TransferProtocol } from './ics20.js'; diff --git a/packages/vats/src/ibc.js b/packages/vats/src/ibc.js index d3d5f47bc60..334c264171a 100644 --- a/packages/vats/src/ibc.js +++ b/packages/vats/src/ibc.js @@ -5,7 +5,6 @@ import { E } from '@endo/far'; import { dataToBase64, base64ToBytes } from '@agoric/network'; -import '@agoric/network/exported.js'; import { localAddrToPortID, decodeRemoteIbcAddress, From cb58a99b81997d2836c044b532bec5a84d900305 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 18 May 2024 06:41:28 -0700 Subject: [PATCH 16/26] chore(types): no runtime imports of ses-ava --- packages/SwingSet/tools/prepare-test-env-ava.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/SwingSet/tools/prepare-test-env-ava.js b/packages/SwingSet/tools/prepare-test-env-ava.js index eadbce67c94..f626c586ebf 100644 --- a/packages/SwingSet/tools/prepare-test-env-ava.js +++ b/packages/SwingSet/tools/prepare-test-env-ava.js @@ -8,8 +8,6 @@ import '@endo/init/pre-bundle-source.js'; import '@agoric/swingset-liveslots/tools/prepare-test-env.js'; -import '@endo/ses-ava/exported.js'; - import { wrapTest } from '@endo/ses-ava'; import rawTest from 'ava'; From e47b0aa7af7d6a3035e6c887c10727506f9b9d2a Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 18 May 2024 06:43:08 -0700 Subject: [PATCH 17/26] chore(types): no runtime imports of /vats --- packages/benchmark/src/benchmarkerator.js | 1 - packages/boot/tools/supports.ts | 3 --- 2 files changed, 4 deletions(-) diff --git a/packages/benchmark/src/benchmarkerator.js b/packages/benchmark/src/benchmarkerator.js index f8c5af2052c..5472e450e30 100644 --- a/packages/benchmark/src/benchmarkerator.js +++ b/packages/benchmark/src/benchmarkerator.js @@ -5,7 +5,6 @@ import '@endo/init/pre-bundle-source.js'; import '@endo/init'; // XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/vats/exported.js'; import '@agoric/inter-protocol/exported.js'; import '@agoric/cosmic-swingset/src/launch-chain.js'; diff --git a/packages/boot/tools/supports.ts b/packages/boot/tools/supports.ts index 59ac205cc6b..882a4b14073 100644 --- a/packages/boot/tools/supports.ts +++ b/packages/boot/tools/supports.ts @@ -18,9 +18,6 @@ import { loadSwingsetConfigFile } from '@agoric/swingset-vat'; import { makeSlogSender } from '@agoric/telemetry'; import { TimeMath, Timestamp } from '@agoric/time'; -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/vats/exported.js'; - import { boardSlottingMarshaller, slotToBoardRemote, From 4e65c280e92304d5d4ff005c7c3987058600560c Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 18 May 2024 06:43:29 -0700 Subject: [PATCH 18/26] chore(types): no runtime imports of /inter-protocol --- packages/benchmark/src/benchmarkerator.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/benchmark/src/benchmarkerator.js b/packages/benchmark/src/benchmarkerator.js index 5472e450e30..57327011ef8 100644 --- a/packages/benchmark/src/benchmarkerator.js +++ b/packages/benchmark/src/benchmarkerator.js @@ -4,8 +4,6 @@ import fs from 'node:fs'; import '@endo/init/pre-bundle-source.js'; import '@endo/init'; -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/inter-protocol/exported.js'; import '@agoric/cosmic-swingset/src/launch-chain.js'; import { Fail } from '@agoric/assert'; From 543df855dfde6157e9a13a5f8b8aa14c64ce4c2f Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 18 May 2024 06:44:50 -0700 Subject: [PATCH 19/26] chore(types): no runtime imports of /internal --- packages/smart-wallet/src/utils.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/smart-wallet/src/utils.js b/packages/smart-wallet/src/utils.js index 4572bb24149..9740bda9405 100644 --- a/packages/smart-wallet/src/utils.js +++ b/packages/smart-wallet/src/utils.js @@ -2,9 +2,6 @@ import { deeplyFulfilledObject, objectMap, makeTracer } from '@agoric/internal'; import { observeIteration, subscribeEach } from '@agoric/notifier'; import { E } from '@endo/far'; -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/internal/exported.js'; - export const NO_SMART_WALLET_ERROR = 'no smart wallet'; const trace = makeTracer('WUTIL', false); From 5bebd20dde02fa7323677ae82878fb433318fbcc Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 18 May 2024 06:49:58 -0700 Subject: [PATCH 20/26] refactor(types): ERTP exported.js only ambients --- packages/ERTP/exported.d.ts | 3 --- packages/inter-protocol/src/feeDistributor.js | 2 +- packages/orchestration/src/cosmos-api.ts | 2 +- packages/orchestration/src/orchestration-api.ts | 2 +- packages/pegasus/src/courier.js | 2 +- packages/pegasus/src/types.js | 2 +- packages/vats/src/vat-bank.js | 2 +- packages/wallet/api/src/internal-types.js | 4 ++-- packages/zoe/src/types-ambient.js | 2 +- packages/zoe/src/zoeService/types-ambient.js | 2 +- packages/zoe/src/zoeService/utils.d.ts | 2 +- 11 files changed, 11 insertions(+), 14 deletions(-) diff --git a/packages/ERTP/exported.d.ts b/packages/ERTP/exported.d.ts index 31053fed03a..c3dab4e11ff 100644 --- a/packages/ERTP/exported.d.ts +++ b/packages/ERTP/exported.d.ts @@ -2,9 +2,6 @@ /** @see {@link /docs/typescript.md} */ /* eslint-disable -- doesn't understand .d.ts */ -// XXX also explicit exports because `@agoric/ertp` top level confuses the type and value of `AssetKind` -export * from './src/types.js'; - import '@agoric/notifier/exported.js'; import { diff --git a/packages/inter-protocol/src/feeDistributor.js b/packages/inter-protocol/src/feeDistributor.js index f7cb5c3d1c5..0818efe0724 100644 --- a/packages/inter-protocol/src/feeDistributor.js +++ b/packages/inter-protocol/src/feeDistributor.js @@ -269,7 +269,7 @@ export const makeFeeDistributor = (feeIssuer, terms) => { /** * @param {import('@endo/far').EOnly< - * import('@agoric/ertp/exported.js').DepositFacet + * import('@agoric/ertp/src/types.js').DepositFacet * >} depositFacet */ makeDepositFacetDestination: depositFacet => { diff --git a/packages/orchestration/src/cosmos-api.ts b/packages/orchestration/src/cosmos-api.ts index ff0e3e0bdbf..e83b668d548 100644 --- a/packages/orchestration/src/cosmos-api.ts +++ b/packages/orchestration/src/cosmos-api.ts @@ -5,7 +5,7 @@ import type { UnbondingDelegation, } from '@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js'; import type { TxBody } from '@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js'; -import type { Brand, Payment, Purse } from '@agoric/ertp/exported.js'; +import type { Brand, Payment, Purse } from '@agoric/ertp/src/types.js'; import type { Port } from '@agoric/network'; import type { LocalIbcAddress, diff --git a/packages/orchestration/src/orchestration-api.ts b/packages/orchestration/src/orchestration-api.ts index 0492bf457b5..9275fdac7ec 100644 --- a/packages/orchestration/src/orchestration-api.ts +++ b/packages/orchestration/src/orchestration-api.ts @@ -9,7 +9,7 @@ import type { Brand, NatAmount, Payment, -} from '@agoric/ertp/exported.js'; +} from '@agoric/ertp/src/types.js'; import type { LocalChainAccount } from '@agoric/vats/src/localchain.js'; import type { Timestamp } from '@agoric/time'; import type { KnownChains } from './types.js'; diff --git a/packages/pegasus/src/courier.js b/packages/pegasus/src/courier.js index 59eed5b1858..fcee1c5b7d7 100644 --- a/packages/pegasus/src/courier.js +++ b/packages/pegasus/src/courier.js @@ -7,7 +7,7 @@ import { E, Far } from '@endo/far'; import { makeOncePromiseKit } from './once-promise-kit.js'; /** - * @import {DepositFacet} from '@agoric/ertp/exported.js' + * @import {DepositFacet} from '@agoric/ertp/src/types.js' * @import {Connection} from '@agoric/network'; * @import {Remote} from '@agoric/vow'; */ diff --git a/packages/pegasus/src/types.js b/packages/pegasus/src/types.js index 6a146895807..88112cc962d 100644 --- a/packages/pegasus/src/types.js +++ b/packages/pegasus/src/types.js @@ -12,7 +12,7 @@ /** * @typedef {object} PacketParts - * @property {import("@agoric/ertp/exported.js").AmountValue} value + * @property {import("@agoric/ertp/src/types.js").AmountValue} value * @property {Denom} remoteDenom * @property {DepositAddress} depositAddress * @property {string} memo diff --git a/packages/vats/src/vat-bank.js b/packages/vats/src/vat-bank.js index 3df9259a4af..b6289458565 100644 --- a/packages/vats/src/vat-bank.js +++ b/packages/vats/src/vat-bank.js @@ -638,7 +638,7 @@ const prepareBankManager = ( * @param {AssetIssuerKit} feeKit * @returns {ERef< * import('@endo/far').EOnly< - * import('@agoric/ertp/exported.js').DepositFacet + * import('@agoric/ertp/src/types.js').DepositFacet * > * >} */ diff --git a/packages/wallet/api/src/internal-types.js b/packages/wallet/api/src/internal-types.js index 12c34f82190..1dbc07b216e 100644 --- a/packages/wallet/api/src/internal-types.js +++ b/packages/wallet/api/src/internal-types.js @@ -18,7 +18,7 @@ /** * @typedef {object} PurseActions - * @property {(receiverP: ERef<{ receive: (payment: Payment) => void }>, valueToSend: import('@agoric/ertp/exported.js').AmountValue) => Promise} send + * @property {(receiverP: ERef<{ receive: (payment: Payment) => void }>, valueToSend: import('@agoric/ertp/src/types.js').AmountValue) => Promise} send * @property {(payment: Payment) => Promise} receive * @property {(payment: Payment, amount?: Amount) => Promise} deposit */ @@ -85,7 +85,7 @@ * @property {string} [issuerBoardId] * * @typedef {object} PaymentActions - * @property {(purseOrPetname?: (Purse | Petname)) => Promise} deposit + * @property {(purseOrPetname?: (Purse | Petname)) => Promise} deposit * @property {() => Promise} refresh * @property {() => Promise} getAmountOf */ diff --git a/packages/zoe/src/types-ambient.js b/packages/zoe/src/types-ambient.js index 1435fc29791..56765df2d94 100644 --- a/packages/zoe/src/types-ambient.js +++ b/packages/zoe/src/types-ambient.js @@ -39,5 +39,5 @@ */ /** - * @typedef {Record} Allocation + * @typedef {Record} Allocation */ diff --git a/packages/zoe/src/zoeService/types-ambient.js b/packages/zoe/src/zoeService/types-ambient.js index 48cf7fc822f..b8391568b12 100644 --- a/packages/zoe/src/zoeService/types-ambient.js +++ b/packages/zoe/src/zoeService/types-ambient.js @@ -232,7 +232,7 @@ */ /** - * @typedef {Record} AmountKeywordRecord + * @typedef {Record} AmountKeywordRecord * * The keys are keywords, and the values are amounts. For example: * { Asset: AmountMath.make(assetBrand, 5n), Price: diff --git a/packages/zoe/src/zoeService/utils.d.ts b/packages/zoe/src/zoeService/utils.d.ts index a96a44e065e..8ccd1043f87 100644 --- a/packages/zoe/src/zoeService/utils.d.ts +++ b/packages/zoe/src/zoeService/utils.d.ts @@ -2,7 +2,7 @@ import '../types-ambient.js'; import '../contractFacet/types-ambient.js'; -import type { Issuer } from '@agoric/ertp/exported.js'; +import type { Issuer } from '@agoric/ertp/src/types.js'; import type { TagContainer } from '@agoric/internal/src/tagged.js'; import type { Baggage } from '@agoric/swingset-liveslots'; import type { VatUpgradeResults } from '@agoric/swingset-vat'; From 4e207b9912661f5c1b60f1813f4f1cf5e6efdcdf Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 18 May 2024 06:58:38 -0700 Subject: [PATCH 21/26] docs(typescript): where named and ambient exports go --- docs/typescript.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/typescript.md b/docs/typescript.md index fc4403b2377..39926e740b5 100644 --- a/docs/typescript.md +++ b/docs/typescript.md @@ -7,7 +7,7 @@ Our use of TypeScript has to accomodate both .js development in agoric-sdk (whic - `.d.ts` for types modules - package entrypoint(s) exports explicit types - for packages upon which other packages expect ambient types: - - `exported.js` exports the explicit types and ambient re-exports + - `exported.js` supplies ambients - don't use runtime imports to get types ([issue](https://github.com/Agoric/agoric-sdk/issues/6512)) ## .d.ts modules From 089f06d606fe272edcae566f9100ee7e9c0e9d73 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 18 May 2024 07:01:07 -0700 Subject: [PATCH 22/26] chore(types): no import of local exported.js --- .../test/unitTests/depositInvitation.test.js | 2 -- .../test/unitTests/findInvitationAmount.test.js | 2 -- packages/deploy-script-support/test/unitTests/install.test.js | 2 -- packages/deploy-script-support/test/unitTests/offer.test.js | 2 -- packages/pegasus/src/contract.js | 2 -- packages/pegasus/src/pegasus.js | 1 - packages/wallet/api/src/issuerTable.js | 1 - .../swingsetTests/upgradeCoveredCall/coveredCall-durable-V3.js | 1 - .../zoe/test/unitTests/contracts/loan/addCollateral.test.js | 1 - packages/zoe/test/unitTests/contracts/loan/borrow.test.js | 1 - packages/zoe/test/unitTests/contracts/loan/close.test.js | 1 - packages/zoe/test/unitTests/contracts/loan/helpers.js | 2 -- packages/zoe/test/unitTests/contracts/loan/lend.test.js | 1 - packages/zoe/test/unitTests/contracts/loan/liquidate.test.js | 1 - packages/zoe/test/unitTests/contracts/loan/loan-e2e.test.js | 2 -- packages/zoe/test/unitTests/contracts/loan/updateDebt.test.js | 1 - packages/zoe/test/unitTests/contracts/oracle.test.js | 2 -- packages/zoe/test/unitTests/contracts/priceAggregator.test.js | 1 - .../zoe/test/unitTests/contracts/scaledPriceAuthority.test.js | 2 -- packages/zoe/test/unitTests/scriptedOracle.test.js | 1 - 20 files changed, 29 deletions(-) diff --git a/packages/deploy-script-support/test/unitTests/depositInvitation.test.js b/packages/deploy-script-support/test/unitTests/depositInvitation.test.js index 922265fa33c..91e9a9561e5 100644 --- a/packages/deploy-script-support/test/unitTests/depositInvitation.test.js +++ b/packages/deploy-script-support/test/unitTests/depositInvitation.test.js @@ -3,8 +3,6 @@ import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import { makeIssuerKit, AssetKind, AmountMath } from '@agoric/ertp'; -import '../../exported.js'; - import { makeDepositInvitation } from '../../src/depositInvitation.js'; test('depositInvitation', async t => { diff --git a/packages/deploy-script-support/test/unitTests/findInvitationAmount.test.js b/packages/deploy-script-support/test/unitTests/findInvitationAmount.test.js index 627c8724174..bb2e7f9e982 100644 --- a/packages/deploy-script-support/test/unitTests/findInvitationAmount.test.js +++ b/packages/deploy-script-support/test/unitTests/findInvitationAmount.test.js @@ -3,8 +3,6 @@ import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import { makeIssuerKit, AssetKind, AmountMath } from '@agoric/ertp'; -import '../../exported.js'; - import { makeOfferAndFindInvitationAmount } from '../../src/offer.js'; test('findInvitationAmount', async t => { diff --git a/packages/deploy-script-support/test/unitTests/install.test.js b/packages/deploy-script-support/test/unitTests/install.test.js index 0ef0ba6a01b..6265b93fb13 100644 --- a/packages/deploy-script-support/test/unitTests/install.test.js +++ b/packages/deploy-script-support/test/unitTests/install.test.js @@ -6,8 +6,6 @@ import { makeFakeBoard } from '@agoric/vats/tools/board-utils.js'; import bundleSource from '@endo/bundle-source'; import { resolve as importMetaResolve } from 'import-meta-resolve'; -import '../../exported.js'; - import { makeInstall } from '../../src/install.js'; test('install', async t => { diff --git a/packages/deploy-script-support/test/unitTests/offer.test.js b/packages/deploy-script-support/test/unitTests/offer.test.js index 32dc7ed46a9..f75c106bff6 100644 --- a/packages/deploy-script-support/test/unitTests/offer.test.js +++ b/packages/deploy-script-support/test/unitTests/offer.test.js @@ -7,8 +7,6 @@ import { makeIssuerKit, AmountMath } from '@agoric/ertp'; import { resolve as importMetaResolve } from 'import-meta-resolve'; import { E } from '@endo/far'; -import '../../exported.js'; - import { makeOfferAndFindInvitationAmount } from '../../src/offer.js'; test('offer', async t => { diff --git a/packages/pegasus/src/contract.js b/packages/pegasus/src/contract.js index 3a686c5e4e7..9f7a89bbfdd 100644 --- a/packages/pegasus/src/contract.js +++ b/packages/pegasus/src/contract.js @@ -3,8 +3,6 @@ import { prepareVowTools } from '@agoric/vow/vat.js'; import { makeDurableZone } from '@agoric/zone/durable.js'; import { makePegasus } from './pegasus.js'; -import '../exported.js'; - /** * @import {Remote} from '@agoric/vow'; */ diff --git a/packages/pegasus/src/pegasus.js b/packages/pegasus/src/pegasus.js index c892ed3d791..e73014804cc 100644 --- a/packages/pegasus/src/pegasus.js +++ b/packages/pegasus/src/pegasus.js @@ -9,7 +9,6 @@ import { } from '@agoric/zoe/src/contractSupport/index.js'; import { makeSubscriptionKit } from '@agoric/notifier'; -import '../exported.js'; import { IBCSourceTraceDenomTransformer } from './ibc-trace.js'; import { ICS20TransferProtocol } from './ics20.js'; import { makeCourierMaker, getCourierPK } from './courier.js'; diff --git a/packages/wallet/api/src/issuerTable.js b/packages/wallet/api/src/issuerTable.js index 9ffdde86f7f..f9880b7b29b 100644 --- a/packages/wallet/api/src/issuerTable.js +++ b/packages/wallet/api/src/issuerTable.js @@ -5,7 +5,6 @@ import { E } from '@endo/eventual-send'; import { makeScalarWeakMapStore } from '@agoric/store'; -import '../exported.js'; import './internal-types.js'; /** diff --git a/packages/zoe/test/swingsetTests/upgradeCoveredCall/coveredCall-durable-V3.js b/packages/zoe/test/swingsetTests/upgradeCoveredCall/coveredCall-durable-V3.js index 6bf5f9534f7..9664cec2d00 100644 --- a/packages/zoe/test/swingsetTests/upgradeCoveredCall/coveredCall-durable-V3.js +++ b/packages/zoe/test/swingsetTests/upgradeCoveredCall/coveredCall-durable-V3.js @@ -1,5 +1,4 @@ import { M, mustMatch } from '@agoric/store'; -import '../../../exported.js'; import { prepareExoClass, prepareExo } from '@agoric/vat-data'; import { swapExact } from '../../../src/contractSupport/index.js'; diff --git a/packages/zoe/test/unitTests/contracts/loan/addCollateral.test.js b/packages/zoe/test/unitTests/contracts/loan/addCollateral.test.js index 8f5f4c35e99..f37dfe1a663 100644 --- a/packages/zoe/test/unitTests/contracts/loan/addCollateral.test.js +++ b/packages/zoe/test/unitTests/contracts/loan/addCollateral.test.js @@ -1,6 +1,5 @@ // @ts-nocheck import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js'; -import '../../../../exported.js'; import { AmountMath } from '@agoric/ertp'; diff --git a/packages/zoe/test/unitTests/contracts/loan/borrow.test.js b/packages/zoe/test/unitTests/contracts/loan/borrow.test.js index 2382d23fef4..f393a48a1cd 100644 --- a/packages/zoe/test/unitTests/contracts/loan/borrow.test.js +++ b/packages/zoe/test/unitTests/contracts/loan/borrow.test.js @@ -1,7 +1,6 @@ // @ts-nocheck /* eslint @typescript-eslint/no-floating-promises: "warn" */ import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js'; -import '../../../../exported.js'; import { AmountMath } from '@agoric/ertp'; import { E } from '@endo/eventual-send'; diff --git a/packages/zoe/test/unitTests/contracts/loan/close.test.js b/packages/zoe/test/unitTests/contracts/loan/close.test.js index ae63c69fa39..e6965d15d1d 100644 --- a/packages/zoe/test/unitTests/contracts/loan/close.test.js +++ b/packages/zoe/test/unitTests/contracts/loan/close.test.js @@ -1,6 +1,5 @@ // @ts-nocheck import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js'; -import '../../../../exported.js'; import { E } from '@endo/eventual-send'; import { AmountMath } from '@agoric/ertp'; diff --git a/packages/zoe/test/unitTests/contracts/loan/helpers.js b/packages/zoe/test/unitTests/contracts/loan/helpers.js index cb6bab91bd6..679ca0d7b84 100644 --- a/packages/zoe/test/unitTests/contracts/loan/helpers.js +++ b/packages/zoe/test/unitTests/contracts/loan/helpers.js @@ -4,8 +4,6 @@ import '@agoric/swingset-liveslots/tools/prepare-test-env.js'; import path from 'path'; -import '../../../../exported.js'; - import { E } from '@endo/eventual-send'; import bundleSource from '@endo/bundle-source'; import { makeIssuerKit, AmountMath } from '@agoric/ertp'; diff --git a/packages/zoe/test/unitTests/contracts/loan/lend.test.js b/packages/zoe/test/unitTests/contracts/loan/lend.test.js index f19a80f2053..8f728b23938 100644 --- a/packages/zoe/test/unitTests/contracts/loan/lend.test.js +++ b/packages/zoe/test/unitTests/contracts/loan/lend.test.js @@ -1,6 +1,5 @@ // @ts-nocheck import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js'; -import '../../../../exported.js'; import { E } from '@endo/eventual-send'; import { AmountMath } from '@agoric/ertp'; diff --git a/packages/zoe/test/unitTests/contracts/loan/liquidate.test.js b/packages/zoe/test/unitTests/contracts/loan/liquidate.test.js index 4a321559beb..2fc65c4a122 100644 --- a/packages/zoe/test/unitTests/contracts/loan/liquidate.test.js +++ b/packages/zoe/test/unitTests/contracts/loan/liquidate.test.js @@ -1,5 +1,4 @@ import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js'; -import '../../../../exported.js'; import { AmountMath } from '@agoric/ertp'; diff --git a/packages/zoe/test/unitTests/contracts/loan/loan-e2e.test.js b/packages/zoe/test/unitTests/contracts/loan/loan-e2e.test.js index fa8f7ea073f..ee15d579199 100644 --- a/packages/zoe/test/unitTests/contracts/loan/loan-e2e.test.js +++ b/packages/zoe/test/unitTests/contracts/loan/loan-e2e.test.js @@ -2,8 +2,6 @@ import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js'; import path from 'path'; -import '../../../../exported.js'; - import { E } from '@endo/eventual-send'; import { AmountMath } from '@agoric/ertp'; import bundleSource from '@endo/bundle-source'; diff --git a/packages/zoe/test/unitTests/contracts/loan/updateDebt.test.js b/packages/zoe/test/unitTests/contracts/loan/updateDebt.test.js index c757042eb70..38159917406 100644 --- a/packages/zoe/test/unitTests/contracts/loan/updateDebt.test.js +++ b/packages/zoe/test/unitTests/contracts/loan/updateDebt.test.js @@ -1,5 +1,4 @@ import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js'; -import '../../../../exported.js'; import { calculateInterest } from '../../../../src/contracts/loan/updateDebt.js'; import { makeRatio } from '../../../../src/contractSupport/index.js'; diff --git a/packages/zoe/test/unitTests/contracts/oracle.test.js b/packages/zoe/test/unitTests/contracts/oracle.test.js index 2f1693aee19..2f3b36e463a 100644 --- a/packages/zoe/test/unitTests/contracts/oracle.test.js +++ b/packages/zoe/test/unitTests/contracts/oracle.test.js @@ -12,8 +12,6 @@ import { E } from '@endo/eventual-send'; import { makeFakeVatAdmin } from '../../../tools/fakeVatAdmin.js'; import { makeZoeForTest } from '../../../tools/setup-zoe.js'; -import '../../../src/contracts/exported.js'; - /** * @typedef {object} TestContext * @property {ZoeService} zoe diff --git a/packages/zoe/test/unitTests/contracts/priceAggregator.test.js b/packages/zoe/test/unitTests/contracts/priceAggregator.test.js index ef855fd0ba3..6540fc0832f 100644 --- a/packages/zoe/test/unitTests/contracts/priceAggregator.test.js +++ b/packages/zoe/test/unitTests/contracts/priceAggregator.test.js @@ -21,7 +21,6 @@ import { makeZoeForTest } from '../../../tools/setup-zoe.js'; import buildManualTimer from '../../../tools/manualTimer.js'; import { start } from '../../../src/contracts/priceAggregator.js'; -import '../../../src/contracts/exported.js'; import { addRatios, makeRatio, diff --git a/packages/zoe/test/unitTests/contracts/scaledPriceAuthority.test.js b/packages/zoe/test/unitTests/contracts/scaledPriceAuthority.test.js index b5fff3bb0e2..f4e10c86f34 100644 --- a/packages/zoe/test/unitTests/contracts/scaledPriceAuthority.test.js +++ b/packages/zoe/test/unitTests/contracts/scaledPriceAuthority.test.js @@ -13,8 +13,6 @@ import { makeFakeVatAdmin } from '../../../tools/fakeVatAdmin.js'; import buildManualTimer from '../../../tools/manualTimer.js'; import { makeManualPriceAuthority } from '../../../tools/manualPriceAuthority.js'; -import '../../../src/contracts/exported.js'; - // This contract still uses 'prepare', so this test covers that case. /** * @typedef {object} TestContext diff --git a/packages/zoe/test/unitTests/scriptedOracle.test.js b/packages/zoe/test/unitTests/scriptedOracle.test.js index 6a817c2fe1b..bb955b1ba75 100644 --- a/packages/zoe/test/unitTests/scriptedOracle.test.js +++ b/packages/zoe/test/unitTests/scriptedOracle.test.js @@ -12,7 +12,6 @@ import { assert } from '@agoric/assert'; import { makeFakeVatAdmin } from '../../tools/fakeVatAdmin.js'; import { makeZoeForTest } from '../../tools/setup-zoe.js'; -import '../../src/contracts/exported.js'; import buildManualTimer from '../../tools/manualTimer.js'; import { setup } from './setupBasicMints.js'; import { assertPayoutAmount } from '../zoeTestHelpers.js'; From 3367a51610eaf4aaf1e4320c13ab9955e987c16f Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 18 May 2024 07:18:17 -0700 Subject: [PATCH 23/26] chore(types): drop noop network/exported.js It didn't have any ambient exports. The named exports are in the package entrypoint. --- packages/agoric-cli/src/init.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/agoric-cli/src/init.js b/packages/agoric-cli/src/init.js index 5b68937bb7c..a95177a6a33 100644 --- a/packages/agoric-cli/src/init.js +++ b/packages/agoric-cli/src/init.js @@ -2,7 +2,6 @@ import chalk from 'chalk'; import { makePspawn } from './helpers.js'; /// -/// // Use either an absolute template URL, or find it relative to DAPP_URL_BASE. const gitURL = (relativeOrAbsoluteURL, base) => { From 09303750e6b7451e4674cee543cde41ccba69fdc Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 18 May 2024 07:30:13 -0700 Subject: [PATCH 24/26] chore(types): rm unused import types-ambient --- packages/inter-protocol/test/psm/psm.test.js | 2 -- packages/inter-protocol/test/vaultFactory/driver.js | 1 - .../test/vaultFactory/replacePriceAuthority.test.js | 1 - packages/inter-protocol/test/vaultFactory/storage.test.js | 2 -- packages/inter-protocol/test/vaultFactory/vaultFactory.test.js | 1 - packages/inter-protocol/test/vaultFactory/vaultFactoryUtils.js | 1 - .../inter-protocol/test/vaultFactory/vaultLiquidation.test.js | 1 - packages/notifier/test/notifier-examples.test.js | 2 -- packages/notifier/test/publish-kit.test.js | 1 - packages/notifier/test/subscriber-examples.test.js | 2 -- packages/smart-wallet/src/offers.js | 3 --- packages/store/test/AtomicProvider.test.js | 2 -- packages/store/test/store.test.js | 2 -- packages/vats/test/network.test.js | 1 - packages/wallet/api/test/getPursesNotifier.test.js | 2 -- packages/wallet/api/test/lib-wallet.test.js | 2 -- packages/zoe/test/unitTests/contractSupport/ratio.test.js | 2 -- 17 files changed, 28 deletions(-) diff --git a/packages/inter-protocol/test/psm/psm.test.js b/packages/inter-protocol/test/psm/psm.test.js index 47159fa359d..b8cd41e40e6 100644 --- a/packages/inter-protocol/test/psm/psm.test.js +++ b/packages/inter-protocol/test/psm/psm.test.js @@ -1,7 +1,5 @@ import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; -import '../../src/vaultFactory/types-ambient.js'; - import { AmountMath, makeIssuerKit } from '@agoric/ertp'; import { split } from '@agoric/ertp/src/legacy-payment-helpers.js'; import { CONTRACT_ELECTORATE, ParamTypes } from '@agoric/governance'; diff --git a/packages/inter-protocol/test/vaultFactory/driver.js b/packages/inter-protocol/test/vaultFactory/driver.js index c119cf20387..38e0344d5d9 100644 --- a/packages/inter-protocol/test/vaultFactory/driver.js +++ b/packages/inter-protocol/test/vaultFactory/driver.js @@ -23,7 +23,6 @@ import { startVaultFactory, } from '../../src/proposals/econ-behaviors.js'; import { startEconomicCommittee } from '../../src/proposals/startEconCommittee.js'; -import '../../src/vaultFactory/types-ambient.js'; import { installPuppetGovernance, setupBootstrap, diff --git a/packages/inter-protocol/test/vaultFactory/replacePriceAuthority.test.js b/packages/inter-protocol/test/vaultFactory/replacePriceAuthority.test.js index 11e762d8652..a9b7aca8a1f 100644 --- a/packages/inter-protocol/test/vaultFactory/replacePriceAuthority.test.js +++ b/packages/inter-protocol/test/vaultFactory/replacePriceAuthority.test.js @@ -35,7 +35,6 @@ import { startVaultFactory, } from '../../src/proposals/econ-behaviors.js'; -import '../../src/vaultFactory/types-ambient.js'; import { defaultParamValues } from './vaultFactoryUtils.js'; /** diff --git a/packages/inter-protocol/test/vaultFactory/storage.test.js b/packages/inter-protocol/test/vaultFactory/storage.test.js index ff823594bbf..2758ad918f9 100644 --- a/packages/inter-protocol/test/vaultFactory/storage.test.js +++ b/packages/inter-protocol/test/vaultFactory/storage.test.js @@ -6,8 +6,6 @@ import { E } from '@endo/eventual-send'; import { assertTopicPathData, subscriptionKey } from '../supports.js'; import { makeDriverContext, makeManagerDriver } from './driver.js'; -import '../../src/vaultFactory/types-ambient.js'; - /** @typedef {import('./driver.js').DriverContext & {}} Context */ /** @type {import('ava').TestFn} */ const test = unknownTest; diff --git a/packages/inter-protocol/test/vaultFactory/vaultFactory.test.js b/packages/inter-protocol/test/vaultFactory/vaultFactory.test.js index da03c8defb5..6ffeed52454 100644 --- a/packages/inter-protocol/test/vaultFactory/vaultFactory.test.js +++ b/packages/inter-protocol/test/vaultFactory/vaultFactory.test.js @@ -28,7 +28,6 @@ import { E } from '@endo/eventual-send'; import { calculateCurrentDebt } from '../../src/interest-math.js'; import { SECONDS_PER_YEAR } from '../../src/interest.js'; import { startVaultFactory } from '../../src/proposals/econ-behaviors.js'; -import '../../src/vaultFactory/types-ambient.js'; import { metricsTracker, reserveInitialState, diff --git a/packages/inter-protocol/test/vaultFactory/vaultFactoryUtils.js b/packages/inter-protocol/test/vaultFactory/vaultFactoryUtils.js index b73dadbcda9..62f4e6e94cd 100644 --- a/packages/inter-protocol/test/vaultFactory/vaultFactoryUtils.js +++ b/packages/inter-protocol/test/vaultFactory/vaultFactoryUtils.js @@ -12,7 +12,6 @@ import { setupReserve, startAuctioneer, } from '../../src/proposals/econ-behaviors.js'; -import '../../src/vaultFactory/types-ambient.js'; import { installPuppetGovernance, produceInstallations, diff --git a/packages/inter-protocol/test/vaultFactory/vaultLiquidation.test.js b/packages/inter-protocol/test/vaultFactory/vaultLiquidation.test.js index 3b06bc64c5b..56aed15a328 100644 --- a/packages/inter-protocol/test/vaultFactory/vaultLiquidation.test.js +++ b/packages/inter-protocol/test/vaultFactory/vaultLiquidation.test.js @@ -28,7 +28,6 @@ import { SECONDS_PER_WEEK as ONE_WEEK, startVaultFactory, } from '../../src/proposals/econ-behaviors.js'; -import '../../src/vaultFactory/types-ambient.js'; import { reserveInitialState, subscriptionTracker, diff --git a/packages/notifier/test/notifier-examples.test.js b/packages/notifier/test/notifier-examples.test.js index 296cd95819f..1c1f3cee026 100644 --- a/packages/notifier/test/notifier-examples.test.js +++ b/packages/notifier/test/notifier-examples.test.js @@ -9,8 +9,6 @@ import { } from '../src/index.js'; import { paula, alice, bob } from './iterable-testing-tools.js'; -import '../src/types.js'; - const last = array => array[array.length - 1]; test('notifier for-await-of success example', async t => { diff --git a/packages/notifier/test/publish-kit.test.js b/packages/notifier/test/publish-kit.test.js index 8f931b934c9..58ff9dd83f6 100644 --- a/packages/notifier/test/publish-kit.test.js +++ b/packages/notifier/test/publish-kit.test.js @@ -17,7 +17,6 @@ import { subscribeLatest, prepareDurablePublishKit, } from '../src/index.js'; -import '../src/types.js'; import { invertPromiseSettlement } from './iterable-testing-tools.js'; /** diff --git a/packages/notifier/test/subscriber-examples.test.js b/packages/notifier/test/subscriber-examples.test.js index 4bac5c2bb25..2ca2b0ef9f5 100644 --- a/packages/notifier/test/subscriber-examples.test.js +++ b/packages/notifier/test/subscriber-examples.test.js @@ -9,8 +9,6 @@ import { } from '../src/index.js'; import { paula, alice, bob, carol } from './iterable-testing-tools.js'; -import '../src/types.js'; - test('subscription for-await-of success example', async t => { const { publication, subscription } = makeSubscriptionKit(); paula(publication); diff --git a/packages/smart-wallet/src/offers.js b/packages/smart-wallet/src/offers.js index 75f7685453e..a5c87ecdbc9 100644 --- a/packages/smart-wallet/src/offers.js +++ b/packages/smart-wallet/src/offers.js @@ -1,6 +1,3 @@ -// XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512 -import '@agoric/zoe/src/zoeService/types-ambient.js'; - /** * @typedef {number | string} OfferId */ diff --git a/packages/store/test/AtomicProvider.test.js b/packages/store/test/AtomicProvider.test.js index 8b63ddba1c4..0da3c5e715d 100644 --- a/packages/store/test/AtomicProvider.test.js +++ b/packages/store/test/AtomicProvider.test.js @@ -5,8 +5,6 @@ import { setTimeout } from 'timers'; import { makeScalarMapStore } from '../src/stores/scalarMapStore.js'; import { makeAtomicProvider } from '../src/stores/store-utils.js'; -import '../src/types.js'; - test('race', async t => { const store = makeScalarMapStore('foo'); const provider = makeAtomicProvider(store); diff --git a/packages/store/test/store.test.js b/packages/store/test/store.test.js index 453f4b71d83..145bdb7a17e 100644 --- a/packages/store/test/store.test.js +++ b/packages/store/test/store.test.js @@ -8,8 +8,6 @@ import { makeScalarSetStore } from '../src/stores/scalarSetStore.js'; import { makeScalarWeakMapStore } from '../src/stores/scalarWeakMapStore.js'; import { provideLazy } from '../src/stores/store-utils.js'; -import '../src/types.js'; - function check(t, mode, objMaker) { // Check the full API, and make sure object identity isn't a problem by // creating two potentially-similar things for use as keys. diff --git a/packages/vats/test/network.test.js b/packages/vats/test/network.test.js index f08d7d34bff..636de11ee78 100644 --- a/packages/vats/test/network.test.js +++ b/packages/vats/test/network.test.js @@ -13,7 +13,6 @@ import { prepareVowTools } from '@agoric/vow/vat.js'; import { buildRootObject as ibcBuildRootObject } from '../src/vat-ibc.js'; import { buildRootObject as networkBuildRootObject } from '../src/vat-network.js'; -import '../src/types.js'; import { registerNetworkProtocols } from '../src/proposals/network-proposal.js'; const { fakeVomKit } = reincarnate({ relaxDurabilityRules: false }); diff --git a/packages/wallet/api/test/getPursesNotifier.test.js b/packages/wallet/api/test/getPursesNotifier.test.js index 757c7797baa..e1d74cd6ef4 100644 --- a/packages/wallet/api/test/getPursesNotifier.test.js +++ b/packages/wallet/api/test/getPursesNotifier.test.js @@ -11,8 +11,6 @@ import { } from '@agoric/vats/src/nameHub.js'; import { makeWalletRoot } from '../src/lib-wallet.js'; -import '../src/types-ambient.js'; - const mixinMyAddress = prepareMixinMyAddress(makeHeapZone()); function makeFakeMyAddressNameAdmin() { diff --git a/packages/wallet/api/test/lib-wallet.test.js b/packages/wallet/api/test/lib-wallet.test.js index 6d958a82367..2852a3ade42 100644 --- a/packages/wallet/api/test/lib-wallet.test.js +++ b/packages/wallet/api/test/lib-wallet.test.js @@ -21,8 +21,6 @@ import { resolve as importMetaResolve } from 'import-meta-resolve'; import { makeHeapZone } from '@agoric/zone'; import { makeWalletRoot } from '../src/lib-wallet.js'; -import '../src/types-ambient.js'; - const ZOE_INVITE_PURSE_PETNAME = 'Default Zoe invite purse'; const mixinMyAddress = prepareMixinMyAddress(makeHeapZone()); diff --git a/packages/zoe/test/unitTests/contractSupport/ratio.test.js b/packages/zoe/test/unitTests/contractSupport/ratio.test.js index 69a3febe1b6..2c7896a5ad6 100644 --- a/packages/zoe/test/unitTests/contractSupport/ratio.test.js +++ b/packages/zoe/test/unitTests/contractSupport/ratio.test.js @@ -1,7 +1,5 @@ import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js'; -import '../../../src/contractSupport/types-ambient.js'; - import { makeIssuerKit, AmountMath } from '@agoric/ertp'; import { makeRatio, From f825d5ab6826ef7512863ad945940e051a2f93a8 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 18 May 2024 07:18:04 -0700 Subject: [PATCH 25/26] BREAKING CHANGE: drop exported.js --- packages/assert/exported.js | 1 - packages/assert/package.json | 1 - packages/assert/tsconfig.json | 1 - packages/deploy-script-support/exported.js | 1 - packages/deploy-script-support/package.json | 3 +-- packages/inter-protocol/exported.js | 2 -- packages/inter-protocol/package.json | 1 - packages/network/exported.js | 1 - packages/network/package.json | 8 ++------ packages/pegasus/exported.js | 2 -- packages/pegasus/package.json | 1 - packages/vats/exported.js | 1 - packages/vats/package.json | 3 +-- packages/wallet/api/exported.js | 1 - 14 files changed, 4 insertions(+), 23 deletions(-) delete mode 100644 packages/assert/exported.js delete mode 100644 packages/deploy-script-support/exported.js delete mode 100644 packages/inter-protocol/exported.js delete mode 100644 packages/network/exported.js delete mode 100644 packages/pegasus/exported.js delete mode 100644 packages/vats/exported.js delete mode 100644 packages/wallet/api/exported.js diff --git a/packages/assert/exported.js b/packages/assert/exported.js deleted file mode 100644 index e6bb3f69af2..00000000000 --- a/packages/assert/exported.js +++ /dev/null @@ -1 +0,0 @@ -import './src/types-ambient.js'; diff --git a/packages/assert/package.json b/packages/assert/package.json index 4c88f1f6917..ff95793a077 100755 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -46,7 +46,6 @@ "homepage": "https://github.com/Agoric/agoric-sdk#readme", "files": [ "src/", - "exported.js", "NEWS.md" ], "publishConfig": { diff --git a/packages/assert/tsconfig.json b/packages/assert/tsconfig.json index f2b29dfa6ae..f6d24d3de00 100644 --- a/packages/assert/tsconfig.json +++ b/packages/assert/tsconfig.json @@ -2,7 +2,6 @@ { "extends": "../../tsconfig.json", "include": [ - "exported.js", "src/**/*.js", "test/**/*.js", ], diff --git a/packages/deploy-script-support/exported.js b/packages/deploy-script-support/exported.js deleted file mode 100644 index 25402b3902a..00000000000 --- a/packages/deploy-script-support/exported.js +++ /dev/null @@ -1 +0,0 @@ -import './src/externalTypes.js'; diff --git a/packages/deploy-script-support/package.json b/packages/deploy-script-support/package.json index ffe2e236b7c..58ce70fe5ee 100644 --- a/packages/deploy-script-support/package.json +++ b/packages/deploy-script-support/package.json @@ -58,8 +58,7 @@ }, "files": [ "src", - "NEWS.md", - "exported.js" + "NEWS.md" ], "ava": { "files": [ diff --git a/packages/inter-protocol/exported.js b/packages/inter-protocol/exported.js deleted file mode 100644 index 8c5daf44e25..00000000000 --- a/packages/inter-protocol/exported.js +++ /dev/null @@ -1,2 +0,0 @@ -import './src/psm/types-ambient.js'; -import './src/vaultFactory/types-ambient.js'; diff --git a/packages/inter-protocol/package.json b/packages/inter-protocol/package.json index fb0a0077c26..e2457938cd7 100644 --- a/packages/inter-protocol/package.json +++ b/packages/inter-protocol/package.json @@ -66,7 +66,6 @@ "files": [ "scripts", "src/", - "exported.js", "NEWS.md" ], "ava": { diff --git a/packages/network/exported.js b/packages/network/exported.js deleted file mode 100644 index f4cba017ea1..00000000000 --- a/packages/network/exported.js +++ /dev/null @@ -1 +0,0 @@ -import './src/types.js'; diff --git a/packages/network/package.json b/packages/network/package.json index ae15fedcb3b..e398443ceed 100644 --- a/packages/network/package.json +++ b/packages/network/package.json @@ -40,17 +40,13 @@ "c8": "^9.1.0" }, "exports": { - ".": "./src/index.js", - "./exported.js": "./exported.js" + ".": "./src/index.js" }, "files": [ "CHANGELOG.md", "src/", "scripts/", - "tools/", - "*.json", - "globals.d.ts", - "exported.js" + "tools/" ], "publishConfig": { "access": "public" diff --git a/packages/pegasus/exported.js b/packages/pegasus/exported.js deleted file mode 100644 index 09b30a91105..00000000000 --- a/packages/pegasus/exported.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -import './src/types.js'; diff --git a/packages/pegasus/package.json b/packages/pegasus/package.json index eaf090b4050..346daa6bfd3 100644 --- a/packages/pegasus/package.json +++ b/packages/pegasus/package.json @@ -55,7 +55,6 @@ "files": [ "scripts/", "src/", - "exported.js", "NEWS.md" ], "ava": { diff --git a/packages/vats/exported.js b/packages/vats/exported.js deleted file mode 100644 index 9fe64fe408d..00000000000 --- a/packages/vats/exported.js +++ /dev/null @@ -1 +0,0 @@ -import './src/core/types-ambient.js'; diff --git a/packages/vats/package.json b/packages/vats/package.json index 723a985f19d..19f739a0652 100644 --- a/packages/vats/package.json +++ b/packages/vats/package.json @@ -58,8 +58,7 @@ "src/", "scripts/", "tools/", - "index.*", - "exported.*" + "index.*" ], "publishConfig": { "access": "public" diff --git a/packages/wallet/api/exported.js b/packages/wallet/api/exported.js deleted file mode 100644 index e6bb3f69af2..00000000000 --- a/packages/wallet/api/exported.js +++ /dev/null @@ -1 +0,0 @@ -import './src/types-ambient.js'; From 8573fadf29d6d7d87f183e2bc0cc1df2dad8f3e6 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 20 May 2024 13:05:15 -0700 Subject: [PATCH 26/26] chore: update type-coverage --- packages/agoric-cli/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/agoric-cli/package.json b/packages/agoric-cli/package.json index b245ca7e0ce..d41c3635f5c 100644 --- a/packages/agoric-cli/package.json +++ b/packages/agoric-cli/package.json @@ -99,6 +99,6 @@ "workerThreads": false }, "typeCoverage": { - "atLeast": 76.88 + "atLeast": 76.99 } }