-
Notifications
You must be signed in to change notification settings - Fork 10
shiritori: update dependencies #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
- bump all dependencies version - add missing fields to package.json - adapt to kuroshiro breaking change - switch to Promise for dispatching result
- return structured enum instead of exception - refresh tests dependencies and lint rules
}); | ||
}); | ||
app.intent('actions.intent.TEXT', async (conv, input) => { | ||
const result = await shiritori.interact(dict, input, conv.data.used); |
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 don't seem to catch the Error
anymore.
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.
Yep, the previous code was doing nothing but re-throwing 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.
Shouldn't you at least catch the error here and state an error message? Otherwise the function will crash and so will your action.
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.
Done, actually removed the error handling, since it wasn't valid, see ce5269c commit message for more details.
The error was actually checking for an empty 'string' rather than a empty list of words. The former would not happen as long as the dictionary of transcription is valid, and the later is already covered by former winning condition (WIN_USED).
LGTM |
1 similar comment
LGTM |
Test report:
c8 coverage report (not 100% because of bcoe/c8#72)
nyc coveratge report:
/cc @yoichiro @atulep @Fleker @smishra2