Skip to content

Commit ef82fbf

Browse files
authoredDec 3, 2024··
lint multichain-testing (#10312)
incidental ## Description #10305 used `bypass:integration` because it was just a change to linting, which should run before integration tests. Unfortunately, that [broke master](https://github.com/Agoric/agoric-sdk/actions/runs/11465689840/job/31904707630) because `multichain-testing` uses the same tsconfig and isn't run until integration. Then I noticed its lint doesn't include TypeScript and had many errors. This adds `tsc` to its `yarn lint` and fixes everything needed to get it passing. It still doesn't bring linting of `multichain-testing` earlier than the **Multichain E2E Tests** workflow. So I still wouldn't have noticed the type import failure under `bypass:integration`. I don't think solving that is really worth the effort at this point. ### Security Considerations none ### Scaling Considerations none ### Documentation Considerations none ### Testing Considerations CI ### Upgrade Considerations n/a
2 parents cf56e91 + a62f80c commit ef82fbf

10 files changed

+26
-18
lines changed
 

‎multichain-testing/.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.yarn/*
22
!.yarn/patches/*
33
# fetched chain info from running starship
4-
starship-chain-info*
4+
starship-chain-info.js
55
# output of build script to get update running chain info
66
revise-chain-info*
77
start*

‎multichain-testing/package.json

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
"type": "module",
55
"scripts": {
66
"build": "exit 0",
7-
"lint": "yarn lint:eslint",
8-
"lint:eslint": "eslint .",
9-
"lint:types": "tsc --noEmit",
7+
"lint": "yarn tsc && yarn eslint .",
108
"lint-fix": "yarn lint:eslint --fix",
119
"test": "echo 'Run specific test suites:\nyarn test:main (needs `make start`)\nyarn test:fast-usdc (needs `make start FILE=config.fusdc.yaml`)'",
1210
"test:main": "ava --config ava.main.config.js",
@@ -29,7 +27,7 @@
2927
"@endo/ses-ava": "^1.2.8",
3028
"@types/eslint": "^8",
3129
"@types/fs-extra": "^11",
32-
"@types/node": "^20.11.13",
30+
"@types/node": "^22.0.0",
3331
"@typescript-eslint/eslint-plugin": "^6.20.0",
3432
"@typescript-eslint/parser": "^6.20.0",
3533
"ava": "^6.2.0",
@@ -41,7 +39,7 @@
4139
"starshipjs": "2.4.1",
4240
"ts-blank-space": "^0.4.4",
4341
"tsx": "^4.15.6",
44-
"typescript": "^5.3.3"
42+
"typescript": "~5.6.2"
4543
},
4644
"resolutions": {
4745
"axios": "1.6.7"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/* @file types so linting works when the real info hasn't been fetched */
2+
export default {} as Record<string, CosmosChainInfo>;

‎multichain-testing/test/chain-queries.test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ test.serial('Send Local Query from chain object', async t => {
247247
},
248248
);
249249
const balanceProto3JsonQuery = typedJson(
250+
// @ts-expect-error outdated cosmic-proto dep
250251
'/cosmos.bank.v1beta1.QueryBalanceRequest',
251252
{
252253
address: agoricAddr,

‎multichain-testing/tools/batchQuery.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @ts-check
12
import { assert } from '@endo/errors';
23
import { E } from '@endo/far';
34

‎multichain-testing/tools/e2e-tools.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @ts-check
12
/** global harden */
23
import { assert } from '@endo/errors';
34
import { E, Far } from '@endo/far';
@@ -123,6 +124,7 @@ const installBundle = async (fullPath, opts) => {
123124
* chainId?: string;
124125
* whale?: string;
125126
* progress?: typeof console.log;
127+
* q?: import('./queryKit.js').QueryTool;
126128
* }} opts
127129
*/
128130
export const provisionSmartWallet = async (
@@ -474,6 +476,7 @@ export const makeE2ETools = async (
474476
// name,
475477
id: fullPath,
476478
installHeight: tx.height,
479+
// @ts-expect-error confirm is a boolean?
477480
installed: confirm.installed,
478481
});
479482
}

‎multichain-testing/tools/makeHttpClient.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @ts-check
12
import { assert } from '@endo/errors';
23
import { Far } from '@endo/far';
34

‎multichain-testing/tools/marshalTables.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @ts-check
12
/**
23
* @file marshal tools for vstorage clients
34
*

‎multichain-testing/tools/queryKit.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @ts-check
12
import { E, Far } from '@endo/far';
23
import { batchVstorageQuery } from './batchQuery.js';
34
import { makeClientMarshaller } from './marshalTables.js';

‎multichain-testing/yarn.lock

+12-12
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ __metadata:
938938
languageName: node
939939
linkType: hard
940940

941-
"@types/node@npm:*":
941+
"@types/node@npm:*, @types/node@npm:^22.0.0":
942942
version: 22.7.8
943943
resolution: "@types/node@npm:22.7.8"
944944
dependencies:
@@ -947,7 +947,7 @@ __metadata:
947947
languageName: node
948948
linkType: hard
949949

950-
"@types/node@npm:>=13.7.0, @types/node@npm:^20.11.13":
950+
"@types/node@npm:>=13.7.0":
951951
version: 20.14.2
952952
resolution: "@types/node@npm:20.14.2"
953953
dependencies:
@@ -3971,7 +3971,7 @@ __metadata:
39713971
"@endo/ses-ava": "npm:^1.2.8"
39723972
"@types/eslint": "npm:^8"
39733973
"@types/fs-extra": "npm:^11"
3974-
"@types/node": "npm:^20.11.13"
3974+
"@types/node": "npm:^22.0.0"
39753975
"@typescript-eslint/eslint-plugin": "npm:^6.20.0"
39763976
"@typescript-eslint/parser": "npm:^6.20.0"
39773977
ava: "npm:^6.2.0"
@@ -3983,7 +3983,7 @@ __metadata:
39833983
starshipjs: "npm:2.4.1"
39843984
ts-blank-space: "npm:^0.4.4"
39853985
tsx: "npm:^4.15.6"
3986-
typescript: "npm:^5.3.3"
3986+
typescript: "npm:~5.6.2"
39873987
languageName: unknown
39883988
linkType: soft
39893989

@@ -4450,13 +4450,13 @@ __metadata:
44504450
languageName: node
44514451
linkType: hard
44524452

4453-
"typescript@npm:^5.3.3":
4454-
version: 5.4.5
4455-
resolution: "typescript@npm:5.4.5"
4453+
"typescript@npm:~5.6.2":
4454+
version: 5.6.3
4455+
resolution: "typescript@npm:5.6.3"
44564456
bin:
44574457
tsc: bin/tsc
44584458
tsserver: bin/tsserver
4459-
checksum: 10c0/2954022ada340fd3d6a9e2b8e534f65d57c92d5f3989a263754a78aba549f7e6529acc1921913560a4b816c46dce7df4a4d29f9f11a3dc0d4213bb76d043251e
4459+
checksum: 10c0/44f61d3fb15c35359bc60399cb8127c30bae554cd555b8e2b46d68fa79d680354b83320ad419ff1b81a0bdf324197b29affe6cc28988cd6a74d4ac60c94f9799
44604460
languageName: node
44614461
linkType: hard
44624462

@@ -4470,13 +4470,13 @@ __metadata:
44704470
languageName: node
44714471
linkType: hard
44724472

4473-
"typescript@patch:typescript@npm%3A^5.3.3#optional!builtin<compat/typescript>":
4474-
version: 5.4.5
4475-
resolution: "typescript@patch:typescript@npm%3A5.4.5#optional!builtin<compat/typescript>::version=5.4.5&hash=5adc0c"
4473+
"typescript@patch:typescript@npm%3A~5.6.2#optional!builtin<compat/typescript>":
4474+
version: 5.6.3
4475+
resolution: "typescript@patch:typescript@npm%3A5.6.3#optional!builtin<compat/typescript>::version=5.6.3&hash=8c6c40"
44764476
bin:
44774477
tsc: bin/tsc
44784478
tsserver: bin/tsserver
4479-
checksum: 10c0/db2ad2a16ca829f50427eeb1da155e7a45e598eec7b086d8b4e8ba44e5a235f758e606d681c66992230d3fc3b8995865e5fd0b22a2c95486d0b3200f83072ec9
4479+
checksum: 10c0/7c9d2e07c81226d60435939618c91ec2ff0b75fbfa106eec3430f0fcf93a584bc6c73176676f532d78c3594fe28a54b36eb40b3d75593071a7ec91301533ace7
44804480
languageName: node
44814481
linkType: hard
44824482

0 commit comments

Comments
 (0)
Please sign in to comment.