Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit acf71d1

Browse files
Deps upgrade/cleanup
* Removed esbuild leftovers * Nodejs upgrade * Removed bullmq and bullboard, as a leftover from microservices setup * Removed unused dependencies * Upgraded turbo * Sorted out deps/devDependencies placement * Fixed turbo codependence: sometimes we had failed builds because `common` package wasn't built yet when `core` was building
1 parent d36a155 commit acf71d1

File tree

9 files changed

+187
-4727
lines changed

9 files changed

+187
-4727
lines changed

.circleci/config.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 2.1
1+
version: 2.1
22

33
jobs:
44
checkDependencies:
@@ -12,7 +12,7 @@ jobs:
1212
1313
checkCandidatesFile:
1414
docker:
15-
- image: node:18
15+
- image: node:22
1616
resource_class: large
1717
steps:
1818
- checkout
@@ -24,7 +24,7 @@ jobs:
2424
2525
checkCoreESLint:
2626
docker:
27-
- image: node:18
27+
- image: node:22
2828
resource_class: large
2929
steps:
3030
- checkout
@@ -36,7 +36,7 @@ jobs:
3636
3737
checkCommonESLint:
3838
docker:
39-
- image: node:18
39+
- image: node:22
4040
resource_class: large
4141
steps:
4242
- checkout
@@ -49,7 +49,7 @@ jobs:
4949
CommonUnitTests:
5050
description: "Common Unit Tests"
5151
docker:
52-
- image: node:18-bullseye
52+
- image: node:22-bullseye
5353
- image: mongo:6.0.9
5454
name: mongodb
5555
resource_class: xlarge
@@ -67,7 +67,7 @@ jobs:
6767
ChaindataIntegrationTests:
6868
description: "Chaindata Integration Tests"
6969
docker:
70-
- image: node:18-bullseye
70+
- image: node:22-bullseye
7171
- image: mongo:6.0.9
7272
name: mongodb
7373
resource_class: xlarge
@@ -85,7 +85,7 @@ jobs:
8585
ApiHandlerIntegrationTests:
8686
description: "ApiHandler Integration Tests"
8787
docker:
88-
- image: node:18-bullseye
88+
- image: node:22-bullseye
8989
- image: mongo:6.0.9
9090
name: mongodb
9191
resource_class: xlarge
@@ -103,7 +103,7 @@ jobs:
103103
NominatorIntegrationTests:
104104
description: "Nominator Integration Tests"
105105
docker:
106-
- image: node:18-bullseye
106+
- image: node:22-bullseye
107107
- image: mongo:6.0.9
108108
name: mongodb
109109
resource_class: xlarge
@@ -121,7 +121,7 @@ jobs:
121121
ScorekeeperIntegrationTests:
122122
description: "Scorekeeper Integration Tests"
123123
docker:
124-
- image: node:18-bullseye
124+
- image: node:22-bullseye
125125
- image: mongo:6.0.9
126126
name: mongodb
127127

@@ -140,7 +140,7 @@ jobs:
140140
TelemetryIntegrationTests:
141141
description: "Telemetry Integration Tests"
142142
docker:
143-
- image: node:18-bullseye
143+
- image: node:22-bullseye
144144
- image: mongo:6.0.9
145145
name: mongodb
146146

.yarnrc.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,3 @@ plugins:
1111
pnpMode: loose
1212

1313
yarnPath: .yarn/releases/yarn-3.2.2.cjs
14-
15-
packageExtensions:
16-
esbuild@*:
17-
dependencies:
18-
"@esbuild/linux-arm64": "*"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:21-slim AS builder
1+
FROM node:22-slim AS builder
22
ARG MATRIX_TOKEN
33
ARG PACKAGE
44
ENV PACKAGE ${PACKAGE}

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,6 @@ You can then query an endpoint like `/candidates` by going to `http://localhost:
206206

207207
To view the Mongo Express GUI to interact with the MongoDB Database, go to `http://localhost:8888/` in your browser. Or run `yarn open:mongo-express` from the root directory.
208208

209-
#### BullMQ Board (Job Queue GUI)
210-
211-
To view the BullMQ Board GUI to interact with the Job Queue, go to `http://localhost:3301/bull` in your browser if running as microservices. Or run `yarn open:bull` from the root directory.
212209

213210
## :pencil: Contribute
214211

package.json

Lines changed: 13 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"scorekeeper-status-ui:build": "cd packages/scorekeeper-status-ui && npm build",
1616
"scorekeeper-status-ui:dev": "yarn workspace @1kv/scorekeeper-status-ui dev",
1717
"open:polkadot-apps": "open-cli https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/staking",
18-
"open:bull": "open-cli http://localhost:3301/bull",
1918
"open:mongo-express": "open-cli http://localhost:8888",
2019
"create-config-kusama-current": "yarn workspace @1kv/core run create-config-kusama-current",
2120
"create-config-polkadot-current": "yarn workspace @1kv/core run create-config-polkadot-current",
@@ -48,25 +47,31 @@
4847
"turbo": "turbo build"
4948
},
5049
"devDependencies": {
51-
"@ava/typescript": "^4.1.0",
52-
"@babel/preset-react": "^7.23.3",
50+
"@types/cron": "^2.4.0",
51+
"@types/koa": "^2.15.0",
52+
"@types/koa-bodyparser": "^4.3.12",
53+
"@types/mongoose": "^5.11.97",
54+
"@types/node": "^20.11.5",
55+
"@types/semver": "^7.5.8",
56+
"@types/ws": "^8.5.10",
5357
"@typescript-eslint/eslint-plugin": "^5.59.9",
5458
"@typescript-eslint/parser": "^5.59.9",
59+
"@vitest/coverage-istanbul": "^1.3.1",
60+
"@vitest/coverage-v8": "^1.3.1",
5561
"@vitest/ui": "^1.3.1",
56-
"ava": "^6.1.2",
5762
"concurrently": "^8.2.2",
58-
"esbuild": "^0.20.1",
59-
"esbuild-plugin-node-polyfill": "^0.0.1",
6063
"eslint": "8.42.0",
6164
"eslint-config-prettier": "^8.8.0",
6265
"eslint-plugin-prettier": "5.0.0",
6366
"eslint-plugin-security": "^1.7.1",
6467
"nodemon": "^3.1.0",
6568
"open-cli": "^8.0.0",
6669
"prettier": "^3.2.4",
67-
"typedoc": "^0.25.12",
68-
"typedoc-plugin-markdown": "^3.17.1",
70+
"ts-node": "^10.9.2",
71+
"turbo": "v2.0.3",
72+
"typescript": "^5.3.3",
6973
"vite": "^5.1.6",
74+
"vite-plugin-dts": "^3.7.3",
7075
"vite-plugin-node": "^3.1.0",
7176
"vite-tsconfig-paths": "^4.3.1",
7277
"vitest": "^1.3.1"
@@ -75,39 +80,20 @@
7580
"@1kv/common": "workspace:*",
7681
"@1kv/gateway": "workspace:*",
7782
"@1kv/telemetry": "workspace:*",
78-
"@bull-board/api": "^5.15.1",
79-
"@bull-board/koa": "^5.15.0",
8083
"@koa/router": "^12.0.1",
8184
"@octokit/rest": "^20.0.2",
8285
"@polkadot/api": "^11.1.1",
8386
"@polkadot/keyring": "^12.6.2",
84-
"@types/cron": "^2.4.0",
85-
"@types/jest": "^29.5.12",
86-
"@types/koa": "^2.15.0",
87-
"@types/koa-bodyparser": "^4.3.12",
88-
"@types/mongoose": "^5.11.97",
89-
"@types/node": "^20.11.5",
90-
"@types/semver": "^7.5.8",
91-
"@types/ws": "^8.5.10",
92-
"@vitest/coverage-istanbul": "^1.3.1",
93-
"@vitest/coverage-v8": "^1.3.1",
9487
"axios": "^1.6.7",
95-
"bree": "^9.2.2",
96-
"bs58": "^5.0.0",
97-
"bullmq": "^5.4.2",
9888
"chalk": "5.3.0",
9989
"coingecko-api-v3": "^0.0.29",
10090
"commander": "^12.0.0",
10191
"cron": "^3.1.6",
102-
"esbuild-node-builtins": "^0.1.0",
10392
"eventemitter3": "^5.0.1",
104-
"hash.js": "^1.1.7",
105-
"jest": "^29.7.0",
10693
"koa": "^2.15.0",
10794
"koa-bodyparser": "^4.4.1",
10895
"koa-cash": "^4.1.1",
10996
"koa-mount": "^4.0.0",
110-
"koa-send": "^5.0.1",
11197
"koa-static": "^5.0.0",
11298
"koa-swagger-decorator": "^1.8.7",
11399
"koa2-cors": "^2.0.6",
@@ -116,24 +102,11 @@
116102
"mongodb": "6.5.0",
117103
"mongodb-memory-server": "^9.1.7",
118104
"mongoose": "^8.2.1",
119-
"node-fetch": "3.3.2",
120105
"prettier": "^3.2.4",
121-
"reconnecting-websocket": "^4.4.0",
122-
"request": "^2.88.2",
123106
"semver": "^7.6.0",
124107
"swagger-jsdoc": "^6.2.8",
125108
"swagger2": "^4.0.3",
126109
"swagger2-koa": "^4.0.0",
127-
"ts-jest": "^29.1.2",
128-
"ts-node": "^10.9.2",
129-
"turbo": "^1.12.5",
130-
"turborepo": "^0.0.1",
131-
"typescript": "^5.3.3",
132-
"vite": "^5.1.6",
133-
"vite-plugin-dts": "^3.7.3",
134-
"vite-plugin-node": "^3.1.0",
135-
"vite-tsconfig-paths": "^4.3.1",
136-
"vitest": "^1.3.1",
137110
"winston": "^3.12.0",
138111
"ws": "^8.16.0",
139112
"yamljs": "^0.3.0"

packages/gateway/src/routes/setupRoutes.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import path from "path";
55
import mount from "koa-mount";
66
import yamljs from "yamljs";
77
import { koaSwagger } from "koa2-swagger-ui";
8-
import { Queue } from "bullmq";
98

109
import Koa from "koa";
1110

@@ -161,7 +160,6 @@ export const setupRoutes = async (
161160
config: Config.ConfigSchema,
162161
port: number,
163162
enable: boolean,
164-
queues?: Queue[],
165163
cache?: number,
166164
handler?: ApiHandler,
167165
scorekeeper?: ScoreKeeper,

packages/gateway/src/server.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
logger,
77
ScoreKeeper,
88
} from "@1kv/common";
9-
import { Queue } from "bullmq";
109

1110
import { setupRoutes } from "./routes/setupRoutes";
1211
import { requestEmitter } from "./events/requestEmitter";
@@ -17,7 +16,6 @@ export default class Server {
1716
private enable = true;
1817
private cache = 180000;
1918
private config: Config.ConfigSchema;
20-
private queues: Queue[] = [];
2119
private handler: ApiHandler | null;
2220
private scorekeeper: ScoreKeeper | null;
2321

@@ -36,7 +34,6 @@ export default class Server {
3634
this.cache = config?.server?.cache || Constants.GATEWAY_CACHE_TTL;
3735
this.handler = handler || null;
3836
this.scorekeeper = scorekeeper || null;
39-
this.queues = [];
4037

4138
requestEmitter.on("requestReceived", this.updateRequestCounts.bind(this));
4239

@@ -71,7 +68,6 @@ export default class Server {
7168
this.config,
7269
this.port,
7370
this.enable,
74-
this.queues,
7571
this.cache,
7672
this.handler,
7773
this.scorekeeper,

turbo.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"$schema": "https://turbo.build/schema.json",
3-
"pipeline": {
3+
"tasks": {
44
"build": {
5+
"dependsOn": ["^build"],
56
"outputs": ["build/**", "dist/**"]
67
},
78
"test": {
89
"inputs": ["src/**/*.tsx", "src/**/*.ts", "test/**/*.ts", "test/**/*.tsx"]
910
},
10-
1111
"lint": {},
1212
"dev": {
1313
"cache": false,

0 commit comments

Comments
 (0)