@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/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.1",
4
+ "version": "1.3.2",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
7
- "module": "dist/commercetools--mock.esm.js",
7
+ "module": "dist/index.mjs",
8
8
  "typings": "dist/index.d.ts",
9
9
  "files": [
10
10
  "dist",
package/src/index.ts CHANGED
@@ -4,5 +4,5 @@ import { getBaseResourceProperties } from './helpers'
4
4
  export {
5
5
  CommercetoolsMock,
6
6
  getBaseResourceProperties,
7
- CommercetoolsMockOptions,
7
+ type CommercetoolsMockOptions,
8
8
  }
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * See https://docs.commercetools.com/api/predicates/query
6
6
  */
7
- import Lexer from 'perplex'
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 Lexer<string>(value)
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 Lexer from 'perplex'
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 Lexer<string>(value)
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)