Comparing version 0.0.15 to 0.0.16
@@ -12,5 +12,4 @@ #!/usr/bin/env node | ||
var estraverse = require("estraverse"); | ||
var chalk = require("chalk"); | ||
require("colors"); | ||
var jsstana = require("../lib/jsstana.js"); | ||
@@ -89,12 +88,12 @@ | ||
case 1: | ||
part = part.red; | ||
part = chalk.red(part); | ||
break; | ||
case 2: | ||
part = part.yellow; | ||
part = chalk.yellow(part); | ||
break; | ||
case 3: | ||
part = part.green; | ||
part = chalk.green(part); | ||
break; | ||
default: | ||
part = part.blue; | ||
part = chalk.blue(part); | ||
} | ||
@@ -140,3 +139,3 @@ | ||
} catch (e) { | ||
console.error("Error: ".red + "invalid pattern -- " + e.message); | ||
console.error(chalk.red("Error: ") + "invalid pattern -- " + e.message); | ||
return 1; | ||
@@ -149,3 +148,3 @@ } | ||
if (!fs.existsSync(absfile)) { | ||
console.log("Error: ".red + " file not exists -- " + file); | ||
console.log(chalk.red("Error: ") + " file not exists -- " + file); | ||
return; | ||
@@ -176,3 +175,3 @@ } | ||
} catch (e) { | ||
console.log("Error: ".red + "cannot parse " + relpath.bold + " -- " + e.message); | ||
console.log(chalk.red("Error: ") + "cannot parse " + relpath.bold + " -- " + e.message); | ||
} | ||
@@ -229,3 +228,3 @@ var lines; | ||
// print match | ||
console.log(prefix.bold + " " + colorizeLine(line, steps)); | ||
console.log(chalk.bold(prefix) + " " + colorizeLine(line, steps)); | ||
} | ||
@@ -232,0 +231,0 @@ }, |
## Release History | ||
- 0.0.16 Updates | ||
- Dependencies updated | ||
- `fn-expr` matches function expressions | ||
- 0.0.15 Updates | ||
@@ -4,0 +7,0 @@ - Dependencies updated |
@@ -88,2 +88,3 @@ /** | ||
_.extend(builtInMatchers, require("./matchers/ternary.js")); | ||
_.extend(builtInMatchers, require("./matchers/fn.js")); | ||
@@ -247,2 +248,3 @@ function unknownNodeType(rator) { | ||
/// include matchers/ternary.js | ||
/// include matchers/fn.js | ||
@@ -249,0 +251,0 @@ /** |
{ | ||
"name": "jsstana", | ||
"description": "s-expression match patterns for Mozilla Parser AST", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"homepage": "https://github.com/phadej/jsstana", | ||
@@ -32,11 +32,7 @@ "author": { | ||
"scripts": { | ||
"test": "grunt", | ||
"blanket": { | ||
"pattern": "lib", | ||
"data-cover-never": "node_modules" | ||
} | ||
"test": "grunt && npm run-script check-coverage", | ||
"check-coverage": "istanbul cover _mocha test && istanbul check-coverage --statements 100 --branches 100 --functions 100 --lines 100" | ||
}, | ||
"devDependencies": { | ||
"grunt-contrib-jshint": "~0.8.0", | ||
"grunt-contrib-nodeunit": "~0.2.0", | ||
"grunt-contrib-watch": "~0.5.3", | ||
@@ -46,3 +42,3 @@ "grunt-simple-mocha": "~0.4.0", | ||
"grunt": "~0.4.1", | ||
"escodegen": "~1.0.0" | ||
"escodegen": "~1.2.0" | ||
}, | ||
@@ -60,3 +56,3 @@ "keywords": [ | ||
"packrattle": "~2.1.0", | ||
"underscore": "~1.5.2", | ||
"underscore": "~1.6.0", | ||
"walkdir": "0.0.7", | ||
@@ -66,5 +62,5 @@ "optimist": "~0.6.0", | ||
"estraverse": "~1.5.0", | ||
"colors": "~0.6.2", | ||
"levenshtein": "~1.0.2" | ||
"levenshtein": "~1.0.2", | ||
"chalk": "~0.4.0" | ||
} | ||
} |
@@ -165,2 +165,6 @@ # jsstana | ||
#### (fn-expr) | ||
Matches `FunctionExpression`. | ||
## API | ||
@@ -219,2 +223,5 @@ | ||
- 0.0.16 Updates | ||
- Dependencies updated | ||
- `fn-expr` matches function expressions | ||
- 0.0.15 Updates | ||
@@ -221,0 +228,0 @@ - Dependencies updated |
Sorry, the diff of this file is not supported yet
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
613503
6
55
11635
294
+ Addedchalk@~0.4.0
+ Addedansi-styles@1.0.0(transitive)
+ Addedchalk@0.4.0(transitive)
+ Addedhas-color@0.1.7(transitive)
+ Addedstrip-ansi@0.1.1(transitive)
+ Addedunderscore@1.6.0(transitive)
- Removedcolors@~0.6.2
- Removedcolors@0.6.2(transitive)
- Removedunderscore@1.5.2(transitive)
Updatedunderscore@~1.6.0