Solving https://github.com/benjamn/recast/issues/1283 would be difficult because
it imports ast-types everywhere, and I would have to replace those references
with passing an ast-types fork as new function parameters all over the place.
This is the pragmatic solution, it would allow me to just replace all of the
ast-types exports with my own fork built from @babel/types (see
https://github.com/benjamn/ast-types/issues/823). So anywhere that imports
them would get my definitions that are up-to-date with babel.
Building defs from @babel/types or other parsers' metadata is the only
sustainable option for the community to have a reliable codemod system built on recast.
Solving https://github.com/benjamn/recast/issues/1283 would be difficult because it imports ast-types everywhere, and I would have to replace those references with passing an ast-types fork as new function parameters all over the place.
This is the pragmatic solution, it would allow me to just replace all of the ast-types exports with my own fork built from
@babel/types
(see https://github.com/benjamn/ast-types/issues/823). So anywhere that imports them would get my definitions that are up-to-date with babel.Building defs from
@babel/types
or other parsers' metadata is the only sustainable option for the community to have a reliable codemod system built on recast.