-
-
Notifications
You must be signed in to change notification settings - Fork 179
Update uglify-es dependency to use maintained terser module #296
Conversation
@fabiosantoscode thanks for PR. Great! |
@fabiosantoscode any breaking changes between abandoned |
There are no breaking changes! |
For security reasons it is not recommended to use All changes to |
@kzc thanks for feedback 👍 |
The issue has been resolved. |
@fabiosantoscode what issue? BTW great 👍 |
CHANGELOG.md
Outdated
@@ -122,7 +122,7 @@ All notable changes to this project will be documented in this file. See [standa | |||
|
|||
### Bug Fixes | |||
|
|||
* **package:** use exact `uglify-es` version (`dependencies`) ([#199](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/issues/199)) ([2e2ed36](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/commit/2e2ed36)) | |||
* **package:** use exact `terser` version (`dependencies`) ([#199](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/issues/199)) ([2e2ed36](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/commit/2e2ed36)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't change historical references of uglify-es
versions to terser
retroactively.
CHANGELOG.md
Outdated
@@ -132,7 +132,7 @@ All notable changes to this project will be documented in this file. See [standa | |||
|
|||
### Chores | |||
|
|||
* update `uglify-es` v3.2.0...v3.2.1 ([#190](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/issues/190)) ([b356f74](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/commit/b356f74)) | |||
* update `terser` v3.2.0...v3.2.1 ([#190](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/issues/190)) ([b356f74](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/commit/b356f74)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
CHANGELOG.md
Outdated
@@ -152,7 +152,7 @@ All notable changes to this project will be documented in this file. See [standa | |||
|
|||
### Chores | |||
|
|||
* update `uglify-es` v3.1.3...3.2.0 ([#176](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/issues/176)) ([3be7f62](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/commit/3be7f62)) | |||
* update `terser` v3.1.3...3.2.0 ([#176](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/issues/176)) ([3be7f62](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/commit/3be7f62)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
CHANGELOG.md
Outdated
@@ -200,7 +200,7 @@ All notable changes to this project will be documented in this file. See [standa | |||
|
|||
### Features | |||
|
|||
* update to `uglify-es` ([#63](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/issues/63)) ([1d62560](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/commit/1d62560)) | |||
* update to `terser` ([#63](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/issues/63)) ([1d62560](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/commit/1d62560)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
CHANGELOG.md
Outdated
@@ -253,7 +253,7 @@ All notable changes to this project will be documented in this file. See [standa | |||
|
|||
### Features | |||
|
|||
* update to `uglify-es` ([#63](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/issues/63)) ([1d62560](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/commit/1d62560)) | |||
* update to `terser` ([#63](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/issues/63)) ([1d62560](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/commit/1d62560)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
CHANGELOG.md
Outdated
@@ -112,7 +112,7 @@ All notable changes to this project will be documented in this file. See [standa | |||
|
|||
### Reverts | |||
|
|||
* **package:** use exact `uglify-es` version (`dependencies`) ([#199](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/issues/199)) ([#202](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/issues/202)) ([426bafd](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/commit/426bafd)) | |||
* **package:** use exact `terser` version (`dependencies`) ([#199](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/issues/199)) ([#202](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/issues/202)) ([426bafd](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/commit/426bafd)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't change historical references of uglify-es
versions to terser
retroactively.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for these! I wasn't being careful enough :/
/cc @fabiosantoscode need do changes above |
This feels like a major change community wise. Should the PR be named something like "Move UglifyJS-ES to Terser fork". I don't feel quite comfortable calling it just an "update". Another approach I would suggest and feel more comfortable with would be a multi step phased approach: First create Security awareness is growing strong in the community, and replacing core dependencies without user knowledge feels a bit against the current trend. |
@irae we don't have time on creating new plugin, also Also for Creating new plugin will only result in a loss of time. I have been helping a lot of times for |
I was under the impression that creating a new plugin could just be copy/paste (or I trust you when you say there are no breaking changes. Tests will pass, everything is fine in the automation part. But when auditing code, thats only part of the job. People will see the core dependency changing and will be more skeptical than I am. Some people will notice, some other people will get warns from security automation tools. I used to work at a large corporation and this kind of changes happens to go through a lot of scrutiny. The usual outcome of this kind of changes is to pin to an older minor release and move on, because it is much more work to whitelist new packages with security teams and open source legal team. My point is not about all the work work it takes or making it harder for no reason. It is about how much people trust on the work you've done and about being honest with the community. If I search for UglifyJS on the web I won't find It was quite confusing to to me to find out that I might be wrong here, or overreacting. Feel free to move on and change the dependency. |
@irae even copy/paste require time, I understand perfectly what you are talking here, but unfortunately at the moment only two developers works in We constantly receive issue about problem with uglify and inline compression in We have a choice:
|
When #308 lands this |
@fabiosantoscode The uglifyjs-webpack-plugin/src/index.js Lines 45 to 47 in 4f50156
|
@kzc I would much rather let someone else do that, as that commit's changes also touch the tests, docs and other parts of the codebase, not all of those changes are undesirable, and it is a bit out of scope for this PR. |
Due to a bug in UglifyJS (mishoo/UglifyJS#2842) we should disable function inlining to avoid falling into this issue. the uglifyjs-webpack-plugin module is considering to move to the maintained fork of UglifyJS (terser: https://github.com/fabiosantoscode/terser): - webpack-contrib/uglifyjs-webpack-plugin#264 - webpack-contrib/uglifyjs-webpack-plugin#296 But until that happens I'd propose to disable function inlining.
Due to a bug in UglifyJS (mishoo/UglifyJS#2842) we should disable function inlining to avoid falling into this issue. the uglifyjs-webpack-plugin module is considering to move to the maintained fork of UglifyJS (terser: https://github.com/fabiosantoscode/terser): - webpack-contrib/uglifyjs-webpack-plugin#264 - webpack-contrib/uglifyjs-webpack-plugin#296 But until that happens I'd propose to disable function inlining.
Due to a bug in UglifyJS (mishoo/UglifyJS#2842) we should disable function inlining to avoid falling into this issue. the uglifyjs-webpack-plugin module is considering to move to the maintained fork of UglifyJS (terser: https://github.com/fabiosantoscode/terser): - webpack-contrib/uglifyjs-webpack-plugin#264 - webpack-contrib/uglifyjs-webpack-plugin#296 But until that happens I'd propose to disable function inlining.
BTW, since I'm running into issues with this and am impatient, I published this PR as-is in a scoped package on npm for others to use: https://www.npmjs.com/package/@salesloft/terser-webpack-plugin |
@fabiosantoscode do you think there's any chance getting these changes out there in webpack npm package? :) |
Close in favor https://github.com/webpack-contrib/terser-webpack-plugin, feel free to feedback and create new issues |
I'm updating the
uglify-es
dependency to the new fork, which is now namedterser