Version 1.6.0 on NPM is not valid ES5 code
adambro opened this issue · comments
AFAIR the public npmjs.com repository requires packages to be valid ES5 code. Apparently serialize-javascript
is not ES5 since 1.6.0 version. Steps to reproduce:
npm i serialize-javascript@1.5.0
npm i es-check --save-dev
./node_modules/.bin/es-check es5 'node_modules/serialize-javascript/*.js'
For version 1.5.0 the above does not complain at all.
My specific case was that UglifyJs babel plugin complains about not being able to compile JS code during build process once serialize-javascript
got upgraded to 1.6.0 version.
We encounter the same problem in our build after they started to fail on minify stage reporting that:
Failed to minify the code from this file:
./node_modules/react-global-configuration/node_modules/serialize-javascript/index.js:86 ```
Ran into the same issue on node 6.
I've opened a PR that fixes this—#42
Published serialize-javascript@1.6.1
. Thanks!