@balena/abstract-sql-compiler
Advanced tools
Comparing version 7.4.0 to 7.4.1-top-level-node-888791a9b281d5fc91ddeb8876f024b1397718e7
@@ -7,2 +7,6 @@ # Change Log | ||
## 7.4.1 - 2020-12-18 | ||
* Fix `containsNode` when that node type is at the top level [Pagan Gazzard] | ||
## 7.4.0 - 2020-12-18 | ||
@@ -9,0 +13,0 @@ |
@@ -73,10 +73,9 @@ "use strict"; | ||
const containsNode = (n, checkNodeTypeFn) => { | ||
if (checkNodeTypeFn(n)) { | ||
return true; | ||
} | ||
for (const p of n) { | ||
if (Array.isArray(p)) { | ||
if (checkNodeTypeFn(p)) { | ||
return true; | ||
} | ||
else if (containsNode(p, checkNodeTypeFn)) { | ||
return true; | ||
} | ||
if (Array.isArray(p) && | ||
containsNode(p, checkNodeTypeFn)) { | ||
return true; | ||
} | ||
@@ -83,0 +82,0 @@ } |
{ | ||
"name": "@balena/abstract-sql-compiler", | ||
"version": "7.4.0", | ||
"version": "7.4.1-top-level-node-888791a9b281d5fc91ddeb8876f024b1397718e7", | ||
"description": "A translator for abstract sql into sql.", | ||
@@ -5,0 +5,0 @@ "main": "out/AbstractSQLCompiler.js", |
@@ -429,9 +429,11 @@ export const enum Engines { | ||
): boolean => { | ||
if (checkNodeTypeFn(n)) { | ||
return true; | ||
} | ||
for (const p of n) { | ||
if (Array.isArray(p)) { | ||
if (checkNodeTypeFn(p)) { | ||
return true; | ||
} else if (containsNode(p as AbstractSqlType[], checkNodeTypeFn)) { | ||
return true; | ||
} | ||
if ( | ||
Array.isArray(p) && | ||
containsNode(p as AbstractSqlType[], checkNodeTypeFn) | ||
) { | ||
return true; | ||
} | ||
@@ -438,0 +440,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
560857
12276
2