@bobfrankston/iflow 1.0.46 → 1.0.47

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.
@@ -340,11 +340,13 @@ function parseAddressList(token) {
340
340
  if (!token || token === "NIL")
341
341
  return [];
342
342
  const addrs = [];
343
- // Match each (name atdomain mailbox host) group
344
- const re = /\(([^)]*)\)/g;
345
- let m;
346
- while ((m = re.exec(token)) !== null) {
347
- const parts = tokenizeParenList(m[1]);
343
+ // Tokenize the outer list to get each address group as a paren-delimited token
344
+ // e.g. ((name NIL mailbox host)(name2 NIL mailbox2 host2)) → ["(name NIL mailbox host)", "(name2 ...)"]
345
+ const groups = tokenizeParenList(token);
346
+ for (const group of groups) {
347
+ if (!group.startsWith("("))
348
+ continue;
349
+ const parts = tokenizeParenList(group);
348
350
  if (parts.length >= 4) {
349
351
  const name = decodeImapString(unquote(parts[0]));
350
352
  const mailbox = unquote(parts[2]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/iflow",
3
- "version": "1.0.46",
3
+ "version": "1.0.47",
4
4
  "description": "IMAP client wrapper library",
5
5
  "main": "index.js",
6
6
  "types": "index.ts",