Skip to content

test: support webpack5 #2553

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

Merged
merged 1 commit into from
Apr 30, 2020
Merged

Conversation

hiroppy
Copy link
Member

@hiroppy hiroppy commented Apr 30, 2020

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

For Bugs and Features; did you add new tests?

Updated.

Motivation / Use-Case

Fixed some tests to support webpack5.
Need to merge this pr asap.

Breaking Changes

Additional Info

@codecov
Copy link

codecov bot commented Apr 30, 2020

Codecov Report

Merging #2553 into v4 will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##               v4    #2553   +/-   ##
=======================================
  Coverage   93.36%   93.36%           
=======================================
  Files          34       34           
  Lines        1327     1327           
  Branches      375      375           
=======================================
  Hits         1239     1239           
  Misses         85       85           
  Partials        3        3           
Impacted Files Coverage Δ
lib/utils/createConfig.js 96.26% <ø> (ø)
client-src/default/overlay.js 97.01% <100.00%> (ø)
lib/Server.js 96.35% <100.00%> (ø)
lib/servers/SockJSServer.js 93.75% <100.00%> (ø)
lib/utils/addEntries.js 100.00% <100.00%> (ø)
lib/utils/updateCompiler.js 100.00% <100.00%> (ø)

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 4fc5ecd...056ca06. Read the comment docs.

@hiroppy hiroppy force-pushed the feature/update-tests-for-webpack5 branch from d84e0b3 to bd17de4 Compare April 30, 2020 01:35
@hiroppy hiroppy force-pushed the feature/update-tests-for-webpack5 branch from bd17de4 to 056ca06 Compare April 30, 2020 01:37

const webpack = require('webpack');

const isWebpack5 = webpack.version[0] === '5';
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this have a try-catch around it, or have all versions of webpack had a .version value?

Copy link
Member Author

@hiroppy hiroppy Apr 30, 2020

Choose a reason for hiding this comment

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

yes, webpack4 and webpack5 have version function and we don't take care of less than v4 so it's okay.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, didn't see that this is just being used for test files

@knagaitsev knagaitsev self-requested a review April 30, 2020 06:24
@alexander-akait alexander-akait merged commit f5498c9 into v4 Apr 30, 2020
@alexander-akait alexander-akait deleted the feature/update-tests-for-webpack5 branch April 30, 2020 08:46
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.

3 participants