Skip to content
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

Closed
wants to merge 3 commits into from
Closed

Updates usage of co to async function in [bemuse-tools] src/indexer.js #640

wants to merge 3 commits into from

Conversation

mslourens
Copy link
Contributor

Fixes #623

@codecov-io
Copy link

codecov-io commented Oct 2, 2019

Codecov Report

Merging #640 into master will decrease coverage by 0.21%.
The diff coverage is n/a.

Impacted file tree graph

@@            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              
Impacted Files Coverage Δ
src/scintillator/nodes/if.js 84.21% <0.00%> (-10.53%) ⬇️
src/app/redux/ReduxState.js 72.05% <0.00%> (-3.36%) ⬇️
src/game/display/player-display.js 75.83% <0.00%> (-1.24%) ⬇️
src/scintillator/loader.js 85.71% <0.00%> (+0.34%) ⬆️
src/scintillator/index.spec.js 100.00% <0.00%> (+0.39%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4003756...6347fc5. Read the comment docs.

Copy link
Member

@dtinth dtinth left a 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…

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)
Copy link
Member

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?

Copy link
Contributor Author

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?

Copy link
Member

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?

Copy link
Contributor Author

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.

@sonarcloud
Copy link

sonarcloud bot commented May 3, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mslourens mslourens closed this Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert usage of co to async function in [bemuse-tools] src/indexer.js
3 participants