samccone / The-cost-of-transpiling-es2015-in-2016

Investigating the overhead cost of compiled es2015
1.34k stars 37 forks source link

Should use "uglify-js" in package.json not "uglifyjs" #27

Closed kzc closed 8 years ago

kzc commented 8 years ago

The package.json files are using the incorrect npm module name for uglify:

babel/package.json:    "uglifyjs": "^2.4.10"
babelify/package.json:    "uglifyjs": "^2.4.10"
rollup-plugin-babel/package.json:    "uglifyjs": "^2.4.10"
rollup/package.json:    "uglifyjs": "^2.4.10"
traceur/package.json:    "uglifyjs": "^2.4.10"
typescript/package.json:    "uglifyjs": "^2.4.10",

You should be using uglify-js, not uglifyjs.

uglifyjs is a non-supported unofficial npm module that is a year old.

Please see https://github.com/mishoo/UglifyJS2/issues/936 and https://github.com/mishoo/UglifyJS2/blob/master/package.json#L2 for details.

Notice that webpack is using the correct npm module name for uglify:

    "uglify-js": "~2.6.0",

https://github.com/webpack/webpack/blob/432bf35df499e09585c0efeedb3ddbed337d3ed9/package.json#L21

samccone commented 8 years ago

ah rough TIL

thanks for the pointer

dead-claudia commented 8 years ago

I would personally suggest sending PRs to each of these dependencies.

@samccone I agree...it's tripped me up multiple times running into already-fixed bugs. And I only spotted this a week and a half ago. :frowning:

kzc commented 8 years ago

So there's no misunderstanding, the uglify module name in the npm modules themselves are fine, it's the package.json files in the The-cost-of-transpiling-es2015-in-2016 project.

For example:

https://github.com/samccone/The-cost-of-transpiling-es2015-in-2016/blob/9ef976c2800b8e90ce35c0e6ab7992e4bb456e1a/rollup/package.json#L10

vs.

https://github.com/rollup/rollup/blob/affc5380671317525eb7e7c040d7c0d3dd7fc8f4/package.json#L61

dead-claudia commented 8 years ago

So, would updating dependencies or similar work?

kzc commented 8 years ago

Updating those 6 package.json files in this project would do the trick.

samccone commented 8 years ago

@kzc PRs welcome if you would not mind :)

kzc commented 8 years ago

See PR #32