From bb16600196efa92caad30ec8fbb7ec9b37eb623e Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 16 Aug 2022 09:03:47 -0700 Subject: [PATCH 01/12] WIP: stop maxNodeModulesJsDepth in deploy-script-support --- packages/deploy-script-support/package.json | 2 +- packages/deploy-script-support/src/helpers.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/deploy-script-support/package.json b/packages/deploy-script-support/package.json index 5ec50a68818..df78b44a97a 100644 --- a/packages/deploy-script-support/package.json +++ b/packages/deploy-script-support/package.json @@ -13,7 +13,7 @@ "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint:eslint": "eslint .", - "lint:types": "tsc --maxNodeModuleJsDepth 5 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint": "run-s --continue-on-error lint:*" }, "repository": { diff --git a/packages/deploy-script-support/src/helpers.js b/packages/deploy-script-support/src/helpers.js index 1d506baa365..7be4edb65fb 100644 --- a/packages/deploy-script-support/src/helpers.js +++ b/packages/deploy-script-support/src/helpers.js @@ -1,4 +1,6 @@ // @ts-check +import '@agoric/inter-protocol/exported.js'; +import '@endo/captp/src/types.js'; import '@agoric/zoe/exported.js'; import { E } from '@endo/far'; From 14cdea394f04880d961ffd1b094caaec87976e6a Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 16 Aug 2022 09:04:37 -0700 Subject: [PATCH 02/12] chore: fewer maxNodeModuleJsDepth --- packages/casting/package.json | 2 +- packages/cosmic-swingset/package.json | 2 +- packages/governance/package.json | 2 +- packages/inter-protocol/package.json | 2 +- packages/notifier/package.json | 2 +- packages/store/package.json | 2 +- packages/telemetry/package.json | 2 +- packages/vats/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/casting/package.json b/packages/casting/package.json index 54cd8eb0130..59899f10b51 100644 --- a/packages/casting/package.json +++ b/packages/casting/package.json @@ -13,7 +13,7 @@ "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", - "lint:types": "tsc --maxNodeModuleJsDepth 4 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint --ext .js,.ts ." }, "keywords": [], diff --git a/packages/cosmic-swingset/package.json b/packages/cosmic-swingset/package.json index 5779e23564c..1fee314c772 100644 --- a/packages/cosmic-swingset/package.json +++ b/packages/cosmic-swingset/package.json @@ -15,7 +15,7 @@ "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", - "lint:types": "tsc --maxNodeModuleJsDepth 3 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint ." }, "keywords": [], diff --git a/packages/governance/package.json b/packages/governance/package.json index 7401c3f7541..36a96c474c2 100644 --- a/packages/governance/package.json +++ b/packages/governance/package.json @@ -16,7 +16,7 @@ "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", "lint:eslint": "eslint .", - "lint:types": "tsc --maxNodeModuleJsDepth 3 -p jsconfig.json" + "lint:types": "tsc -p jsconfig.json" }, "repository": { "type": "git", diff --git a/packages/inter-protocol/package.json b/packages/inter-protocol/package.json index cadc0e96973..278f2aa8618 100644 --- a/packages/inter-protocol/package.json +++ b/packages/inter-protocol/package.json @@ -16,7 +16,7 @@ "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", "lint:eslint": "eslint .", - "lint:types": "tsc --maxNodeModuleJsDepth 5 -p jsconfig.json" + "lint:types": "tsc -p jsconfig.json" }, "repository": { "type": "git", diff --git a/packages/notifier/package.json b/packages/notifier/package.json index 78cc19bac42..ce6ed342357 100644 --- a/packages/notifier/package.json +++ b/packages/notifier/package.json @@ -15,7 +15,7 @@ "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", "lint:eslint": "eslint .", - "lint:types": "tsc --maxNodeModuleJsDepth 3 -p jsconfig.json" + "lint:types": "tsc -p jsconfig.json" }, "repository": { "type": "git", diff --git a/packages/store/package.json b/packages/store/package.json index febe9e0795c..ebbd9b0064d 100644 --- a/packages/store/package.json +++ b/packages/store/package.json @@ -13,7 +13,7 @@ "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", - "lint:types": "tsc --maxNodeModuleJsDepth 3 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint ." }, "repository": { diff --git a/packages/telemetry/package.json b/packages/telemetry/package.json index 7042e76c249..15c4a87fcda 100644 --- a/packages/telemetry/package.json +++ b/packages/telemetry/package.json @@ -12,7 +12,7 @@ "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", - "lint:types": "tsc --maxNodeModuleJsDepth 4 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint ." }, "bin": { diff --git a/packages/vats/package.json b/packages/vats/package.json index 7b57eb69c29..236ef42ff5d 100644 --- a/packages/vats/package.json +++ b/packages/vats/package.json @@ -18,7 +18,7 @@ "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", - "lint:types": "tsc --maxNodeModuleJsDepth 5 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint ." }, "keywords": [], From 4f34a26d1e2dfcafcfef68f9e2a47ac699e94cdb Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 16 Aug 2022 09:11:37 -0700 Subject: [PATCH 03/12] chore(zoe): remove maxNodeModuleJsDepth --- packages/zoe/exported.js | 4 ++++ packages/zoe/package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/zoe/exported.js b/packages/zoe/exported.js index cb872f8909a..6757768e432 100644 --- a/packages/zoe/exported.js +++ b/packages/zoe/exported.js @@ -1,3 +1,7 @@ +// XXX without this types don't resolve +// eslint-disable-next-line import/no-extraneous-dependencies -- TODO remove +import '@agoric/inter-protocol/exported.js'; + import './src/contractFacet/types.js'; import './src/zoeService/types.js'; import './src/contractSupport/types.js'; diff --git a/packages/zoe/package.json b/packages/zoe/package.json index ecc0b5c913d..daf4f6984be 100644 --- a/packages/zoe/package.json +++ b/packages/zoe/package.json @@ -21,7 +21,7 @@ "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", "lint:eslint": "eslint .", - "lint:types": "tsc --maxNodeModuleJsDepth 4 -p jsconfig.json" + "lint:types": "tsc -p jsconfig.json" }, "repository": { "type": "git", From 6bc20ec310c4af52bb1aa5a4e77fe93107183097 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 16 Aug 2022 09:20:18 -0700 Subject: [PATCH 04/12] chore(pegasus): remove maxNodeModuleJsDepth --- packages/pegasus/exported.js | 4 ++++ packages/pegasus/package.json | 2 +- packages/pegasus/src/types.js | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/pegasus/exported.js b/packages/pegasus/exported.js index 54086a2c401..00348e2a143 100644 --- a/packages/pegasus/exported.js +++ b/packages/pegasus/exported.js @@ -1,3 +1,7 @@ +// XXX without this types don't resolve +// eslint-disable-next-line import/no-extraneous-dependencies -- TODO remove +import '@agoric/inter-protocol/exported.js'; + import './src/types.js'; import '@agoric/notifier/exported.js'; import '@agoric/ertp/exported.js'; diff --git a/packages/pegasus/package.json b/packages/pegasus/package.json index f5c756753cd..ef63765bce5 100644 --- a/packages/pegasus/package.json +++ b/packages/pegasus/package.json @@ -16,7 +16,7 @@ "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", "lint:eslint": "eslint .", - "lint:types": "tsc --maxNodeModuleJsDepth 4 -p jsconfig.json" + "lint:types": "tsc -p jsconfig.json" }, "repository": { "type": "git", diff --git a/packages/pegasus/src/types.js b/packages/pegasus/src/types.js index 60b9be2af94..7040d6c1bb5 100644 --- a/packages/pegasus/src/types.js +++ b/packages/pegasus/src/types.js @@ -5,7 +5,6 @@ /** * @typedef {string} Denom * @typedef {string} DepositAddress - * @typedef {string} Address */ /** From ca50c790284a5ca400d80a671b2f5fcaa4498d04 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 16 Aug 2022 09:25:57 -0700 Subject: [PATCH 05/12] chore(solo): remove maxNodeModuleJsDepth (WIP until @endo/captp fix) --- packages/solo/package.json | 2 +- packages/solo/src/entrypoint.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/solo/package.json b/packages/solo/package.json index 3c103dce606..547ebb798ac 100644 --- a/packages/solo/package.json +++ b/packages/solo/package.json @@ -15,7 +15,7 @@ "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", - "lint:types": "tsc --maxNodeModuleJsDepth 4 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint ." }, "keywords": [], diff --git a/packages/solo/src/entrypoint.js b/packages/solo/src/entrypoint.js index 31867b98b05..7408c5b1c9d 100755 --- a/packages/solo/src/entrypoint.js +++ b/packages/solo/src/entrypoint.js @@ -1,5 +1,8 @@ #! /usr/bin/env node +// XXX types resolution +import '@agoric/swingset-vat/exported.js'; + import '@endo/init/pre-bundle-source.js'; // import lmdb early to work around SES incompatibility From fc3b935b4cf20dc14b9d13e6912cf3bed2562862 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 16 Aug 2022 09:31:12 -0700 Subject: [PATCH 06/12] chore(ertp): remove maxNodeModuleJsDepth --- packages/ERTP/package.json | 2 +- packages/SwingSet/src/controller/initializeSwingset.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/ERTP/package.json b/packages/ERTP/package.json index d15d1ab62da..b9cc1dd4a37 100644 --- a/packages/ERTP/package.json +++ b/packages/ERTP/package.json @@ -17,7 +17,7 @@ "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", "lint:eslint": "eslint .", - "lint:types": "tsc --maxNodeModuleJsDepth 3 -p jsconfig.json" + "lint:types": "tsc -p jsconfig.json" }, "repository": { "type": "git", diff --git a/packages/SwingSet/src/controller/initializeSwingset.js b/packages/SwingSet/src/controller/initializeSwingset.js index 0b36c48091c..1b205063d83 100644 --- a/packages/SwingSet/src/controller/initializeSwingset.js +++ b/packages/SwingSet/src/controller/initializeSwingset.js @@ -3,6 +3,9 @@ import fs from 'fs'; import path from 'path'; +// XXX types resolution +import '@endo/bundle-source/src/types.js'; + import { resolve as resolveModuleSpecifier } from 'import-meta-resolve'; import { assert, details as X } from '@agoric/assert'; import bundleSource from '@endo/bundle-source'; From 6f3b47501e983a8a0438c6709b1fbe7ab1526f2b Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 16 Aug 2022 09:43:02 -0700 Subject: [PATCH 07/12] chore(cache): remove maxNodeModuleJsDepth --- packages/cache/package.json | 2 +- packages/notifier/src/types.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/cache/package.json b/packages/cache/package.json index 39b87877438..61a6cb3171c 100644 --- a/packages/cache/package.json +++ b/packages/cache/package.json @@ -12,7 +12,7 @@ "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", - "lint:types": "tsc --maxNodeModuleJsDepth 4 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint --ext .js,.ts ." }, "keywords": [], diff --git a/packages/notifier/src/types.js b/packages/notifier/src/types.js index 4a52093b466..eafd37a8508 100644 --- a/packages/notifier/src/types.js +++ b/packages/notifier/src/types.js @@ -5,16 +5,17 @@ * @typedef {import('@endo/far').ERef} ERef */ +// XXX import src/types until https://github.com/endojs/endo/issues/1254 /** * @template T - * @typedef {import('@endo/promise-kit').PromiseKit} PromiseKit + * @typedef {import('@endo/promise-kit/src/types.js').PromiseKit} PromiseKit */ /** * Deprecated. Use PromiseKit instead. * * @template T - * @typedef {import('@endo/promise-kit').PromiseRecord} PromiseRecord + * @typedef {import('@endo/promise-kit/src/types.js').PromiseRecord} PromiseRecord */ /** From 68a0b4a3d521ce53f4ebeddcac8cd7c53218b7e8 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 16 Aug 2022 09:47:29 -0700 Subject: [PATCH 08/12] chore(swingset-vat): WIP remove maxNodeModuleJsDepth --- packages/SwingSet/exported.js | 7 +++++++ packages/SwingSet/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/SwingSet/exported.js b/packages/SwingSet/exported.js index 99c77797b4b..041c0aa9410 100644 --- a/packages/SwingSet/exported.js +++ b/packages/SwingSet/exported.js @@ -1 +1,8 @@ /// + +// XXX without this types don't resolve +// eslint-disable-next-line import/no-extraneous-dependencies -- TODO remove +import '@agoric/governance/exported.js'; + +// XXX https://github.com/endojs/endo/issues/1254 +import '@endo/captp/src/types.js'; diff --git a/packages/SwingSet/package.json b/packages/SwingSet/package.json index ab7c78e89f2..aed1f821c61 100644 --- a/packages/SwingSet/package.json +++ b/packages/SwingSet/package.json @@ -17,7 +17,7 @@ "test:xs-worker": "ava test/workers/test-worker.js -m 'xs vat manager'", "lint-fix": "yarn lint:eslint --fix", "lint": "yarn lint:types&&yarn lint:eslint", - "lint:types": "tsc --maxNodeModuleJsDepth 3 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint ." }, "devDependencies": { From badea57894970eee241db21d2614346e13b8da0f Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 16 Aug 2022 09:54:18 -0700 Subject: [PATCH 09/12] chore(agoric-cli): remove maxNodeModuleJsDepth --- packages/agoric-cli/src/main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/agoric-cli/src/main.js b/packages/agoric-cli/src/main.js index b7eb4fbad50..b4c865ea9b6 100644 --- a/packages/agoric-cli/src/main.js +++ b/packages/agoric-cli/src/main.js @@ -1,5 +1,9 @@ /* eslint-disable @jessie.js/no-nested-await */ /* global process */ + +// XXX types resolution https://github.com/endojs/endo/issues/1254 +import '@endo/captp/src/types.js'; + import { Command } from 'commander'; import path from 'path'; import { assert, details as X } from '@agoric/assert'; From a6360fcf071053a714c881d7931cd8a1a91abe27 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 16 Aug 2022 10:00:49 -0700 Subject: [PATCH 10/12] chore(wallet/api): WIP --- packages/wallet/api/exported.js | 5 +++++ packages/wallet/api/package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/wallet/api/exported.js b/packages/wallet/api/exported.js index f4cba017ea1..662c47f3f59 100644 --- a/packages/wallet/api/exported.js +++ b/packages/wallet/api/exported.js @@ -1 +1,6 @@ +// XXX without this types don't resolve +// eslint-disable-next-line import/no-extraneous-dependencies -- TODO remove +import '@agoric/governance/exported.js'; +import '@agoric/zoe/exported.js'; + import './src/types.js'; diff --git a/packages/wallet/api/package.json b/packages/wallet/api/package.json index 3214c52d03e..1ed42e7f2e7 100644 --- a/packages/wallet/api/package.json +++ b/packages/wallet/api/package.json @@ -10,7 +10,7 @@ "test:xs": "exit 0", "lint": "run-s --continue-on-error lint:*", "lint-fix": "yarn lint:eslint --fix", - "lint:types": "tsc --maxNodeModuleJsDepth 3 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint ." }, "devDependencies": { From f9b175d3112a290597dd7bb55ab85f0279b1f9d3 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 16 Aug 2022 10:01:46 -0700 Subject: [PATCH 11/12] chore(web-components): remove maxNodeModuleJsDepth --- packages/web-components/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web-components/package.json b/packages/web-components/package.json index 4584a31cc47..73e203e1a0b 100644 --- a/packages/web-components/package.json +++ b/packages/web-components/package.json @@ -14,7 +14,7 @@ "test:watch": "web-test-runner --watch", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", - "lint:types": "tsc --maxNodeModuleJsDepth 4 -p jsconfig.json", + "lint:types": "tsc -p jsconfig.json", "lint:eslint": "eslint . --ignore-path .gitignore", "analyze": "cem analyze --litelement", "start": "web-dev-server --port 8100" From d68b350b4b64d4e741f7e07c11cd65e48fb93404 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Thu, 22 Sep 2022 10:34:27 -0700 Subject: [PATCH 12/12] inter-protocol explicit --- packages/inter-protocol/src/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/inter-protocol/src/index.js b/packages/inter-protocol/src/index.js index c0d9d7d76dd..12d0724def5 100644 --- a/packages/inter-protocol/src/index.js +++ b/packages/inter-protocol/src/index.js @@ -1 +1,7 @@ +// @ts-check +/// + +// Ambient types. Needed only for dev but this does a runtime import. +import '@agoric/notifier/exported.js'; + export { calculateCurrentDebt } from './interest-math.js';