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

tests: add tests for optimization mangleExports #1724

Merged
merged 5 commits into from
Aug 4, 2020

Conversation

anshumanv
Copy link
Member

@anshumanv anshumanv commented Aug 1, 2020

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
Copy link
Member

@snitin315 snitin315 left a comment

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
Member 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
Member 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
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
Member 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
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
Copy link
Member

snitin315 commented Aug 3, 2020

Now we wait for merge and release /cc @evilebottnawi

@anshumanv
Copy link
Member 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

@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