facebook/regenerator

Consider removing _shadowedFunctionLiteral use in regenerator-transform

wbinnssmith opened this issue · 1 comments

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