Skip to content

Commit d894691

Browse files
committed
feat(bin): change verbose level to 0 by default
1 parent cc4f1dd commit d894691

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

bin/codemod.js

+6-9
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,12 @@ const TRANSFORMERS = [
3838
if (pathsArgs.length > 0) {
3939
if (pathsArgs.some((path) => path.includes('*'))) {
4040
try {
41-
// expand with globstar
4241
paths = await glob(pathsArgs, { ignore: 'node_modules/**' })
4342
} catch (e) {
4443
console.log(e)
4544
process.exit(1)
4645
}
4746
} else {
48-
// user provided multiple paths or a glob pattern expanded by its shell...
49-
// paths = pathsArgs.map(p => path.resolve(p))
5047
paths = pathsArgs
5148
}
5249
}
@@ -58,12 +55,12 @@ const TRANSFORMERS = [
5855
return value
5956
}
6057

61-
if (printOptions) options.printOptions = parsePrintOptions(printOptions)
62-
if (!options.verbose && !(options.verbose === 0)) options.verbose = 1
63-
// babel: apply babeljs to the transform file
64-
// yargs parser automatically parses "--no-<option>"" flags to `{ <option>: false }`
65-
if (!options.babel && options.babel !== false) options.babel = true
66-
// other options can be left undefined and will be treated as if set to jscodeshift defaults
58+
if (printOptions) {
59+
options.printOptions = parsePrintOptions(printOptions)
60+
}
61+
if (!options.babel && options.babel !== false) {
62+
options.babel = true
63+
}
6764

6865
try {
6966
await jscodeshift(transformerPath, paths, options)

0 commit comments

Comments
 (0)