grasp-equery
Advanced tools
Comparing version 0.3.2 to 0.4.0
@@ -1,2 +0,2 @@ | ||
// Generated by LiveScript 1.3.1 | ||
// Generated by LiveScript 1.5.0 | ||
(function(){ | ||
@@ -3,0 +3,0 @@ var attrMap, getNodeAtPath; |
@@ -6,3 +6,3 @@ // Generated by LiveScript 1.5.0 | ||
matchNode = require('./match').matchNode; | ||
VERSION = '0.3.2'; | ||
VERSION = '0.4.0'; | ||
query = function(selector, ast){ | ||
@@ -9,0 +9,0 @@ return queryParsed(parse(selector), ast); |
@@ -40,2 +40,5 @@ // Generated by LiveScript 1.5.0 | ||
spec = syntaxFlat[type]; | ||
if (spec == null) { | ||
return; | ||
} | ||
return all(function(it){ | ||
@@ -42,0 +45,0 @@ return eq(targetNode[it], selectorNode[it]); |
@@ -1,9 +0,9 @@ | ||
// Generated by LiveScript 1.4.0 | ||
// Generated by LiveScript 1.5.0 | ||
(function(){ | ||
var acorn, ref$, aliasMap, matchesMap, matchesAliasMap, literalMap, getNodeAtPath, toString$ = {}.toString; | ||
acorn = require('acorn'); | ||
var parser, ref$, aliasMap, matchesMap, matchesAliasMap, literalMap, getNodeAtPath, toString$ = {}.toString; | ||
parser = require('flow-parser'); | ||
ref$ = require('grasp-syntax-javascript'), aliasMap = ref$.aliasMap, matchesMap = ref$.matchesMap, matchesAliasMap = ref$.matchesAliasMap, literalMap = ref$.literalMap; | ||
getNodeAtPath = require('./common').getNodeAtPath; | ||
function parse(selector){ | ||
var attempts, i$, len$, attempt, code, parsedSelector, path, e, selectorBody, extractedSelector, finalSelector, root; | ||
var attempts, i$, len$, attempt, code, parserOptions, parsedSelector, path, e, selectorBody, extractedSelector, finalSelector, root; | ||
attempts = [ | ||
@@ -36,6 +36,6 @@ { | ||
try { | ||
parsedSelector = acorn.parse(code, { | ||
ecmaVersion: 6, | ||
parserOptions = { | ||
sourceType: 'module' | ||
}); | ||
}; | ||
parsedSelector = parser.parse(code, parserOptions); | ||
path = attempt.path; | ||
@@ -66,4 +66,4 @@ break; | ||
var key, node, nodeType, i$, len$, i, n, that; | ||
delete ast.start; | ||
delete ast.end; | ||
delete ast.loc; | ||
delete ast.range; | ||
for (key in ast) { | ||
@@ -70,0 +70,0 @@ node = ast[key]; |
{ | ||
"name": "grasp-equery", | ||
"version": "0.3.2", | ||
"version": "0.4.0", | ||
"author": "George Zahariev <z@georgezahariev.com>", | ||
@@ -34,4 +34,4 @@ "description": "grasp query using example code with wildcards", | ||
"dependencies": { | ||
"flow-parser": "^0.*", | ||
"prelude-ls": "^1.1.2", | ||
"acorn": "^2.6.4", | ||
"grasp-syntax-javascript": "^0.2.0" | ||
@@ -38,0 +38,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
18093
478
+ Addedflow-parser@^0.*
+ Addedflow-parser@0.255.0(transitive)
- Removedacorn@^2.6.4
- Removedacorn@2.7.0(transitive)