imapflow 1.0.190 → 1.0.191
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/lib/search-compiler.js +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.191](https://github.com/postalsys/imapflow/compare/v1.0.190...v1.0.191) (2025-07-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **search:** Use the next day when searching BEFORE/SENTBEFORE to include current day in the range as well ([9e6d749](https://github.com/postalsys/imapflow/commit/9e6d749ac781c6240b3113f2ec8d329ad831d740))
|
|
9
|
+
|
|
3
10
|
## [1.0.190](https://github.com/postalsys/imapflow/compare/v1.0.189...v1.0.190) (2025-07-10)
|
|
4
11
|
|
|
5
12
|
|
package/lib/search-compiler.js
CHANGED
|
@@ -66,6 +66,12 @@ let setOpt = (attributes, term, value, type) => {
|
|
|
66
66
|
* @param {*} value - Date value to format
|
|
67
67
|
*/
|
|
68
68
|
let processDateField = (attributes, term, value) => {
|
|
69
|
+
if (['BEFORE', 'SENTBEFORE'].includes(term.toUpperCase()) && isDate(value) && value.toISOString().substring(11) !== '00:00:00.000Z') {
|
|
70
|
+
// Set to next day to include current day as well, othwerise BEFORE+AFTER
|
|
71
|
+
// searches for the same day but different time values do not match anything
|
|
72
|
+
value = new Date(value.getTime() + 24 * 3600 * 1000);
|
|
73
|
+
}
|
|
74
|
+
|
|
69
75
|
let date = formatDate(value);
|
|
70
76
|
if (!date) {
|
|
71
77
|
return;
|