email-bounce-parser 1.0.21 → 1.0.22

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.
Files changed (2) hide show
  1. package/lib/parser.js +2 -1
  2. package/package.json +1 -1
package/lib/parser.js CHANGED
@@ -113,7 +113,7 @@ var REGEXES = {
113
113
 
114
114
  recipient : [
115
115
  /the following addresses had permanent fatal errors (?:.*?)\s\<(.+?)\>/i,
116
- /there was a temporary problem delivering your message to (.+?). Gmail will retry/i,
116
+ /there was a temporary problem (?:while )?delivering your message to (.+?). Gmail will retry/i,
117
117
  /the following message to \<(.+?)\> was undeliverable/i,
118
118
  /to the following addresses:\s*(.+)/i,
119
119
  /^your message wasn't delivered to (.+?)\s/mi, // "Your message wasn't delivered to john@acme.com"
@@ -555,6 +555,7 @@ class Parser {
555
555
  _str = _str.replace(this.__regexes.line_break_double_indent_single, "\n\n");
556
556
 
557
557
  // Replace single Line-break with regular space
558
+ // TODO: re2 doesn't support lookbehinds, so for now we use a pure-JS regex
558
559
  _str = _str.replace(/(?<!\n)\n(?!\n)/gm, " ");
559
560
 
560
561
  // Replace long indent with double Line-break
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "email-bounce-parser",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "Parses bounce emails and extract errors",
5
5
  "author": "Eliott Vincent <eliott@crisp.chat>",
6
6
  "main": "lib/index.js",