mailparser 3.4.0 → 3.6.0
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/.gitattributes +1 -0
- package/.github/workflows/test.yml +21 -0
- package/lib/mail-parser.js +3 -3
- package/package.json +13 -13
package/.gitattributes
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*.js text eol=lf
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: Run tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
test:
|
|
9
|
+
strategy:
|
|
10
|
+
matrix:
|
|
11
|
+
node: [12.x, 14.x, 16.x, 18.x]
|
|
12
|
+
os: [ubuntu-latest, macos-latest]
|
|
13
|
+
runs-on: ${{ matrix.os }}
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v2
|
|
16
|
+
- name: Use Node.js ${{ matrix.node }}
|
|
17
|
+
uses: actions/setup-node@v1
|
|
18
|
+
with:
|
|
19
|
+
node-version: ${{ matrix.node }}
|
|
20
|
+
- run: npm install
|
|
21
|
+
- run: npm test
|
package/lib/mail-parser.js
CHANGED
|
@@ -138,7 +138,7 @@ class MailParser extends Transform {
|
|
|
138
138
|
|
|
139
139
|
this.endReceived = false;
|
|
140
140
|
this.reading = false;
|
|
141
|
-
this.
|
|
141
|
+
this.hasFailed = false;
|
|
142
142
|
|
|
143
143
|
this.tree = false;
|
|
144
144
|
this.curnode = false;
|
|
@@ -175,7 +175,7 @@ class MailParser extends Transform {
|
|
|
175
175
|
});
|
|
176
176
|
|
|
177
177
|
this.splitter.on('error', err => {
|
|
178
|
-
this.
|
|
178
|
+
this.hasFailed = true;
|
|
179
179
|
if (typeof this.waitingEnd === 'function') {
|
|
180
180
|
return this.waitingEnd(err);
|
|
181
181
|
}
|
|
@@ -210,7 +210,7 @@ class MailParser extends Transform {
|
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
readData() {
|
|
213
|
-
if (this.
|
|
213
|
+
if (this.hasFailed) {
|
|
214
214
|
return false;
|
|
215
215
|
}
|
|
216
216
|
this.reading = true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mailparser",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "Parse e-mails",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -16,25 +16,25 @@
|
|
|
16
16
|
],
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"encoding-japanese": "
|
|
19
|
+
"encoding-japanese": "2.0.0",
|
|
20
20
|
"he": "1.2.0",
|
|
21
|
-
"html-to-text": "
|
|
21
|
+
"html-to-text": "9.0.2",
|
|
22
22
|
"iconv-lite": "0.6.3",
|
|
23
|
-
"libmime": "5.
|
|
24
|
-
"linkify-it": "
|
|
25
|
-
"mailsplit": "5.3.
|
|
26
|
-
"nodemailer": "6.
|
|
27
|
-
"tlds": "1.
|
|
23
|
+
"libmime": "5.2.0",
|
|
24
|
+
"linkify-it": "4.0.1",
|
|
25
|
+
"mailsplit": "5.3.2",
|
|
26
|
+
"nodemailer": "6.8.0",
|
|
27
|
+
"tlds": "1.235.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"ajv": "8.
|
|
31
|
-
"eslint": "8.
|
|
30
|
+
"ajv": "8.11.2",
|
|
31
|
+
"eslint": "8.29.0",
|
|
32
32
|
"eslint-config-nodemailer": "1.2.0",
|
|
33
|
-
"eslint-config-prettier": "8.
|
|
34
|
-
"grunt": "1.
|
|
33
|
+
"eslint-config-prettier": "8.5.0",
|
|
34
|
+
"grunt": "1.5.3",
|
|
35
35
|
"grunt-cli": "1.4.3",
|
|
36
36
|
"grunt-contrib-nodeunit": "4.0.0",
|
|
37
|
-
"grunt-eslint": "
|
|
37
|
+
"grunt-eslint": "24.0.1",
|
|
38
38
|
"iconv": "3.0.1",
|
|
39
39
|
"random-message": "1.1.0"
|
|
40
40
|
},
|