Skip to content
Discussion options

You must be logged in to vote

We have accomplished this using jscodeshift (GitHub).

You pass all files to your jscodeshift transform (e.g. transform.cjs) using orvals afterAllFilesWrite setting:

import {run} from 'jscodeshift/src/Runner.js';
// snip
afterAllFilesWrite: [paths => run('./transform.cjs', paths, {parser: 'ts'})]

And in your transform.cjs you find the callee ending with Mutator and you add another argument.

It is kind of rough, but it works and it is not too much additional source code.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ghost
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
workaround A workaround has been provided
1 participant