Skip to content

Issue with transpiled code in v2.14.0 vs v2.13.0 #174

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

Closed
ryanthemanuel opened this issue Apr 13, 2017 · 4 comments
Closed

Issue with transpiled code in v2.14.0 vs v2.13.0 #174

ryanthemanuel opened this issue Apr 13, 2017 · 4 comments

Comments

@ryanthemanuel
Copy link

We ran into an issue when we upgraded to v2.14.0 today that was not existing in v2.13.0. Specifically this issue was hit when running our continuous integration night watch tests against PhantomJS. We are seeing a console error: 'SyntaxError: Unexpected token '['' that maps to this line of code: https://github.com/reactjs/react-docgen/blob/d65bfc460d7274206c3208fc41518727acd5a490/src/utils/getMemberValuePath.js#L25 It appears that PhantomJS is not set up to use the new syntax for declaring objects. I'm not sure what transpiling happened in v2.13.0 that is not happening in v2.14.0, but there is definitely something different between the two.

@fkling
Copy link
Member

fkling commented Apr 14, 2017

da97fc6 made a change to use preset-env with Node v4 as target (instead preset-es2015). Sorry for that! We could switch back, but of course we to transpile as few code as possible. Usually I would recommend to perform your own transpilation if you need to run it in an unsupported environment.

cc @danez

@danez
Copy link
Collaborator

danez commented Apr 14, 2017

Uppss, I thought react docgen was already requiring node4 at least. I go ahead and revert the breaking change for 2.x. but I would leave it for 3.x

@fkling
Copy link
Member

fkling commented Apr 18, 2017

I released v2.14.1 with @danez' changes. Let me know if that works for you!

@ryanthemanuel
Copy link
Author

I just tested the 2.14.1 release and it works for us. Thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants