imapflow 1.2.3 → 1.2.5
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/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +14 -0
- package/lib/imap-flow.d.ts +4 -2
- package/lib/imap-flow.js +23 -0
- package/package.json +10 -7
- package/test/commands-integration-test.js +8216 -0
- package/test/jp-decoder-test.js +199 -0
- package/test/limited-passthrough-test.js +258 -0
- package/test/memory-cleanup-test.js +144 -0
- package/test/proxy-connection-test.js +541 -0
- package/test/search-compiler-test.js +820 -50
- package/test/tools-test.js +788 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.2.5](https://github.com/postalsys/imapflow/compare/v1.2.4...v1.2.5) (2026-01-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* add missing 'text' search property to TypeScript definitions ([#327](https://github.com/postalsys/imapflow/issues/327)) ([0d1e43d](https://github.com/postalsys/imapflow/commit/0d1e43daa671131929a63c42cfef6ef32dda4c8e))
|
|
9
|
+
|
|
10
|
+
## [1.2.4](https://github.com/postalsys/imapflow/compare/v1.2.3...v1.2.4) (2025-12-28)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* Improve resource cleanup on connection close ([7c3244c](https://github.com/postalsys/imapflow/commit/7c3244cd2d6c7c3d7be54ba26ad2ce5d8b9ddae9))
|
|
16
|
+
|
|
3
17
|
## [1.2.3](https://github.com/postalsys/imapflow/compare/v1.2.2...v1.2.3) (2025-12-22)
|
|
4
18
|
|
|
5
19
|
|
package/lib/imap-flow.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
import {
|
|
2
|
+
import { ConnectionOptions } from 'tls';
|
|
3
3
|
import { Readable } from 'stream';
|
|
4
4
|
|
|
5
5
|
export interface ImapFlowOptions {
|
|
@@ -31,7 +31,7 @@ export interface ImapFlowOptions {
|
|
|
31
31
|
/** If true, then do not start IDLE when connection is established */
|
|
32
32
|
disableAutoIdle?: boolean;
|
|
33
33
|
/** Additional TLS options (see Node.js TLS documentation) */
|
|
34
|
-
tls?:
|
|
34
|
+
tls?: ConnectionOptions;
|
|
35
35
|
/** Custom logger instance. Set to false to disable logging */
|
|
36
36
|
logger?: Logger | false;
|
|
37
37
|
/** If true, log data read and written to socket encoded in base64 */
|
|
@@ -300,6 +300,8 @@ export interface SearchObject {
|
|
|
300
300
|
body?: string;
|
|
301
301
|
/** Matches message subject */
|
|
302
302
|
subject?: string;
|
|
303
|
+
/** Matches any text in headers and body */
|
|
304
|
+
text?: string;
|
|
303
305
|
/** Matches messages larger than value */
|
|
304
306
|
larger?: number;
|
|
305
307
|
/** Matches messages smaller than value */
|
package/lib/imap-flow.js
CHANGED
|
@@ -1788,6 +1788,29 @@ class ImapFlow extends EventEmitter {
|
|
|
1788
1788
|
}
|
|
1789
1789
|
}
|
|
1790
1790
|
|
|
1791
|
+
// cleanup streamer
|
|
1792
|
+
if (this.streamer) {
|
|
1793
|
+
try {
|
|
1794
|
+
// remove our listeners
|
|
1795
|
+
if (this.socketReadable) {
|
|
1796
|
+
this.streamer.removeListener('readable', this.socketReadable);
|
|
1797
|
+
}
|
|
1798
|
+
this.streamer.removeAllListeners('error');
|
|
1799
|
+
if (!this.streamer.destroyed) {
|
|
1800
|
+
this.streamer.destroy();
|
|
1801
|
+
}
|
|
1802
|
+
} catch (err) {
|
|
1803
|
+
this.log.error({ err, info: 'Failed to cleanup streamer', cid: this.id });
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
// clear socket handlers
|
|
1808
|
+
this.clearSocketHandlers();
|
|
1809
|
+
|
|
1810
|
+
// clear cached data
|
|
1811
|
+
this.folders.clear();
|
|
1812
|
+
this.requestTagMap.clear();
|
|
1813
|
+
|
|
1791
1814
|
this.state = this.states.LOGOUT;
|
|
1792
1815
|
if (this.isClosed) {
|
|
1793
1816
|
return;
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "imapflow",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "IMAP Client for Node",
|
|
5
5
|
"main": "lib/imap-flow.js",
|
|
6
6
|
"types": "lib/imap-flow.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"test": "grunt",
|
|
9
|
+
"coverage": "c8 --reporter=text --reporter=html npx nodeunit test/*-test.js",
|
|
9
10
|
"prepare": "npm run build",
|
|
10
11
|
"docs": "rm -rf docs && mkdir -p docs && jsdoc lib/imap-flow.js -c jsdoc.json -R README.md --destination docs/ && cp assets/favicon.ico docs",
|
|
11
12
|
"build": "npm run docs",
|
|
@@ -35,9 +36,10 @@
|
|
|
35
36
|
"@babel/plugin-syntax-class-properties": "7.12.13",
|
|
36
37
|
"@babel/preset-env": "7.28.5",
|
|
37
38
|
"@eslint/eslintrc": "3.3.3",
|
|
38
|
-
"@eslint/js": "9.39.
|
|
39
|
-
"@types/node": "25.0.
|
|
40
|
-
"
|
|
39
|
+
"@eslint/js": "9.39.2",
|
|
40
|
+
"@types/node": "25.0.3",
|
|
41
|
+
"c8": "10.1.3",
|
|
42
|
+
"eslint": "9.39.2",
|
|
41
43
|
"eslint-config-nodemailer": "1.2.0",
|
|
42
44
|
"eslint-config-prettier": "10.1.8",
|
|
43
45
|
"grunt": "1.6.1",
|
|
@@ -47,17 +49,18 @@
|
|
|
47
49
|
"imapflow-jsdoc-template": "3.4.0-imapflow.3",
|
|
48
50
|
"jsdoc": "4.0.4",
|
|
49
51
|
"prettier": "3.7.4",
|
|
52
|
+
"proxyquire": "^2.1.3",
|
|
50
53
|
"st": "3.0.3",
|
|
51
54
|
"typescript": "5.9.3"
|
|
52
55
|
},
|
|
53
56
|
"dependencies": {
|
|
57
|
+
"@zone-eu/mailsplit": "5.4.8",
|
|
54
58
|
"encoding-japanese": "2.2.0",
|
|
55
|
-
"iconv-lite": "0.7.
|
|
59
|
+
"iconv-lite": "0.7.1",
|
|
56
60
|
"libbase64": "1.3.0",
|
|
57
61
|
"libmime": "5.3.7",
|
|
58
62
|
"libqp": "2.1.1",
|
|
59
|
-
"
|
|
60
|
-
"nodemailer": "7.0.11",
|
|
63
|
+
"nodemailer": "7.0.12",
|
|
61
64
|
"pino": "10.1.0",
|
|
62
65
|
"socks": "2.8.7"
|
|
63
66
|
}
|