mailparser 3.3.0 → 3.4.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/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010-2020 Andris Reinman
1
+ Copyright (c) 2020 - 2021 Andris Reinman
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
@@ -13,4 +13,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
13
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
14
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
15
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
- SOFTWARE.
16
+ SOFTWARE.
@@ -312,13 +312,15 @@ class MailParser extends Transform {
312
312
  }
313
313
  });
314
314
  break;
315
- case 'date':
316
- value = new Date(value);
317
- if (isNaN(value)) {
315
+ case 'date': {
316
+ let dateValue = new Date(value);
317
+ if (isNaN(dateValue)) {
318
318
  // date parsing failed :S
319
- value = new Date();
319
+ dateValue = new Date();
320
320
  }
321
+ value = dateValue;
321
322
  break;
323
+ }
322
324
  case 'subject':
323
325
  try {
324
326
  value = this.libmime.decodeWords(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mailparser",
3
- "version": "3.3.0",
3
+ "version": "3.4.0",
4
4
  "description": "Parse e-mails",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,21 +21,21 @@
21
21
  "html-to-text": "8.0.0",
22
22
  "iconv-lite": "0.6.3",
23
23
  "libmime": "5.0.0",
24
- "linkify-it": "3.0.2",
25
- "mailsplit": "5.0.1",
26
- "nodemailer": "6.6.3",
27
- "tlds": "1.221.1"
24
+ "linkify-it": "3.0.3",
25
+ "mailsplit": "5.3.1",
26
+ "nodemailer": "6.7.0",
27
+ "tlds": "1.224.0"
28
28
  },
29
29
  "devDependencies": {
30
- "ajv": "8.6.2",
31
- "eslint": "7.32.0",
30
+ "ajv": "8.6.3",
31
+ "eslint": "8.0.0",
32
32
  "eslint-config-nodemailer": "1.2.0",
33
33
  "eslint-config-prettier": "8.3.0",
34
34
  "grunt": "1.4.1",
35
35
  "grunt-cli": "1.4.3",
36
- "grunt-contrib-nodeunit": "3.0.0",
36
+ "grunt-contrib-nodeunit": "4.0.0",
37
37
  "grunt-eslint": "23.0.0",
38
- "iconv": "3.0.0",
38
+ "iconv": "3.0.1",
39
39
  "random-message": "1.1.0"
40
40
  },
41
41
  "repository": {