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

Check ES3 syntax compatibility #1720

Merged
merged 2 commits into from
May 13, 2016
Merged

Check ES3 syntax compatibility #1720

merged 2 commits into from
May 13, 2016

Conversation

SimenB
Copy link
Contributor

@SimenB SimenB commented May 12, 2016

Ref #1632 when a new dep messed up the syntax for ES3 compatibility.

This small tool won't ensure IE8 compat, but it will throw if the syntax is unsupported. In practice, this means consumers can exclude a module with a runtime flag, instead of messing with it at build time.

The current version failed for the minified umd build, as default was unquoted in property access, so I removed screw_ie8 option.

A screenshot of sample output on mismatch (this is the minified file before the change to uglify). (the diff is just before and after es3ify with some color)

image

I added the check to prepublish and not the linting as the code has to have been built before the check can be run. Might be annoying if tags have been made and such, but unsure if it's better to have it somewhere else?

@SimenB SimenB changed the title Check es3 Check ES3 syntax compatibility May 12, 2016
@gaearon gaearon merged commit ca977c6 into reduxjs:master May 13, 2016
@gaearon
Copy link
Contributor

gaearon commented May 13, 2016

Looks good to me, 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

Successfully merging this pull request may close these issues.

2 participants