From 229e19924627036cb8601806eee8b6e593b4b6f6 Mon Sep 17 00:00:00 2001 From: David <75678655+David-Werth@users.noreply.github.com> Date: Thu, 7 Aug 2025 15:58:20 +0200 Subject: [PATCH 1/4] refactor(jmespath): mark projectionStop and maxCache as readonly in Parser --- packages/jmespath/src/Parser.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/jmespath/src/Parser.ts b/packages/jmespath/src/Parser.ts index 8c006cc8e3..de5d9fd300 100644 --- a/packages/jmespath/src/Parser.ts +++ b/packages/jmespath/src/Parser.ts @@ -48,7 +48,7 @@ class Parser { * The maximum binding power for a token * that can stop a projection. */ - #projectionStop = 10; + readonly #projectionStop = 10; /** * Cache object */ @@ -56,7 +56,7 @@ class Parser { /** * The maximum size of the cache. */ - #maxCacheSize = 128; + readonly #maxCacheSize = 128; #tokenizer?: Lexer; #tokens: Token[]; #index = 0; From c53d356b7522a9182b19a134dd619579c0440368 Mon Sep 17 00:00:00 2001 From: David <75678655+David-Werth@users.noreply.github.com> Date: Thu, 7 Aug 2025 15:59:06 +0200 Subject: [PATCH 2/4] refactor(jmespath): fix typo in Parser --- packages/jmespath/src/Parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jmespath/src/Parser.ts b/packages/jmespath/src/Parser.ts index de5d9fd300..c576d5ee2b 100644 --- a/packages/jmespath/src/Parser.ts +++ b/packages/jmespath/src/Parser.ts @@ -30,7 +30,7 @@ import { ParsedResult } from './ParsedResult.js'; import type { Node, Token } from './types.js'; /** - * Top down operaotr precedence parser for JMESPath. + * Top down operator precedence parser for JMESPath. * * ## References * The implementation of this Parser is based on the implementation of From d46d2e44e19aece5e8e18ce86fa082c85d2fb20f Mon Sep 17 00:00:00 2001 From: David <75678655+David-Werth@users.noreply.github.com> Date: Thu, 7 Aug 2025 16:00:02 +0200 Subject: [PATCH 3/4] refactor(jmespath): mark functions as readonly in TreeInterpreter --- packages/jmespath/src/TreeInterpreter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jmespath/src/TreeInterpreter.ts b/packages/jmespath/src/TreeInterpreter.ts index 385dbab6b3..17be0bd49a 100644 --- a/packages/jmespath/src/TreeInterpreter.ts +++ b/packages/jmespath/src/TreeInterpreter.ts @@ -25,7 +25,7 @@ import { isTruthy, sliceArray } from './utils.js'; * @internal */ class TreeInterpreter { - #functions: Functions; + readonly #functions: Functions; /** * @param options The options to use for the interpreter. From 489df97fb953bf624df48cdd46457be8dbc7fe98 Mon Sep 17 00:00:00 2001 From: David <75678655+David-Werth@users.noreply.github.com> Date: Thu, 7 Aug 2025 16:01:04 +0200 Subject: [PATCH 4/4] refactor(jmespath): mark consumeComparatorSigns as readonly in Lexer --- packages/jmespath/src/Lexer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jmespath/src/Lexer.ts b/packages/jmespath/src/Lexer.ts index a200b74974..9136311888 100644 --- a/packages/jmespath/src/Lexer.ts +++ b/packages/jmespath/src/Lexer.ts @@ -81,7 +81,7 @@ class Lexer { * * @param current The current character */ - #consumeComparatorSigns = ( + readonly #consumeComparatorSigns = ( current: '<' | '>' | '!' | '=' | '|' | '&' ): Token => { switch (current) {