@labdigital/commercetools-mock 1.3.1 → 1.3.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.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +1 -1
- package/src/lib/predicateParser.ts +2 -2
- package/src/lib/projectionSearchFilter.ts +2 -2
- package/dist/index.global.js +0 -46293
- package/dist/index.global.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@labdigital/commercetools-mock",
|
|
3
3
|
"author": "Michael van Tellingen",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
|
-
"module": "dist/
|
|
7
|
+
"module": "dist/index.mjs",
|
|
8
8
|
"typings": "dist/index.d.ts",
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
package/src/index.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* See https://docs.commercetools.com/api/predicates/query
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
7
|
+
import perplex from 'perplex'
|
|
8
8
|
import { ITokenPosition, Parser } from 'pratt'
|
|
9
9
|
import { haversineDistance } from './haversine'
|
|
10
10
|
|
|
@@ -104,7 +104,7 @@ const resolveValue = (obj: any, val: TypeSymbol): any => {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
const getLexer = (value: string) =>
|
|
107
|
-
new
|
|
107
|
+
new perplex(value)
|
|
108
108
|
|
|
109
109
|
.token('AND', /and(?![-_a-z0-9]+)/i)
|
|
110
110
|
.token('OR', /or(?![-_a-z0-9]+)/i)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import type { ProductProjection, ProductVariant } from '@commercetools/platform-sdk'
|
|
6
|
-
import
|
|
6
|
+
import perplex from 'perplex'
|
|
7
7
|
import Parser from 'pratt'
|
|
8
8
|
import { nestedLookup } from '../helpers'
|
|
9
9
|
import type { Writable } from '../types'
|
|
@@ -72,7 +72,7 @@ export const parseFilterExpression = (
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
const getLexer = (value: string) =>
|
|
75
|
-
new
|
|
75
|
+
new perplex(value)
|
|
76
76
|
.token('MISSING', /missing(?![-_a-z0-9]+)/i)
|
|
77
77
|
.token('EXISTS', /exists(?![-_a-z0-9]+)/i)
|
|
78
78
|
.token('RANGE', /range(?![-_a-z0-9]+)/i)
|