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 43d26f6
Show file tree
Hide file tree
Showing 26 changed files with 42 additions and 84 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
13 changes: 9 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3315,9 +3315,9 @@
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==
version "20.16.11"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.16.11.tgz#9b544c3e716b1577ac12e70f9145193f32750b33"
integrity sha512-y+cTCACu92FyA5fgQSAI8A1H429g7aSK2HsO7K4XYUWc4dY5IUz55JSDIYT6/VsOLfGy8vmvQYC2hfb0iF16Uw==
dependencies:
undici-types "~6.19.2"

Expand Down Expand Up @@ -12401,7 +12401,7 @@ typescript-docs-verifier@^2.5.0:
tsconfig "^7.0.0"
yargs "^17.5.1"

[email protected], typescript@^5.4.2:
[email protected]:
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 @@ [email protected], 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 43d26f6

Please sign in to comment.