Skip to content

Commit

Permalink
deps: update typescript and lint dependencies (#5995)
Browse files Browse the repository at this point in the history
* Update typescript and lint dependencies

* Fix relevant breaking changes

* Fix lerna config for the major release

* Fix the unit tests
  • Loading branch information
nazarhussain authored Sep 26, 2023
1 parent f5e2c3a commit a11427e
Show file tree
Hide file tree
Showing 10 changed files with 1,116 additions and 1,327 deletions.
11 changes: 4 additions & 7 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
{
"packages": [
"packages/*"
],
"packages": ["packages/*"],
"npmClient": "yarn",
"useWorkspaces": true,
"useNx": true,
"version": "1.11.1",
"stream": "true",
"stream": true,
"command": {
"version": {
"message": "chore(release): %s"
}
}
},
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,23 @@
"@types/chai": "^4.3.4",
"@types/chai-as-promised": "^7.1.5",
"@types/mocha": "^10.0.1",
"@types/node": "^20.4.2",
"@types/node": "^20.6.5",
"@types/sinon": "^10.0.13",
"@types/sinon-chai": "^3.2.9",
"@typescript-eslint/eslint-plugin": "6.0.0",
"@typescript-eslint/parser": "6.0.0",
"@typescript-eslint/eslint-plugin": "6.7.2",
"@typescript-eslint/parser": "6.7.2",
"c8": "^7.13.0",
"chai": "^4.3.7",
"chai-as-promised": "^7.1.1",
"codecov": "^3.8.3",
"crypto-browserify": "^3.12.0",
"electron": "^22.3.24",
"eslint": "^8.44.0",
"eslint-plugin-import": "^2.27.5",
"eslint": "^8.50.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-chai-expect": "^3.0.0",
"eslint-plugin-mocha": "^10.1.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-mocha": "^10.2.0",
"eslint-import-resolver-typescript": "^3.6.1",
"https-browserify": "^1.0.0",
"karma": "^6.4.1",
"karma-chai": "^0.1.0",
Expand All @@ -74,14 +74,14 @@
"karma-mocha": "^2.0.1",
"karma-spec-reporter": "^0.0.36",
"karma-webpack": "^5.0.0",
"lerna": "^6.6.1",
"lerna": "^7.3.0",
"libp2p": "0.46.3",
"mocha": "^10.2.0",
"node-gyp": "^9.3.1",
"node-gyp": "^9.4.0",
"npm-run-all": "^4.1.5",
"nyc": "^15.1.0",
"path-browserify": "^1.0.1",
"prettier": "^3.0.0",
"prettier": "^3.0.3",
"process": "^0.11.10",
"resolve-typescript-plugin": "^2.0.1",
"sinon": "^15.0.3",
Expand All @@ -91,7 +91,7 @@
"supertest": "^6.3.3",
"ts-loader": "^9.4.4",
"ts-node": "^10.9.1",
"typescript": "^5.1.6",
"typescript": "^5.2.2",
"typescript-docs-verifier": "^2.5.0",
"webpack": "^5.88.1",
"wait-port": "^1.0.4"
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/beacon/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {Api} from "./routes/index.js";

export * as routes from "./routes/index.js";
export {getClient} from "./client/index.js";
export {Api};
export type {Api};

// Declare namespaces for CLI options
export type ApiNamespace = keyof Api;
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/builder/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import {Api, ReqTypes, routesData, getReturnTypes, getReqSerializers} from "../routes.js";

// Re-export for convenience
export {RouteConfig};
export type {RouteConfig};

export function getRoutes(config: ChainForkConfig, api: ServerApi<Api>): ServerRoutes<Api, ReqTypes> {
// All routes return JSON, use a server auto-generator
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/keymanager/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import {Api, ReqTypes, routesData, getReturnTypes, getReqSerializers} from "../routes.js";

// Re-export for convenience
export {RouteConfig};
export type {RouteConfig};

export function getRoutes(config: ChainForkConfig, api: ServerApi<Api>): ServerRoutes<Api, ReqTypes> {
// All routes return JSON, use a server auto-generator
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/utils/client/httpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export type HttpClientModules = {
metrics?: Metrics;
};

export {Metrics};
export type {Metrics};

export class HttpClient implements IHttpClient {
private readonly globalTimeoutMs: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-node/test/unit/monitoring/service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ describe("monitoring / service", () => {
const endpoint = `${baseUrl}${remoteServiceRoutes.pending}`;
service = new MonitoringService("beacon", {endpoint, collectSystemStats: false}, {register, logger});

service.send().finally(() => {
void service.send().finally(() => {
try {
assertError({message: new ErrorAborted("request").message});
done();
Expand Down
2 changes: 1 addition & 1 deletion packages/db/src/controller/level.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const DB_SIZE_METRIC_INTERVAL_MS = 5 * 60 * 1000;
export class LevelDbController implements DatabaseController<Uint8Array, Uint8Array> {
private status = Status.started;

private dbSizeMetricInterval?: NodeJS.Timer;
private dbSizeMetricInterval?: NodeJS.Timeout;

constructor(
private readonly logger: Logger,
Expand Down
10 changes: 7 additions & 3 deletions packages/validator/src/services/indices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,13 @@ export class IndicesService {

this.pollValidatorIndicesPromise = this.pollValidatorIndicesInternal(pubkeysHex);
// Once the pollValidatorIndicesInternal() resolves or rejects null the cached promise so it can be called again.
this.pollValidatorIndicesPromise.finally(() => {
this.pollValidatorIndicesPromise = null;
});
this.pollValidatorIndicesPromise
.catch((err) => {
this.logger.error("Error polling validator indices", {}, err);
})
.finally(() => {
this.pollValidatorIndicesPromise = null;
});
return this.pollValidatorIndicesPromise;
}

Expand Down
Loading

0 comments on commit a11427e

Please sign in to comment.