Add support for webpack v5#83
Add support for webpack v5#83jayaddison wants to merge 26 commits intosysgears:masterfrom jayaddison:upgrades/webpack-5
Conversation
TODO: Determine how to retrieve failure count
…new Set interface
|
@jayaddison Nice, thanks! Could you adjust Travis settings for our tests to include Webpack 5 as well? |
|
I have to admit to not being experienced enough with either |
|
@jayaddison Thanks for letting know! |
|
Hello! |
The Pull Request is needed that implements Webpack 5 support while not breaking any of the current tests. I don't know other ways, feel free to share your ideas. |
You mean you need help fixing the unit tests on this pr? EDIT: fixed a few more errors here https://github.com/jayaddison/mochapack/pull/1 |
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
|
The code-splitting tests are failing because the chunks are all filtered by this condition: mochapack/src/webpack/util/createEntry.ts Line 12 in 8416776 So none of the tests actually runs. The mochapack/src/runner/TestRunner.ts Line 79 in 8416776 So I guess something's wrong with the updated |
|
Something's also broken related to the way that the test runner is invoked; the pull request as it stands uses some poorly-understood modifications to get Taking another look at it currently; hope to learn a bit more about how this is supposed to work. |
| // Make sure we have a valid error message | ||
| if (err.message && typeof err.message === 'string') { | ||
| lines.push(formatErrorMessage(err.message)) | ||
| } |
There was a problem hiding this comment.
@skjnldsv I wasn't completely sure whether this change is required, so I've backed it out for now (along with some error-related code changes elsewhere in this file).
There was a problem hiding this comment.
It was just a sanity check on an error I encountered. Where the error was not valid :)
|
Hello! I tried this branch and have found some things.
|
|
@lveraszto Thanks a lot for helping out! If you feel like pushing your fix from item (1) to a git repo, I'd be glad to merge that into the branch; or I could commit it locally and credit you via the commit author list if that's preferable. The |
|
Thanks for your work @jayaddison . I created a PR (https://github.com/jayaddison/mochapack/pull/2) |
|
Oh, sorry - I didn't spot the pull request. I'll check my notification settings. Thanks! |
fix exit code build problem for watch return type
|
Hi all First of all many thanks for your efforts to ensure this library will get webpack 5 support, really appreciated! Do you have any news on the progress for this, or do you need any additional help? |
|
Hi @jmariller - thanks! I've no recent updates here, and have not yet had time to review the latest ideas regarding the |
|
It seems unlikely I'm going to be able to commit more time to this in the near future, sorry about that for anyone waiting. If anyone's lurking with additional ideas or progress towards completing the upgrade process, let's try to incorporate those soon? |
|
Was this PR canceled entirely or will it be continued later? |
|
@danilofuchs Currently I've no plans to continue it, but that doesn't prevent anyone else picking it up. I didn't feel I had a strong enough grasp of the codebase to get this to completion. |
|
I've opened a new PR that have got most tests passing #98 |
What's the problem this PR addresses?
This pull request attempts to introduce support for
webpackv5.Status
Tests are not yet passing - it looks like there may be some remaining problems related to:
Error formatting
Failure case:
1) code-splitting with static require runs successful test: Uncaught AssertionError: expected ' WEBPACK Compiling...\n\n WEBPACK Compiled successfully in 197ms\n\n MOCHA Testing...\n\n\n\n 0 passing (0ms)\n\n MOCHA Tests completed successfully\n\n' to include 'entry1.js'Code reference:
mochapack/src/webpack/util/createStatsFormatter.ts
Lines 71 to 78 in a23607c
Exit code
In order to get the codebase to compile against an updated version of
webpack, a workaround was applied which omits thefailurescount from the exit code ofmochapack.Commit reference:
https://github.com/jayaddison/mochapack/commit/ef3582ea97c5fa85bf2ba4d7eedfa3825b59f00d
How did you fix it?
webpackdependency inpackage.jsonnpx tscnpx ts-mocha ...Resolves #82