-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat: expose the peerId that created the operations #551
base: main
Are you sure you want to change the base?
Conversation
Flamegraph.com reportCreated by Flamegraph.com Github Action |
Coverage Report
File Coverage
|
packages/object/src/index.ts
Outdated
if (!caller) { | ||
throw new Error("Caller is undefined"); | ||
} | ||
if (target.context) { | ||
target.context.caller = caller; | ||
} else { | ||
throw new Error("Target does not have a context to update."); | ||
} | ||
|
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.
why you mark the caller
as optional then enforce checks like this? I think it's better to force on the function params
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 did it because peerId
can be undefined in _computeDRP
. Agree it's better to check it there before calling _applyOperation
.
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.
updated
* origin: fix: tsconfig for interval discovery (#564)
Signed-off-by: Sacha Froment <[email protected]>
Signed-off-by: Sacha Froment <[email protected]>
Signed-off-by: Sacha Froment <[email protected]>
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.
otherwise lgtm
packages/types/src/drp.ts
Outdated
/** | ||
* The context metadata for a request. | ||
*/ | ||
context?: DrpRuntimeContext; |
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 would put it below semantics type
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.
updated
What type of PR is this?
Description
DRPRuntimeContext
and added to theIDRP
.drp.context
before applying an opeartion to the drp.Related Issues and PRs
Added/updated tests?
Additional Info
add instructions or screenshots on what you might think is relevant or instructions on how to manually test it
[optional] Do we need to perform any post-deployment tasks?