Comparing version 0.6.0-beta to 0.6.0
// Generated by LiveScript 1.5.0 | ||
(function(){ | ||
var path, acorn, squery, equery, async, minimatch, ref$, min, sortWith, lines, chars, split, join, map, Obj, format, formatResult, formatName, formatCount, replace, parseOptions, generateHelp, generateHelpForOption, help, _console, version, run, getQueryEngine, slice$ = [].slice, toString$ = {}.toString; | ||
var path, squery, equery, async, minimatch, flowParser, ref$, min, sortWith, lines, chars, split, join, map, Obj, format, formatResult, formatName, formatCount, replace, parseOptions, generateHelp, generateHelpForOption, help, _console, version, run, getQueryEngine, slice$ = [].slice, toString$ = {}.toString; | ||
path = require('path'); | ||
acorn = require('acorn'); | ||
squery = require('grasp-squery'); | ||
@@ -10,2 +9,3 @@ equery = require('grasp-equery'); | ||
minimatch = require('minimatch'); | ||
flowParser = require('flow-parser'); | ||
ref$ = require('prelude-ls'), min = ref$.min, sortWith = ref$.sortWith, lines = ref$.lines, chars = ref$.chars, split = ref$.split, join = ref$.join, map = ref$.map, Obj = ref$.Obj; | ||
@@ -78,4 +78,4 @@ format = require('./format'), formatResult = format.formatResult, formatName = format.formatName, formatCount = format.formatCount; | ||
switch (options.parser[0]) { | ||
case 'acorn': | ||
return [acorn, options.parser[1]]; | ||
case 'flow-parser': | ||
return [flowParser, options.parser[1]]; | ||
default: | ||
@@ -82,0 +82,0 @@ return [require(options.parser[0]), options.parser[1]]; |
@@ -19,3 +19,4 @@ // Generated by LiveScript 1.5.0 | ||
return function(arg$, replacementArg){ | ||
var origResults, ref$, filters, selector, that, e, results, rawPrepend, rawAppend, join, textOperations, filterName, argsStr, args, ref1$, pre, post, i$, len$, arg, result, n, len, rawResults, res$, outputString, this$ = this; | ||
var noFilters, origResults, ref$, filters, selector, that, e, results, rawPrepend, rawAppend, join, textOperations, filterName, argsStr, args, ref1$, pre, post, i$, len$, arg, result, n, len, rawResults, res$, outputString, this$ = this; | ||
noFilters = false; | ||
if (/^\s*\|\s+/.test(replacementArg)) { | ||
@@ -33,7 +34,10 @@ origResults = [node]; | ||
e = e$; | ||
origResults = queryEngine.query(replacementArg, node); | ||
filters = []; | ||
noFilters = true; | ||
} | ||
} | ||
} | ||
if (noFilters || !origResults.length) { | ||
origResults = queryEngine.query(replacementArg, node); | ||
filters = []; | ||
} | ||
if (origResults.length) { | ||
@@ -291,3 +295,4 @@ results = origResults; | ||
replaceLines[replaceLines.length - 1] = replaceLast + "" + endContext; | ||
inputLines.splice.apply(inputLines, [startLineNum, numberOfLines].concat(slice$.call(replaceLines))); | ||
inputLines.splice(startLineNum, numberOfLines); | ||
inputLines = inputLines.slice(0, startLineNum).concat(replaceLines).concat(inputLines.slice(startLineNum)); | ||
lineOffset += replaceLines.length - numberOfLines; | ||
@@ -294,0 +299,0 @@ colOffset += endLen - endCol; |
{ | ||
"name": "grasp", | ||
"author": "George Zahariev", | ||
"version": "0.6.0-beta", | ||
"version": "0.6.0", | ||
"homepage": "http://graspjs.com", | ||
@@ -44,4 +44,4 @@ "description": "JavaScript structural search, replace, and refactor", | ||
"optionator": "^0.8.0", | ||
"grasp-squery": "^0.3.0", | ||
"grasp-equery": "^0.3.1", | ||
"grasp-squery": "^0.4.0", | ||
"grasp-equery": "^0.4.0", | ||
"grasp-syntax-javascript": "^0.2.0", | ||
@@ -48,0 +48,0 @@ "levn": "^0.3.0", |
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
54647
1346
+ Addedflow-parser@0.254.2(transitive)
+ Addedgrasp-equery@0.4.0(transitive)
+ Addedgrasp-squery@0.4.0(transitive)
- Removedacorn@2.7.0(transitive)
- Removedflow-parser@0.254.1(transitive)
- Removedgrasp-equery@0.3.2(transitive)
- Removedgrasp-squery@0.3.1(transitive)
Updatedgrasp-equery@^0.4.0
Updatedgrasp-squery@^0.4.0