-
Notifications
You must be signed in to change notification settings - Fork 255
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: Update README, tests, dependencies #179
Conversation
BREAKING CHANGE: * Botkit updated to 4.0.0 which means there are a lot of changes to use your bot with botkit now. * Only simple bot example was updated.
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.
After installing this branch I got an empty lib
dir with .gitkeep
file in it.
README.md
Outdated
```typescript | ||
function checkBalance(context, callback) { | ||
```js | ||
const checkBalance = (context) => new Promise((resolve, reject) => { |
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.
This function would look better with async
.
README.md
Outdated
|
||
They can be customized as follows: | ||
|
||
```js | ||
middleware.before = function(message, assistantPayload, callback) { | ||
middleware.before = (message, assistantPayload) => new Promise((resolve, reject) => { |
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.
middleware.before = (message, assistantPayload) => async {
// Code here gets executed before making the call to Assistant.
return assistantPayload;
}
examples/simple-bot/package.json
Outdated
"dotenv": "^7.0.0", | ||
"botbuilder-adapter-slack": "^1.0.1", | ||
"botkit": "^4.0.1", | ||
"botkit-middleware-watson": "file:../../botkit-middleware-watson-2.0.0.tgz", |
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.
Please change version constraint to ^2.0.0
.
Is ignoring compiled files a standard practice in node-sdk? How am I supposed to test my changes now? |
src/index.ts
Outdated
import deepMerge = require('deepmerge'); | ||
import {promisify} from 'util'; | ||
import { BotkitMessage } from 'botkit'; | ||
|
||
export interface MiddlewareConfig { |
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 just used this in my code and I think that it would be better to name it WatsonMiddlewareConfig
.
@Naktibalda I added back the |
Codecov Report
@@ Coverage Diff @@
## botkit-next #179 +/- ##
=============================================
Coverage ? 78.5%
=============================================
Files ? 2
Lines ? 107
Branches ? 22
=============================================
Hits ? 84
Misses ? 19
Partials ? 4
Continue to review full report at Codecov.
|
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.
Thanks, after changing sendToWatsonAsync
to sendToWatson
, my bot works successfuly with your branch.
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@Naktibalda I did some updates to your code to update the tests to use typescript and cleanup extra code that we had for when we were using plain javascript.
src
andlib
is ignore from the repository.lib
with the types and javascript but notsrc
with the typescript.simple-bot
was updatedmulti-bot
was not updated as I ran out of time 😞jest
and addedcodecov
for code coverageWhat I need.
---- for semantic versioning ---
BREAKING CHANGE: