@labdigital/commercetools-mock 2.53.1 → 2.53.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/predicateParser.test.ts +39 -0
- package/src/lib/predicateParser.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -4741,6 +4741,7 @@ const generateMatchFunc = (predicate) => {
|
|
|
4741
4741
|
}
|
|
4742
4742
|
}).led("IN", 20, ({ left, bp }) => {
|
|
4743
4743
|
const expr = parser.parse({ terminals: [bp - 1] });
|
|
4744
|
+
lexer.expect(")");
|
|
4744
4745
|
return (obj, vars) => {
|
|
4745
4746
|
let symbols = expr;
|
|
4746
4747
|
if (!Array.isArray(symbols)) symbols = [expr];
|
|
@@ -4762,6 +4763,7 @@ const generateMatchFunc = (predicate) => {
|
|
|
4762
4763
|
if (type.match !== "circle") throw new PredicateError(`Invalid input '${type.match}', expected circle`);
|
|
4763
4764
|
lexer.expect("(");
|
|
4764
4765
|
const expr = parser.parse({ terminals: [")"] });
|
|
4766
|
+
lexer.expect(")");
|
|
4765
4767
|
return (obj, vars) => {
|
|
4766
4768
|
const value = resolveValue(obj, left);
|
|
4767
4769
|
if (!value) return false;
|