-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Conversation
This might be a dumb question, but why do we need |
I think the types are broken...at one point they were. I'll try removing them and see if it breaks. |
Ah, also web3 doesn't contain those provider types we use that are included in @types/web3. |
If that's the only missing piece, I'd be an advocate of providing our own version of those via |
Yeah I'd be into getting rid of that dep: even if it means simplifying the types. |
Yeah while I don't know the current status, for quite a while at least it was the case that the types included in Edit: Here's an old issue I filed with them about this, it's now closed as fixed (and there have been many updates since then), but I don't know whether the fix was comprehensive or just fixed the stuff I pointed out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me as a quick fix, but as @benjamincburns says we should really review whether we still need @types/web3
at all. I guess I'll open an issue for that? (Edit: Put up #5772.)
Yeah all good, guys - glad you didn't interpret my comments as blocking this merge! |
PR description
In #3777 it was reported that hdwallet-provider could not be included in TS projects because the compiler would choke on some missing types. This turned out to be both because it was using the wrong version of @types/web3 and did not contain some necessary types packages in the regular dependencies section. The types were being exposed but were only listed under
devDependencies
in thepackage.json
.This PR pins @types/web3 in all of Truffle to
1.0.20
(which was sometimes resolved to1.2.2
which is a stub package containing no types). It also moves a couple of dependencies into thedependencies
section ofpackage.json
as those types are exposed in that package.Testing instructions
If you would like to test this you can do the following:
npm init -y
)npm pack
in hdwallet-provider after checking out this PR's latest commit and bootstrappingindex.ts
that imports hdwallet-providertsconfig.json
and install TSnpm install -S <yourTarballFilename>
Documentation
doc-change-required
label to this PR if documentation updates are required.Breaking changes and new features
breaking-change
andnew-feature
labels for the appropriate packages.