@aws-lambda-powertools/jmespath 2.28.1 → 2.29.0

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/README.md CHANGED
@@ -199,6 +199,7 @@ The following companies, among others, use Powertools:
199
199
  - [Banxware](https://www.banxware.com)
200
200
  - [Caylent](https://caylent.com/)
201
201
  - [Certible](https://www.certible.com/)
202
+ - [Codeac](https://www.codeac.io/)
202
203
  - [Elva](https://elva-group.com)
203
204
  - [Flyweight](https://flyweight.io/)
204
205
  - [FraudFalcon](https://fraudfalcon.app)
@@ -1 +1 @@
1
- {"version":3,"file":"Parser.d.ts","sourceRoot":"","sources":["../../src/Parser.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD;;;;;;;;;;;;GAYG;AACH,cAAM,MAAM;;gBAkBS,SAAS,SAAI;IAIhC;;;;;;;;OAQG;IACI,KAAK,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY;IAc9C;;OAEG;IACI,UAAU,IAAI,IAAI;CA2uB1B;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"Parser.d.ts","sourceRoot":"","sources":["../../src/Parser.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD;;;;;;;;;;;;GAYG;AACH,cAAM,MAAM;;gBAkBS,SAAS,SAAI;IAIhC;;;;;;;;OAQG;IACI,KAAK,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY;IAc9C;;OAEG;IACI,UAAU,IAAI,IAAI;CA4uB1B;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
package/lib/cjs/Parser.js CHANGED
@@ -585,6 +585,7 @@ class Parser {
585
585
  const value = this.#expression(0);
586
586
  const node = (0, ast_js_1.keyValPair)(keyName, value);
587
587
  pairs.push(node);
588
+ /* v8 ignore else -- @preserve */
588
589
  if (this.#currentToken() === 'comma') {
589
590
  this.#match('comma');
590
591
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TreeInterpreter.d.ts","sourceRoot":"","sources":["../../src/TreeInterpreter.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAG3E;;;;;;;;GAQG;AACH,cAAM,eAAe;;IAGnB;;OAEG;gBACgB,OAAO,CAAC,EAAE,sBAAsB;IASnD;;;;;;;OAOG;IACI,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI;CA0b/D;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"TreeInterpreter.d.ts","sourceRoot":"","sources":["../../src/TreeInterpreter.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAG3E;;;;;;;;GAQG;AACH,cAAM,eAAe;;IAGnB;;OAEG;gBACgB,OAAO,CAAC,EAAE,sBAAsB;IASnD;;;;;;;OAOG;IACI,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI;CA6b/D;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -122,6 +122,7 @@ class TreeInterpreter {
122
122
  if (comparator === 'ne') {
123
123
  return !(0, typeutils_1.isStrictEqual)(left, right);
124
124
  }
125
+ /* v8 ignore else -- @preserve */
125
126
  if (typeof left === 'number' && typeof right === 'number') {
126
127
  // Ordering operators only work on numbers. Evaluating them on other
127
128
  // types will return null.
@@ -191,6 +192,7 @@ class TreeInterpreter {
191
192
  return this.#functions[funcName](args);
192
193
  }
193
194
  catch (error) {
195
+ /* v8 ignore else -- @preserve */
194
196
  if (error instanceof errors_js_1.JMESPathTypeError ||
195
197
  error instanceof errors_js_1.VariadicArityError ||
196
198
  error instanceof errors_js_1.ArityError) {
@@ -329,6 +331,7 @@ class TreeInterpreter {
329
331
  }
330
332
  const collected = {};
331
333
  for (const child of node.children) {
334
+ /* v8 ignore else -- @preserve */
332
335
  if (typeof child.value === 'string') {
333
336
  collected[child.value] = this.visit(child, value);
334
337
  }
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAUA;;;;;;;;;GASG;AACH,QAAA,MAAM,QAAQ,GAAI,OAAO,OAAO,KAAG,OAKlC,CAAC;AA6BF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,QAAA,MAAM,UAAU,GAAI,CAAC,EAAE,8BAKpB;IACD,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,KAAG,CAAC,EAAE,GAAG,IA0BT,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,UAAU,GACd,MAAM,OAAO,EAAE,EACf,gBAAgB,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EACpC,WAAW,OAAO,KACjB,IAcF,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,SAAS,GACb,MAAM,OAAO,EAAE,EACf,gBAAgB,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,KACnC,IAKF,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,iBAAiB,GAAI,KAAK,OAAO,EAAE,cAAc,KAAK,CAAC,MAAM,CAAC,KAAG,IAMtE,CAAC;AA6IF,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAUA;;;;;;;;;GASG;AACH,QAAA,MAAM,QAAQ,GAAI,OAAO,OAAO,KAAG,OAKlC,CAAC;AA6BF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,QAAA,MAAM,UAAU,GAAI,CAAC,EAAE,8BAKpB;IACD,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,KAAG,CAAC,EAAE,GAAG,IA0BT,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,UAAU,GACd,MAAM,OAAO,EAAE,EACf,gBAAgB,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EACpC,WAAW,OAAO,KACjB,IAcF,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,SAAS,GACb,MAAM,OAAO,EAAE,EACf,gBAAgB,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,KACnC,IAKF,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,iBAAiB,GAAI,KAAK,OAAO,EAAE,cAAc,KAAK,CAAC,MAAM,CAAC,KAAG,IAMtE,CAAC;AA8IF,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC"}
package/lib/cjs/utils.js CHANGED
@@ -195,6 +195,7 @@ const checkIfArgumentTypeIsValid = (arg, type, index, argumentSpec) => {
195
195
  checkExpressionType(arg, argumentSpec, hasMoreTypesToCheck);
196
196
  return true;
197
197
  }
198
+ /* v8 ignore else -- @preserve */
198
199
  if (['string', 'number', 'boolean'].includes(type)) {
199
200
  typeCheckType(arg, type, argumentSpec, hasMoreTypesToCheck);
200
201
  if (typeof arg === type)
@@ -1 +1 @@
1
- {"version":3,"file":"Parser.d.ts","sourceRoot":"","sources":["../../src/Parser.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD;;;;;;;;;;;;GAYG;AACH,cAAM,MAAM;;gBAkBS,SAAS,SAAI;IAIhC;;;;;;;;OAQG;IACI,KAAK,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY;IAc9C;;OAEG;IACI,UAAU,IAAI,IAAI;CA2uB1B;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"Parser.d.ts","sourceRoot":"","sources":["../../src/Parser.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD;;;;;;;;;;;;GAYG;AACH,cAAM,MAAM;;gBAkBS,SAAS,SAAI;IAIhC;;;;;;;;OAQG;IACI,KAAK,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY;IAc9C;;OAEG;IACI,UAAU,IAAI,IAAI;CA4uB1B;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
package/lib/esm/Parser.js CHANGED
@@ -582,6 +582,7 @@ class Parser {
582
582
  const value = this.#expression(0);
583
583
  const node = keyValPair(keyName, value);
584
584
  pairs.push(node);
585
+ /* v8 ignore else -- @preserve */
585
586
  if (this.#currentToken() === 'comma') {
586
587
  this.#match('comma');
587
588
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TreeInterpreter.d.ts","sourceRoot":"","sources":["../../src/TreeInterpreter.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAG3E;;;;;;;;GAQG;AACH,cAAM,eAAe;;IAGnB;;OAEG;gBACgB,OAAO,CAAC,EAAE,sBAAsB;IASnD;;;;;;;OAOG;IACI,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI;CA0b/D;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"TreeInterpreter.d.ts","sourceRoot":"","sources":["../../src/TreeInterpreter.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAG3E;;;;;;;;GAQG;AACH,cAAM,eAAe;;IAGnB;;OAEG;gBACgB,OAAO,CAAC,EAAE,sBAAsB;IASnD;;;;;;;OAOG;IACI,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI;CA6b/D;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -119,6 +119,7 @@ class TreeInterpreter {
119
119
  if (comparator === 'ne') {
120
120
  return !isStrictEqual(left, right);
121
121
  }
122
+ /* v8 ignore else -- @preserve */
122
123
  if (typeof left === 'number' && typeof right === 'number') {
123
124
  // Ordering operators only work on numbers. Evaluating them on other
124
125
  // types will return null.
@@ -188,6 +189,7 @@ class TreeInterpreter {
188
189
  return this.#functions[funcName](args);
189
190
  }
190
191
  catch (error) {
192
+ /* v8 ignore else -- @preserve */
191
193
  if (error instanceof JMESPathTypeError ||
192
194
  error instanceof VariadicArityError ||
193
195
  error instanceof ArityError) {
@@ -326,6 +328,7 @@ class TreeInterpreter {
326
328
  }
327
329
  const collected = {};
328
330
  for (const child of node.children) {
331
+ /* v8 ignore else -- @preserve */
329
332
  if (typeof child.value === 'string') {
330
333
  collected[child.value] = this.visit(child, value);
331
334
  }
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAUA;;;;;;;;;GASG;AACH,QAAA,MAAM,QAAQ,GAAI,OAAO,OAAO,KAAG,OAKlC,CAAC;AA6BF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,QAAA,MAAM,UAAU,GAAI,CAAC,EAAE,8BAKpB;IACD,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM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,SAAS,GACb,MAAM,OAAO,EAAE,EACf,gBAAgB,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,KACnC,IAKF,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,iBAAiB,GAAI,KAAK,OAAO,EAAE,cAAc,KAAK,CAAC,MAAM,CAAC,KAAG,IAMtE,CAAC;AA8IF,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC"}
package/lib/esm/utils.js CHANGED
@@ -187,6 +187,7 @@ const checkIfArgumentTypeIsValid = (arg, type, index, argumentSpec) => {
187
187
  checkExpressionType(arg, argumentSpec, hasMoreTypesToCheck);
188
188
  return true;
189
189
  }
190
+ /* v8 ignore else -- @preserve */
190
191
  if (['string', 'number', 'boolean'].includes(type)) {
191
192
  typeCheckType(arg, type, argumentSpec, hasMoreTypesToCheck);
192
193
  if (typeof arg === type)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-lambda-powertools/jmespath",
3
- "version": "2.28.1",
3
+ "version": "2.29.0",
4
4
  "description": "A type safe and modern jmespath module to parse and extract data from JSON documents using JMESPath",
5
5
  "author": {
6
6
  "name": "Amazon Web Services",
@@ -25,7 +25,7 @@
25
25
  "nodejs"
26
26
  ],
27
27
  "dependencies": {
28
- "@aws-lambda-powertools/commons": "2.28.1"
28
+ "@aws-lambda-powertools/commons": "2.29.0"
29
29
  },
30
30
  "main": "./lib/cjs/index.js",
31
31
  "types": "./lib/cjs/index.d.ts",