ethereumjs / ethereumjs-util

Project is in active development and has been moved to the EthereumJS monorepo.
https://github.com/ethereumjs/ethereumjs-monorepo
Mozilla Public License 2.0
604 stars 274 forks source link

Fix prod tsconfig and include ethjs-util types in dist #260

Closed cgewecke closed 4 years ago

cgewecke commented 4 years ago

Fixes two bugs introduced in #248.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 99.711% when pulling 173e6bc190ee13cb4e84ccc3fb55f9efaf3fcda6 on fix/dist into 584cc821b5f89980d1c1f87a6a4fe2610aa5c5a1 on master.

holgerd77 commented 4 years ago

@cgewecke thanks for addressing this so quickly, this looks already a lot better with the correct general folder structure and the types from ethjs-util being exported.

When I pack and test-install this I don't get access to an ES6-style import structure though (or is this technically just not possible?) nor do I get any type information, see the following screenshot:

Bildschirmfoto 2020-07-06 um 11 41 34

Could you have a look and state what should and should not be working here? 😄

We should also add usage information on the docs here along (on this PR or the subsequent release PR).

holgerd77 commented 4 years ago

@nebojsa94 @alcuadrado we need to address this here until we can release v7.0.3.

cgewecke commented 4 years ago

@holgerd77 Very sorry, thanks for double-checking this.

I think 173e6bc fixes. Tested locally and TS was able to resolve the types from the dist. Have also removed the added compiler options that were papering over this problem in the tests.

We should also add usage information

The existing example shows an import statement like this:

import { isValidChecksumAddress, unpad, BN } from 'ethereumjs-util'

Are you thinking of something more detailed?