Skip to content

tests: add tests for optimization mangleExports#1724

Merged
anshumanv merged 5 commits into
webpack:nextfrom
anshumanv:opt-test
Aug 4, 2020
Merged

tests: add tests for optimization mangleExports#1724
anshumanv merged 5 commits into
webpack:nextfrom
anshumanv:opt-test

Conversation

@anshumanv

@anshumanv anshumanv commented Aug 1, 2020

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

tests

Did you add tests for your changes?
Yes

If relevant, did you update the documentation?
NA

Summary
A case was reported by the user in #1677 add tests for it

Does this PR introduce a breaking change?
No

Other information

fixes #1677

@anshumanv
anshumanv requested a review from a team as a code owner August 1, 2020 14:53
alexander-akait
alexander-akait previously approved these changes Aug 1, 2020
snitin315
snitin315 previously approved these changes Aug 1, 2020
Comment thread test/optimization/optimization.test.js Outdated

@snitin315 snitin315 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@anshumanv with a new release (v5.0.0-beta.23) now webpack exports --optimization-mangle-exports, so it will be automatically tested inside coreFlags/optimization-flags.test.js. So we need to modify it there.
This new addition is the reason for CI failure (and some deprecation warnings).
Can you fix it?

@anshumanv

Copy link
Copy Markdown
Contributor Author

This new addition is the reason for CI failure (and some deprecation warnings).

A new warning popped up in various tests, all need update

@anshumanv

Copy link
Copy Markdown
Contributor Author

/cc @webpack/cli-team several tests are failing because the next version of webpack is throwing a warning so all the expect(stderr).toBeFalsy() assertions are failing, what do you think is the most suitable fix for this?

@snitin315

Copy link
Copy Markdown
Member

I think we need to investigate where is the warning coming from and fix it. The waring is something like

(node:4632) [DEP_WEBPACK_COMPILATION_CACHE] DeprecationWarning: Compilation.cache was removed in favor of Compilation.getCache()
    (Use node --trace-deprecation ... to show where the warning was created)

@anshumanv

Copy link
Copy Markdown
Contributor Author

I think we need to investigate where is the warning coming from and fix it. The waring is something like

Feel free to investigate and PR @snitin315

@snitin315

Copy link
Copy Markdown
Member

@anshumanv the warning is coming from terser-webpack-plugin we need to PR there. I will send it.

https://github.com/webpack-contrib/terser-webpack-plugin/blob/91642a150ee2c72d0d445a852410b8ecf647a5f0/src/Webpack5Cache.js#L13-L15

@snitin315

snitin315 commented Aug 3, 2020

Copy link
Copy Markdown
Member

Now we wait for merge and release /cc @evilebottnawi

@anshumanv

Copy link
Copy Markdown
Contributor Author

@anshumanv the warning is coming from terser-webpack-plugin we need to PR there. I will send it.

Awesome, thanks for the effort! 👏

@webpack-bot

Copy link
Copy Markdown

@anshumanv Thanks for your update.

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

@evilebottnawi Please review the new changes.

@anshumanv
anshumanv merged commit c8e1dfe into webpack:next Aug 4, 2020
@anshumanv
anshumanv deleted the opt-test branch August 4, 2020 18:46
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.

Invalid configuration object: mangleExports using 5.0.0-beta.14

5 participants