From fa940e888eb92859c1fb75b1dea680bc9cb0c51d Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 17 Jul 2023 13:13:17 -0700 Subject: [PATCH 01/10] chore(deps): bump typescript-eslint to 6.1 --- package.json | 4 +- packages/eslint-config/package.json | 4 +- yarn.lock | 131 +++++++++++++++++++++++----- 3 files changed, 115 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index a70fa293e00..4d5d987126b 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,8 @@ "@jessie.js/eslint-plugin": "^0.4.0", "@types/express": "^4.17.17", "@types/node": "^16.13.0", - "@typescript-eslint/eslint-plugin": "^5.61.0", - "@typescript-eslint/parser": "^5.61.0", + "@typescript-eslint/eslint-plugin": "^6.1.0", + "@typescript-eslint/parser": "^6.1.0", "ava": "^5.3.0", "c8": "^7.13.0", "conventional-changelog-conventionalcommits": "^4.6.0", diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 2fec95672aa..13b42c5f08e 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -27,8 +27,8 @@ "peerDependencies": { "@endo/eslint-plugin": "^0.4.4", "@jessie.js/eslint-plugin": "^0.4.0", - "@typescript-eslint/eslint-plugin": "^5.61.0", - "@typescript-eslint/parser": "^5.61.0", + "@typescript-eslint/eslint-plugin": "^6.1.0", + "@typescript-eslint/parser": "^6.1.0", "eslint": "^8.36.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-github": "^4.8.0", diff --git a/yarn.lock b/yarn.lock index 418640d4abf..0545502e7bb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -567,17 +567,17 @@ esquery "^1.5.0" jsdoc-type-pratt-parser "~4.0.0" -"@eslint-community/eslint-utils@^4.2.0": - version "4.3.0" - resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.3.0.tgz#a556790523a351b4e47e9d385f47265eaaf9780a" - integrity sha512-v3oplH6FYCULtFuCeqyuTd9D2WKO937Dxdq+GmHOLL72TTRriLxz2VLlNfkZRsvj6PKnOPAtuT6dwrs/pA5DvA== +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== dependencies: eslint-visitor-keys "^3.3.0" -"@eslint-community/regexpp@^4.4.0": - version "4.4.0" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.4.0.tgz#3e61c564fcd6b921cb789838631c5ee44df09403" - integrity sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ== +"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.5.1": + version "4.5.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.5.1.tgz#cdd35dce4fa1a89a4fd42b1599eb35b3af408884" + integrity sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ== "@eslint/eslintrc@^2.1.0": version "2.1.0" @@ -1888,10 +1888,10 @@ resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== -"@types/json-schema@*", "@types/json-schema@^7.0.9": - version "7.0.11" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" - integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== +"@types/json-schema@*", "@types/json-schema@^7.0.12", "@types/json-schema@^7.0.9": + version "7.0.12" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" + integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== "@types/json5@^0.0.29": version "0.0.29" @@ -1968,10 +1968,10 @@ dependencies: "@types/node" "*" -"@types/semver@^7.3.12": - version "7.3.13" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91" - integrity sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw== +"@types/semver@^7.3.12", "@types/semver@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a" + integrity sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw== "@types/send@*": version "0.17.1" @@ -1999,7 +1999,7 @@ resolved "https://registry.yarnpkg.com/@types/triple-beam/-/triple-beam-1.3.2.tgz#38ecb64f01aa0d02b7c8f4222d7c38af6316fef8" integrity sha512-txGIh+0eDFzKGC25zORnswy+br1Ha7hj5cMVwKIU7+s0U2AxxJru/jZSMU6OC9MJWP6+pc/hc6ZjyZShpsyY2g== -"@typescript-eslint/eslint-plugin@^5.1.0", "@typescript-eslint/eslint-plugin@^5.61.0": +"@typescript-eslint/eslint-plugin@^5.1.0": version "5.61.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.61.0.tgz#a1a5290cf33863b4db3fb79350b3c5275a7b1223" integrity sha512-A5l/eUAug103qtkwccSCxn8ZRwT+7RXWkFECdA4Cvl1dOlDUgTpAOfSEElZn2uSUxhdDpnCdetrf0jvU4qrL+g== @@ -2015,7 +2015,25 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/parser@^5.1.0", "@typescript-eslint/parser@^5.61.0": +"@typescript-eslint/eslint-plugin@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.1.0.tgz#96f3ca6615717659d06c9f7161a1d14ab0c49c66" + integrity sha512-qg7Bm5TyP/I7iilGyp6DRqqkt8na00lI6HbjWZObgk3FFSzH5ypRwAHXJhJkwiRtTcfn+xYQIMOR5kJgpo6upw== + dependencies: + "@eslint-community/regexpp" "^4.5.1" + "@typescript-eslint/scope-manager" "6.1.0" + "@typescript-eslint/type-utils" "6.1.0" + "@typescript-eslint/utils" "6.1.0" + "@typescript-eslint/visitor-keys" "6.1.0" + debug "^4.3.4" + graphemer "^1.4.0" + ignore "^5.2.4" + natural-compare "^1.4.0" + natural-compare-lite "^1.4.0" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/parser@^5.1.0": version "5.61.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.61.0.tgz#7fbe3e2951904bb843f8932ebedd6e0635bffb70" integrity sha512-yGr4Sgyh8uO6fSi9hw3jAFXNBHbCtKKFMdX2IkT3ZqpKmtAq3lHS4ixB/COFuAIJpwl9/AqF7j72ZDWYKmIfvg== @@ -2025,6 +2043,17 @@ "@typescript-eslint/typescript-estree" "5.61.0" debug "^4.3.4" +"@typescript-eslint/parser@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.1.0.tgz#3135bf65dca5340d8650703eb8cb83113e156ee5" + integrity sha512-hIzCPvX4vDs4qL07SYzyomamcs2/tQYXg5DtdAfj35AyJ5PIUqhsLf4YrEIFzZcND7R2E8tpQIZKayxg8/6Wbw== + dependencies: + "@typescript-eslint/scope-manager" "6.1.0" + "@typescript-eslint/types" "6.1.0" + "@typescript-eslint/typescript-estree" "6.1.0" + "@typescript-eslint/visitor-keys" "6.1.0" + debug "^4.3.4" + "@typescript-eslint/scope-manager@5.53.0": version "5.53.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.53.0.tgz#42b54f280e33c82939275a42649701024f3fafef" @@ -2041,6 +2070,14 @@ "@typescript-eslint/types" "5.61.0" "@typescript-eslint/visitor-keys" "5.61.0" +"@typescript-eslint/scope-manager@6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.1.0.tgz#a6cdbe11630614f8c04867858a42dd56590796ed" + integrity sha512-AxjgxDn27hgPpe2rQe19k0tXw84YCOsjDJ2r61cIebq1t+AIxbgiXKvD4999Wk49GVaAcdJ/d49FYel+Pp3jjw== + dependencies: + "@typescript-eslint/types" "6.1.0" + "@typescript-eslint/visitor-keys" "6.1.0" + "@typescript-eslint/type-utils@5.61.0": version "5.61.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.61.0.tgz#e90799eb2045c4435ea8378cb31cd8a9fddca47a" @@ -2051,6 +2088,16 @@ debug "^4.3.4" tsutils "^3.21.0" +"@typescript-eslint/type-utils@6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.1.0.tgz#21cc6c3bc1980b03f9eb4e64580d0c5be6f08215" + integrity sha512-kFXBx6QWS1ZZ5Ni89TyT1X9Ag6RXVIVhqDs0vZE/jUeWlBv/ixq2diua6G7ece6+fXw3TvNRxP77/5mOMusx2w== + dependencies: + "@typescript-eslint/typescript-estree" "6.1.0" + "@typescript-eslint/utils" "6.1.0" + debug "^4.3.4" + ts-api-utils "^1.0.1" + "@typescript-eslint/types@5.53.0": version "5.53.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.53.0.tgz#f79eca62b97e518ee124086a21a24f3be267026f" @@ -2061,6 +2108,11 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.61.0.tgz#e99ff11b5792d791554abab0f0370936d8ca50c0" integrity sha512-ldyueo58KjngXpzloHUog/h9REmHl59G1b3a5Sng1GfBo14BkS3ZbMEb3693gnP1k//97lh7bKsp6/V/0v1veQ== +"@typescript-eslint/types@6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.1.0.tgz#2d607c62827bb416ada5c96ebfa2ef84e45a8dfa" + integrity sha512-+Gfd5NHCpDoHDOaU/yIF3WWRI2PcBRKKpP91ZcVbL0t5tQpqYWBs3z/GGhvU+EV1D0262g9XCnyqQh19prU0JQ== + "@typescript-eslint/typescript-estree@5.53.0": version "5.53.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.53.0.tgz#bc651dc28cf18ab248ecd18a4c886c744aebd690" @@ -2087,6 +2139,19 @@ semver "^7.3.7" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.1.0.tgz#ea382f6482ba698d7e993a88ce5391ea7a66c33d" + integrity sha512-nUKAPWOaP/tQjU1IQw9sOPCDavs/iU5iYLiY/6u7gxS7oKQoi4aUxXS1nrrVGTyBBaGesjkcwwHkbkiD5eBvcg== + dependencies: + "@typescript-eslint/types" "6.1.0" + "@typescript-eslint/visitor-keys" "6.1.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" + "@typescript-eslint/utils@5.61.0": version "5.61.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.61.0.tgz#5064838a53e91c754fffbddd306adcca3fe0af36" @@ -2101,6 +2166,19 @@ eslint-scope "^5.1.1" semver "^7.3.7" +"@typescript-eslint/utils@6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.1.0.tgz#1641843792b4e3451cc692e2c73055df8b26f453" + integrity sha512-wp652EogZlKmQoMS5hAvWqRKplXvkuOnNzZSE0PVvsKjpexd/XznRVHAtrfHFYmqaJz0DFkjlDsGYC9OXw+OhQ== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@types/json-schema" "^7.0.12" + "@types/semver" "^7.5.0" + "@typescript-eslint/scope-manager" "6.1.0" + "@typescript-eslint/types" "6.1.0" + "@typescript-eslint/typescript-estree" "6.1.0" + semver "^7.5.4" + "@typescript-eslint/utils@~5.53.0": version "5.53.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.53.0.tgz#e55eaad9d6fffa120575ffaa530c7e802f13bce8" @@ -2131,6 +2209,14 @@ "@typescript-eslint/types" "5.61.0" eslint-visitor-keys "^3.3.0" +"@typescript-eslint/visitor-keys@6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.1.0.tgz#d2b84dff6b58944d3257ea03687e269a788c73be" + integrity sha512-yQeh+EXhquh119Eis4k0kYhj9vmFzNpbhM3LftWQVwqVjipCkwHBQOZutcYW+JVkjtTG9k8nrZU1UoNedPDd1A== + dependencies: + "@typescript-eslint/types" "6.1.0" + eslint-visitor-keys "^3.4.1" + "@yarnpkg/lockfile@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" @@ -5680,7 +5766,7 @@ ignore@^4.0.3: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.0.5, ignore@^5.2.0: +ignore@^5.0.5, ignore@^5.2.0, ignore@^5.2.4: version "5.2.4" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== @@ -9060,7 +9146,7 @@ semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.1: +semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.1, semver@^7.5.4: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -9975,6 +10061,11 @@ triple-beam@1.3.0, triple-beam@^1.3.0: resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.3.0.tgz#a595214c7298db8339eeeee083e4d10bd8cb8dd9" integrity sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw== +ts-api-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.1.tgz#8144e811d44c749cd65b2da305a032510774452d" + integrity sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A== + ts-poet@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/ts-poet/-/ts-poet-6.1.0.tgz#c5c3d679dfce1fe39acb5f5415275c5d6a598cb7" From d7d8621614a21eedb37f4780aca425562979d04b Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 17 Jul 2023 13:20:56 -0700 Subject: [PATCH 02/10] ci: skip safe-await for cli --- packages/deployment/src/main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/deployment/src/main.js b/packages/deployment/src/main.js index ad79e69af5c..ed5e48a6450 100644 --- a/packages/deployment/src/main.js +++ b/packages/deployment/src/main.js @@ -1,3 +1,4 @@ +/* eslint-disable @jessie.js/safe-await-separator */ import djson from 'deterministic-json'; import { createHash } from 'crypto'; import chalk from 'chalk'; From 0c2133c01c8e176a12b60a9067a0a7ae6b919424 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 17 Jul 2023 13:23:03 -0700 Subject: [PATCH 03/10] ci: always lint with types use new EXPERIMENTAL_useProjectService which makes this performant enough to use --- .eslintrc.cjs | 2 ++ scripts/lint-with-types.sh | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 65bc0b25612..5d17ed26567 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -36,6 +36,8 @@ module.exports = { parser: '@typescript-eslint/parser', parserOptions: lintTypes ? { + // this is not yet compatible with eslint lsp so it's conditioned on AGORIC_ESLINT_TYPES + EXPERIMENTAL_useProjectService: true, sourceType: 'module', project: [ './packages/*/jsconfig.json', diff --git a/scripts/lint-with-types.sh b/scripts/lint-with-types.sh index bba445bbe57..077c2c05958 100755 --- a/scripts/lint-with-types.sh +++ b/scripts/lint-with-types.sh @@ -1,8 +1,8 @@ #!/bin/sh -# we don't collect type info by default because it can slow eslint by 8-10x -# FIXME even in CI it has become too slow so disable until https://github.com/Agoric/agoric-sdk/issues/5788 -# export AGORIC_ESLINT_TYPES='keypresent' +# we don't collect type info by default because the EXPERIMENTAL_useProjectService that provides viable perf +# is not yet compatible with running eslint in IDE +export AGORIC_ESLINT_TYPES='keypresent' # CI and some VMs OOM without this export NODE_OPTIONS='--max-old-space-size=8192' From f703a9041471950f4cc3092952d8d053214e866a Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 17 Jul 2023 13:46:15 -0700 Subject: [PATCH 04/10] ci: tsconfig for eslint-ed files --- packages/ERTP/jsconfig.json | 1 + packages/SwingSet/jsconfig.json | 4 +++- packages/assert/jsconfig.json | 1 + packages/deployment/jsconfig.json | 3 ++- packages/governance/jsconfig.json | 1 + packages/store/jsconfig.json | 1 + packages/time/jsconfig.json | 1 + 7 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/ERTP/jsconfig.json b/packages/ERTP/jsconfig.json index d39030cbed2..376dea62cbb 100644 --- a/packages/ERTP/jsconfig.json +++ b/packages/ERTP/jsconfig.json @@ -2,6 +2,7 @@ { "extends": "../../tsconfig.json", "include": [ + "exported.js", "src/**/*.js", "src/**/*.ts", "test" diff --git a/packages/SwingSet/jsconfig.json b/packages/SwingSet/jsconfig.json index d8e99876334..879a4e0dac1 100644 --- a/packages/SwingSet/jsconfig.json +++ b/packages/SwingSet/jsconfig.json @@ -2,10 +2,12 @@ { "extends": "../../tsconfig.json", "include": [ + "exported.js", + "demo/**/*.js", "lib/**/*.js", + "misc-tools/**/*.js", "src/**/*.js", "src/**/*.ts", - // "test", "tools", ], } diff --git a/packages/assert/jsconfig.json b/packages/assert/jsconfig.json index e9c3e53b5d9..88206c40229 100644 --- a/packages/assert/jsconfig.json +++ b/packages/assert/jsconfig.json @@ -2,6 +2,7 @@ { "extends": "../../tsconfig.json", "include": [ + "exported.js", "src/**/*.js", ], } diff --git a/packages/deployment/jsconfig.json b/packages/deployment/jsconfig.json index 5357adfd09d..f720c5abf1c 100644 --- a/packages/deployment/jsconfig.json +++ b/packages/deployment/jsconfig.json @@ -3,6 +3,7 @@ "extends": "../../tsconfig.json", "include": [ "src/**/*.js", - "test/**/*.js" + "test/**/*.js", + "upgrade-test/**/*.js" ] } diff --git a/packages/governance/jsconfig.json b/packages/governance/jsconfig.json index b2d019670f2..96133333c02 100644 --- a/packages/governance/jsconfig.json +++ b/packages/governance/jsconfig.json @@ -1,6 +1,7 @@ { "extends": "../../tsconfig.json", "include": [ + "exported.js", "build", "scripts", "src", diff --git a/packages/store/jsconfig.json b/packages/store/jsconfig.json index f6d24d3de00..f2b29dfa6ae 100644 --- a/packages/store/jsconfig.json +++ b/packages/store/jsconfig.json @@ -2,6 +2,7 @@ { "extends": "../../tsconfig.json", "include": [ + "exported.js", "src/**/*.js", "test/**/*.js", ], diff --git a/packages/time/jsconfig.json b/packages/time/jsconfig.json index b2d019670f2..5b481f5932e 100644 --- a/packages/time/jsconfig.json +++ b/packages/time/jsconfig.json @@ -2,6 +2,7 @@ "extends": "../../tsconfig.json", "include": [ "build", + "index.js", "scripts", "src", "test", From 9573a37549844d915bb376f6cc1f288ff3abd4ad Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 17 Jul 2023 14:04:01 -0700 Subject: [PATCH 05/10] ci: include 'test' dirs in ts glob --- packages/SwingSet/jsconfig.json | 3 ++- packages/SwingSet/misc-tools/db-delete.js | 1 + packages/SwingSet/misc-tools/db-dump.js | 1 + packages/SwingSet/misc-tools/db-get.js | 1 + packages/SwingSet/misc-tools/db-set.js | 1 + .../SwingSet/misc-tools/extract-contract-from-transcript.js | 1 + .../SwingSet/misc-tools/extract-transcript-from-kerneldb.js | 2 +- .../SwingSet/misc-tools/extract-transcript-from-slogfile.js | 1 + packages/SwingSet/misc-tools/extract-vat-from-transcript.js | 1 + packages/SwingSet/misc-tools/extract-xs-snapshot.js | 2 +- packages/SwingSet/misc-tools/ingest-xs-snapshot.js | 1 + packages/SwingSet/misc-tools/measure-metering/measure.js | 1 + .../misc-tools/measure-metering/measurement-bootstrap.js | 1 + .../SwingSet/misc-tools/measure-metering/measurement-target.js | 1 + packages/SwingSet/misc-tools/replace-bundle.js | 1 + packages/SwingSet/misc-tools/replay-transcript.js | 2 ++ packages/SwingSet/misc-tools/vat-stats.js | 1 + packages/SwingSet/test/bundling/nonvat-importable.js | 1 + packages/SwingSet/test/bundling/nonvat-install.js | 1 + packages/SwingSet/test/bundling/test-bundles-controller.js | 1 + packages/SwingSet/test/bundling/test-bundles.js | 1 + .../SwingSet/test/change-parameters/test-change-parameters.js | 1 + packages/SwingSet/test/commsVatDriver.js | 1 + packages/SwingSet/test/device-hooks/test-device-hooks.js | 1 + packages/SwingSet/test/device-mailbox/test-device-mailbox.js | 1 + packages/SwingSet/test/device-plugin/test-device.js | 1 + packages/SwingSet/test/devices/bootstrap-raw.js | 1 + packages/SwingSet/test/devices/test-devices.js | 1 + packages/SwingSet/test/devices/test-raw-device.js | 1 + packages/SwingSet/test/gc/bootstrap.js | 1 + packages/SwingSet/test/metering/test-dynamic-vat-metered.js | 1 + packages/SwingSet/test/promise-watcher/vat-upton.js | 1 + packages/SwingSet/test/run-policy/test-run-policy.js | 1 + packages/SwingSet/test/test-abandon-export.js | 1 + packages/SwingSet/test/test-activityhash-vs-start.js | 1 + packages/SwingSet/test/test-clist.js | 1 + packages/SwingSet/test/test-comms.js | 1 + packages/SwingSet/test/test-controller.js | 1 + packages/SwingSet/test/test-device-bridge.js | 1 + packages/SwingSet/test/test-gc-and-finalize.js | 1 + packages/SwingSet/test/test-gc-kernel.js | 1 + packages/SwingSet/test/test-kernel.js | 1 + packages/SwingSet/test/test-message-patterns-comms.js | 1 + packages/SwingSet/test/test-message-patterns-local.js | 1 + packages/SwingSet/test/test-network.js | 1 + packages/SwingSet/test/test-promises.js | 1 + packages/SwingSet/test/test-state.js | 1 + packages/SwingSet/test/test-syscall-failure.js | 1 + packages/SwingSet/test/test-timer-device.js | 1 + packages/SwingSet/test/test-transcript-light.js | 1 + packages/SwingSet/test/test-vat-env.js | 1 + packages/SwingSet/test/test-vat-timer.js | 1 + packages/SwingSet/test/test-vpid-kernel.js | 1 + packages/SwingSet/test/test-xsnap-metering.js | 1 + packages/SwingSet/test/test-xsnap-store.js | 1 + packages/SwingSet/test/timer-device/device-timer.js | 1 + packages/SwingSet/test/transcript/test-state-sync-reload.js | 1 + packages/SwingSet/test/transcript/test-transcript-entries.js | 1 + packages/SwingSet/test/upgrade/test-upgrade-replay.js | 1 + packages/SwingSet/test/upgrade/test-upgrade.js | 1 + packages/SwingSet/test/vat-admin/broken-module-vat.js | 1 + packages/SwingSet/test/vat-admin/broken-root-vat.js | 1 + .../SwingSet/test/vat-admin/terminate/test-terminate-replay.js | 1 + packages/SwingSet/test/vat-admin/terminate/test-terminate.js | 1 + packages/SwingSet/test/vat-admin/test-create-vat.js | 1 + packages/SwingSet/test/vat-admin/test-replay.js | 1 + packages/SwingSet/test/vat-direct.js | 1 + packages/SwingSet/test/vat-durable-promise-watcher.js | 1 + packages/SwingSet/test/vat-envtest.js | 1 + packages/SwingSet/test/vat-warehouse/test-preload.js | 1 + packages/SwingSet/test/vat-warehouse/test-reload-snapshot.js | 1 + .../virtualObjects/collection-slots/test-collection-slots.js | 1 + .../virtualObjects/delete-stored-vo/test-delete-stored-vo.js | 1 + packages/SwingSet/test/virtualObjects/test-facet-retention.js | 1 + packages/SwingSet/test/virtualObjects/test-representatives.js | 1 + .../SwingSet/test/xsnap-stable-bundles/test-stable-bundles.js | 1 + packages/SwingSet/test/zcf-ish-upgrade/pseudo-contract-v1.js | 1 + packages/SwingSet/test/zcf-ish-upgrade/pseudo-contract-v2.js | 1 + packages/SwingSet/test/zcf-ish-upgrade/pseudo-zcf.js | 1 + packages/assert/jsconfig.json | 1 + packages/swingset-liveslots/jsconfig.json | 2 +- packages/swingset-liveslots/test/mock-gc.js | 1 + packages/swingset-liveslots/test/storeGC/test-lifecycle.js | 1 + packages/swingset-liveslots/test/test-collections.js | 1 + packages/swingset-liveslots/test/test-gc-sensitivity.js | 1 + packages/swingset-liveslots/test/test-liveslots-mock-gc.js | 1 + packages/swingset-liveslots/test/test-liveslots-real-gc.js | 1 + packages/swingset-liveslots/test/test-liveslots.js | 1 + packages/swingset-liveslots/test/test-vpid-liveslots.js | 1 + .../test/virtual-objects/test-cease-recognition.js | 1 + .../test/virtual-objects/test-kind-changes.js | 1 + .../test/virtual-objects/test-reachable-vrefs.js | 1 + .../test/virtual-objects/test-retain-remotable.js | 1 + .../test/virtual-objects/test-state-shape.js | 1 + .../test/virtual-objects/test-virtualObjectGC.js | 1 + .../test/virtual-objects/test-virtualObjectManager.js | 1 + .../swingset-liveslots/test/virtual-objects/test-vo-real-gc.js | 1 + 97 files changed, 99 insertions(+), 4 deletions(-) diff --git a/packages/SwingSet/jsconfig.json b/packages/SwingSet/jsconfig.json index 879a4e0dac1..f8066c44f00 100644 --- a/packages/SwingSet/jsconfig.json +++ b/packages/SwingSet/jsconfig.json @@ -8,6 +8,7 @@ "misc-tools/**/*.js", "src/**/*.js", "src/**/*.ts", + "test", "tools", - ], + ] } diff --git a/packages/SwingSet/misc-tools/db-delete.js b/packages/SwingSet/misc-tools/db-delete.js index be36f8188ff..599f6754a5f 100755 --- a/packages/SwingSet/misc-tools/db-delete.js +++ b/packages/SwingSet/misc-tools/db-delete.js @@ -1,4 +1,5 @@ #!/usr/bin/env node +// @ts-nocheck import '@endo/init'; import process from 'process'; import { openSwingStore } from '@agoric/swing-store'; diff --git a/packages/SwingSet/misc-tools/db-dump.js b/packages/SwingSet/misc-tools/db-dump.js index 05c72a3666e..5b9bd88a584 100644 --- a/packages/SwingSet/misc-tools/db-dump.js +++ b/packages/SwingSet/misc-tools/db-dump.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* eslint-disable */ import '@endo/init'; import process from 'process'; diff --git a/packages/SwingSet/misc-tools/db-get.js b/packages/SwingSet/misc-tools/db-get.js index d5524eb9c30..7964b2c5304 100755 --- a/packages/SwingSet/misc-tools/db-get.js +++ b/packages/SwingSet/misc-tools/db-get.js @@ -1,4 +1,5 @@ #!/usr/bin/env node +// @ts-nocheck import '@endo/init'; import process from 'process'; import { openSwingStore } from '@agoric/swing-store'; diff --git a/packages/SwingSet/misc-tools/db-set.js b/packages/SwingSet/misc-tools/db-set.js index db4971fe10f..0bd69dbce62 100755 --- a/packages/SwingSet/misc-tools/db-set.js +++ b/packages/SwingSet/misc-tools/db-set.js @@ -1,4 +1,5 @@ #!/usr/bin/env node +// @ts-nocheck import '@endo/init'; import process from 'process'; import { openSwingStore } from '@agoric/swing-store'; diff --git a/packages/SwingSet/misc-tools/extract-contract-from-transcript.js b/packages/SwingSet/misc-tools/extract-contract-from-transcript.js index 23237a027ee..5f9eb928c96 100644 --- a/packages/SwingSet/misc-tools/extract-contract-from-transcript.js +++ b/packages/SwingSet/misc-tools/extract-contract-from-transcript.js @@ -1,3 +1,4 @@ +// @ts-nocheck import fs from 'fs'; import zlib from 'zlib'; import readline from 'readline'; diff --git a/packages/SwingSet/misc-tools/extract-transcript-from-kerneldb.js b/packages/SwingSet/misc-tools/extract-transcript-from-kerneldb.js index d3024407b5b..aa2c5638cd9 100644 --- a/packages/SwingSet/misc-tools/extract-transcript-from-kerneldb.js +++ b/packages/SwingSet/misc-tools/extract-transcript-from-kerneldb.js @@ -1,4 +1,4 @@ -// @ts-check +// @ts-nocheck import '@endo/init'; import process from 'process'; diff --git a/packages/SwingSet/misc-tools/extract-transcript-from-slogfile.js b/packages/SwingSet/misc-tools/extract-transcript-from-slogfile.js index a3c9b456466..f3ff7a35687 100644 --- a/packages/SwingSet/misc-tools/extract-transcript-from-slogfile.js +++ b/packages/SwingSet/misc-tools/extract-transcript-from-slogfile.js @@ -1,3 +1,4 @@ +// @ts-nocheck import fs from 'fs'; import zlib from 'zlib'; import readline from 'readline'; diff --git a/packages/SwingSet/misc-tools/extract-vat-from-transcript.js b/packages/SwingSet/misc-tools/extract-vat-from-transcript.js index 2f3b26dd984..987b24b8b22 100644 --- a/packages/SwingSet/misc-tools/extract-vat-from-transcript.js +++ b/packages/SwingSet/misc-tools/extract-vat-from-transcript.js @@ -1,3 +1,4 @@ +// @ts-nocheck import fs from 'fs'; import zlib from 'zlib'; import readline from 'readline'; diff --git a/packages/SwingSet/misc-tools/extract-xs-snapshot.js b/packages/SwingSet/misc-tools/extract-xs-snapshot.js index f120e436b34..d9a429ef008 100644 --- a/packages/SwingSet/misc-tools/extract-xs-snapshot.js +++ b/packages/SwingSet/misc-tools/extract-xs-snapshot.js @@ -1,4 +1,4 @@ -// @ts-check +// @ts-nocheck import '@endo/init'; import process from 'process'; diff --git a/packages/SwingSet/misc-tools/ingest-xs-snapshot.js b/packages/SwingSet/misc-tools/ingest-xs-snapshot.js index 7965f991c18..a1a52d00466 100644 --- a/packages/SwingSet/misc-tools/ingest-xs-snapshot.js +++ b/packages/SwingSet/misc-tools/ingest-xs-snapshot.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* eslint-disable */ // import '@endo/init'; // import { E } from '@endo/far'; diff --git a/packages/SwingSet/misc-tools/measure-metering/measure.js b/packages/SwingSet/misc-tools/measure-metering/measure.js index 51ea42f8057..ef7979a9964 100644 --- a/packages/SwingSet/misc-tools/measure-metering/measure.js +++ b/packages/SwingSet/misc-tools/measure-metering/measure.js @@ -1,3 +1,4 @@ +// @ts-nocheck // run as `node tools/measure-metering/measure.js` // eslint-disable-next-line import/order diff --git a/packages/SwingSet/misc-tools/measure-metering/measurement-bootstrap.js b/packages/SwingSet/misc-tools/measure-metering/measurement-bootstrap.js index 3623b928463..46e65df63b3 100644 --- a/packages/SwingSet/misc-tools/measure-metering/measurement-bootstrap.js +++ b/packages/SwingSet/misc-tools/measure-metering/measurement-bootstrap.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* eslint-disable import/no-extraneous-dependencies,no-unused-vars,no-empty-function */ import { Far, E } from '@endo/far'; import vaultFactoryBundle from '@agoric/inter-protocol/bundles/bundle-vaultFactory.js'; diff --git a/packages/SwingSet/misc-tools/measure-metering/measurement-target.js b/packages/SwingSet/misc-tools/measure-metering/measurement-target.js index 9d3d47d975c..6ef6b835ebb 100644 --- a/packages/SwingSet/misc-tools/measure-metering/measurement-target.js +++ b/packages/SwingSet/misc-tools/measure-metering/measurement-target.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* eslint-disable import/no-extraneous-dependencies,no-unused-vars,no-empty-function */ import { Far } from '@endo/far'; // XXX cyclic dependency; TODO move this tool out of swingset-vat diff --git a/packages/SwingSet/misc-tools/replace-bundle.js b/packages/SwingSet/misc-tools/replace-bundle.js index bd4217a0c0a..6d444f72f7e 100755 --- a/packages/SwingSet/misc-tools/replace-bundle.js +++ b/packages/SwingSet/misc-tools/replace-bundle.js @@ -1,4 +1,5 @@ #!/usr/bin/env node +// @ts-nocheck import '@endo/init'; import process from 'process'; diff --git a/packages/SwingSet/misc-tools/replay-transcript.js b/packages/SwingSet/misc-tools/replay-transcript.js index 9eee35ff9f8..6db20eea482 100644 --- a/packages/SwingSet/misc-tools/replay-transcript.js +++ b/packages/SwingSet/misc-tools/replay-transcript.js @@ -332,6 +332,7 @@ async function replay(transcriptFile) { throw Error(`unhandled worker type ${worker}`); } + // @ts-expect-error missing symbol /** @type {Partial, Map>>} */ let syscallResults = {}; @@ -339,6 +340,7 @@ async function replay(transcriptFile) { const numWorkers = workers.length; let divergent = false; for (const [kind, kindSummary] of Object.entries(syscallResults)) { + // @ts-expect-error due to missing symbol above, but also `syscallResults` is never populated for (const [syscallKey, workerList] of kindSummary.entries()) { if (workerList.length !== numWorkers) { console.error( diff --git a/packages/SwingSet/misc-tools/vat-stats.js b/packages/SwingSet/misc-tools/vat-stats.js index 1cd883a4f71..45222817841 100644 --- a/packages/SwingSet/misc-tools/vat-stats.js +++ b/packages/SwingSet/misc-tools/vat-stats.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* eslint-disable */ import '@endo/init'; import process from 'process'; diff --git a/packages/SwingSet/test/bundling/nonvat-importable.js b/packages/SwingSet/test/bundling/nonvat-importable.js index fe0a19b0e26..bc2c8964b8d 100644 --- a/packages/SwingSet/test/bundling/nonvat-importable.js +++ b/packages/SwingSet/test/bundling/nonvat-importable.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* global big globalThis */ export function runTheCheck(world) { diff --git a/packages/SwingSet/test/bundling/nonvat-install.js b/packages/SwingSet/test/bundling/nonvat-install.js index 584aa5c50aa..ae8731bfdf2 100644 --- a/packages/SwingSet/test/bundling/nonvat-install.js +++ b/packages/SwingSet/test/bundling/nonvat-install.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* global big globalThis */ export function runTheCheck(world) { diff --git a/packages/SwingSet/test/bundling/test-bundles-controller.js b/packages/SwingSet/test/bundling/test-bundles-controller.js index 32f98b379d6..f172daa17fc 100644 --- a/packages/SwingSet/test/bundling/test-bundles-controller.js +++ b/packages/SwingSet/test/bundling/test-bundles-controller.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/bundling/test-bundles.js b/packages/SwingSet/test/bundling/test-bundles.js index 5e8437b3ee5..137ce9b8a0d 100644 --- a/packages/SwingSet/test/bundling/test-bundles.js +++ b/packages/SwingSet/test/bundling/test-bundles.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/change-parameters/test-change-parameters.js b/packages/SwingSet/test/change-parameters/test-change-parameters.js index 251dcd6f8ae..48e22fc24ff 100644 --- a/packages/SwingSet/test/change-parameters/test-change-parameters.js +++ b/packages/SwingSet/test/change-parameters/test-change-parameters.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/commsVatDriver.js b/packages/SwingSet/test/commsVatDriver.js index 6cc3bc3df59..9eb9a7d4e7f 100644 --- a/packages/SwingSet/test/commsVatDriver.js +++ b/packages/SwingSet/test/commsVatDriver.js @@ -1,3 +1,4 @@ +// @ts-nocheck import { assert, Fail } from '@agoric/assert'; import buildCommsDispatch from '../src/vats/comms/index.js'; import { debugState } from '../src/vats/comms/dispatch.js'; diff --git a/packages/SwingSet/test/device-hooks/test-device-hooks.js b/packages/SwingSet/test/device-hooks/test-device-hooks.js index 0329fed45a4..fc492a4ea54 100644 --- a/packages/SwingSet/test/device-hooks/test-device-hooks.js +++ b/packages/SwingSet/test/device-hooks/test-device-hooks.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* eslint-disable no-lone-blocks */ // eslint-disable-next-line import/order import { test } from '../../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/device-mailbox/test-device-mailbox.js b/packages/SwingSet/test/device-mailbox/test-device-mailbox.js index 5af898eab98..a15f569724a 100644 --- a/packages/SwingSet/test/device-mailbox/test-device-mailbox.js +++ b/packages/SwingSet/test/device-mailbox/test-device-mailbox.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../../tools/prepare-test-env-ava.js'; // eslint-disable-next-line import/order diff --git a/packages/SwingSet/test/device-plugin/test-device.js b/packages/SwingSet/test/device-plugin/test-device.js index a538a12f566..776685dfeea 100644 --- a/packages/SwingSet/test/device-plugin/test-device.js +++ b/packages/SwingSet/test/device-plugin/test-device.js @@ -1,3 +1,4 @@ +// @ts-nocheck import { test } from '../../tools/prepare-test-env-ava.js'; // eslint-disable-next-line import/order diff --git a/packages/SwingSet/test/devices/bootstrap-raw.js b/packages/SwingSet/test/devices/bootstrap-raw.js index b24109f2e8f..7772d4727e7 100644 --- a/packages/SwingSet/test/devices/bootstrap-raw.js +++ b/packages/SwingSet/test/devices/bootstrap-raw.js @@ -1,3 +1,4 @@ +// @ts-nocheck import { Far } from '@endo/far'; import { makePromiseKit } from '@endo/promise-kit'; diff --git a/packages/SwingSet/test/devices/test-devices.js b/packages/SwingSet/test/devices/test-devices.js index 528fb0333ab..02bbc3ec2d9 100644 --- a/packages/SwingSet/test/devices/test-devices.js +++ b/packages/SwingSet/test/devices/test-devices.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/devices/test-raw-device.js b/packages/SwingSet/test/devices/test-raw-device.js index f3d6daf8fc5..9e79e4c3e3e 100644 --- a/packages/SwingSet/test/devices/test-raw-device.js +++ b/packages/SwingSet/test/devices/test-raw-device.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/gc/bootstrap.js b/packages/SwingSet/test/gc/bootstrap.js index 6a6a1f9f347..3c08bb01b4e 100644 --- a/packages/SwingSet/test/gc/bootstrap.js +++ b/packages/SwingSet/test/gc/bootstrap.js @@ -1,3 +1,4 @@ +// @ts-nocheck import { Far, E } from '@endo/far'; export function buildRootObject() { diff --git a/packages/SwingSet/test/metering/test-dynamic-vat-metered.js b/packages/SwingSet/test/metering/test-dynamic-vat-metered.js index b1ed98198f5..3839c5f94c1 100644 --- a/packages/SwingSet/test/metering/test-dynamic-vat-metered.js +++ b/packages/SwingSet/test/metering/test-dynamic-vat-metered.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/promise-watcher/vat-upton.js b/packages/SwingSet/test/promise-watcher/vat-upton.js index 65096fd5a66..2f3d894dd05 100644 --- a/packages/SwingSet/test/promise-watcher/vat-upton.js +++ b/packages/SwingSet/test/promise-watcher/vat-upton.js @@ -1,3 +1,4 @@ +// @ts-nocheck import { Far, E } from '@endo/far'; import { initEmpty } from '@agoric/store'; import { makePromiseKit } from '@endo/promise-kit'; diff --git a/packages/SwingSet/test/run-policy/test-run-policy.js b/packages/SwingSet/test/run-policy/test-run-policy.js index 979f61e3bb8..2a7838ae432 100644 --- a/packages/SwingSet/test/run-policy/test-run-policy.js +++ b/packages/SwingSet/test/run-policy/test-run-policy.js @@ -1,3 +1,4 @@ +// @ts-nocheck import { test } from '../../tools/prepare-test-env-ava.js'; // eslint-disable-next-line import/order diff --git a/packages/SwingSet/test/test-abandon-export.js b/packages/SwingSet/test/test-abandon-export.js index 84b9a47172d..df9d76eb771 100644 --- a/packages/SwingSet/test/test-abandon-export.js +++ b/packages/SwingSet/test/test-abandon-export.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* eslint-disable import/order */ import { test } from '../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/test-activityhash-vs-start.js b/packages/SwingSet/test/test-activityhash-vs-start.js index fcfbbef2801..57be8dfdc45 100644 --- a/packages/SwingSet/test/test-activityhash-vs-start.js +++ b/packages/SwingSet/test/test-activityhash-vs-start.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/test-clist.js b/packages/SwingSet/test/test-clist.js index 936bd378495..2b3831da74c 100644 --- a/packages/SwingSet/test/test-clist.js +++ b/packages/SwingSet/test/test-clist.js @@ -1,3 +1,4 @@ +// @ts-nocheck import { test } from '../tools/prepare-test-env-ava.js'; // eslint-disable-next-line import/order diff --git a/packages/SwingSet/test/test-comms.js b/packages/SwingSet/test/test-comms.js index 1dad14ec545..fc84afcbd17 100644 --- a/packages/SwingSet/test/test-comms.js +++ b/packages/SwingSet/test/test-comms.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/test-controller.js b/packages/SwingSet/test/test-controller.js index 993a92dc3cf..818bbceabbd 100644 --- a/packages/SwingSet/test/test-controller.js +++ b/packages/SwingSet/test/test-controller.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/test-device-bridge.js b/packages/SwingSet/test/test-device-bridge.js index 287efab4b47..c7242646f5d 100644 --- a/packages/SwingSet/test/test-device-bridge.js +++ b/packages/SwingSet/test/test-device-bridge.js @@ -1,3 +1,4 @@ +// @ts-nocheck import { test } from '../tools/prepare-test-env-ava.js'; // eslint-disable-next-line import/order diff --git a/packages/SwingSet/test/test-gc-and-finalize.js b/packages/SwingSet/test/test-gc-and-finalize.js index 94ae280e2ba..915cd75e981 100644 --- a/packages/SwingSet/test/test-gc-and-finalize.js +++ b/packages/SwingSet/test/test-gc-and-finalize.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* global FinalizationRegistry WeakRef */ // eslint-disable-next-line import/order import { test } from '../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/test-gc-kernel.js b/packages/SwingSet/test/test-gc-kernel.js index 49ffb5a28e0..a901d00eada 100644 --- a/packages/SwingSet/test/test-gc-kernel.js +++ b/packages/SwingSet/test/test-gc-kernel.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* global WeakRef, FinalizationRegistry */ // eslint-disable-next-line import/order import anylogger from 'anylogger'; diff --git a/packages/SwingSet/test/test-kernel.js b/packages/SwingSet/test/test-kernel.js index 92cfbc601a3..5eb45924d94 100644 --- a/packages/SwingSet/test/test-kernel.js +++ b/packages/SwingSet/test/test-kernel.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/test-message-patterns-comms.js b/packages/SwingSet/test/test-message-patterns-comms.js index 75a3c32b225..a4fe9b3b7f3 100644 --- a/packages/SwingSet/test/test-message-patterns-comms.js +++ b/packages/SwingSet/test/test-message-patterns-comms.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* eslint no-await-in-loop: "off" */ /* eslint dot-notation: "off" */ /* eslint object-shorthand: "off" */ diff --git a/packages/SwingSet/test/test-message-patterns-local.js b/packages/SwingSet/test/test-message-patterns-local.js index 5c4895bdc31..6c51b0bbc90 100644 --- a/packages/SwingSet/test/test-message-patterns-local.js +++ b/packages/SwingSet/test/test-message-patterns-local.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* eslint no-await-in-loop: "off" */ /* eslint dot-notation: "off" */ /* eslint object-shorthand: "off" */ diff --git a/packages/SwingSet/test/test-network.js b/packages/SwingSet/test/test-network.js index c383e68a5a5..c99d7b94958 100644 --- a/packages/SwingSet/test/test-network.js +++ b/packages/SwingSet/test/test-network.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/test-promises.js b/packages/SwingSet/test/test-promises.js index a90e309883a..6762e20cedf 100644 --- a/packages/SwingSet/test/test-promises.js +++ b/packages/SwingSet/test/test-promises.js @@ -1,3 +1,4 @@ +// @ts-nocheck import { test } from '../tools/prepare-test-env-ava.js'; // eslint-disable-next-line import/order diff --git a/packages/SwingSet/test/test-state.js b/packages/SwingSet/test/test-state.js index fdad91485dd..40ea95f0749 100644 --- a/packages/SwingSet/test/test-state.js +++ b/packages/SwingSet/test/test-state.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* eslint-disable no-useless-concat */ // eslint-disable-next-line import/order import { test } from '../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/test-syscall-failure.js b/packages/SwingSet/test/test-syscall-failure.js index 9a0eefffff5..4e1a0f798e0 100644 --- a/packages/SwingSet/test/test-syscall-failure.js +++ b/packages/SwingSet/test/test-syscall-failure.js @@ -1,3 +1,4 @@ +// @ts-nocheck import { test } from '../tools/prepare-test-env-ava.js'; // eslint-disable-next-line import/order diff --git a/packages/SwingSet/test/test-timer-device.js b/packages/SwingSet/test/test-timer-device.js index 41e8dd3ae6a..b4ae7a07011 100644 --- a/packages/SwingSet/test/test-timer-device.js +++ b/packages/SwingSet/test/test-timer-device.js @@ -1,3 +1,4 @@ +// @ts-nocheck import { test } from '../tools/prepare-test-env-ava.js'; // eslint-disable-next-line import/order diff --git a/packages/SwingSet/test/test-transcript-light.js b/packages/SwingSet/test/test-transcript-light.js index c595d7d41e6..51bdd714d72 100644 --- a/packages/SwingSet/test/test-transcript-light.js +++ b/packages/SwingSet/test/test-transcript-light.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../tools/prepare-test-env-ava.js'; // eslint-disable-next-line import/order diff --git a/packages/SwingSet/test/test-vat-env.js b/packages/SwingSet/test/test-vat-env.js index 0c38d6140c1..0f1f29c9298 100644 --- a/packages/SwingSet/test/test-vat-env.js +++ b/packages/SwingSet/test/test-vat-env.js @@ -1,3 +1,4 @@ +// @ts-nocheck import { test, VatData } from '../tools/prepare-test-env-ava.js'; // eslint-disable-next-line import/order diff --git a/packages/SwingSet/test/test-vat-timer.js b/packages/SwingSet/test/test-vat-timer.js index 8ba0a8b14fa..75eb2c215b0 100644 --- a/packages/SwingSet/test/test-vat-timer.js +++ b/packages/SwingSet/test/test-vat-timer.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/test-vpid-kernel.js b/packages/SwingSet/test/test-vpid-kernel.js index 38508a2f368..75a2ee268cb 100644 --- a/packages/SwingSet/test/test-vpid-kernel.js +++ b/packages/SwingSet/test/test-vpid-kernel.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* global WeakRef, FinalizationRegistry */ // eslint-disable-next-line import/order import { test } from '../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/test-xsnap-metering.js b/packages/SwingSet/test/test-xsnap-metering.js index 33dd057903f..5dad4d627c4 100644 --- a/packages/SwingSet/test/test-xsnap-metering.js +++ b/packages/SwingSet/test/test-xsnap-metering.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/test-xsnap-store.js b/packages/SwingSet/test/test-xsnap-store.js index 3c015ab89d4..26d1ceb550e 100644 --- a/packages/SwingSet/test/test-xsnap-store.js +++ b/packages/SwingSet/test/test-xsnap-store.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* global globalThis */ import '@endo/init/debug.js'; diff --git a/packages/SwingSet/test/timer-device/device-timer.js b/packages/SwingSet/test/timer-device/device-timer.js index 164c0763179..9fba6bac28c 100644 --- a/packages/SwingSet/test/timer-device/device-timer.js +++ b/packages/SwingSet/test/timer-device/device-timer.js @@ -1,3 +1,4 @@ +// @ts-nocheck import setup from '../../src/devices/timer/device-timer.js'; export { setup }; diff --git a/packages/SwingSet/test/transcript/test-state-sync-reload.js b/packages/SwingSet/test/transcript/test-state-sync-reload.js index a432a22d051..bda9a9b233b 100644 --- a/packages/SwingSet/test/transcript/test-state-sync-reload.js +++ b/packages/SwingSet/test/transcript/test-state-sync-reload.js @@ -1,3 +1,4 @@ +// @ts-nocheck import test from 'ava'; import '@endo/init/debug.js'; import tmp from 'tmp'; diff --git a/packages/SwingSet/test/transcript/test-transcript-entries.js b/packages/SwingSet/test/transcript/test-transcript-entries.js index 832ff4aff2a..e06ccf141ce 100644 --- a/packages/SwingSet/test/transcript/test-transcript-entries.js +++ b/packages/SwingSet/test/transcript/test-transcript-entries.js @@ -1,3 +1,4 @@ +// @ts-nocheck import test from 'ava'; import '@endo/init/debug.js'; import { initSwingStore } from '@agoric/swing-store'; diff --git a/packages/SwingSet/test/upgrade/test-upgrade-replay.js b/packages/SwingSet/test/upgrade/test-upgrade-replay.js index 48047c70290..b8ec534896c 100644 --- a/packages/SwingSet/test/upgrade/test-upgrade-replay.js +++ b/packages/SwingSet/test/upgrade/test-upgrade-replay.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/upgrade/test-upgrade.js b/packages/SwingSet/test/upgrade/test-upgrade.js index d4ab354844e..d4ad17f5aa7 100644 --- a/packages/SwingSet/test/upgrade/test-upgrade.js +++ b/packages/SwingSet/test/upgrade/test-upgrade.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/vat-admin/broken-module-vat.js b/packages/SwingSet/test/vat-admin/broken-module-vat.js index 30eff12e68b..47d3f80ac1c 100644 --- a/packages/SwingSet/test/vat-admin/broken-module-vat.js +++ b/packages/SwingSet/test/vat-admin/broken-module-vat.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line no-undef missing({}); diff --git a/packages/SwingSet/test/vat-admin/broken-root-vat.js b/packages/SwingSet/test/vat-admin/broken-root-vat.js index 26a3820ef01..5da40944bb3 100644 --- a/packages/SwingSet/test/vat-admin/broken-root-vat.js +++ b/packages/SwingSet/test/vat-admin/broken-root-vat.js @@ -1,3 +1,4 @@ +// @ts-nocheck export function buildRootObject() { // eslint-disable-next-line no-undef return missing({}); diff --git a/packages/SwingSet/test/vat-admin/terminate/test-terminate-replay.js b/packages/SwingSet/test/vat-admin/terminate/test-terminate-replay.js index 42f1815a7d9..45e4c17c374 100644 --- a/packages/SwingSet/test/vat-admin/terminate/test-terminate-replay.js +++ b/packages/SwingSet/test/vat-admin/terminate/test-terminate-replay.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../../../tools/prepare-test-env-ava.js'; // eslint-disable-next-line import/order diff --git a/packages/SwingSet/test/vat-admin/terminate/test-terminate.js b/packages/SwingSet/test/vat-admin/terminate/test-terminate.js index 61963431353..c4e194a0c97 100644 --- a/packages/SwingSet/test/vat-admin/terminate/test-terminate.js +++ b/packages/SwingSet/test/vat-admin/terminate/test-terminate.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../../../tools/prepare-test-env-ava.js'; // eslint-disable-next-line import/order diff --git a/packages/SwingSet/test/vat-admin/test-create-vat.js b/packages/SwingSet/test/vat-admin/test-create-vat.js index 0a128bff73a..c853bd85c92 100644 --- a/packages/SwingSet/test/vat-admin/test-create-vat.js +++ b/packages/SwingSet/test/vat-admin/test-create-vat.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../../tools/prepare-test-env-ava.js'; // eslint-disable-next-line import/order diff --git a/packages/SwingSet/test/vat-admin/test-replay.js b/packages/SwingSet/test/vat-admin/test-replay.js index f380bd0a166..6011f7a9363 100644 --- a/packages/SwingSet/test/vat-admin/test-replay.js +++ b/packages/SwingSet/test/vat-admin/test-replay.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../../tools/prepare-test-env-ava.js'; // eslint-disable-next-line import/order diff --git a/packages/SwingSet/test/vat-direct.js b/packages/SwingSet/test/vat-direct.js index 0693401df01..52bfd3c2d4a 100644 --- a/packages/SwingSet/test/vat-direct.js +++ b/packages/SwingSet/test/vat-direct.js @@ -1,3 +1,4 @@ +// @ts-nocheck import { extractMessage } from './vat-util.js'; import { krefOf, kser, kslot, kunser } from '../src/lib/kmarshal.js'; diff --git a/packages/SwingSet/test/vat-durable-promise-watcher.js b/packages/SwingSet/test/vat-durable-promise-watcher.js index 6cbb48f5cf6..ef4287b2699 100644 --- a/packages/SwingSet/test/vat-durable-promise-watcher.js +++ b/packages/SwingSet/test/vat-durable-promise-watcher.js @@ -1,3 +1,4 @@ +// @ts-nocheck import { Far } from '@endo/far'; import { getCopyMapEntries, M } from '@agoric/store'; import { makePromiseKit } from '@endo/promise-kit'; diff --git a/packages/SwingSet/test/vat-envtest.js b/packages/SwingSet/test/vat-envtest.js index 97496bd2475..e66efd4f9c0 100644 --- a/packages/SwingSet/test/vat-envtest.js +++ b/packages/SwingSet/test/vat-envtest.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* global VatData */ import { Far } from '@endo/far'; diff --git a/packages/SwingSet/test/vat-warehouse/test-preload.js b/packages/SwingSet/test/vat-warehouse/test-preload.js index 65b4f1fcde7..275f8e1ef14 100644 --- a/packages/SwingSet/test/vat-warehouse/test-preload.js +++ b/packages/SwingSet/test/vat-warehouse/test-preload.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/vat-warehouse/test-reload-snapshot.js b/packages/SwingSet/test/vat-warehouse/test-reload-snapshot.js index 0baf741f2d1..e83f016549f 100644 --- a/packages/SwingSet/test/vat-warehouse/test-reload-snapshot.js +++ b/packages/SwingSet/test/vat-warehouse/test-reload-snapshot.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/virtualObjects/collection-slots/test-collection-slots.js b/packages/SwingSet/test/virtualObjects/collection-slots/test-collection-slots.js index 5cf9149af44..d69a960a079 100644 --- a/packages/SwingSet/test/virtualObjects/collection-slots/test-collection-slots.js +++ b/packages/SwingSet/test/virtualObjects/collection-slots/test-collection-slots.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../../../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/virtualObjects/delete-stored-vo/test-delete-stored-vo.js b/packages/SwingSet/test/virtualObjects/delete-stored-vo/test-delete-stored-vo.js index 5484513e0ed..12025568f13 100644 --- a/packages/SwingSet/test/virtualObjects/delete-stored-vo/test-delete-stored-vo.js +++ b/packages/SwingSet/test/virtualObjects/delete-stored-vo/test-delete-stored-vo.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../../../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/virtualObjects/test-facet-retention.js b/packages/SwingSet/test/virtualObjects/test-facet-retention.js index 4d0d28d1f66..82bfcdf3e97 100644 --- a/packages/SwingSet/test/virtualObjects/test-facet-retention.js +++ b/packages/SwingSet/test/virtualObjects/test-facet-retention.js @@ -1,3 +1,4 @@ +// @ts-nocheck import '@endo/init/debug.js'; import test from 'ava'; import { initSwingStore } from '@agoric/swing-store'; diff --git a/packages/SwingSet/test/virtualObjects/test-representatives.js b/packages/SwingSet/test/virtualObjects/test-representatives.js index 0e0fb1432f8..12e2395fdd3 100644 --- a/packages/SwingSet/test/virtualObjects/test-representatives.js +++ b/packages/SwingSet/test/virtualObjects/test-representatives.js @@ -1,3 +1,4 @@ +// @ts-nocheck // eslint-disable-next-line import/order import { test } from '../../tools/prepare-test-env-ava.js'; diff --git a/packages/SwingSet/test/xsnap-stable-bundles/test-stable-bundles.js b/packages/SwingSet/test/xsnap-stable-bundles/test-stable-bundles.js index 11298438718..70c4ced80b3 100644 --- a/packages/SwingSet/test/xsnap-stable-bundles/test-stable-bundles.js +++ b/packages/SwingSet/test/xsnap-stable-bundles/test-stable-bundles.js @@ -1,3 +1,4 @@ +// @ts-nocheck import '@endo/init/debug.js'; import test from 'ava'; import { createHash } from 'crypto'; diff --git a/packages/SwingSet/test/zcf-ish-upgrade/pseudo-contract-v1.js b/packages/SwingSet/test/zcf-ish-upgrade/pseudo-contract-v1.js index 0f4ade02d91..252a8ed3ec0 100644 --- a/packages/SwingSet/test/zcf-ish-upgrade/pseudo-contract-v1.js +++ b/packages/SwingSet/test/zcf-ish-upgrade/pseudo-contract-v1.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* eslint-disable no-unused-vars */ import { defineDurableKind, defineDurableKindMulti } from '@agoric/vat-data'; import { provideHandle, provideBaggageSubset } from './util.js'; diff --git a/packages/SwingSet/test/zcf-ish-upgrade/pseudo-contract-v2.js b/packages/SwingSet/test/zcf-ish-upgrade/pseudo-contract-v2.js index 441226b3a8e..7029dbc9bbb 100644 --- a/packages/SwingSet/test/zcf-ish-upgrade/pseudo-contract-v2.js +++ b/packages/SwingSet/test/zcf-ish-upgrade/pseudo-contract-v2.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* eslint-disable no-unused-vars */ import { defineDurableKind, defineDurableKindMulti } from '@agoric/vat-data'; import { provideHandle, provideBaggageSubset } from './util.js'; diff --git a/packages/SwingSet/test/zcf-ish-upgrade/pseudo-zcf.js b/packages/SwingSet/test/zcf-ish-upgrade/pseudo-zcf.js index 6fc35a3fce1..b2aac733211 100644 --- a/packages/SwingSet/test/zcf-ish-upgrade/pseudo-zcf.js +++ b/packages/SwingSet/test/zcf-ish-upgrade/pseudo-zcf.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* global VatData */ /* eslint-disable no-unused-vars */ diff --git a/packages/assert/jsconfig.json b/packages/assert/jsconfig.json index 88206c40229..f2b29dfa6ae 100644 --- a/packages/assert/jsconfig.json +++ b/packages/assert/jsconfig.json @@ -4,5 +4,6 @@ "include": [ "exported.js", "src/**/*.js", + "test/**/*.js", ], } diff --git a/packages/swingset-liveslots/jsconfig.json b/packages/swingset-liveslots/jsconfig.json index e77ffa706b8..39a984af601 100644 --- a/packages/swingset-liveslots/jsconfig.json +++ b/packages/swingset-liveslots/jsconfig.json @@ -4,7 +4,7 @@ "*.js", "scripts/**/*.js", "src/**/*.js", - //"test/**/*.js", + "test/**/*.js", "tools/**/*.js", ], } diff --git a/packages/swingset-liveslots/test/mock-gc.js b/packages/swingset-liveslots/test/mock-gc.js index 20b945e2d69..09a5171b0d0 100644 --- a/packages/swingset-liveslots/test/mock-gc.js +++ b/packages/swingset-liveslots/test/mock-gc.js @@ -1,3 +1,4 @@ +// @ts-nocheck import { waitUntilQuiescent } from './waitUntilQuiescent.js'; import { makeDummyMeterControl } from './dummyMeterControl.js'; diff --git a/packages/swingset-liveslots/test/storeGC/test-lifecycle.js b/packages/swingset-liveslots/test/storeGC/test-lifecycle.js index 58a78e02931..3433af7e7bc 100644 --- a/packages/swingset-liveslots/test/storeGC/test-lifecycle.js +++ b/packages/swingset-liveslots/test/storeGC/test-lifecycle.js @@ -1,3 +1,4 @@ +// @ts-nocheck import test from 'ava'; import '@endo/init/debug.js'; diff --git a/packages/swingset-liveslots/test/test-collections.js b/packages/swingset-liveslots/test/test-collections.js index ba536179e0d..0e30071c5ee 100644 --- a/packages/swingset-liveslots/test/test-collections.js +++ b/packages/swingset-liveslots/test/test-collections.js @@ -1,3 +1,4 @@ +// @ts-nocheck import test from 'ava'; import '@endo/init/debug.js'; diff --git a/packages/swingset-liveslots/test/test-gc-sensitivity.js b/packages/swingset-liveslots/test/test-gc-sensitivity.js index 332602d73b8..2564fb56b6b 100644 --- a/packages/swingset-liveslots/test/test-gc-sensitivity.js +++ b/packages/swingset-liveslots/test/test-gc-sensitivity.js @@ -1,3 +1,4 @@ +// @ts-nocheck import test from 'ava'; import '@endo/init/debug.js'; import { Far } from '@endo/marshal'; diff --git a/packages/swingset-liveslots/test/test-liveslots-mock-gc.js b/packages/swingset-liveslots/test/test-liveslots-mock-gc.js index 20e8a5274c1..d5698d0800b 100644 --- a/packages/swingset-liveslots/test/test-liveslots-mock-gc.js +++ b/packages/swingset-liveslots/test/test-liveslots-mock-gc.js @@ -1,3 +1,4 @@ +// @ts-nocheck import test from 'ava'; import '@endo/init/debug.js'; diff --git a/packages/swingset-liveslots/test/test-liveslots-real-gc.js b/packages/swingset-liveslots/test/test-liveslots-real-gc.js index 8dc0b161d34..21182c58bc5 100644 --- a/packages/swingset-liveslots/test/test-liveslots-real-gc.js +++ b/packages/swingset-liveslots/test/test-liveslots-real-gc.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* global WeakRef */ import test from 'ava'; import '@endo/init/debug.js'; diff --git a/packages/swingset-liveslots/test/test-liveslots.js b/packages/swingset-liveslots/test/test-liveslots.js index f73a0829779..d2350a5c516 100644 --- a/packages/swingset-liveslots/test/test-liveslots.js +++ b/packages/swingset-liveslots/test/test-liveslots.js @@ -1,3 +1,4 @@ +// @ts-nocheck import test from 'ava'; import '@endo/init/debug.js'; diff --git a/packages/swingset-liveslots/test/test-vpid-liveslots.js b/packages/swingset-liveslots/test/test-vpid-liveslots.js index 20a5750cf40..6e7f0872c3a 100644 --- a/packages/swingset-liveslots/test/test-vpid-liveslots.js +++ b/packages/swingset-liveslots/test/test-vpid-liveslots.js @@ -1,3 +1,4 @@ +// @ts-nocheck import test from 'ava'; import '@endo/init/debug.js'; diff --git a/packages/swingset-liveslots/test/virtual-objects/test-cease-recognition.js b/packages/swingset-liveslots/test/virtual-objects/test-cease-recognition.js index dffa7973a3f..2424ea23d30 100644 --- a/packages/swingset-liveslots/test/virtual-objects/test-cease-recognition.js +++ b/packages/swingset-liveslots/test/virtual-objects/test-cease-recognition.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* global FinalizationRegistry WeakRef */ import test from 'ava'; import '@endo/init/debug.js'; diff --git a/packages/swingset-liveslots/test/virtual-objects/test-kind-changes.js b/packages/swingset-liveslots/test/virtual-objects/test-kind-changes.js index dbf56bf0a36..c5b9e2c2f95 100644 --- a/packages/swingset-liveslots/test/virtual-objects/test-kind-changes.js +++ b/packages/swingset-liveslots/test/virtual-objects/test-kind-changes.js @@ -1,3 +1,4 @@ +// @ts-nocheck import test from 'ava'; import '@endo/init/debug.js'; import { Far } from '@endo/marshal'; diff --git a/packages/swingset-liveslots/test/virtual-objects/test-reachable-vrefs.js b/packages/swingset-liveslots/test/virtual-objects/test-reachable-vrefs.js index d772f5fdfd7..4c84d94d968 100644 --- a/packages/swingset-liveslots/test/virtual-objects/test-reachable-vrefs.js +++ b/packages/swingset-liveslots/test/virtual-objects/test-reachable-vrefs.js @@ -1,3 +1,4 @@ +// @ts-nocheck import test from 'ava'; import '@endo/init/debug.js'; diff --git a/packages/swingset-liveslots/test/virtual-objects/test-retain-remotable.js b/packages/swingset-liveslots/test/virtual-objects/test-retain-remotable.js index 84035f74d11..b3874491e20 100644 --- a/packages/swingset-liveslots/test/virtual-objects/test-retain-remotable.js +++ b/packages/swingset-liveslots/test/virtual-objects/test-retain-remotable.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* global WeakRef */ import test from 'ava'; import '@endo/init/debug.js'; diff --git a/packages/swingset-liveslots/test/virtual-objects/test-state-shape.js b/packages/swingset-liveslots/test/virtual-objects/test-state-shape.js index e8af616a3be..274aa8932b6 100644 --- a/packages/swingset-liveslots/test/virtual-objects/test-state-shape.js +++ b/packages/swingset-liveslots/test/virtual-objects/test-state-shape.js @@ -1,3 +1,4 @@ +// @ts-nocheck import test from 'ava'; import '@endo/init/debug.js'; diff --git a/packages/swingset-liveslots/test/virtual-objects/test-virtualObjectGC.js b/packages/swingset-liveslots/test/virtual-objects/test-virtualObjectGC.js index 1bcfc92acd0..5f8adb92de6 100644 --- a/packages/swingset-liveslots/test/virtual-objects/test-virtualObjectGC.js +++ b/packages/swingset-liveslots/test/virtual-objects/test-virtualObjectGC.js @@ -1,3 +1,4 @@ +// @ts-nocheck import test from 'ava'; import '@endo/init/debug.js'; diff --git a/packages/swingset-liveslots/test/virtual-objects/test-virtualObjectManager.js b/packages/swingset-liveslots/test/virtual-objects/test-virtualObjectManager.js index 4ac890b64cc..a1444694a6b 100644 --- a/packages/swingset-liveslots/test/virtual-objects/test-virtualObjectManager.js +++ b/packages/swingset-liveslots/test/virtual-objects/test-virtualObjectManager.js @@ -1,3 +1,4 @@ +// @ts-nocheck import test from 'ava'; import '@endo/init/debug.js'; diff --git a/packages/swingset-liveslots/test/virtual-objects/test-vo-real-gc.js b/packages/swingset-liveslots/test/virtual-objects/test-vo-real-gc.js index f4cd4fd9026..48254072660 100644 --- a/packages/swingset-liveslots/test/virtual-objects/test-vo-real-gc.js +++ b/packages/swingset-liveslots/test/virtual-objects/test-vo-real-gc.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* global WeakRef */ import test from 'ava'; import '@endo/init/debug.js'; From 8498d26cd8b62d819d1d99c7950da0d6cdb58544 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 17 Jul 2023 14:04:46 -0700 Subject: [PATCH 06/10] chore(deps); explicit types for yargs-parser fixes a type error inferring from node_modules cjs files --- packages/SwingSet/package.json | 3 ++- yarn.lock | 28 +++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/packages/SwingSet/package.json b/packages/SwingSet/package.json index e4347e1cd23..6617b0c8ec7 100644 --- a/packages/SwingSet/package.json +++ b/packages/SwingSet/package.json @@ -23,7 +23,8 @@ "devDependencies": { "@types/better-sqlite3": "^7.5.0", "@types/microtime": "^2.1.0", - "@types/tmp": "^0.2.0" + "@types/tmp": "^0.2.0", + "@types/yargs-parser": "^21.0.0" }, "dependencies": { "@agoric/assert": "^0.6.0", diff --git a/yarn.lock b/yarn.lock index 0545502e7bb..ecb3b711eea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21,13 +21,20 @@ resolved "https://registry.yarnpkg.com/@agoric/wallet-ui/-/wallet-ui-0.1.3-solo.0.tgz#5f05c3dd2820d4f1efcbccbd2dc1292847ecbd2b" integrity sha512-NbhCrTH9u2af+6ituM99M8Mo10VOP1nQRTZoYEXW+esBwJId/7cRniMmAC7qmkbXs8POA31S8EQ5gAhkWq08WA== -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.11", "@babel/code-frame@^7.18.6": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== dependencies: "@babel/highlight" "^7.18.6" +"@babel/code-frame@^7.12.11": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.5.tgz#234d98e1551960604f1246e6475891a570ad5658" + integrity sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ== + dependencies: + "@babel/highlight" "^7.22.5" + "@babel/generator@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.9.tgz#68337e9ea8044d6ddc690fb29acae39359cca0a5" @@ -69,6 +76,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== +"@babel/helper-validator-identifier@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz#9544ef6a33999343c8740fa51350f30eeaaaf193" + integrity sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ== + "@babel/highlight@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" @@ -78,6 +90,15 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@babel/highlight@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.5.tgz#aa6c05c5407a67ebce408162b7ede789b4d22031" + integrity sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw== + dependencies: + "@babel/helper-validator-identifier" "^7.22.5" + chalk "^2.0.0" + js-tokens "^4.0.0" + "@babel/parser@^7.17.3", "@babel/parser@^7.18.6", "@babel/parser@^7.18.9", "@babel/parser@^7.7.0": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.9.tgz#f2dde0c682ccc264a9a8595efd030a5cc8fd2539" @@ -1999,6 +2020,11 @@ resolved "https://registry.yarnpkg.com/@types/triple-beam/-/triple-beam-1.3.2.tgz#38ecb64f01aa0d02b7c8f4222d7c38af6316fef8" integrity sha512-txGIh+0eDFzKGC25zORnswy+br1Ha7hj5cMVwKIU7+s0U2AxxJru/jZSMU6OC9MJWP6+pc/hc6ZjyZShpsyY2g== +"@types/yargs-parser@^21.0.0": + version "21.0.0" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" + integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== + "@typescript-eslint/eslint-plugin@^5.1.0": version "5.61.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.61.0.tgz#a1a5290cf33863b4db3fb79350b3c5275a7b1223" From 7224f20334cf6c683f2c575be143967a0f5fd2d0 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 17 Jul 2023 14:12:26 -0700 Subject: [PATCH 07/10] chore(deps): upgrade acorn --- patches/{acorn+8.8.2.patch => acorn+8.10.0.patch} | 6 +++--- yarn.lock | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) rename patches/{acorn+8.8.2.patch => acorn+8.10.0.patch} (73%) diff --git a/patches/acorn+8.8.2.patch b/patches/acorn+8.10.0.patch similarity index 73% rename from patches/acorn+8.8.2.patch rename to patches/acorn+8.10.0.patch index db571063ec5..1ec930760a0 100644 --- a/patches/acorn+8.8.2.patch +++ b/patches/acorn+8.10.0.patch @@ -1,13 +1,13 @@ diff --git a/node_modules/acorn/dist/acorn.js b/node_modules/acorn/dist/acorn.js -index f623ebc..c1868c6 100644 +index 62e1aa6..2a9e592 100644 --- a/node_modules/acorn/dist/acorn.js +++ b/node_modules/acorn/dist/acorn.js -@@ -2139,7 +2139,7 @@ +@@ -2191,7 +2191,7 @@ if (checkClashes) { if (hasOwn(checkClashes, expr.name)) { this.raiseRecoverable(expr.start, "Argument name clash"); } - checkClashes[expr.name] = true; -+ Object.defineProperty(checkClashes, expr.name, { configurable: true, enumerable: true, value: true }); ++ Object.defineProperty(checkClashes, expr.name, { configurable: true, enumerable: true, value: true }); } if (bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } } diff --git a/yarn.lock b/yarn.lock index ecb3b711eea..06120ee3292 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2288,10 +2288,10 @@ acorn-walk@^8.2.0: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^8.2.4, acorn@^8.7.1, acorn@^8.8.2, acorn@^8.9.0: - version "8.8.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" - integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== +acorn@^8.2.4, acorn@^8.8.2, acorn@^8.7.1, acorn@^8.9.0: + version "8.10.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" + integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== agent-base@4, agent-base@^4.3.0: version "4.3.0" From 9fc615e3ac8d630f6a2bfaf2ac0741718f937c33 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 17 Jul 2023 14:21:13 -0700 Subject: [PATCH 08/10] chore: run lint-fix for default-params rule --- packages/internal/src/callback.js | 2 +- packages/internal/src/marshal.js | 2 +- packages/notifier/src/publish-kit.js | 2 +- packages/pegasus/src/pegasus.js | 4 ++-- packages/smart-wallet/src/smartWallet.js | 2 +- packages/solo/src/add-chain.js | 2 +- packages/store/src/legacy/legacyMap.js | 2 +- packages/store/src/legacy/legacyWeakMap.js | 2 +- packages/store/src/stores/scalarMapStore.js | 2 +- packages/store/src/stores/scalarSetStore.js | 2 +- packages/store/src/stores/scalarWeakMapStore.js | 2 +- packages/store/src/stores/scalarWeakSetStore.js | 2 +- .../swingset-liveslots/src/collectionManager.js | 16 ++++++++-------- .../swingset-liveslots/test/liveslots-helpers.js | 8 ++++---- .../tools/fakeVirtualSupport.js | 4 ++-- .../test/bootstrapTests/test-vaults-upgrade.js | 4 ++-- packages/vats/tools/authorityViz.js | 2 +- .../zoe/src/contractSupport/bondingCurves.js | 4 ++-- packages/zoe/src/contractSupport/zoeHelpers.js | 2 +- 19 files changed, 33 insertions(+), 33 deletions(-) diff --git a/packages/internal/src/callback.js b/packages/internal/src/callback.js index 18b5fa82ef8..d645b63745d 100644 --- a/packages/internal/src/callback.js +++ b/packages/internal/src/callback.js @@ -265,7 +265,7 @@ export const prepareAttenuator = ( /** * @param {object} opts * @param {any} [opts.target] - * @param {boolean} [opts.isSync=false] + * @param {boolean} [opts.isSync] * @param {Overrides} [opts.overrides] */ ({ diff --git a/packages/internal/src/marshal.js b/packages/internal/src/marshal.js index d4e65bca780..34278ba2035 100644 --- a/packages/internal/src/marshal.js +++ b/packages/internal/src/marshal.js @@ -65,7 +65,7 @@ harden(assertCapData); * @param {Map} data * @param {string} key * @param {ReturnType['fromCapData']} fromCapData - * @param {number} [index=-1] index of the desired value in a deserialized stream cell + * @param {number} [index] index of the desired value in a deserialized stream cell */ export const unmarshalFromVstorage = (data, key, fromCapData, index = -1) => { const serialized = data.get(key) || Fail`no data for ${key}`; diff --git a/packages/notifier/src/publish-kit.js b/packages/notifier/src/publish-kit.js index 51fdc6f4e0f..180855dc742 100644 --- a/packages/notifier/src/publish-kit.js +++ b/packages/notifier/src/publish-kit.js @@ -209,7 +209,7 @@ const DurablePublishKitStateShape = harden({ /** * @param {object} [options] - * @param {DurablePublishKitValueDurability & 'mandatory'} [options.valueDurability='mandatory'] + * @param {DurablePublishKitValueDurability & 'mandatory'} [options.valueDurability] * @returns {DurablePublishKitState} */ const initDurablePublishKitState = (options = {}) => { diff --git a/packages/pegasus/src/pegasus.js b/packages/pegasus/src/pegasus.js index 43a434012ee..4f074f0b11e 100644 --- a/packages/pegasus/src/pegasus.js +++ b/packages/pegasus/src/pegasus.js @@ -316,8 +316,8 @@ const makePegasus = (zcf, board, namesByAddress) => { /** * Return a handler that can be used with the Network API. * - * @param {ERef} [transferProtocol=DEFAULT_TRANSFER_PROTOCOL] - * @param {ERef} [denomTransformer=DEFAULT_DENOM_TRANSFORMER] + * @param {ERef} [transferProtocol] + * @param {ERef} [denomTransformer] * @returns {PegasusConnectionKit} */ makePegasusConnectionKit( diff --git a/packages/smart-wallet/src/smartWallet.js b/packages/smart-wallet/src/smartWallet.js index c7a7e7893d6..39da99f88d3 100644 --- a/packages/smart-wallet/src/smartWallet.js +++ b/packages/smart-wallet/src/smartWallet.js @@ -520,7 +520,7 @@ export const prepareSmartWallet = (baggage, shared) => { * Umarshals the actionCapData and delegates to the appropriate action handler. * * @param {import('@endo/marshal').CapData} actionCapData of type BridgeAction - * @param {boolean} [canSpend=false] + * @param {boolean} [canSpend] * @returns {Promise} */ handleBridgeAction(actionCapData, canSpend = false) { diff --git a/packages/solo/src/add-chain.js b/packages/solo/src/add-chain.js index 896fba368ec..cf549cdd1f8 100644 --- a/packages/solo/src/add-chain.js +++ b/packages/solo/src/add-chain.js @@ -13,7 +13,7 @@ const DEFAULT_CHAIN_CONFIG = 'https://testnet.agoric.com/network-config'; /** * @param {string} basedir * @param {string} [chainConfig] - * @param {boolean} [force=false] + * @param {boolean} [force] */ async function addChain(basedir, chainConfig, force = false) { let actualConfig = chainConfig; diff --git a/packages/store/src/legacy/legacyMap.js b/packages/store/src/legacy/legacyMap.js index 78664c641c0..a0b9346acd4 100644 --- a/packages/store/src/legacy/legacyMap.js +++ b/packages/store/src/legacy/legacyMap.js @@ -30,7 +30,7 @@ import '../types.js'; * * @deprecated switch to ScalarMap if possible, Map otherwise * @template K,V - * @param {string} [tag='key'] - tag for debugging + * @param {string} [tag] - tag for debugging * @returns {LegacyMap} */ export const makeLegacyMap = (tag = 'key') => { diff --git a/packages/store/src/legacy/legacyWeakMap.js b/packages/store/src/legacy/legacyWeakMap.js index 5676f9c42d1..1f9e9a9241e 100644 --- a/packages/store/src/legacy/legacyWeakMap.js +++ b/packages/store/src/legacy/legacyWeakMap.js @@ -6,7 +6,7 @@ import '../types.js'; * * @deprecated switch to ScalarWeakMap if possible, WeakMap otherwise * @template K,V - * @param {string} [tag='key'] - tag for debugging + * @param {string} [tag] - tag for debugging * @returns {LegacyWeakMap} */ export const makeLegacyWeakMap = (tag = 'key') => { diff --git a/packages/store/src/stores/scalarMapStore.js b/packages/store/src/stores/scalarMapStore.js index ec4e70f8eb9..d9dd8a35cf3 100644 --- a/packages/store/src/stores/scalarMapStore.js +++ b/packages/store/src/stores/scalarMapStore.js @@ -129,7 +129,7 @@ export const makeMapStoreMethods = ( * * @template {Key} K * @template {Passable} V - * @param {string} [tag='key'] - the column name for the key + * @param {string} [tag] - the column name for the key * @param {StoreOptions} [options] * @returns {MapStore} */ diff --git a/packages/store/src/stores/scalarSetStore.js b/packages/store/src/stores/scalarSetStore.js index b981655a46b..eee55dd36fd 100644 --- a/packages/store/src/stores/scalarSetStore.js +++ b/packages/store/src/stores/scalarSetStore.js @@ -85,7 +85,7 @@ export const makeSetStoreMethods = ( * copyRecords, as keys and look them up based on equality of their contents. * * @template K - * @param {string} [tag='key'] - tag for debugging + * @param {string} [tag] - tag for debugging * @param {StoreOptions} [options] * @returns {SetStore} */ diff --git a/packages/store/src/stores/scalarWeakMapStore.js b/packages/store/src/stores/scalarWeakMapStore.js index 5ca4bc9bbf7..2634d878477 100644 --- a/packages/store/src/stores/scalarWeakMapStore.js +++ b/packages/store/src/stores/scalarWeakMapStore.js @@ -88,7 +88,7 @@ export const makeWeakMapStoreMethods = ( * remotables, since the other primitives may always reappear. * * @template K,V - * @param {string} [tag='key'] - tag for debugging + * @param {string} [tag] - tag for debugging * @param {StoreOptions} [options] * @returns {WeakMapStore} */ diff --git a/packages/store/src/stores/scalarWeakSetStore.js b/packages/store/src/stores/scalarWeakSetStore.js index 926f43edbee..6b99330446c 100644 --- a/packages/store/src/stores/scalarWeakSetStore.js +++ b/packages/store/src/stores/scalarWeakSetStore.js @@ -70,7 +70,7 @@ export const makeWeakSetStoreMethods = ( * remotables, since the other primitives may always appear. * * @template K - * @param {string} [tag='key'] - tag for debugging + * @param {string} [tag] - tag for debugging * @param {StoreOptions} [options] * @returns {WeakSetStore} */ diff --git a/packages/swingset-liveslots/src/collectionManager.js b/packages/swingset-liveslots/src/collectionManager.js index 95529e049eb..8ee291e7db1 100644 --- a/packages/swingset-liveslots/src/collectionManager.js +++ b/packages/swingset-liveslots/src/collectionManager.js @@ -896,7 +896,7 @@ export function makeCollectionManager( * Produce a big map. * * @template K,V - * @param {string} [label='map'] - diagnostic label for the store + * @param {string} [label] - diagnostic label for the store * @param {StoreOptions} [options] * @returns {MapStore} */ @@ -940,7 +940,7 @@ export function makeCollectionManager( * Produce a weak big map. * * @template K,V - * @param {string} [label='weakMap'] - diagnostic label for the store + * @param {string} [label] - diagnostic label for the store * @param {StoreOptions} [options] * @returns {WeakMapStore} */ @@ -969,7 +969,7 @@ export function makeCollectionManager( * Produce a big set. * * @template K - * @param {string} [label='set'] - diagnostic label for the store + * @param {string} [label] - diagnostic label for the store * @param {StoreOptions} [options] * @returns {SetStore} */ @@ -996,7 +996,7 @@ export function makeCollectionManager( * Produce a weak big set. * * @template K - * @param {string} [label='weakSet'] - diagnostic label for the store + * @param {string} [label] - diagnostic label for the store * @param {StoreOptions} [options] * @returns {WeakSetStore} */ @@ -1073,7 +1073,7 @@ export function makeCollectionManager( * remotables. * * @template K,V - * @param {string} [label='map'] - diagnostic label for the store + * @param {string} [label] - diagnostic label for the store * @param {StoreOptions} [options] * @returns {MapStore} */ @@ -1085,7 +1085,7 @@ export function makeCollectionManager( * primitives, or remotables. * * @template K,V - * @param {string} [label='weakMap'] - diagnostic label for the store + * @param {string} [label] - diagnostic label for the store * @param {StoreOptions} [options] * @returns {WeakMapStore} */ @@ -1097,7 +1097,7 @@ export function makeCollectionManager( * remotables. * * @template K - * @param {string} [label='set'] - diagnostic label for the store + * @param {string} [label] - diagnostic label for the store * @param {StoreOptions} [options] * @returns {SetStore} */ @@ -1109,7 +1109,7 @@ export function makeCollectionManager( * primitives, or remotables. * * @template K - * @param {string} [label='weakSet'] - diagnostic label for the store + * @param {string} [label] - diagnostic label for the store * @param {StoreOptions} [options] * @returns {WeakSetStore} */ diff --git a/packages/swingset-liveslots/test/liveslots-helpers.js b/packages/swingset-liveslots/test/liveslots-helpers.js index 42b53deb5f6..1f101af07e6 100644 --- a/packages/swingset-liveslots/test/liveslots-helpers.js +++ b/packages/swingset-liveslots/test/liveslots-helpers.js @@ -16,8 +16,8 @@ import { kser } from './kmarshal.js'; /** * @param {object} [options] - * @param {boolean} [options.skipLogging = false] - * @param {Map} [options.kvStore = new Map()] + * @param {boolean} [options.skipLogging] + * @param {Map} [options.kvStore] */ export function buildSyscall(options = {}) { const { skipLogging = false, kvStore: fakestore = new Map() } = options; @@ -168,9 +168,9 @@ function makeRPMaker(nextNumber = 1) { * @param {string} vatName * @param {object} [options] * @param {boolean} [options.forceGC] - * @param {Map} [options.kvStore = new Map()] + * @param {Map} [options.kvStore] * @param {number} [options.nextPromiseImportNumber] - * @param {boolean} [options.skipLogging = false] + * @param {boolean} [options.skipLogging] */ export async function setupTestLiveslots( t, diff --git a/packages/swingset-liveslots/tools/fakeVirtualSupport.js b/packages/swingset-liveslots/tools/fakeVirtualSupport.js index 6280ec6c6f5..461737ca5d0 100644 --- a/packages/swingset-liveslots/tools/fakeVirtualSupport.js +++ b/packages/swingset-liveslots/tools/fakeVirtualSupport.js @@ -315,8 +315,8 @@ export function makeFakeWatchedPromiseManager( * Configure virtual stuff with relaxed durability rules and fake liveslots * * @param {object} [options] - * @param {number} [options.cacheSize=3] - * @param {boolean} [options.relaxDurabilityRules=true] + * @param {number} [options.cacheSize] + * @param {boolean} [options.relaxDurabilityRules] */ export function makeFakeVirtualStuff(options = {}) { const actualOptions = { diff --git a/packages/vats/test/bootstrapTests/test-vaults-upgrade.js b/packages/vats/test/bootstrapTests/test-vaults-upgrade.js index b692992eadb..db495bddd0d 100644 --- a/packages/vats/test/bootstrapTests/test-vaults-upgrade.js +++ b/packages/vats/test/bootstrapTests/test-vaults-upgrade.js @@ -21,8 +21,8 @@ const collateralBrandKey = 'ATOM'; /** * @param {import('ava').ExecutionContext} t * @param {object} [options] - * @param {number} [options.incarnation=1] - * @param {boolean} [options.logTiming=true] + * @param {number} [options.incarnation] + * @param {boolean} [options.logTiming] * @param {import('@agoric/internal/src/storage-test-utils.js').FakeStorageKit} [options.storage] */ const makeDefaultTestContext = async ( diff --git a/packages/vats/tools/authorityViz.js b/packages/vats/tools/authorityViz.js index dec0c1f2789..00c9134852b 100755 --- a/packages/vats/tools/authorityViz.js +++ b/packages/vats/tools/authorityViz.js @@ -103,7 +103,7 @@ const manifest2graph = manifest => { * @param {string} src * @param {string} ty * @param {Permit} item - * @param {boolean} [reverse=false] + * @param {boolean} [reverse] */ const level1 = (src, ty, item, reverse = false) => { if (!item) return; diff --git a/packages/zoe/src/contractSupport/bondingCurves.js b/packages/zoe/src/contractSupport/bondingCurves.js index a7d51a536d9..347561ee43a 100644 --- a/packages/zoe/src/contractSupport/bondingCurves.js +++ b/packages/zoe/src/contractSupport/bondingCurves.js @@ -27,7 +27,7 @@ const BASIS_POINTS = 10000n; // TODO change to 10_000n once tooling copes. * pool of the kind of asset sent in * @param {any} outputReserve - the value in the liquidity * pool of the kind of asset to be sent out - * @param {bigint} [feeBasisPoints=30n] - the fee taken in + * @param {bigint} [feeBasisPoints] - the fee taken in * basis points. The default is 0.3% or 30 basis points. The fee * is taken from inputValue * @returns {NatValue} outputValue - the current price, in value form @@ -66,7 +66,7 @@ export const getInputPrice = ( * pool of the asset being spent * @param {any} outputReserve - the value in the liquidity * pool of the kind of asset to be sent out - * @param {bigint} [feeBasisPoints=30n] - the fee taken in + * @param {bigint} [feeBasisPoints] - the fee taken in * basis points. The default is 0.3% or 30 basis points. The fee is taken from * outputValue * @returns {NatValue} inputValue - the value of input required to purchase output diff --git a/packages/zoe/src/contractSupport/zoeHelpers.js b/packages/zoe/src/contractSupport/zoeHelpers.js index 19dfd1ac4fc..8eee34c1aa5 100644 --- a/packages/zoe/src/contractSupport/zoeHelpers.js +++ b/packages/zoe/src/contractSupport/zoeHelpers.js @@ -305,7 +305,7 @@ const reverse = (keywordRecord = {}) => { * @param {ZCFSeat} fromSeat * The seat in contractA to take the offer payments from. * - * @param {ZCFSeat} [toSeat=fromSeat] + * @param {ZCFSeat} [toSeat] * The seat in contractA to deposit the payout of the offer to. * If `toSeat` is not provided, this defaults to the `fromSeat`. * From b6d5359b1b07a35ae51e1f38cee00312d0657b28 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 17 Jul 2023 14:46:33 -0700 Subject: [PATCH 09/10] chore(types): lint 'scripts' --- packages/swingset-xsnap-supervisor/jsconfig.json | 1 + packages/swingset-xsnap-supervisor/scripts/build-bundle.js | 2 +- packages/xsnap-lockdown/jsconfig.json | 1 + packages/xsnap-lockdown/scripts/build-bundle.js | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/swingset-xsnap-supervisor/jsconfig.json b/packages/swingset-xsnap-supervisor/jsconfig.json index b7cc9a19a3b..392fe1ed9f5 100644 --- a/packages/swingset-xsnap-supervisor/jsconfig.json +++ b/packages/swingset-xsnap-supervisor/jsconfig.json @@ -4,6 +4,7 @@ "include": [ "*.js", "lib/**/*.js", + "scripts/**/*.js", "src/**/*.d.ts", "src/**/*.js", "test/**/*.js", diff --git a/packages/swingset-xsnap-supervisor/scripts/build-bundle.js b/packages/swingset-xsnap-supervisor/scripts/build-bundle.js index dc3358a6a67..afb1d9d4ce2 100644 --- a/packages/swingset-xsnap-supervisor/scripts/build-bundle.js +++ b/packages/swingset-xsnap-supervisor/scripts/build-bundle.js @@ -8,7 +8,7 @@ import process from 'process'; import bundleSource from '@endo/bundle-source'; import { bundlePaths, hashPaths, entryPaths } from '../src/paths.js'; -/** @param {Uint8Array} bytes */ +/** @param {Uint8Array | string} bytes */ const computeSha256 = bytes => { const hash = crypto.createHash('sha256'); hash.update(bytes); diff --git a/packages/xsnap-lockdown/jsconfig.json b/packages/xsnap-lockdown/jsconfig.json index b7cc9a19a3b..392fe1ed9f5 100644 --- a/packages/xsnap-lockdown/jsconfig.json +++ b/packages/xsnap-lockdown/jsconfig.json @@ -4,6 +4,7 @@ "include": [ "*.js", "lib/**/*.js", + "scripts/**/*.js", "src/**/*.d.ts", "src/**/*.js", "test/**/*.js", diff --git a/packages/xsnap-lockdown/scripts/build-bundle.js b/packages/xsnap-lockdown/scripts/build-bundle.js index b89a992c03d..69ff2069efe 100644 --- a/packages/xsnap-lockdown/scripts/build-bundle.js +++ b/packages/xsnap-lockdown/scripts/build-bundle.js @@ -8,7 +8,7 @@ import process from 'process'; import bundleSource from '@endo/bundle-source'; import { bundlePaths, entryPaths, hashPaths } from '../src/paths.js'; -/** @param {Uint8Array} bytes */ +/** @param {Uint8Array | string} bytes */ const computeSha256 = bytes => { const hash = crypto.createHash('sha256'); hash.update(bytes); From 81f9d9fa41f84ba90bed11717ed4348e1b094251 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 17 Jul 2023 14:48:56 -0700 Subject: [PATCH 10/10] ci: disable lint for Golang --- golang/cosmos/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/golang/cosmos/package.json b/golang/cosmos/package.json index 60676206c74..77e5531eaab 100644 --- a/golang/cosmos/package.json +++ b/golang/cosmos/package.json @@ -19,7 +19,7 @@ "postpack": "git clean -f git-revision.txt", "build": "exit 0", "lint-fix": "yarn lint:eslint --fix", - "lint": "eslint '**/*.{cjs,js}'" + "lint": "exit 0" }, "dependencies": { "bindings": "^1.2.1",