Skip to content

Commit c5fb316

Browse files
holgerd77ScottyPoi
andauthored
Monorepo: Remove esModuleInterop and allowSyntheticDefaultImports Options (cherry-picked) (ethereumjs#1975)
* Monorepo: set esModuleInterop TS compiler option to false * client: change `import X` to `import * as X` * client: replace qheap with js-priority-queue * blockchain: change to import * * blockchain/tests: change to import * * block/test: change to import * * common: change to import * * common/tests: change to import * * devp2p: change imports to import * or require() * ethash/tests: change import tape to import * as * rlp/tests: change imports to import * * statemanager/test: change imports to import * as * trie/tests: change imports to import * * ts/tests: change imports to import * * util/tests: change imports to import * * vm: change json import to import * * vm/tests: change imports to import * * client/test: change imports to import * * vm/tests: fix API test imports * trie/benchmarks: fix benchmark test import * client: fix qheap import problem * Devp2p, EVM: fixed tests Co-authored-by: ScottyPoi <[email protected]>
1 parent 252e283 commit c5fb316

File tree

230 files changed

+370
-354
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

230 files changed

+370
-354
lines changed

config/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"moduleResolution": "node",
77
"emitDecoratorMetadata": true,
88
"experimentalDecorators": true,
9-
"esModuleInterop": true,
9+
"esModuleInterop": false,
1010
"allowSyntheticDefaultImports": true,
1111
"resolveJsonModule": true,
1212
"downlevelIteration": true,

packages/block/test/block.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import tape from 'tape'
1+
import * as tape from 'tape'
22
import { keccak256 } from 'ethereum-cryptography/keccak'
33
import { bytesToHex } from 'ethereum-cryptography/utils'
44
import { bufArrToArr, NestedUint8Array, toBuffer, zeros } from '@ethereumjs/util'
@@ -8,7 +8,7 @@ import { Block, BlockBuffer, BlockHeader } from '../src'
88
import blockFromRpc from '../src/from-rpc'
99
import { Mockchain } from './mockchain'
1010
import { createBlock } from './util'
11-
import testnetMerge from './testdata/testnetMerge.json'
11+
import * as testnetMerge from './testdata/testnetMerge.json'
1212
import * as testDataPreLondon from './testdata/testdata_pre-london.json'
1313
import * as testDataPreLondon2 from './testdata/testdata_pre-london-2.json'
1414
import * as testDataGenesis from './testdata/genesishashestest.json'

packages/block/test/clique.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import tape from 'tape'
1+
import * as tape from 'tape'
22
import Common, { Chain, Hardfork } from '@ethereumjs/common'
33
import { BlockHeader } from '../src/header'
44
import { Address } from '@ethereumjs/util'

packages/block/test/difficulty.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import tape from 'tape'
1+
import * as tape from 'tape'
22
import Common, { Chain } from '@ethereumjs/common'
33
import { bufferToInt } from '@ethereumjs/util'
44
import { Block } from '../src'

packages/block/test/eip1559block.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import tape from 'tape'
1+
import * as tape from 'tape'
22
import Common, { Chain, Hardfork } from '@ethereumjs/common'
33
import { BlockHeader } from '../src/header'
44
import { Mockchain } from './mockchain'

packages/block/test/from-rpc.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import tape from 'tape'
1+
import * as tape from 'tape'
22
import Common, { Chain, Hardfork } from '@ethereumjs/common'
33
import { Transaction } from '@ethereumjs/tx'
44
import blockFromRpc from '../src/from-rpc'

packages/block/test/header.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import tape from 'tape'
1+
import * as tape from 'tape'
22
import { Address, toBuffer, zeros, KECCAK256_RLP, KECCAK256_RLP_ARRAY } from '@ethereumjs/util'
33
import RLP from 'rlp'
44
import Common, { Chain, CliqueConfig, Hardfork } from '@ethereumjs/common'

packages/block/test/mergeBlock.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import tape from 'tape'
1+
import * as tape from 'tape'
22
import Common, { Chain, Hardfork } from '@ethereumjs/common'
33
import { BlockHeader } from '../src/header'
44
import { Address, KECCAK256_RLP, KECCAK256_RLP_ARRAY, zeros } from '@ethereumjs/util'

packages/blockchain/src/db/cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import LRUCache from 'lru-cache'
1+
import * as LRUCache from 'lru-cache'
22

33
/**
44
* Simple LRU Cache that allows for keys of type Buffer

packages/blockchain/test/clique.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Common, {
77
Hardfork,
88
} from '@ethereumjs/common'
99
import { Address } from '@ethereumjs/util'
10-
import tape from 'tape'
10+
import * as tape from 'tape'
1111
import Blockchain from '../src'
1212
import { CliqueConsensus, CLIQUE_NONCE_AUTH, CLIQUE_NONCE_DROP } from '../src/consensus/clique'
1313

0 commit comments

Comments
 (0)