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 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
 
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imapflow",
3
- "version": "1.0.190",
3
+ "version": "1.0.191",
4
4
  "description": "IMAP Client for Node",
5
5
  "main": "lib/imap-flow.js",
6
6
  "types": "lib/imap-flow.d.ts",