Skip to content
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

Merged
merged 3 commits into from
May 2, 2024

Conversation

LiranCohen
Copy link
Member

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 of api and get rid of the type-wrapping we are doing in agent

Copy link

changeset-bot bot commented May 2, 2024

🦋 Changeset detected

Latest commit: facd2f7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@web5/api Patch

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

shamilovtim
shamilovtim previously approved these changes May 2, 2024
@LiranCohen LiranCohen changed the base branch from henrytsai/fixed-typedoc-errors to main May 2, 2024 16:35
@LiranCohen LiranCohen dismissed shamilovtim’s stale review May 2, 2024 16:35

The base branch was changed.

Copy link
Contributor

github-actions bot commented May 2, 2024

TBDocs Report

✅ No errors or warnings

@web5/api

  • Project entry file: packages/api/src/index.ts

@web5/crypto

  • Project entry file: packages/crypto/src/index.ts

@web5/crypto-aws-kms

  • Project entry file: packages/crypto-aws-kms/src/index.ts

@web5/dids

  • Project entry file: packages/dids/src/index.ts

@web5/credentials

  • Project entry file: packages/credentials/src/index.ts

TBDocs Report Updated at 2024-05-02T16:54:17Z facd2f7

thehenrytsai
thehenrytsai previously approved these changes May 2, 2024
Copy link
Member

@thehenrytsai thehenrytsai left a 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-commenter
Copy link

codecov-commenter commented May 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.81%. Comparing base (eb02b62) to head (facd2f7).
Report is 1 commits behind head on main.

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           
Components Coverage Δ
agent 79.90% <ø> (ø)
api 97.92% <100.00%> (+0.01%) ⬆️
common 98.68% <ø> (ø)
credentials 95.26% <ø> (+<0.01%) ⬆️
crypto 93.81% <ø> (ø)
dids 97.66% <ø> (ø)
identity-agent 96.70% <ø> (ø)
crypto-aws-kms 100.00% <ø> (ø)
proxy-agent 96.70% <ø> (ø)
user-agent 96.70% <ø> (ø)

Copy link
Member

@thehenrytsai thehenrytsai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

@LiranCohen LiranCohen merged commit d863c37 into main May 2, 2024
11 checks passed
@LiranCohen LiranCohen deleted the lirancohen/export-inferred-types branch May 2, 2024 18:10
@github-actions github-actions bot mentioned this pull request May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants