mailparser 3.7.4 → 3.7.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/CHANGELOG.md +7 -0
- package/lib/mail-parser.js +12 -3
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.7.5](https://github.com/nodemailer/mailparser/compare/v3.7.4...v3.7.5) (2025-10-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* bumped deps ([9a13f4e](https://github.com/nodemailer/mailparser/commit/9a13f4efca4b209a40f4d57d2edbd019706a82c7))
|
|
9
|
+
|
|
3
10
|
## [3.7.4](https://github.com/nodemailer/mailparser/compare/v3.7.3...v3.7.4) (2025-06-29)
|
|
4
11
|
|
|
5
12
|
|
package/lib/mail-parser.js
CHANGED
|
@@ -5,6 +5,7 @@ const libmime = require('libmime');
|
|
|
5
5
|
const addressparser = require('nodemailer/lib/addressparser');
|
|
6
6
|
const Transform = require('stream').Transform;
|
|
7
7
|
const Splitter = mailsplit.Splitter;
|
|
8
|
+
const ChunkedPassthrough = mailsplit.ChunkedPassthrough;
|
|
8
9
|
const punycode = require('punycode.js');
|
|
9
10
|
const FlowedDecoder = require('mailsplit/lib/flowed-decoder');
|
|
10
11
|
const StreamHash = require('./stream-hash');
|
|
@@ -129,7 +130,11 @@ class MailParser extends Transform {
|
|
|
129
130
|
});
|
|
130
131
|
|
|
131
132
|
this.options = config || {};
|
|
133
|
+
this.chunkedPassthrough = new ChunkedPassthrough();
|
|
132
134
|
this.splitter = new Splitter(config);
|
|
135
|
+
|
|
136
|
+
this.chunkedPassthrough.pipe(this.splitter);
|
|
137
|
+
|
|
133
138
|
this.finished = false;
|
|
134
139
|
this.waitingEnd = false;
|
|
135
140
|
|
|
@@ -160,6 +165,10 @@ class MailParser extends Transform {
|
|
|
160
165
|
|
|
161
166
|
this.decoder = this.getDecoder();
|
|
162
167
|
|
|
168
|
+
this.chunkedPassthrough.on('error', err => {
|
|
169
|
+
this.splitter.emit('error', err);
|
|
170
|
+
});
|
|
171
|
+
|
|
163
172
|
this.splitter.on('readable', () => {
|
|
164
173
|
if (this.reading) {
|
|
165
174
|
return false;
|
|
@@ -250,8 +259,8 @@ class MailParser extends Transform {
|
|
|
250
259
|
return done();
|
|
251
260
|
}
|
|
252
261
|
|
|
253
|
-
if (this.
|
|
254
|
-
return this.
|
|
262
|
+
if (this.chunkedPassthrough.write(chunk) === false) {
|
|
263
|
+
return this.chunkedPassthrough.once('drain', () => {
|
|
255
264
|
done();
|
|
256
265
|
});
|
|
257
266
|
} else {
|
|
@@ -260,7 +269,7 @@ class MailParser extends Transform {
|
|
|
260
269
|
}
|
|
261
270
|
|
|
262
271
|
_flush(done) {
|
|
263
|
-
setImmediate(() => this.
|
|
272
|
+
setImmediate(() => this.chunkedPassthrough.end());
|
|
264
273
|
if (this.finished) {
|
|
265
274
|
return this.cleanup(done);
|
|
266
275
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mailparser",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.5",
|
|
4
4
|
"description": "Parse e-mails",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"encoding-japanese": "2.2.0",
|
|
21
21
|
"he": "1.2.0",
|
|
22
22
|
"html-to-text": "9.0.5",
|
|
23
|
-
"iconv-lite": "0.
|
|
23
|
+
"iconv-lite": "0.7.0",
|
|
24
24
|
"libmime": "5.3.7",
|
|
25
25
|
"linkify-it": "5.0.0",
|
|
26
|
-
"mailsplit": "5.4.
|
|
27
|
-
"nodemailer": "7.0.
|
|
26
|
+
"mailsplit": "5.4.6",
|
|
27
|
+
"nodemailer": "7.0.9",
|
|
28
28
|
"punycode.js": "2.3.1",
|
|
29
|
-
"tlds": "1.
|
|
29
|
+
"tlds": "1.260.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"ajv": "8.17.1",
|