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 progress on line wrap (trim line to stderr.columns) #9225

Merged
merged 2 commits into from
Jun 13, 2019

Conversation

kuceb
Copy link
Contributor

@kuceb kuceb commented Jun 3, 2019

fix #9221

fixed it by trimming lines to process.stderr.columns if it exists

What kind of change does this PR introduce?
bugfix

Did you add tests for your changes?
yes

also added a test utility file so I didn't have to clutter up the progressPlugin.test.js, but it can be moved back in. I just needed a utility for capturing stderr and promisified compiler.run

@webpack-bot
Copy link
Contributor

For maintainers only:

  • This need to be documented (issue in webpack/webpack.js.org will be filed when merged)

@webpack-bot
Copy link
Contributor

Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon.

lib/ProgressPlugin.js Outdated Show resolved Hide resolved
test/support/utils.js Outdated Show resolved Hide resolved
test/support/utils.js Outdated Show resolved Hide resolved
test/ProgressPlugin.test.js Outdated Show resolved Hide resolved
lib/ProgressPlugin.js Outdated Show resolved Hide resolved
test/support/utils.js Outdated Show resolved Hide resolved
test/ProgressPlugin.test.js Outdated Show resolved Hide resolved
test/ProgressPlugin.test.js Outdated Show resolved Hide resolved
lib/ProgressPlugin.js Outdated Show resolved Hide resolved
@webpack-bot
Copy link
Contributor

@bkucera Thanks for your update.

I labeled the Pull Request so reviewers will review it again.

@sokra Please review the new changes.

@kuceb
Copy link
Contributor Author

kuceb commented Jun 11, 2019

friendly bump

@sokra sokra merged commit 681abf0 into webpack:master Jun 13, 2019
@sokra
Copy link
Member

sokra commented Jun 13, 2019

Thanks

@kinke
Copy link

kinke commented Jul 4, 2019

With --progress, I now have an output of thousands of lines (instead of just the progress line being constantly updated).

@kuceb
Copy link
Contributor Author

kuceb commented Jul 5, 2019

@kinke please open an issue if you think this caused a bug, closed PRs are not good for visibility. Also please mention the webpack version you're on.

@kinke
Copy link

kinke commented Jul 5, 2019

Well it's not a bug IMO, just a major inconvenience - I downgraded from v4.35.2 to v4.34 because of this.

@kuceb
Copy link
Contributor Author

kuceb commented Jul 6, 2019

@kinke ok, well please open an issue or comment on this issue #9221, preferably with a reproducible example.

also it would be nice to log process.stderr.columns and post that with the issue. it may be a problem when that's not set

@sodatea
Copy link
Contributor

sodatea commented Sep 30, 2019

IMO falling back to Infinity is not a good idea here.
It breaks use cases like the Vue CLI UI, where the stderr stream is piped thus not having the columns property vuejs/vue-cli#4557.
Such problems won't occur with the old 40 max length.

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.

Terminal progress on multiple lines if line wraps
5 participants