diff --git a/packages/codemods/src/testUtils/matchInlineTransformSnapshot.ts b/packages/codemods/src/testUtils/matchInlineTransformSnapshot.ts index 8b71e44d5b70..a95386a5fe59 100644 --- a/packages/codemods/src/testUtils/matchInlineTransformSnapshot.ts +++ b/packages/codemods/src/testUtils/matchInlineTransformSnapshot.ts @@ -33,6 +33,9 @@ export const matchInlineTransformSnapshot = async ( await runTransform({ transformPath, targetPaths: [tempFilePath], + options: { + verbose: 1, + }, parser, }) diff --git a/packages/codemods/src/testUtils/matchTransformSnapshot.ts b/packages/codemods/src/testUtils/matchTransformSnapshot.ts index 5fb06e9ac325..f90481609182 100644 --- a/packages/codemods/src/testUtils/matchTransformSnapshot.ts +++ b/packages/codemods/src/testUtils/matchTransformSnapshot.ts @@ -43,7 +43,8 @@ export const matchTransformSnapshot: MatchTransformSnapshotFunction = async ( targetPaths: [tempFilePath], parser, options: { - verbose: true, + verbose: 1, + print: true, }, }) diff --git a/packages/codemods/tasks/generateCodemod/templates/code/codemod.yargs.ts.template b/packages/codemods/tasks/generateCodemod/templates/code/codemod.yargs.ts.template index 3a21464546f7..4877b93b47d2 100644 --- a/packages/codemods/tasks/generateCodemod/templates/code/codemod.yargs.ts.template +++ b/packages/codemods/tasks/generateCodemod/templates/code/codemod.yargs.ts.template @@ -11,13 +11,16 @@ export const description = '(${version}->${version}) Converts world to bazinga' export const handler = () => { task( '${titleName}', - async ({ setOutput }: TaskInnerApi) => { + async ({ setOutput }: TaskInnerAPI) => { await runTransform({ transformPath: path.join(__dirname, '${name}.js'), // Here we know exactly which file we need to transform, but often times you won't. // If you need to transform files based on their name, location, etc, use `fast-glob`. // If you need to transform files based on their contents, use `getFilesWithPattern`. - targetPaths: [path.join(getPaths().base, 'redwood.toml')], + targetPaths: fg.sync('**/*.{js,jsx,tsx}', { + cwd: getPaths().web.src, + absolute: true, + }), }) setOutput('All done! Run `yarn rw lint --fix` to prettify your code')