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

Update jsx binary to latest jstransform + latest flow syntax features #3143

Merged
merged 2 commits into from Feb 13, 2015

Conversation

jeffmo
Copy link
Contributor

@jeffmo jeffmo commented Feb 13, 2015

  • Updates the jstransform version to include new Flow syntactic features (like import type and type casts)
  • Adds new --es6module and --non-strict-es6module flags to the jsx executable

Why a special flag for es6 modules, you ask?

ES6 modules are parsed in a different mode than regular scripts: (1) They are implictly strict-mode (2) Only modules can have import/export declarations (scripts cannot); So the parser needs to know which mode it should parse the file.

Whats up with --non-strict-es6module you ask?

There are a lot of non-ES6 modules out in the wild (i.e. CommonJS modules) that are just begging to be converted to ES6 modules. However, because es6 modules are implicit-strict, it's not immediately safe to just convert the require()s to imports and call it a day. So this new --non-strict-es6module is a compatibility mode that lets people switch to the new syntax and defer the strict-mode conversion until they have time to come around to it.

cc @sebmck w.r.t. the new Flow syntax features (see facebookarchive/jstransform@de1173c and facebookarchive/jstransform@a4099d9)

@jeffmo jeffmo changed the title Flow 0 3 0 Update jsx binary to latest jstransform + latest flow syntax features Feb 13, 2015
jeffmo added a commit that referenced this pull request Feb 13, 2015
Update jsx binary to latest jstransform + latest flow syntax features
@jeffmo jeffmo merged commit 8e803cb into facebook:master Feb 13, 2015
@jeffmo jeffmo deleted the flow_0_3_0 branch February 13, 2015 23:39
@sebmck
Copy link
Contributor

sebmck commented Feb 14, 2015

Done, available as of 3.6.3

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.

None yet

3 participants