Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
build: add dependencies for subpackages #87
build: add dependencies for subpackages #87
Changes from 5 commits
f4a9c42
723824d
ab6a346
4a969de
77b2002
367c2e9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
ignorable nit: removing this newline makes the comment a little harder to read
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.
They're either
dependencies
orpeerDependencies
but not both.peer has less burden on the consumer, so if that works go with it
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.
I think they should be
dependencies
because they're imported and used directly in this package: https://github.com/Agoric/ui-kit/blob/main/packages/react-components/src/lib/context/AgoricProviderLite.tsx#L10-L18It's possible the consumer doesn't directly use the exposed
chainStorageWatcher
orwalletConnection
types from the context so I think it would be more burden to require them to add these as dependencies on their own.However, if the client is using those types elsewhere, I figured it would make sense to put them in
peerDependencies
as well to avoid conflicts. Am I thinking about this wrong?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.
yeah then they're
dependencies
.I see your motivation to constrain the
peerDependencies
as well, but I don't think it's warranted.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.
I see this is a new dependency as of this PR
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.
Yea I figured it was a dependency at first but then realized it was just using
any
for the chainStorageWatcher type, but left this in since that should be fixed anyway.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.
you could cast the
watcher
so you don't have to ignore at each site. up to youThere 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.
Casting requires stubbing out more of the functions than the test uses, or else I'm getting type errors. Unless you mean casting to
any
, but I think the expect-error with explanation would be better.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.
I meant to put the one
ts-expect-error
at the cast site. then it will let you lie about what the type is.i agree that any expect-error should have an explanation