From f2cd6ee333e2d998ba5c4ec6e03d2c829b432949 Mon Sep 17 00:00:00 2001 From: Andris Reinman Date: Thu, 30 Mar 2023 14:45:42 +0300 Subject: [PATCH] fixed tests --- Dockerfile | 2 +- lib/search-query.js | 12 ++---------- package.json | 7 +++---- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index f32e0b34..ca0d1d78 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$TARGETPLATFORM node:lts-alpine +FROM --platform=${BUILDPLATFORM} node:lts-alpine ARG TARGETPLATFORM ARG TARGETARCH ARG TARGETVARIANT diff --git a/lib/search-query.js b/lib/search-query.js index af38f4e2..669f1651 100644 --- a/lib/search-query.js +++ b/lib/search-query.js @@ -3,11 +3,7 @@ const SearchString = require('search-string'); const parser = require('logic-query-parser'); -const { parse } = require('liqe'); - -const util = require('util'); - -function convertSearchQuery(queryStr, elasticSearch) { +function convertSearchQuery(queryStr) { const queryTree = parser.parse(queryStr); let walkQueryTree = (node, branch) => { @@ -52,11 +48,7 @@ function convertSearchQuery(queryStr, elasticSearch) { } }; - //walkQueryTree(queryTree); - - console.log('------'); - console.log(queryStr); - console.log(util.inspect(parse(queryStr), false, 22, true)); + walkQueryTree(queryTree); } module.exports = { convertSearchQuery }; diff --git a/package.json b/package.json index 73b977cb..6a6941e1 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "ajv": "8.12.0", "chai": "4.3.7", "docsify-cli": "4.4.4", - "eslint": "8.36.0", + "eslint": "8.37.0", "eslint-config-nodemailer": "1.2.0", "eslint-config-prettier": "8.8.0", "grunt": "1.6.1", @@ -35,7 +35,7 @@ "grunt-mocha-test": "0.13.3", "grunt-shell-spawn": "0.4.0", "grunt-wait": "0.3.0", - "imapflow": "1.0.123", + "imapflow": "1.0.125", "mailparser": "3.6.4", "mocha": "10.2.0", "request": "2.88.2", @@ -59,7 +59,7 @@ "generate-password": "1.7.0", "hash-wasm": "4.9.0", "he": "1.2.0", - "html-to-text": "9.0.4", + "html-to-text": "9.0.5", "humanname": "0.2.2", "iconv-lite": "0.6.3", "ioredfour": "1.2.0-ioredis-07", @@ -72,7 +72,6 @@ "libbase64": "1.2.1", "libmime": "5.2.1", "libqp": "2.0.1", - "liqe": "^3.6.0", "logic-query-parser": "0.0.5", "mailauth": "4.3.1", "mailsplit": "5.4.0",