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

Refactor loader's code #448

Merged
merged 8 commits into from
Sep 16, 2019
Merged

Conversation

goganchic
Copy link
Contributor

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

I want to make the code of the plugin a bit easier to understand and debug by removing unnecessary hidden connection between index.js and loader.js and changing variables and functions names to a bit more clear variants.

Breaking Changes

Additional Info

@jsf-clabot
Copy link

jsf-clabot commented Sep 13, 2019

CLA assistant check
All committers have signed the CLA.

@alexander-akait
Copy link
Member

Please accept CLA and fix linting errors, thanks

@goganchic
Copy link
Contributor Author

goganchic commented Sep 13, 2019

@evilebottnawi would you please tell me how can I reproduce failing tests locally? I've ran npm run test and all tests passes:

--------------------------|----------|----------|----------|----------|-------------------|
File                      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
--------------------------|----------|----------|----------|----------|-------------------|
All files                 |    88.64 |    80.89 |    88.46 |    88.47 |                   |
 src                      |    88.93 |    82.24 |    88.14 |    88.71 |                   |
  CssDependency.js        |      100 |      100 |      100 |      100 |                   |
  cjs.js                  |      100 |      100 |      100 |      100 |                   |
  index.js                |    88.51 |    82.61 |     87.8 |    88.17 |... 11,531,538,560 |
  loader.js               |    88.57 |    81.58 |     87.5 |    88.57 |... 71,175,185,200 |
 src/hmr                  |    87.88 |       78 |    89.47 |    87.88 |                   |
  hotModuleReplacement.js |    87.88 |       78 |    89.47 |    87.88 |... 01,162,200,202 |
--------------------------|----------|----------|----------|----------|-------------------|

Test Suites: 5 passed, 5 total
Tests:       42 passed, 42 total
Snapshots:   19 passed, 19 total
Time:        4.386s
Ran all test suites.

What should I do to reproduce this failure https://github.com/webpack-contrib/mini-css-extract-plugin/pull/448/checks?check_run_id=221075652 (I've tried node v8.9.1)

And one more question: you have said about linter error: https://github.com/webpack-contrib/mini-css-extract-plugin/pull/448/checks?check_run_id=221075432 it's about npm audit. Should I update eslint-utils package in this PR?

@alexander-akait
Copy link
Member

alexander-akait commented Sep 13, 2019

@goganchic
Copy link
Contributor Author

@evilebottnawi should I fix something else for merge this PR or everything is fine and we just need to wait for contributors?

@alexander-akait
Copy link
Member

@goganchic wait other contributors

sokra
sokra previously approved these changes Sep 13, 2019
Copy link
Member

@sokra sokra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@codecov
Copy link

codecov bot commented Sep 13, 2019

Codecov Report

Merging #448 into master will decrease coverage by 0.14%.
The diff coverage is 92.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #448      +/-   ##
==========================================
- Coverage   88.32%   88.17%   -0.15%     
==========================================
  Files           4        5       +1     
  Lines         411      406       -5     
  Branches       86       86              
==========================================
- Hits          363      358       -5     
  Misses         46       46              
  Partials        2        2
Impacted Files Coverage Δ
src/index.js 87.24% <ø> (-0.78%) ⬇️
src/CssDependency.js 100% <100%> (ø)
src/loader.js 89.01% <88.88%> (-0.41%) ⬇️

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 159ce3b...b134f00. Read the comment docs.

@goganchic
Copy link
Contributor Author

goganchic commented Sep 14, 2019

@evilebottnawi @sokra I've updated eslint-utils as npm audit required and have made several small refactoring-like changes. So now all checks are successful. I think PR is ready for merge.

@alexander-akait alexander-akait merged commit 50434b5 into webpack-contrib:master Sep 16, 2019
@alexander-akait
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants