Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade koa, and types #585

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
},
"devDependencies": {
"@polkadot/dev": "^0.82.2",
"@types/node": "^20.10.5",
"@types/yargs": "^17.0.32"
"@types/node": "^20.17.10",
"@types/yargs": "^17.0.33"
},
"resolutions": {
"@polkadot/api": "^15.1.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/api-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"yargs": "^17.7.2"
},
"devDependencies": {
"@types/node": "^20.10.5",
"@types/yargs": "^17.0.32"
"@types/node": "^20.17.10",
"@types/yargs": "^17.0.33"
}
}
10 changes: 5 additions & 5 deletions packages/json-serve/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
"@polkadot/api-derive": "^15.1.1",
"@polkadot/types": "^15.1.1",
"@polkadot/util": "^13.2.3",
"koa": "^2.14.2",
"koa-route": "^3.2.0",
"koa": "^2.15.3",
"koa-route": "^4.0.1",
"tslib": "^2.8.1",
"yargs": "^17.7.2"
},
"devDependencies": {
"@types/koa": "^2.13.12",
"@types/koa": "^2.15.0",
"@types/koa-route": "^3.2.8",
"@types/node": "^20.10.5",
"@types/yargs": "^17.0.32"
"@types/node": "^20.17.10",
"@types/yargs": "^17.0.33"
}
}
4 changes: 2 additions & 2 deletions packages/metadata-cmp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"yargs": "^17.7.2"
},
"devDependencies": {
"@types/node": "^20.10.5",
"@types/yargs": "^17.0.32"
"@types/node": "^20.17.10",
"@types/yargs": "^17.0.33"
}
}
10 changes: 5 additions & 5 deletions packages/monitor-rpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
"@polkadot/api": "^15.1.1",
"@polkadot/types": "^15.1.1",
"@polkadot/util": "^13.2.3",
"koa": "^2.14.2",
"koa-route": "^3.2.0",
"koa": "^2.15.3",
"koa-route": "^4.0.1",
"tslib": "^2.8.1",
"yargs": "^17.7.2"
},
"devDependencies": {
"@types/koa": "^2.13.12",
"@types/koa": "^2.15.0",
"@types/koa-route": "^3.2.8",
"@types/node": "^20.10.5",
"@types/yargs": "^17.0.32"
"@types/node": "^20.17.10",
"@types/yargs": "^17.0.33"
}
}
5 changes: 4 additions & 1 deletion packages/monitor-rpc/src/runcli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

import type { BlockNumber, Header } from '@polkadot/types/interfaces';
import type { AnyJson } from '@polkadot/types/types';

import Koa from 'koa';
import koaRoute from 'koa-route';
Expand All @@ -10,6 +11,8 @@

import { ApiPromise, WsProvider } from '@polkadot/api';

type Handler = (this: Koa.Context, ctx: Koa.Context, ...params: AnyJson[]) => AnyJson;

interface ArgV {
port: number;
ws: string
Expand Down Expand Up @@ -71,7 +74,7 @@
async function main (): Promise<void> {
const app = new Koa();

app.use(koaRoute.all('/', httpStatus));
app.use(koaRoute.all('/', httpStatus as Handler));

Check failure on line 77 in packages/monitor-rpc/src/runcli.ts

View workflow job for this annotation

GitHub Actions / pr (build)

Argument of type 'Handler' is not assignable to parameter of type 'KoaRoute.Handler'.
app.listen(port);

const provider = new WsProvider(ws);
Expand Down
4 changes: 2 additions & 2 deletions packages/signer-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"yargs": "^17.7.2"
},
"devDependencies": {
"@types/node": "^20.10.5",
"@types/yargs": "^17.0.32"
"@types/node": "^20.17.10",
"@types/yargs": "^17.0.33"
}
}
4 changes: 2 additions & 2 deletions packages/vanitygen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"yargs": "^17.7.2"
},
"devDependencies": {
"@types/node": "^20.10.5",
"@types/yargs": "^17.0.32"
"@types/node": "^20.17.10",
"@types/yargs": "^17.0.33"
}
}
121 changes: 80 additions & 41 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,8 @@ __metadata:
"@polkadot/types": "npm:^15.1.1"
"@polkadot/util": "npm:^13.2.3"
"@polkadot/util-crypto": "npm:^13.2.3"
"@types/node": "npm:^20.10.5"
"@types/yargs": "npm:^17.0.32"
"@types/node": "npm:^20.17.10"
"@types/yargs": "npm:^17.0.33"
tslib: "npm:^2.8.1"
yargs: "npm:^17.7.2"
bin:
Expand Down Expand Up @@ -642,12 +642,12 @@ __metadata:
"@polkadot/api-derive": "npm:^15.1.1"
"@polkadot/types": "npm:^15.1.1"
"@polkadot/util": "npm:^13.2.3"
"@types/koa": "npm:^2.13.12"
"@types/koa": "npm:^2.15.0"
"@types/koa-route": "npm:^3.2.8"
"@types/node": "npm:^20.10.5"
"@types/yargs": "npm:^17.0.32"
koa: "npm:^2.14.2"
koa-route: "npm:^3.2.0"
"@types/node": "npm:^20.17.10"
"@types/yargs": "npm:^17.0.33"
koa: "npm:^2.15.3"
koa-route: "npm:^4.0.1"
tslib: "npm:^2.8.1"
yargs: "npm:^17.7.2"
bin:
Expand Down Expand Up @@ -677,8 +677,8 @@ __metadata:
"@polkadot/keyring": "npm:^13.2.3"
"@polkadot/types": "npm:^15.1.1"
"@polkadot/util": "npm:^13.2.3"
"@types/node": "npm:^20.10.5"
"@types/yargs": "npm:^17.0.32"
"@types/node": "npm:^20.17.10"
"@types/yargs": "npm:^17.0.33"
tslib: "npm:^2.8.1"
yargs: "npm:^17.7.2"
bin:
Expand All @@ -693,12 +693,12 @@ __metadata:
"@polkadot/api": "npm:^15.1.1"
"@polkadot/types": "npm:^15.1.1"
"@polkadot/util": "npm:^13.2.3"
"@types/koa": "npm:^2.13.12"
"@types/koa": "npm:^2.15.0"
"@types/koa-route": "npm:^3.2.8"
"@types/node": "npm:^20.10.5"
"@types/yargs": "npm:^17.0.32"
koa: "npm:^2.14.2"
koa-route: "npm:^3.2.0"
"@types/node": "npm:^20.17.10"
"@types/yargs": "npm:^17.0.33"
koa: "npm:^2.15.3"
koa-route: "npm:^4.0.1"
tslib: "npm:^2.8.1"
yargs: "npm:^17.7.2"
bin:
Expand Down Expand Up @@ -778,8 +778,8 @@ __metadata:
"@polkadot/types": "npm:^15.1.1"
"@polkadot/util": "npm:^13.2.3"
"@polkadot/util-crypto": "npm:^13.2.3"
"@types/node": "npm:^20.10.5"
"@types/yargs": "npm:^17.0.32"
"@types/node": "npm:^20.17.10"
"@types/yargs": "npm:^17.0.33"
tslib: "npm:^2.8.1"
yargs: "npm:^17.7.2"
bin:
Expand Down Expand Up @@ -902,8 +902,8 @@ __metadata:
dependencies:
"@polkadot/util": "npm:^13.2.3"
"@polkadot/util-crypto": "npm:^13.2.3"
"@types/node": "npm:^20.10.5"
"@types/yargs": "npm:^17.0.32"
"@types/node": "npm:^20.17.10"
"@types/yargs": "npm:^17.0.33"
tslib: "npm:^2.8.1"
yargs: "npm:^17.7.2"
bin:
Expand Down Expand Up @@ -1570,7 +1570,7 @@ __metadata:
languageName: node
linkType: hard

"@types/koa@npm:*, @types/koa@npm:^2.13.12":
"@types/koa@npm:*":
version: 2.13.12
resolution: "@types/koa@npm:2.13.12"
dependencies:
Expand All @@ -1586,14 +1586,30 @@ __metadata:
languageName: node
linkType: hard

"@types/koa@npm:^2.15.0":
version: 2.15.0
resolution: "@types/koa@npm:2.15.0"
dependencies:
"@types/accepts": "npm:*"
"@types/content-disposition": "npm:*"
"@types/cookies": "npm:*"
"@types/http-assert": "npm:*"
"@types/http-errors": "npm:*"
"@types/keygrip": "npm:*"
"@types/koa-compose": "npm:*"
"@types/node": "npm:*"
checksum: 10/2be9dff1ef66bf15b037386c188893761a8fb46390a5e1d2a2031d9e1ba4473e40ddfbd625980a504bd804d7148b3e230c18e240503f33eac3b6e5e830645d30
languageName: node
linkType: hard

"@types/mime@npm:*":
version: 2.0.3
resolution: "@types/mime@npm:2.0.3"
checksum: 10/1f4f144423e149f300438f7cdca9b308d7a18a944e63f5ddf262558208a22a64c8e79b6973d602d86928e19052b3256b492429951b34d037242bb1bdfddae388
languageName: node
linkType: hard

"@types/node@npm:*, @types/node@npm:^20.10.5":
"@types/node@npm:*":
version: 20.10.5
resolution: "@types/node@npm:20.10.5"
dependencies:
Expand All @@ -1602,6 +1618,15 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:^20.17.10":
version: 20.17.10
resolution: "@types/node@npm:20.17.10"
dependencies:
undici-types: "npm:~6.19.2"
checksum: 10/9a1bcb2f25ce1ad249497e5f10ed984bf0ec476439fad2e965c3d6cc4642abb23c5e8400f7e48e55ff121d2b80b14bdc1bd4eac7ff6848154033a2be25fffb17
languageName: node
linkType: hard

"@types/qs@npm:*":
version: 6.9.5
resolution: "@types/qs@npm:6.9.5"
Expand Down Expand Up @@ -1690,12 +1715,12 @@ __metadata:
languageName: node
linkType: hard

"@types/yargs@npm:^17.0.32":
version: 17.0.32
resolution: "@types/yargs@npm:17.0.32"
"@types/yargs@npm:^17.0.33":
version: 17.0.33
resolution: "@types/yargs@npm:17.0.33"
dependencies:
"@types/yargs-parser": "npm:*"
checksum: 10/1e2b2673847011ce43607df690d392f137d95a2d6ea85aa319403eadda2ef4277365efd4982354d8843f2611ef3846c88599660aaeb537fa9ccddae83c2a89de
checksum: 10/16f6681bf4d99fb671bf56029141ed01db2862e3db9df7fc92d8bea494359ac96a1b4b1c35a836d1e95e665fb18ad753ab2015fc0db663454e8fd4e5d5e2ef91
languageName: node
linkType: hard

Expand Down Expand Up @@ -3206,13 +3231,13 @@ __metadata:
languageName: node
linkType: hard

"cookies@npm:~0.8.0":
version: 0.8.0
resolution: "cookies@npm:0.8.0"
"cookies@npm:~0.9.0":
version: 0.9.1
resolution: "cookies@npm:0.9.1"
dependencies:
depd: "npm:~2.0.0"
keygrip: "npm:~1.1.0"
checksum: 10/5da4d72ba81c2740511751ac8ea9506e10e2366b9ad3360333581e4667fd8d063d02c5be0bef16177de3e366b8128ed2b72921e2952c79cbca084d177e529bba
checksum: 10/4816461a38d907b20f3fb7a2bc4741fe580e7a195f3e248ef7025cb3be56a07638a0f4e72553a5f535554ca30172c8a3245c63ac72c9737cec034e9a47773392
languageName: node
linkType: hard

Expand Down Expand Up @@ -6413,26 +6438,26 @@ __metadata:
languageName: node
linkType: hard

"koa-route@npm:^3.2.0":
version: 3.2.0
resolution: "koa-route@npm:3.2.0"
"koa-route@npm:^4.0.1":
version: 4.0.1
resolution: "koa-route@npm:4.0.1"
dependencies:
debug: "npm:*"
methods: "npm:~1.1.0"
path-to-regexp: "npm:^1.2.0"
checksum: 10/251f257211be237aa287454940f7a43e4b1df7852700009756fe699000c7429d92e511729adf0aa382b248ba1c222d510f68d54e7ac32a7891303bdc5dd18335
path-to-regexp: "npm:^6.2.1"
checksum: 10/3143012c32342d62ec0a74e600e0860111b46bbf16b0f1b0ff1b043962d2dac8bf526dbf592e620f7b3cf32fb7f2ff57c35969f6067d7d2de7f7e3690c6ae071
languageName: node
linkType: hard

"koa@npm:^2.14.2":
version: 2.14.2
resolution: "koa@npm:2.14.2"
"koa@npm:^2.15.3":
version: 2.15.3
resolution: "koa@npm:2.15.3"
dependencies:
accepts: "npm:^1.3.5"
cache-content-type: "npm:^1.0.0"
content-disposition: "npm:~0.5.2"
content-type: "npm:^1.0.4"
cookies: "npm:~0.8.0"
cookies: "npm:~0.9.0"
debug: "npm:^4.3.2"
delegates: "npm:^1.0.0"
depd: "npm:^2.0.0"
Expand All @@ -6451,7 +6476,7 @@ __metadata:
statuses: "npm:^1.5.0"
type-is: "npm:^1.6.16"
vary: "npm:^1.1.2"
checksum: 10/be3592ad2ed61068aaf19f4957de07602c4141cb33e049727d2453010d90cb9f4756c87103c9b44e24cf31f061116f4479b0a4ce7638c96fd64652f559ad5b7b
checksum: 10/b2c2771a4ee5268f9d039ce025b9c3798a0baba8c3cf3895a6fc2d286363e0cd2c98c02a5b87f14100baa2bc17d854eed6ed80f9bd41afda1d056f803b206514
languageName: node
linkType: hard

Expand Down Expand Up @@ -7505,7 +7530,7 @@ __metadata:
languageName: node
linkType: hard

"path-to-regexp@npm:^1.2.0, path-to-regexp@npm:^1.7.0":
"path-to-regexp@npm:^1.7.0":
version: 1.8.0
resolution: "path-to-regexp@npm:1.8.0"
dependencies:
Expand All @@ -7514,6 +7539,13 @@ __metadata:
languageName: node
linkType: hard

"path-to-regexp@npm:^6.2.1":
version: 6.3.0
resolution: "path-to-regexp@npm:6.3.0"
checksum: 10/6822f686f01556d99538b350722ef761541ec0ce95ca40ce4c29e20a5b492fe8361961f57993c71b2418de12e604478dcf7c430de34b2c31a688363a7a944d9c
languageName: node
linkType: hard

"path-type@npm:^4.0.0":
version: 4.0.0
resolution: "path-type@npm:4.0.0"
Expand Down Expand Up @@ -8269,8 +8301,8 @@ __metadata:
resolution: "root-workspace-0b6124@workspace:."
dependencies:
"@polkadot/dev": "npm:^0.82.2"
"@types/node": "npm:^20.10.5"
"@types/yargs": "npm:^17.0.32"
"@types/node": "npm:^20.17.10"
"@types/yargs": "npm:^17.0.33"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -9457,6 +9489,13 @@ __metadata:
languageName: node
linkType: hard

"undici-types@npm:~6.19.2":
version: 6.19.8
resolution: "undici-types@npm:6.19.8"
checksum: 10/cf0b48ed4fc99baf56584afa91aaffa5010c268b8842f62e02f752df209e3dea138b372a60a963b3b2576ed932f32329ce7ddb9cb5f27a6c83040d8cd74b7a70
languageName: node
linkType: hard

"uniq@npm:^1.0.1":
version: 1.0.1
resolution: "uniq@npm:1.0.1"
Expand Down
Loading