From 55bbd0fe9359bc1d6e88c5f5eb6a65369c70d9c0 Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Fri, 16 Sep 2022 16:20:40 +0300 Subject: [PATCH 1/2] Add support for `/$count` with nested `$filter` in $orderby & $orderby Update @balena/odata-parser from 2.3.0 to 2.4.0 Update @balena/odata-to-abstractsql from 5.4.14 to 5.5.0 Resolves: #577 Change-type: minor Signed-off-by: Thodoris Greasidis --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1ce39a641..87a3ebbec 100644 --- a/package.json +++ b/package.json @@ -32,8 +32,8 @@ "@balena/abstract-sql-compiler": "^7.20.0", "@balena/abstract-sql-to-typescript": "^1.2.0", "@balena/lf-to-abstract-sql": "^4.5.1", - "@balena/odata-parser": "^2.3.0", - "@balena/odata-to-abstract-sql": "^5.4.14", + "@balena/odata-parser": "^2.4.0", + "@balena/odata-to-abstract-sql": "^5.5.0", "@balena/sbvr-parser": "^1.4.1", "@balena/sbvr-types": "^3.4.7", "@types/body-parser": "^1.19.2", From 734fd4c97f9438df4d2f80430739a4f1036e62cf Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Fri, 16 Sep 2022 16:27:40 +0300 Subject: [PATCH 2/2] Update lodash typings Change-type: patch Signed-off-by: Thodoris Greasidis --- package.json | 2 +- src/sbvr-api/uri-parser.ts | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 87a3ebbec..6b594c44a 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "@types/deep-freeze": "^0.1.2", "@types/express": "^4.17.13", "@types/express-session": "^1.17.5", - "@types/lodash": "^4.14.182", + "@types/lodash": "^4.14.185", "@types/memoizee": "^0.4.8", "@types/method-override": "^0.0.32", "@types/multer": "^1.4.7", diff --git a/src/sbvr-api/uri-parser.ts b/src/sbvr-api/uri-parser.ts index b6a800474..c84c53936 100644 --- a/src/sbvr-api/uri-parser.ts +++ b/src/sbvr-api/uri-parser.ts @@ -235,11 +235,7 @@ const memoizedOdata2AbstractSQL = (() => { if (odataQuery.options) { odataQuery = { ...odataQuery, - options: _.pick( - odataQuery.options, - // @ts-expect-error: lodash typings do not allow a single array of property paths arrays but lodash itself does and it has better performance than property path strings - cachedProps, - ) as ODataOptions, + options: _.pick(odataQuery.options, cachedProps) as ODataOptions, }; } const { tree, extraBodyVars, extraBindVars } = $memoizedOdata2AbstractSQL(