-
Notifications
You must be signed in to change notification settings - Fork 143
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
Updates usage of co
to async function in [bemuse-tools] src/indexer.js
#640
Conversation
Codecov Report
@@ Coverage Diff @@
## master #640 +/- ##
==========================================
- Coverage 81.07% 80.85% -0.22%
==========================================
Files 156 156
Lines 4776 4764 -12
Branches 184 184
==========================================
- Hits 3872 3852 -20
- Misses 855 863 +8
Partials 49 49
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! I'm approving this PR in advance but I would really appreciate it if you can address the comments below…
packages/bemuse-tools/src/indexer.js
Outdated
let glob = Promise.promisify(require('glob')) | ||
let fileStat = util.promisify(fs.stat, fs) | ||
let readFile = util.promisify(fs.readFile, fs) | ||
let writeFile = util.promisify(fs.writeFile, fs) |
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 for also removing Bluebird. However, util.promisify
only takes one argument. Can you help fix this?
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.
Should I update all references to Bluebird to use native Promise and the promisify function from util like I did here?
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 agree... I would like to move away from using Bluebird instance methods. I'd prefer it in a separate PR though to make it easy for me to review and test...
Do you plan to update the whole project?
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.
Sure, why not. Let me create a new PR without Bluebird.
Kudos, SonarCloud Quality Gate passed!
|
Fixes #623