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

Version 1.6.0 on NPM is not valid ES5 code #41

Closed
adambro opened this issue Dec 27, 2018 · 3 comments
Closed

Version 1.6.0 on NPM is not valid ES5 code #41

adambro opened this issue Dec 27, 2018 · 3 comments

Comments

@adambro
Copy link

adambro commented Dec 27, 2018

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.

@yuri1992
Copy link

yuri1992 commented Dec 27, 2018

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 ```

@eddyerburgh
Copy link
Contributor

Ran into the same issue on node 6.

I've opened a PR that fixes this—#42

@okuryu
Copy link
Collaborator

okuryu commented Dec 28, 2018

Published serialize-javascript@1.6.1. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants