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

fix: use async / await for info command #494

Merged
merged 1 commit into from
Jun 4, 2018
Merged

fix: use async / await for info command #494

merged 1 commit into from
Jun 4, 2018

Conversation

DanielRuf
Copy link
Contributor

@DanielRuf DanielRuf commented Jun 4, 2018

What kind of change does this PR introduce?
This PR fixes #493

Did you add tests for your changes?
No

If relevant, did you update the documentation?

Summary
Currently webpack-cli info fails as it returns a promise which is not directly resolved.

Does this PR introduce a breaking change?
Probably requires a Node.js version which supports async / await.

Other information

@DanielRuf
Copy link
Contributor Author

Async functions are not supported yet on Node 6.0.0. (node/no-unsupported-features)
9
module.exports = async function info() {
Async functions are not supported yet on Node 6.0.0. (node/no-unsupported-features)
11
await envinfo.run({

So just 8+ is supported as I already thought.

@tabrindle
Copy link
Contributor

tabrindle commented Jun 4, 2018

🤦‍♂️ sorry about this.

edit: I looked into this to make sure this wasn't something that was caused by my envinfo package. Turns out this was a side effect of moving webpack-cli to a mono repo. Looks like envinfo was upgraded across a major version (4.x=>5.x), which indeed did make the breaking change of moving from sync=>async.

@DanielRuf
Copy link
Contributor Author

🤦‍♂️ sorry about this.

Why are you sorry and for what?

@tabrindle
Copy link
Contributor

I thought I had gone back and made PRs to upgrade everyone using older versions of envinfo already. Turns out I hadn't!

@DanielRuf
Copy link
Contributor Author

I thought I had gone back and made PRs to upgrade everyone using older versions of envinfo already. Turns out I hadn't!

Ah ok, didn't know it. Which is the "right" solution here which I can / should apply?

@tabrindle
Copy link
Contributor

This should work fine 👍

@evenstensberg evenstensberg merged commit 6833db9 into webpack:master Jun 4, 2018
@DanielRuf DanielRuf deleted the fix/info-promise branch June 4, 2018 20:43
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.

webpack-cli info does not work anymore (pending promise)
5 participants