Skip to content

Commit ab23c3b

Browse files
fordNtilacog
authored andcommitted
Upgrade dependencies
- Upgrade most eligible dependencies: aside from ethers, urql, and pino because they have many breaking changes
1 parent 5235248 commit ab23c3b

File tree

6 files changed

+1476
-1336
lines changed

6 files changed

+1476
-1336
lines changed

packages/common-ts/package.json

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,49 +16,49 @@
1616
"test:watch": "jest --watch --passWithNoTests --detectOpenHandles --verbose"
1717
},
1818
"dependencies": {
19-
"@graphprotocol/contracts": "2.1.0",
19+
"@graphprotocol/contracts": "5.2.1",
2020
"@graphprotocol/pino-sentry-simple": "0.7.1",
2121
"@urql/core": "2.4.4",
2222
"@urql/exchange-execute": "1.2.2",
23-
"body-parser": "1.19.1",
24-
"bs58": "4.0.1",
23+
"body-parser": "1.20.2",
24+
"bs58": "5.0.0",
2525
"cors": "2.8.5",
26-
"cross-fetch": "3.1.5",
26+
"cross-fetch": "4.0.0",
2727
"ethers": "5.7.0",
28-
"express": "4.17.3",
29-
"graphql": "16.3.0",
28+
"express": "4.18.2",
29+
"graphql": "16.8.0",
3030
"graphql-tag": "2.12.6",
31-
"helmet": "5.0.2",
31+
"helmet": "7.0.0",
3232
"morgan": "1.10.0",
3333
"ngeohash": "0.6.3",
34-
"pg": "8.7.3",
34+
"pg": "8.11.3",
3535
"pg-hstore": "2.3.4",
3636
"pino": "7.6.0",
3737
"pino-multi-stream": "6.0.0",
38-
"prom-client": "14.0.1",
39-
"sequelize": "6.31.1"
38+
"prom-client": "14.2.0",
39+
"sequelize": "6.33.0"
4040
},
4141
"devDependencies": {
4242
"@types/bs58": "4.0.1",
43-
"@types/cors": "2.8.12",
44-
"@types/express": "4.17.13",
45-
"@types/jest": "27.4.1",
46-
"@types/lodash.isequal": "4.5.5",
47-
"@types/morgan": "1.9.3",
43+
"@types/cors": "2.8.14",
44+
"@types/express": "4.17.17",
45+
"@types/jest": "29.5.4",
46+
"@types/lodash.isequal": "4.5.6",
47+
"@types/morgan": "1.9.5",
4848
"@types/ngeohash": "0.6.4",
49-
"@types/node": "17.0.23",
49+
"@types/node": "20.6.1",
5050
"@types/pino": "7.0.5",
5151
"@types/pino-multi-stream": "5.1.3",
5252
"@types/supertest": "2.0.12",
53-
"@typescript-eslint/eslint-plugin": "5.8.0",
54-
"@typescript-eslint/parser": "5.19.0",
55-
"eslint": "8.13.0",
56-
"jest": "27.5.1",
57-
"nock": "13.2.4",
58-
"prettier": "2.6.2",
59-
"supertest": "6.2.2",
60-
"ts-jest": "27.1.4",
61-
"typescript": "4.1.6"
53+
"@typescript-eslint/eslint-plugin": "6.7.0",
54+
"@typescript-eslint/parser": "6.7.0",
55+
"eslint": "8.49.0",
56+
"jest": "29.7.0",
57+
"nock": "13.3.3",
58+
"prettier": "3.0.3",
59+
"supertest": "6.3.3",
60+
"ts-jest": "29.1.1",
61+
"typescript": "5.2.2"
6262
},
6363
"gitHead": "8d9126f4c6c764ad6462c6ca2cc4523a268820fa"
6464
}

packages/common-ts/src/eventual/eventual.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,12 +273,15 @@ export function throttle<T>(source: Eventual<T>, interval: number): Eventual<T>
273273
latestT = t
274274

275275
if (!timeout) {
276-
timeout = setTimeout(() => {
277-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
278-
output.push(latestT!)
279-
lastPushed = Date.now()
280-
timeout = undefined
281-
}, Math.max(0, Math.min(interval, Date.now() - lastPushed)))
276+
timeout = setTimeout(
277+
() => {
278+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
279+
output.push(latestT!)
280+
lastPushed = Date.now()
281+
timeout = undefined
282+
},
283+
Math.max(0, Math.min(interval, Date.now() - lastPushed)),
284+
)
282285
}
283286
}
284287
})

packages/common-ts/src/subgraph/networkSubgraphClient.test.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ describe('Network Subgraph Client', () => {
1212

1313
expect(
1414
client
15-
.query(
16-
gql`
17-
{
18-
ok
19-
}
20-
`,
21-
)
15+
.query(gql`
16+
{
17+
ok
18+
}
19+
`)
2220
.toPromise(),
2321
).resolves.toMatchObject({
2422
data: { ok: true },

packages/common-ts/src/subgraphs/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { utils } from 'ethers'
22
import base58 from 'bs58'
33

44
export class SubgraphName {
5-
kind: 'name' = 'name'
5+
kind: 'name' = 'name' as const
66
value: string
77

88
constructor(name: string) {
@@ -19,7 +19,7 @@ const bytes32Check = /^0x[0-9a-f]{64}$/
1919
const multiHashCheck = /^Qm[1-9a-km-zA-HJ-NP-Z]{44}$/
2020

2121
export class SubgraphDeploymentID {
22-
kind: 'deployment-id' = 'deployment-id'
22+
kind: 'deployment-id' = 'deployment-id' as const
2323

2424
// Hexadecimal (bytes32) representation of the subgraph deployment Id
2525
value: string

packages/common-ts/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
"strict": true,
1212
"composite": true,
1313
"lib": ["es2015", "es6", "esnext.asynciterable", "dom"],
14+
"types": ["jest", "node"]
1415
},
1516
"include": ["src/**/*.ts"],
16-
"exclude": ["src/**/__tests__/*.ts"],
17+
"exclude": [],
1718
"references": []
1819
}

0 commit comments

Comments
 (0)