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

Consider removing _shadowedFunctionLiteral use in regenerator-transform #387

Closed
wbinnssmith opened this issue Mar 13, 2020 · 1 comment · Fixed by #388
Closed

Consider removing _shadowedFunctionLiteral use in regenerator-transform #387

wbinnssmith opened this issue Mar 13, 2020 · 1 comment · Fixed by #388

Comments

@wbinnssmith
Copy link
Contributor

wbinnssmith commented Mar 13, 2020

Located at [0]. Attaching a NodePath to a node causes the Babel ast not to be serializable with v8.serialize (it contains at least one function) nor with JSON.stringify (it makes the structure circular). We'd like to serialize and persist Babel asts in parcel-bundler/parcel, but this transform prevents us from doing that.

While it looks like at one point this had special meaning to babel [1], it looks like it doesn't anymore [2]. Removing this line doesn't cause the test added in #283 to fail. Is it still needed?

cc @devongovett @padmaia

[0]

argumentIdentifier._shadowedFunctionLiteral = path;

[1] #283 (review)
[2] https://github.com/babel/babel/search?q=_shadowedFunctionLiteral&unscoped_q=_shadowedFunctionLiteral

@wbinnssmith wbinnssmith changed the title Remove _shadowedFunctionLiteral use in regenerator-transform Consider removing _shadowedFunctionLiteral use in regenerator-transform Mar 13, 2020
@benjamn
Copy link
Collaborator

benjamn commented Mar 17, 2020

cc @nicolo-ribaudo

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 a pull request may close this issue.

2 participants