You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@aws-lambda-powertools/jmespath

Package Overview
Dependencies
Maintainers
3
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-lambda-powertools/jmespath - npm Package Compare versions

Comparing version

to
2.24.0

16

./lib/cjs/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnknownFunctionError = exports.EmptyExpressionError = exports.JMESPathTypeError = exports.VariadicArityError = exports.ArityError = exports.IncompleteExpressionError = exports.ParseError = exports.LexerError = exports.JMESPathError = exports.search = void 0;
var search_js_1 = require("./search.js");
Object.defineProperty(exports, "search", { enumerable: true, get: function () { return search_js_1.search; } });
exports.search = exports.VariadicArityError = exports.UnknownFunctionError = exports.ParseError = exports.LexerError = exports.JMESPathTypeError = exports.JMESPathError = exports.IncompleteExpressionError = exports.EmptyExpressionError = exports.ArityError = void 0;
var errors_js_1 = require("./errors.js");
Object.defineProperty(exports, "ArityError", { enumerable: true, get: function () { return errors_js_1.ArityError; } });
Object.defineProperty(exports, "EmptyExpressionError", { enumerable: true, get: function () { return errors_js_1.EmptyExpressionError; } });
Object.defineProperty(exports, "IncompleteExpressionError", { enumerable: true, get: function () { return errors_js_1.IncompleteExpressionError; } });
Object.defineProperty(exports, "JMESPathError", { enumerable: true, get: function () { return errors_js_1.JMESPathError; } });
Object.defineProperty(exports, "JMESPathTypeError", { enumerable: true, get: function () { return errors_js_1.JMESPathTypeError; } });
Object.defineProperty(exports, "LexerError", { enumerable: true, get: function () { return errors_js_1.LexerError; } });
Object.defineProperty(exports, "ParseError", { enumerable: true, get: function () { return errors_js_1.ParseError; } });
Object.defineProperty(exports, "IncompleteExpressionError", { enumerable: true, get: function () { return errors_js_1.IncompleteExpressionError; } });
Object.defineProperty(exports, "ArityError", { enumerable: true, get: function () { return errors_js_1.ArityError; } });
Object.defineProperty(exports, "UnknownFunctionError", { enumerable: true, get: function () { return errors_js_1.UnknownFunctionError; } });
Object.defineProperty(exports, "VariadicArityError", { enumerable: true, get: function () { return errors_js_1.VariadicArityError; } });
Object.defineProperty(exports, "JMESPathTypeError", { enumerable: true, get: function () { return errors_js_1.JMESPathTypeError; } });
Object.defineProperty(exports, "EmptyExpressionError", { enumerable: true, get: function () { return errors_js_1.EmptyExpressionError; } });
Object.defineProperty(exports, "UnknownFunctionError", { enumerable: true, get: function () { return errors_js_1.UnknownFunctionError; } });
var search_js_1 = require("./search.js");
Object.defineProperty(exports, "search", { enumerable: true, get: function () { return search_js_1.search; } });

@@ -0,3 +1,3 @@

export { ArityError, EmptyExpressionError, IncompleteExpressionError, JMESPathError, JMESPathTypeError, LexerError, ParseError, UnknownFunctionError, VariadicArityError, } from './errors.js';
export { search } from './search.js';
export { JMESPathError, LexerError, ParseError, IncompleteExpressionError, ArityError, VariadicArityError, JMESPathTypeError, EmptyExpressionError, UnknownFunctionError, } from './errors.js';
//# sourceMappingURL=index.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnknownFunctionError = exports.EmptyExpressionError = exports.JMESPathTypeError = exports.VariadicArityError = exports.ArityError = exports.IncompleteExpressionError = exports.ParseError = exports.LexerError = exports.JMESPathError = exports.search = void 0;
var search_js_1 = require("./search.js");
Object.defineProperty(exports, "search", { enumerable: true, get: function () { return search_js_1.search; } });
exports.search = exports.VariadicArityError = exports.UnknownFunctionError = exports.ParseError = exports.LexerError = exports.JMESPathTypeError = exports.JMESPathError = exports.IncompleteExpressionError = exports.EmptyExpressionError = exports.ArityError = void 0;
var errors_js_1 = require("./errors.js");
Object.defineProperty(exports, "ArityError", { enumerable: true, get: function () { return errors_js_1.ArityError; } });
Object.defineProperty(exports, "EmptyExpressionError", { enumerable: true, get: function () { return errors_js_1.EmptyExpressionError; } });
Object.defineProperty(exports, "IncompleteExpressionError", { enumerable: true, get: function () { return errors_js_1.IncompleteExpressionError; } });
Object.defineProperty(exports, "JMESPathError", { enumerable: true, get: function () { return errors_js_1.JMESPathError; } });
Object.defineProperty(exports, "JMESPathTypeError", { enumerable: true, get: function () { return errors_js_1.JMESPathTypeError; } });
Object.defineProperty(exports, "LexerError", { enumerable: true, get: function () { return errors_js_1.LexerError; } });
Object.defineProperty(exports, "ParseError", { enumerable: true, get: function () { return errors_js_1.ParseError; } });
Object.defineProperty(exports, "IncompleteExpressionError", { enumerable: true, get: function () { return errors_js_1.IncompleteExpressionError; } });
Object.defineProperty(exports, "ArityError", { enumerable: true, get: function () { return errors_js_1.ArityError; } });
Object.defineProperty(exports, "UnknownFunctionError", { enumerable: true, get: function () { return errors_js_1.UnknownFunctionError; } });
Object.defineProperty(exports, "VariadicArityError", { enumerable: true, get: function () { return errors_js_1.VariadicArityError; } });
Object.defineProperty(exports, "JMESPathTypeError", { enumerable: true, get: function () { return errors_js_1.JMESPathTypeError; } });
Object.defineProperty(exports, "EmptyExpressionError", { enumerable: true, get: function () { return errors_js_1.EmptyExpressionError; } });
Object.defineProperty(exports, "UnknownFunctionError", { enumerable: true, get: function () { return errors_js_1.UnknownFunctionError; } });
var search_js_1 = require("./search.js");
Object.defineProperty(exports, "search", { enumerable: true, get: function () { return search_js_1.search; } });

@@ -270,3 +270,3 @@ "use strict";

}
catch (error) {
catch {
throw new errors_js_1.LexerError(start, lexeme);

@@ -273,0 +273,0 @@ }

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ParsedResult = void 0;
const errors_js_1 = require("./errors.js");
const TreeInterpreter_js_1 = require("./TreeInterpreter.js");
const errors_js_1 = require("./errors.js");
class ParsedResult {

@@ -7,0 +7,0 @@ expression;

@@ -5,7 +5,7 @@ "use strict";

const node_crypto_1 = require("node:crypto");
const Lexer_js_1 = require("./Lexer.js");
const ParsedResult_js_1 = require("./ParsedResult.js");
const ast_js_1 = require("./ast.js");
const constants_js_1 = require("./constants.js");
const errors_js_1 = require("./errors.js");
const Lexer_js_1 = require("./Lexer.js");
const ParsedResult_js_1 = require("./ParsedResult.js");
/**

@@ -12,0 +12,0 @@ * Top down operaotr precedence parser for JMESPath.

@@ -6,4 +6,4 @@ "use strict";

const Expression_js_1 = require("./Expression.js");
const errors_js_1 = require("./errors.js");
const Functions_js_1 = require("./Functions.js");
const errors_js_1 = require("./errors.js");
const utils_js_1 = require("./utils.js");

@@ -10,0 +10,0 @@ /**

import type { JSONArray, JSONValue } from '@aws-lambda-powertools/commons/types';
import type { BINDING_POWER } from './constants.js';
import type { Functions } from './Functions.js';
import type { BINDING_POWER } from './constants.js';
/**

@@ -5,0 +5,0 @@ * A token in the JMESPath AST.

@@ -200,3 +200,2 @@ "use strict";

typeCheckType(arg, type, argumentSpec, hasMoreTypesToCheck);
// biome-ignore lint/suspicious/useValidTypeof: we know that `type` is one of 'string', 'number', or 'boolean' because we checked for that above
if (typeof arg === type)

@@ -220,3 +219,2 @@ return true;

const typeCheckType = (arg, type, argumentSpec, hasMoreTypesToCheck) => {
// biome-ignore lint/suspicious/useValidTypeof: we know that `type` is one of 'string', 'number', or 'boolean' because we checked before calling this function
if (typeof arg !== type && !hasMoreTypesToCheck) {

@@ -223,0 +221,0 @@ throw new errors_js_1.JMESPathTypeError({

@@ -0,3 +1,3 @@

export { ArityError, EmptyExpressionError, IncompleteExpressionError, JMESPathError, JMESPathTypeError, LexerError, ParseError, UnknownFunctionError, VariadicArityError, } from './errors.js';
export { search } from './search.js';
export { JMESPathError, LexerError, ParseError, IncompleteExpressionError, ArityError, VariadicArityError, JMESPathTypeError, EmptyExpressionError, UnknownFunctionError, } from './errors.js';
//# sourceMappingURL=index.d.ts.map

@@ -0,2 +1,2 @@

export { ArityError, EmptyExpressionError, IncompleteExpressionError, JMESPathError, JMESPathTypeError, LexerError, ParseError, UnknownFunctionError, VariadicArityError, } from './errors.js';
export { search } from './search.js';
export { JMESPathError, LexerError, ParseError, IncompleteExpressionError, ArityError, VariadicArityError, JMESPathTypeError, EmptyExpressionError, UnknownFunctionError, } from './errors.js';

@@ -267,3 +267,3 @@ import { SIMPLE_TOKENS, START_IDENTIFIER, VALID_IDENTIFIER, VALID_NUMBER, WHITESPACE, } from './constants.js';

}
catch (error) {
catch {
throw new LexerError(start, lexeme);

@@ -270,0 +270,0 @@ }

@@ -0,3 +1,3 @@

import { ArityError, JMESPathTypeError, UnknownFunctionError, VariadicArityError, } from './errors.js';
import { TreeInterpreter } from './TreeInterpreter.js';
import { ArityError, JMESPathTypeError, UnknownFunctionError, VariadicArityError, } from './errors.js';
class ParsedResult {

@@ -4,0 +4,0 @@ expression;

import { randomInt } from 'node:crypto';
import { Lexer } from './Lexer.js';
import { ParsedResult } from './ParsedResult.js';
import { andExpression, comparator, currentNode, expref, field, filterProjection, flatten, functionExpression, identity, index, indexExpression, keyValPair, literal, multiSelectList, multiSelectObject, notExpression, orExpression, pipe, projection, slice, subexpression, valueProjection, } from './ast.js';
import { BINDING_POWER } from './constants.js';
import { IncompleteExpressionError, LexerError, ParseError } from './errors.js';
import { Lexer } from './Lexer.js';
import { ParsedResult } from './ParsedResult.js';
/**

@@ -8,0 +8,0 @@ * Top down operaotr precedence parser for JMESPath.

import { isIntegerNumber, isRecord, isStrictEqual, } from '@aws-lambda-powertools/commons/typeutils';
import { Expression } from './Expression.js';
import { ArityError, JMESPathError, JMESPathTypeError, UnknownFunctionError, VariadicArityError, } from './errors.js';
import { Functions } from './Functions.js';
import { ArityError, JMESPathError, JMESPathTypeError, UnknownFunctionError, VariadicArityError, } from './errors.js';
import { isTruthy, sliceArray } from './utils.js';

@@ -6,0 +6,0 @@ /**

import type { JSONArray, JSONValue } from '@aws-lambda-powertools/commons/types';
import type { BINDING_POWER } from './constants.js';
import type { Functions } from './Functions.js';
import type { BINDING_POWER } from './constants.js';
/**

@@ -5,0 +5,0 @@ * A token in the JMESPath AST.

@@ -192,3 +192,2 @@ import { getType, isIntegerNumber, isNumber, isRecord, isTruthy as isTruthyJS, } from '@aws-lambda-powertools/commons/typeutils';

typeCheckType(arg, type, argumentSpec, hasMoreTypesToCheck);
// biome-ignore lint/suspicious/useValidTypeof: we know that `type` is one of 'string', 'number', or 'boolean' because we checked for that above
if (typeof arg === type)

@@ -212,3 +211,2 @@ return true;

const typeCheckType = (arg, type, argumentSpec, hasMoreTypesToCheck) => {
// biome-ignore lint/suspicious/useValidTypeof: we know that `type` is one of 'string', 'number', or 'boolean' because we checked before calling this function
if (typeof arg !== type && !hasMoreTypesToCheck) {

@@ -215,0 +213,0 @@ throw new JMESPathTypeError({

{
"name": "@aws-lambda-powertools/jmespath",
"version": "2.23.0",
"version": "2.24.0",
"description": "A type safe and modern jmespath module to parse and extract data from JSON documents using JMESPath",

@@ -28,3 +28,3 @@ "author": {

"dependencies": {
"@aws-lambda-powertools/commons": "2.23.0"
"@aws-lambda-powertools/commons": "2.24.0"
},

@@ -31,0 +31,0 @@ "main": "./lib/cjs/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet