-
Notifications
You must be signed in to change notification settings - Fork 56
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
add reference types from dwn-sdk-js to avoid pnpm build error #507
Conversation
🦋 Changeset detectedLatest commit: facd2f7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
8cc806f
to
eb02b62
Compare
TBDocs Report ✅ No errors or warnings @web5/api
@web5/crypto
@web5/crypto-aws-kms
@web5/dids
@web5/credentials
TBDocs Report Updated at 2024-05-02T16:54:17Z |
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.
Consider adding an in-line comment to the type reference to explain why it is added, else it might not be easy/obvious to reverse engineer why the line is there.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #507 +/- ##
=======================================
Coverage 90.81% 90.81%
=======================================
Files 116 116
Lines 29414 29442 +28
Branches 2156 2156
=======================================
+ Hits 26711 26739 +28
Misses 2668 2668
Partials 35 35
|
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.
🙏
pnpm
encounters some build errors for inferred types when there are 2 different versions of the same package in a monorepo.microsoft/TypeScript#47663 (comment)
Adding
/// <reference types="@tbd54566975/dwn-sdk-js" />
at the top of files which would infer these types allows the build system to understand them, i believe while keeping this package as a devDependency.I don't think that this is the long-term solution here, but may be a temporary fix until we decide on a permanent one potentially bringing in
dwn-sdk-js
as a first class dependency ofapi
and get rid of the type-wrapping we are doing inagent