Skip to content

Commit

Permalink
Upgrade dependencies
Browse files Browse the repository at this point in the history
- Upgrade most eligible dependencies: aside from ethers, urql, and
pino because they have many breaking changes
  • Loading branch information
fordN authored and tilacog committed Sep 18, 2023
1 parent 5235248 commit ab23c3b
Show file tree
Hide file tree
Showing 6 changed files with 1,476 additions and 1,336 deletions.
50 changes: 25 additions & 25 deletions packages/common-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,49 +16,49 @@
"test:watch": "jest --watch --passWithNoTests --detectOpenHandles --verbose"
},
"dependencies": {
"@graphprotocol/contracts": "2.1.0",
"@graphprotocol/contracts": "5.2.1",
"@graphprotocol/pino-sentry-simple": "0.7.1",
"@urql/core": "2.4.4",
"@urql/exchange-execute": "1.2.2",
"body-parser": "1.19.1",
"bs58": "4.0.1",
"body-parser": "1.20.2",
"bs58": "5.0.0",
"cors": "2.8.5",
"cross-fetch": "3.1.5",
"cross-fetch": "4.0.0",
"ethers": "5.7.0",
"express": "4.17.3",
"graphql": "16.3.0",
"express": "4.18.2",
"graphql": "16.8.0",
"graphql-tag": "2.12.6",
"helmet": "5.0.2",
"helmet": "7.0.0",
"morgan": "1.10.0",
"ngeohash": "0.6.3",
"pg": "8.7.3",
"pg": "8.11.3",
"pg-hstore": "2.3.4",
"pino": "7.6.0",
"pino-multi-stream": "6.0.0",
"prom-client": "14.0.1",
"sequelize": "6.31.1"
"prom-client": "14.2.0",
"sequelize": "6.33.0"
},
"devDependencies": {
"@types/bs58": "4.0.1",
"@types/cors": "2.8.12",
"@types/express": "4.17.13",
"@types/jest": "27.4.1",
"@types/lodash.isequal": "4.5.5",
"@types/morgan": "1.9.3",
"@types/cors": "2.8.14",
"@types/express": "4.17.17",
"@types/jest": "29.5.4",
"@types/lodash.isequal": "4.5.6",
"@types/morgan": "1.9.5",
"@types/ngeohash": "0.6.4",
"@types/node": "17.0.23",
"@types/node": "20.6.1",
"@types/pino": "7.0.5",
"@types/pino-multi-stream": "5.1.3",
"@types/supertest": "2.0.12",
"@typescript-eslint/eslint-plugin": "5.8.0",
"@typescript-eslint/parser": "5.19.0",
"eslint": "8.13.0",
"jest": "27.5.1",
"nock": "13.2.4",
"prettier": "2.6.2",
"supertest": "6.2.2",
"ts-jest": "27.1.4",
"typescript": "4.1.6"
"@typescript-eslint/eslint-plugin": "6.7.0",
"@typescript-eslint/parser": "6.7.0",
"eslint": "8.49.0",
"jest": "29.7.0",
"nock": "13.3.3",
"prettier": "3.0.3",
"supertest": "6.3.3",
"ts-jest": "29.1.1",
"typescript": "5.2.2"
},
"gitHead": "8d9126f4c6c764ad6462c6ca2cc4523a268820fa"
}
15 changes: 9 additions & 6 deletions packages/common-ts/src/eventual/eventual.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,15 @@ export function throttle<T>(source: Eventual<T>, interval: number): Eventual<T>
latestT = t

if (!timeout) {
timeout = setTimeout(() => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
output.push(latestT!)
lastPushed = Date.now()
timeout = undefined
}, Math.max(0, Math.min(interval, Date.now() - lastPushed)))
timeout = setTimeout(
() => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
output.push(latestT!)
lastPushed = Date.now()
timeout = undefined
},
Math.max(0, Math.min(interval, Date.now() - lastPushed)),
)
}
}
})
Expand Down
12 changes: 5 additions & 7 deletions packages/common-ts/src/subgraph/networkSubgraphClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ describe('Network Subgraph Client', () => {

expect(
client
.query(
gql`
{
ok
}
`,
)
.query(gql`
{
ok
}
`)
.toPromise(),
).resolves.toMatchObject({
data: { ok: true },
Expand Down
4 changes: 2 additions & 2 deletions packages/common-ts/src/subgraphs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { utils } from 'ethers'
import base58 from 'bs58'

export class SubgraphName {
kind: 'name' = 'name'
kind: 'name' = 'name' as const
value: string

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

export class SubgraphDeploymentID {
kind: 'deployment-id' = 'deployment-id'
kind: 'deployment-id' = 'deployment-id' as const

// Hexadecimal (bytes32) representation of the subgraph deployment Id
value: string
Expand Down
3 changes: 2 additions & 1 deletion packages/common-ts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
"strict": true,
"composite": true,
"lib": ["es2015", "es6", "esnext.asynciterable", "dom"],
"types": ["jest", "node"]
},
"include": ["src/**/*.ts"],
"exclude": ["src/**/__tests__/*.ts"],
"exclude": [],
"references": []
}
Loading

0 comments on commit ab23c3b

Please sign in to comment.