Skip to content

Commit

Permalink
♻️ chore: Update ethers and tsconfig to NodeNext (#573)
Browse files Browse the repository at this point in the history
## Description

Update ethers and tsconfig to NodeNext

## Testing

Explain the quality checks that have been done on the code changes

## Additional Information

- [ ] I read the [contributing docs](../docs/contributing.md) (if this
is your first contribution)

Your ENS/address:

---------

Co-authored-by: Will Cory <[email protected]>
  • Loading branch information
roninjin10 and Will Cory authored Oct 16, 2023
1 parent eee7e7f commit a8248fb
Show file tree
Hide file tree
Showing 22 changed files with 67 additions and 63 deletions.
5 changes: 5 additions & 0 deletions .changeset/afraid-socks-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@evmts/tsconfig": patch
---

Updated shared tsconfig to default to NodeNext
5 changes: 5 additions & 0 deletions .changeset/rich-ants-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@evmts/ethers": patch
---

Converted @evmts/ethers to NodeNext. This will help compatibility
6 changes: 2 additions & 4 deletions blockexplorer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
"rootDir": "src",
"composite": true,
"outDir": "types",
"skipLibCheck": true,
"module": "NodeNext",
"moduleResolution": "NodeNext"
"skipLibCheck": true
},
"include": [
"src",
"src/**/*.json"
]
}
}
8 changes: 4 additions & 4 deletions bundlers/bun/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"composite": true,
"outDir": "types",
"skipLibCheck": true,
"types": ["bun-types"],
"moduleResolution": "NodeNext",
"module": "NodeNext"
"types": [
"bun-types"
]
},
"include": [
"src",
"src/**/*.json"
]
}
}
12 changes: 7 additions & 5 deletions bundlers/bundler/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
"outDir": "types",
"skipLibCheck": true,
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"moduleResolution": "NodeNext",
"module": "NodeNext"
"resolveJsonModule": true
},
"include": ["src", "src/**/*.json", "package.json"]
}
"include": [
"src",
"src/**/*.json",
"package.json"
]
}
6 changes: 2 additions & 4 deletions bundlers/esbuild/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
"rootDir": "src",
"composite": true,
"outDir": "types",
"skipLibCheck": true,
"moduleResolution": "NodeNext",
"module": "NodeNext"
"skipLibCheck": true
},
"include": [
"src",
"src/**/*.json"
]
}
}
6 changes: 2 additions & 4 deletions bundlers/rollup/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
"rootDir": "src",
"composite": true,
"outDir": "types",
"skipLibCheck": true,
"moduleResolution": "NodeNext",
"module": "NodeNext"
"skipLibCheck": true
},
"include": [
"src",
"src/**/*.json"
]
}
}
4 changes: 1 addition & 3 deletions bundlers/rspack/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
"rootDir": "src",
"composite": true,
"outDir": "types",
"moduleResolution": "NodeNext",
"module": "NodeNext",
"skipLibCheck": true
},
"include": [
"src",
"src/**/*.json"
]
}
}
4 changes: 1 addition & 3 deletions bundlers/vite/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
"rootDir": "src",
"composite": true,
"outDir": "types",
"moduleResolution": "NodeNext",
"module": "NodeNext",
"skipLibCheck": true
},
"include": [
"src",
"src/**/*.json"
]
}
}
4 changes: 1 addition & 3 deletions bundlers/webpack/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
"rootDir": "src",
"composite": true,
"outDir": "types",
"moduleResolution": "NodeNext",
"module": "NodeNext",
"skipLibCheck": true
},
"include": [
"src",
"src/**/*.json"
]
}
}
6 changes: 2 additions & 4 deletions config/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
"compilerOptions": {
"composite": true,
"outDir": "types",
"skipLibCheck": true,
"moduleResolution": "NodeNext",
"module": "NodeNext"
"skipLibCheck": true
},
"include": [
"src",
"src/**/*.json"
]
}
}
3 changes: 2 additions & 1 deletion core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"outDir": "types",
"skipLibCheck": true,
// this should be "Bundler" but don't want to fight a broken type
"moduleResolution": "Node"
"moduleResolution": "Node",
"module": "ESNext"
},
"include": [
"src",
Expand Down
2 changes: 1 addition & 1 deletion ethers/src/BaseContractMethod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ContractMethodArgs } from './ContractMethodArgs'
import type { ContractMethodArgs } from './ContractMethodArgs.js'
import type {
BaseContract,
ContractTransaction,
Expand Down
2 changes: 1 addition & 1 deletion ethers/src/Contract.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Contract } from './Contract'
import { Contract } from './Contract.js'
import { JsonRpcProvider, ethers } from 'ethers'
import { assertType, describe, expect, expectTypeOf, test } from 'vitest'

Expand Down
2 changes: 1 addition & 1 deletion ethers/src/Contract.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { TypesafeEthersContract } from '.'
import type { TypesafeEthersContract } from './TypesafeEthersContract.js'
import type { Abi } from 'abitype'
import {
type Addressable,
Expand Down
2 changes: 1 addition & 1 deletion ethers/src/TypesafeEthersContract.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BaseContractMethod } from './BaseContractMethod'
import type { BaseContractMethod } from './BaseContractMethod.js'
import type {
Abi,
AbiParametersToPrimitiveTypes,
Expand Down
8 changes: 4 additions & 4 deletions ethers/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './TypesafeEthersContract'
export * from './ContractMethodArgs'
export * from './BaseContractMethod'
export * from './Contract'
export * from './TypesafeEthersContract.js'
export * from './ContractMethodArgs.js'
export * from './BaseContractMethod.js'
export * from './Contract.js'
18 changes: 14 additions & 4 deletions experimental/solc/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,20 @@
"extends": "@evmts/tsconfig/base.json",
"compilerOptions": {
"composite": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"lib": [
"DOM",
"DOM.Iterable",
"ESNext"
],
"outDir": "types",
"skipLibCheck": true,
"resolveJsonModule": true
"resolveJsonModule": true,
"moduleResolution": "Bundler",
"module": "ES2020"
},
"include": ["src", "src/**/*.json", "package.json"]
}
"include": [
"src",
"src/**/*.json",
"package.json"
]
}
3 changes: 1 addition & 2 deletions revm/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"rootDir": "src",
"composite": true,
"outDir": "types",
"skipLibCheck": true,
"moduleResolution": "Bundler"
"skipLibCheck": true
},
"include": [
"src",
Expand Down
6 changes: 2 additions & 4 deletions schemas/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
"rootDir": "src",
"composite": true,
"outDir": "types",
"skipLibCheck": true,
"module": "NodeNext",
"moduleResolution": "NodeNext"
"skipLibCheck": true
},
"include": [
"src",
"src/**/*.json"
]
}
}
6 changes: 2 additions & 4 deletions state/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
"rootDir": "src",
"composite": true,
"outDir": "types",
"skipLibCheck": true,
"moduleResolution": "NodeNext",
"module": "NodeNext"
"skipLibCheck": true
},
"include": [
"src",
"src/**/*.json"
]
}
}
12 changes: 6 additions & 6 deletions tsconfig/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "ESNext",
"lib": ["esnext"],
"module": "esnext",
"moduleResolution": "bundler",
"lib": [
"esnext"
],
"module": "NodeNext",
"moduleResolution": "NodeNext",
"allowJs": true,
"checkJs": true,
"isolatedModules": true,
"incremental": true,
"allowJs": true,
"checkJs": true,
"allowUnreachableCode": false,
"skipLibCheck": false,
"allowUnusedLabels": false,
Expand All @@ -29,4 +29,4 @@
"noUnusedParameters": true,
"strict": true
}
}
}

1 comment on commit a8248fb

@vercel
Copy link

@vercel vercel bot commented on a8248fb Oct 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployment failed with the following error:

Resource is limited - try again in 18 minutes (more than 100, code: "api-deployments-free-per-day").

Please sign in to comment.