Skip to content

Commit

Permalink
Update typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
nazarhussain committed Oct 14, 2024
1 parent d37bdb0 commit cfa0efa
Show file tree
Hide file tree
Showing 26 changed files with 47 additions and 89 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@dapplion/benchmark": "^0.2.4",
"@biomejs/biome": "^1.9.3",
"@types/mocha": "^10.0.6",
"@types/node": "^20.12.8",
"@types/node": "^22.7.5",
"@vitest/browser": "^2.0.4",
"@vitest/coverage-v8": "^2.0.4",
"crypto-browserify": "^3.12.0",
Expand All @@ -72,7 +72,7 @@
"stream-http": "^3.2.0",
"supertest": "^6.3.3",
"ts-node": "^10.9.2",
"typescript": "^5.4.2",
"typescript": "^5.6.3",
"typescript-docs-verifier": "^2.5.0",
"vite": "^5.3.4",
"vite-plugin-dts": "^3.9.1",
Expand Down
4 changes: 0 additions & 4 deletions packages/api/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"extends": "../../tsconfig.build.json",
"include": ["src"],
"compilerOptions": {
"outDir": "lib"
}
}
1 change: 0 additions & 1 deletion packages/api/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {}
}
2 changes: 1 addition & 1 deletion packages/beacon-node/src/eth1/eth1DepositDataTracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export class Eth1DepositDataTracker {

// If remoteFollowBlock is not at or beyond deployBlock, there is no need to
// fetch and track any deposit data yet
if (remoteFollowBlock < this.eth1Provider.deployBlock ?? 0) return true;
if (remoteFollowBlock < (this.eth1Provider.deployBlock ?? 0)) return true;

const hasCaughtUpDeposits = await this.updateDepositCache(remoteFollowBlock);
const hasCaughtUpBlocks = await this.updateBlockCache(remoteFollowBlock);
Expand Down
7 changes: 1 addition & 6 deletions packages/beacon-node/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"extends": "../../tsconfig.build.json",
"include": ["src"],
"compilerOptions": {
"outDir": "lib",
"typeRoots": ["../../node_modules/@types", "./node_modules/@types", "../../types"]
}
"extends": "../../tsconfig.build.json"
}
5 changes: 1 addition & 4 deletions packages/beacon-node/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"extends": "../../tsconfig.json",
"exclude": ["../../node_modules/it-pipe"],
"compilerOptions": {
"typeRoots": ["../../node_modules/@types", "../../types"]
}
"exclude": ["../../node_modules/it-pipe"]
}
7 changes: 1 addition & 6 deletions packages/cli/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"extends": "../../tsconfig.build.json",
"include": ["src"],
"compilerOptions": {
"outDir": "lib",
"typeRoots": ["../../node_modules/@types", "./node_modules/@types", "../../types"]
}
"extends": "../../tsconfig.build.json"
}
5 changes: 1 addition & 4 deletions packages/cli/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"typeRoots": ["../../node_modules/@types", "./node_modules/@types", "../../types"]
}
"extends": "../../tsconfig.json"
}
6 changes: 1 addition & 5 deletions packages/config/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"extends": "../../tsconfig.build.json",
"include": ["src"],
"compilerOptions": {
"outDir": "lib"
}
"extends": "../../tsconfig.build.json"
}
1 change: 0 additions & 1 deletion packages/config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {}
}
6 changes: 1 addition & 5 deletions packages/db/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"extends": "../../tsconfig.build.json",
"include": ["src"],
"compilerOptions": {
"outDir": "lib"
}
"extends": "../../tsconfig.build.json"
}
3 changes: 1 addition & 2 deletions packages/db/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {}
"extends": "../../tsconfig.json"
}
6 changes: 1 addition & 5 deletions packages/flare/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"extends": "../../tsconfig.build.json",
"include": ["src"],
"compilerOptions": {
"outDir": "lib"
}
"extends": "../../tsconfig.build.json"
}
3 changes: 1 addition & 2 deletions packages/flare/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {}
"extends": "../../tsconfig.json"
}
6 changes: 1 addition & 5 deletions packages/fork-choice/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"extends": "../../tsconfig.build.json",
"include": ["src"],
"compilerOptions": {
"outDir": "lib"
}
"extends": "../../tsconfig.build.json"
}
3 changes: 1 addition & 2 deletions packages/fork-choice/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {}
"extends": "../../tsconfig.json"
}
6 changes: 1 addition & 5 deletions packages/light-client/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"extends": "../../tsconfig.build.json",
"include": ["src"],
"compilerOptions": {
"outDir": "lib"
}
"extends": "../../tsconfig.build.json"
}
3 changes: 1 addition & 2 deletions packages/light-client/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"extends": "../../tsconfig.json",
"exclude": ["src/index.browser.ts", "test/unit/webEsmBundle.browser.test.ts"],
"compilerOptions": {}
"exclude": ["src/index.browser.ts", "test/unit/webEsmBundle.browser.test.ts"]
}
6 changes: 1 addition & 5 deletions packages/logger/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"extends": "../../tsconfig.build.json",
"include": ["src"],
"compilerOptions": {
"outDir": "./lib"
}
"extends": "../../tsconfig.build.json"
}
3 changes: 1 addition & 2 deletions packages/logger/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {}
"extends": "../../tsconfig.json"
}
6 changes: 1 addition & 5 deletions packages/params/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"extends": "../../tsconfig.build.json",
"include": ["src"],
"compilerOptions": {
"outDir": "./lib"
}
"extends": "../../tsconfig.build.json"
}
3 changes: 1 addition & 2 deletions packages/params/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {}
"extends": "../../tsconfig.json"
}
2 changes: 0 additions & 2 deletions packages/prover/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"extends": "../../tsconfig.build.json",
"include": ["src"],
"compilerOptions": {
"outDir": "lib",
// Had to add it because compiling error `Duplicate identifier 'Buffer'`
"skipLibCheck": true
}
Expand Down
6 changes: 6 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"include": ["${configDir}/src"],
"compilerOptions": {
"target": "es2021",
"lib": ["es2021", "dom"],
Expand All @@ -24,9 +25,14 @@
"declarationMap": true,
"incremental": true,
"preserveWatchOutput": true,
"noUncheckedSideEffectImports": true,
"noCheck": true,

// TODO: Investigate following errors:
// - Cannot find module 'rollup/parseAst' or its corresponding type declarations
"skipLibCheck": true,

// Output relative to each package
"outDir": "${configDir}/lib"
}
}
11 changes: 8 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@
"emitDeclarationOnly": false,
"incremental": false,
// Required to run benchmark command from root directory
"typeRoots": ["node_modules/@types", "./types"],
"typeRoots": [
"node_modules/@types",
"./types",
"${configDir}/node_modules/@types",
"${configDir}/types"
],
"noCheck": false,
"noEmit": true,
// To be used in the test fixtures
"resolveJsonModule": true,

// We want to speed up the CI run for all tests, which require us to use the
// `transpileOnly` mode for the `ts-node`. This change requires to treat types for each module
// independently, which is done by setting the `isolatedModules` flag to `true`.
Expand All @@ -17,4 +22,4 @@
"ts-node": {
"transpileOnly": true
}
}
}
21 changes: 13 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3314,20 +3314,20 @@
dependencies:
undici-types "~5.26.4"

"@types/node@^20.12.8":
version "20.16.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.16.7.tgz#0a245bf5805add998a22b8b5adac612ee70190bc"
integrity sha512-QkDQjAY3gkvJNcZOWwzy3BN34RweT0OQ9zJyvLCU0kSK22dO2QYh/NHGfbEAYylPYzRB1/iXcojS79wOg5gFSw==
dependencies:
undici-types "~6.19.2"

"@types/node@^20.14.11":
version "20.14.11"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.11.tgz#09b300423343460455043ddd4d0ded6ac579b74b"
integrity sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==
dependencies:
undici-types "~5.26.4"

"@types/node@^22.7.5":
version "22.7.5"
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.5.tgz#cfde981727a7ab3611a481510b473ae54442b92b"
integrity sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==
dependencies:
undici-types "~6.19.2"

"@types/normalize-package-data@^2.4.0":
version "2.4.1"
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301"
Expand Down Expand Up @@ -12401,7 +12401,7 @@ typescript-docs-verifier@^2.5.0:
tsconfig "^7.0.0"
yargs "^17.5.1"

typescript@5.4.2, typescript@^5.4.2:
typescript@5.4.2:
version "5.4.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.2.tgz#0ae9cebcfae970718474fe0da2c090cad6577372"
integrity sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==
Expand All @@ -12411,6 +12411,11 @@ typescript@5.4.2, typescript@^5.4.2:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78"
integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==

typescript@^5.6.3:
version "5.6.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b"
integrity sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==

uglify-js@^3.1.4:
version "3.17.2"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.2.tgz#f55f668b9a64b213977ae688703b6bbb7ca861c6"
Expand Down

0 comments on commit cfa0efa

Please sign in to comment.