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(server): refactor file-list event interface #3616
Conversation
✅ Build karma 463 completed (commit 5c9bef693e by @johnjbarton) |
✅ Build karma 2860 completed (commit 5c9bef693e by @johnjbarton) |
✅ Build karma 462 completed (commit 5c9bef693e by @johnjbarton) |
❌ Build karma 2862 failed (commit f6d72807f0 by @johnjbarton) |
❌ Build karma 465 failed (commit f6d72807f0 by @johnjbarton) |
❌ Build karma 464 failed (commit f6d72807f0 by @johnjbarton) |
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.
LGTM once CI is happy
Remove the confusing promise container in favor of a current-file-list state. The custom-then() function around a promise is hard to understand and reason about. A simple object with a files property expresses the 'current files list' clearer.
The input config supplies 'patterns' which FileList expands into Files. These files are preprocessed and then 'file-list-modified' is fired. The event offers a pair of file lists, {included, served}. The bundle layer maps this pair to a new pair where fewer files are included. By default the bundler copies the inputs to outputs. Fixes karma-runner#3633
3844632
to
ae4f6c6
Compare
I added the bundler here. I will try to separate the addition from the refactoring. |
✅ Build karma 2894 completed (commit f8614d3a6e by @johnjbarton) |
✅ Build karma 497 completed (commit f8614d3a6e by @johnjbarton) |
✅ Build karma 496 completed (commit f8614d3a6e by @johnjbarton) |
To avoid introducing a change to middleware/karma and then just turn around and change it again, I combined the refactoring with the bundler introduction in #3638 |
Remove the confusing promise container in favor of a current-file-list state.
The custom-then() function around a promise is hard to understand and reason about.
A simple object with a files property expresses the 'current files list' clearer.