jscodeshift icon indicating copy to clipboard operation
jscodeshift copied to clipboard

export Runner from jscodeshift

Open sibelius opened this issue 5 years ago • 3 comments
trafficstars

import { Runner } from  'jscodeshift'

can we export Runner from jscodeshift to make it easy to reuse it in API way?

related to https://github.com/facebook/jscodeshift/issues/179

does it make sense to use jest-worker here instead of custom worker processing logic?

sibelius avatar Jun 25 '20 13:06 sibelius

Hey @sibelius,

Have you seen this issue? https://github.com/facebook/jscodeshift/issues/398 Seems like it's possible by importing runner like so: const Runner = require('jscodeshift/src/Runner');

Feels like a bit of a hack to me though, it would be great if an official solution was available

danieldelcore avatar May 12 '21 04:05 danieldelcore

Unfortunately, this does not work with esm module projects

sys13 avatar Dec 10 '22 23:12 sys13

Unfortunately, this does not work with esm module projects. Nothing I can do only but destroy my esm project due to this. :(

Indomi avatar Feb 02 '23 13:02 Indomi