-
Notifications
You must be signed in to change notification settings - Fork 8
[MAINT] Async repository #17
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
Conversation
@@ -176,7 +177,10 @@ export class Evaluator { | |||
return false; | |||
} | |||
|
|||
private evaluateClause(clause: Clause, target: Target): boolean { | |||
private async evaluateClause( |
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 probably want to await
any async calls in the switch
statement as well
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.
only this is promise
return this.isTargetIncludedOrExcludedInSegment(clause.values, target);
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.
Some potential issues with src/index.ts
and some other bits and pieces to look at, but looks like it's really coming together. Since this is breaking change (i.e. the user will have to update their code to use it), make sure to mark this as v2.0.0
Oh, and it looks like there are about 778 vulnerabilities in the dependencies. It would be worth running |
} | ||
|
||
deleteFlag(identifier: string): void { | ||
async deleteFlag(identifier: string): Promise<void> { |
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.
Is there anything asynchronous in this function or the next?
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.
if (this.store) {
this.store.del(flagKey);
}
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.
As is, it won't actually wait for that to complete before the promise resolves, so await
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.
Nice work 👍🏻
No description provided.