Comparing version 1.0.80 to 1.0.81
# CHANGELOG | ||
- 1.0.81 - 2022-02-15 | ||
- Added support for the QRESYNC extension and untagged VANISHED responses | ||
- 1.0.80 - 2022-02-07 | ||
@@ -4,0 +8,0 @@ |
@@ -23,2 +23,13 @@ 'use strict'; | ||
response = await connection.exec(command, attributes); | ||
// A OK [HIGHESTMODSEQ 9122] Expunge completed (0.010 + 0.000 + 0.012 secs). | ||
let section = response.response.attributes && response.response.attributes[0] && response.response.attributes[0].section; | ||
let responseCode = section && section.length && section[0] && typeof section[0].value === 'string' ? section[0].value : ''; | ||
if (responseCode.toUpperCase() === 'HIGHESTMODSEQ') { | ||
let highestModseq = section[1] && typeof section[1].value === 'string' && !isNaN(section[1].value) ? BigInt(section[1].value) : false; | ||
if (highestModseq && (!connection.mailbox.highestModseq || highestModseq > connection.mailbox.highestModseq)) { | ||
connection.mailbox.highestModseq = highestModseq; | ||
} | ||
} | ||
response.next(); | ||
@@ -25,0 +36,0 @@ return true; |
@@ -141,3 +141,3 @@ 'use strict'; | ||
if (options.changedSince && connection.enabled.has('CONDSTORE') && !mailbox.noModseq) { | ||
attributes.push([ | ||
let changedSinceArgs = [ | ||
{ | ||
@@ -151,3 +151,12 @@ type: 'ATOM', | ||
} | ||
]); | ||
]; | ||
if (options.uid && connection.enabled.has('QRESYNC')) { | ||
changedSinceArgs.push({ | ||
type: 'ATOM', | ||
value: 'VANISHED' | ||
}); | ||
} | ||
attributes.push(changedSinceArgs); | ||
} | ||
@@ -154,0 +163,0 @@ |
@@ -24,2 +24,3 @@ 'use strict'; | ||
} | ||
let folderListData = connection.folders.has(path) ? connection.folders.get(path) : false; | ||
@@ -37,3 +38,15 @@ | ||
} | ||
response = await connection.exec(!options.readOnly ? 'SELECT' : 'EXAMINE', [{ type: 'ATOM', value: path }], { | ||
let extraArgs = []; | ||
if (connection.enabled.has('QRESYNC') && options.changedSince && options.uidValidity) { | ||
extraArgs.push([ | ||
{ type: 'ATOM', value: 'QRESYNC' }, | ||
[ | ||
{ type: 'ATOM', value: options.uidValidity }, | ||
{ type: 'ATOM', value: options.changedSince } | ||
] | ||
]); | ||
} | ||
response = await connection.exec(!options.readOnly ? 'SELECT' : 'EXAMINE', [{ type: 'ATOM', value: path }].concat(extraArgs || []), { | ||
untagged: { | ||
@@ -115,2 +128,17 @@ OK: async untagged => { | ||
map.exists = num; | ||
}, | ||
VANISHED: async untagged => { | ||
await connection.untaggedVanished( | ||
untagged, | ||
// mailbox is not yet open, so use a dummy mailbox object | ||
{ path, uidNext: false, uidValidity: false } | ||
); | ||
}, | ||
// we should only get an untagged FETCH for a SELECT/EXAMINE if QRESYNC was asked for | ||
FETCH: async untagged => { | ||
await connection.untaggedFetch( | ||
untagged, | ||
// mailbox is not yet open, so use a dummy mailbox object | ||
{ path, uidNext: false, uidValidity: false } | ||
); | ||
} | ||
@@ -117,0 +145,0 @@ } |
@@ -30,2 +30,3 @@ /// <reference types="node" /> | ||
* @param [options.proxy] - Optional proxy URL. Supports HTTP CONNECT (`http://`, `https://`) and SOCKS (`socks://`, `socks4://`, `socks5://`) proxies | ||
* @param [options.qresync = false] - If true, then enables QRESYNC support. EXPUNGE notifications will include `uid` property instead of `seq` | ||
*/ | ||
@@ -56,2 +57,3 @@ class ImapFlow extends EventEmitter { | ||
proxy?: boolean; | ||
qresync?: boolean; | ||
}); | ||
@@ -58,0 +60,0 @@ /** |
{ | ||
"name": "imapflow", | ||
"version": "1.0.80", | ||
"version": "1.0.81", | ||
"description": "IMAP Client for Node", | ||
@@ -33,5 +33,5 @@ "main": "./lib/imap-flow.js", | ||
"@babel/preset-env": "7.16.11", | ||
"@types/node": "17.0.15", | ||
"@types/node": "17.0.18", | ||
"braintree-jsdoc-template": "3.3.0", | ||
"eslint": "8.8.0", | ||
"eslint": "8.9.0", | ||
"eslint-config-nodemailer": "1.2.0", | ||
@@ -54,5 +54,5 @@ "eslint-config-prettier": "8.3.0", | ||
"nodemailer": "6.7.2", | ||
"pino": "7.6.5", | ||
"pino": "7.8.0", | ||
"socks": "2.6.2" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
503971
11358
+ Addedpino@7.8.0(transitive)
- Removedpino@7.6.5(transitive)
Updatedpino@7.8.0