haraka-plugin-karma
Advanced tools
Comparing version 2.1.2 to 2.1.3
#### N.N.N - YYYY-MM-DD | ||
### [2.1.3] - 2023-12-12 | ||
- ci: use shared configs | ||
- style(es6): replace for..i with for...of | ||
- deps(*): bump versions to latest | ||
### [2.1.2] - 2023-12-11 | ||
@@ -6,0 +12,0 @@ |
29
index.js
@@ -172,4 +172,3 @@ 'use strict' | ||
// do any award conditions match this result? | ||
for (let i=0; i < pi_prop.length; i++) { // each award... | ||
const thisAward = pi_prop[i] | ||
for (const thisAward of pi_prop) { // each award... | ||
// { id: '011', operator: 'equals', value: 'all_bad', award: '-2'} | ||
@@ -227,4 +226,4 @@ const thisResArr = this.result_as_array(thisResult) | ||
for (let j=0; j < thisResult.length; j++) { | ||
const tr = parseFloat(thisResult[j]) | ||
for (const element of thisResult) { | ||
const tr = parseFloat(element) | ||
if (tr >= parseFloat(thisAward.value)) continue | ||
@@ -240,4 +239,4 @@ if (conn.results.has('karma', 'awards', thisAward.id)) continue | ||
for (let j=0; j < thisResult.length; j++) { | ||
const tr = parseFloat(thisResult[j]) | ||
for (const element of thisResult) { | ||
const tr = parseFloat(element) | ||
if (tr <= parseFloat(thisAward.value)) continue | ||
@@ -253,8 +252,8 @@ if (conn.results.has('karma', 'awards', thisAward.id)) continue | ||
for (let j=0; j < thisResult.length; j++) { | ||
for (const element of thisResult) { | ||
if (thisAward.value === 'true') { | ||
if (!thisResult[j]) continue | ||
if (!element) continue | ||
} | ||
else { | ||
if (thisResult[j] != thisAward.value) continue | ||
if (element != thisAward.value) continue | ||
} | ||
@@ -274,4 +273,4 @@ if (!/auth/.test(thisAward.plugin)) { | ||
for (let i=0; i < thisResult.length; i++) { | ||
if (!re.test(thisResult[i])) continue | ||
for (const element of thisResult) { | ||
if (!re.test(element)) continue | ||
if (conn.results.has('karma', 'awards', thisAward.id)) continue | ||
@@ -286,3 +285,3 @@ | ||
for (let j=0; j < thisResult.length; j++) { | ||
for (const element of thisResult) { | ||
const [operator, qty] = thisAward.value.split(/\s+/) // requires node 6+ | ||
@@ -294,9 +293,9 @@ | ||
case 'equals': | ||
if (parseInt(thisResult[j], 10) != parseInt(qty, 10)) continue | ||
if (parseInt(element, 10) != parseInt(qty, 10)) continue | ||
break | ||
case 'gt': | ||
if (parseInt(thisResult[j], 10) <= parseInt(qty, 10)) continue | ||
if (parseInt(element, 10) <= parseInt(qty, 10)) continue | ||
break | ||
case 'lt': | ||
if (parseInt(thisResult[j], 10) >= parseInt(qty, 10)) continue | ||
if (parseInt(element, 10) >= parseInt(qty, 10)) continue | ||
break | ||
@@ -303,0 +302,0 @@ default: |
{ | ||
"name": "haraka-plugin-karma", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"description": "A heuristics scoring and reputation engine for SMTP connections", | ||
@@ -26,14 +26,14 @@ "main": "index.js", | ||
"dependencies": { | ||
"address-rfc2821": "*", | ||
"haraka-constants": ">=1.0.2", | ||
"haraka-utils": "*", | ||
"haraka-plugin-redis": "2.0.5", | ||
"redis": "4.6.11" | ||
"address-rfc2821": "^2.1.1", | ||
"haraka-constants": "^1.0.2", | ||
"haraka-utils": "^1.0.3", | ||
"haraka-plugin-redis": "^2.0.6", | ||
"redis": "^4.6.11" | ||
}, | ||
"devDependencies": { | ||
"eslint": "8.55.0", | ||
"eslint": "^8.55.0", | ||
"eslint-plugin-haraka": "*", | ||
"haraka-test-fixtures": "*", | ||
"mocha": "10.2.0" | ||
"mocha": "^10.2.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 2 instances in 1 package
0
89991
1505
+ Added@redis/client@1.6.0(transitive)
+ Added@redis/json@1.0.7(transitive)
+ Added@redis/search@1.2.0(transitive)
+ Added@redis/time-series@1.1.0(transitive)
+ Addedharaka-plugin-redis@2.0.8(transitive)
+ Addedredis@4.7.0(transitive)
- Removed@redis/client@1.5.12(transitive)
- Removed@redis/json@1.0.6(transitive)
- Removed@redis/search@1.1.6(transitive)
- Removed@redis/time-series@1.0.5(transitive)
- Removedharaka-plugin-redis@2.0.5(transitive)
- Removedredis@4.6.11(transitive)
Updatedaddress-rfc2821@^2.1.1
Updatedharaka-constants@^1.0.2
Updatedharaka-plugin-redis@^2.0.6
Updatedharaka-utils@^1.0.3
Updatedredis@^4.6.11