-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Types] CIDs typings incompability #839
Comments
Hmm in the generated typings I see:
But the original JSDoc import does not have it: https://github.com/libp2p/js-libp2p/blob/master/src/content-routing.js#L12 😳 Maybe it is related to the version of CID that was used when the typings were released? 🤔 |
Thanks for reporting this @AuHau In theory, this should work as the cids import goes to Any ideas @hugomrdias @Gozala ? |
Sure thing! Just FYI. downgrading |
@AuHau which ts version are you using? |
@hugomrdias this is one of the cases that the aegir typecheck is not catching errors. If you build libp2p and check |
I'm afraid problem is that TS has a bug that incorrectly resolves module paths microsoft/TypeScript#41284. As to why TS rewrites imports to things like |
I have the same problem here ethereumjs/ethereumjs-monorepo#1027 (comment) |
This PR updates aegir and fixes errors with the new ts config and removes typesVersions. `typesVersions` workaround makes TS rewrite imports to `cids` to `cids/src` and because this package doesn't really needs this a workaround its just removed. This should fix libp2p/js-libp2p#839 (comment)
This PR updates aegir and fixes errors with the new ts config and removes typesVersions. `typesVersions` workaround makes TS rewrite imports to `cids` to `cids/src` and because this package doesn't really needs this a workaround its just removed. This should fix libp2p/js-libp2p#839 (comment)
@ryanio thanks for pointing to the PR. It helped me to verify that the fix in js-cid actually works. No workarounds for that should be needed if you use cids v1.1.5. |
thanks @vmx and @hugomrdias @AuHau this should be fixed, feel free to re-open if you have further issues |
CID version
1.1.0
introduced typings generated withaegir
which changed the structure of typings as before this release it was placed in/src/
folder. With version1.1.4
ts compile now fails with:With version
1.0.0
of CID the problem is not present.The text was updated successfully, but these errors were encountered: