jscodeshift
Advanced tools
Comparing version 0.6.2 to 0.6.3
@@ -7,2 +7,11 @@ # Changelog | ||
## [0.6.3] 2019-01-18 | ||
### Fixed | ||
- Don't throw an error when jscodeshift processes an empty set of files (#295, | ||
@skovhus). | ||
- `renameTo` should not rename class properties (#296, @henryqdineen). | ||
- Custom/unknown CLI parameters are parsed as JSON, just like nomnom used to | ||
do. | ||
## [0.6.2] 2018-12-05 | ||
@@ -9,0 +18,0 @@ ### Changed |
@@ -174,2 +174,9 @@ /* | ||
list: isList, | ||
process(value) { | ||
// Try to parse values as JSON to be compatible with nomnom | ||
try { | ||
return JSON.parse(value); | ||
} catch(_e) {} | ||
return value; | ||
}, | ||
}; | ||
@@ -199,3 +206,3 @@ | ||
} else { | ||
if (value === null && i < args.length - 1 && !isOption(args[i+1])) { | ||
if (value === null && i < args.length - 1 && !isOption(args[i+1])) { | ||
// consume next value | ||
@@ -245,3 +252,3 @@ value = args[i+1]; | ||
/** | ||
* `options` is an object of object. Each option can have the following | ||
* `options` is an object of objects. Each option can have the following | ||
* properties: | ||
@@ -248,0 +255,0 @@ * |
@@ -118,2 +118,11 @@ /* | ||
if ( | ||
types.ClassProperty.check(parent) && | ||
parent.key === path.node && | ||
!parent.computed | ||
) { | ||
// class A { oldName = 3 } | ||
return false; | ||
} | ||
if ( | ||
types.JSXAttribute.check(parent) && | ||
@@ -120,0 +129,0 @@ parent.name === path.node && |
@@ -221,3 +221,3 @@ /* | ||
process.stdout.write('No files selected, nothing to do. \n'); | ||
return; | ||
return []; | ||
} | ||
@@ -224,0 +224,0 @@ |
{ | ||
"name": "jscodeshift", | ||
"version": "0.6.2", | ||
"version": "0.6.3", | ||
"description": "A toolkit for JavaScript codemods", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -174,2 +174,9 @@ /* | ||
list: isList, | ||
process(value) { | ||
// Try to parse values as JSON to be compatible with nomnom | ||
try { | ||
return JSON.parse(value); | ||
} catch(_e) {} | ||
return value; | ||
}, | ||
}; | ||
@@ -199,3 +206,3 @@ | ||
} else { | ||
if (value === null && i < args.length - 1 && !isOption(args[i+1])) { | ||
if (value === null && i < args.length - 1 && !isOption(args[i+1])) { | ||
// consume next value | ||
@@ -245,3 +252,3 @@ value = args[i+1]; | ||
/** | ||
* `options` is an object of object. Each option can have the following | ||
* `options` is an object of objects. Each option can have the following | ||
* properties: | ||
@@ -248,0 +255,0 @@ * |
@@ -118,2 +118,11 @@ /* | ||
if ( | ||
types.ClassProperty.check(parent) && | ||
parent.key === path.node && | ||
!parent.computed | ||
) { | ||
// class A { oldName = 3 } | ||
return false; | ||
} | ||
if ( | ||
types.JSXAttribute.check(parent) && | ||
@@ -120,0 +129,0 @@ parent.name === path.node && |
@@ -221,3 +221,3 @@ /* | ||
process.stdout.write('No files selected, nothing to do. \n'); | ||
return; | ||
return []; | ||
} | ||
@@ -224,0 +224,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1342593
96
5512