New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

imap

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

imap - npm Package Compare versions

Comparing version 0.8.4 to 0.8.5

test/test-connection-fetch-stringbody.js

13

lib/Connection.js

@@ -199,7 +199,5 @@ var tls = require('tls'),

if (m = RE_IDLENOOPRES.exec(line)) {
if (m[1] === 'IDLE') {
// no longer idling
self._idle.enabled = false;
self._idle.started = undefined;
}
// no longer idling
self._idle.enabled = false;
self._idle.started = undefined;

@@ -213,3 +211,6 @@ self._curReq = undefined;

self._idle.enabled = true;
self._doKeepaliveTimer(true);
if (m[1] === 'NOOP')
self._doKeepaliveTimer();
else
self._doKeepaliveTimer(true);
}

@@ -216,0 +217,0 @@

@@ -14,2 +14,3 @@ var EventEmitter = require('events').EventEmitter,

RE_BODYLITERAL = /BODY\[(.*)\] \{(\d+)\}$/i,
RE_BODYINLINEKEY = /^BODY\[(.*)\]$/i,
RE_SEQNO = /^\* (\d+)/,

@@ -79,4 +80,6 @@ RE_LISTCONTENT = /^\((.*)\)$/,

Parser.prototype._tryread = function(n) {
var r = this._stream.read(n);
r && this._parse(r);
if (this._stream.readable) {
var r = this._stream.read(n);
r && this._parse(r);
}
};

@@ -167,3 +170,2 @@

this._literallen = parseInt(m[1], 10);
this._tryread(this._literallen);
} else {

@@ -207,3 +209,2 @@ var m = RE_TAGGED.exec(this._buffer),

this._literallen = parseInt(m[1], 10);
this._tryread(this._literallen);
} else if (m = RE_UNTAGGED.exec(this._buffer)) {

@@ -261,3 +262,3 @@ this._buffer = '';

else if (type === 'fetch')
val = parseFetch(m[5], this._literals);
val = parseFetch.call(this, m[5], this._literals, num);
else if (type === 'namespace')

@@ -426,4 +427,4 @@ val = parseNamespaces(m[5], this._literals);

function parseFetch(text, literals) {
var list = parseExpr(text, literals)[0], attrs = {};
function parseFetch(text, literals, seqno) {
var list = parseExpr(text, literals)[0], attrs = {}, m, body;
// list is [KEY1, VAL1, KEY2, VAL2, .... KEYn, VALn]

@@ -441,2 +442,15 @@ for (var i = 0, len = list.length, key, val; i < len; i += 2) {

val = parseBodyStructure(val);
else if (m = RE_BODYINLINEKEY.exec(list[i])) {
// a body was sent as a non-literal
val = new Buffer(''+val);
body = new ReadableStream();
body._read = EMPTY_READCB;
this.emit('body', body, {
seqno: seqno,
which: m[1],
size: val.length
});
body.push(val);
body.push(null);
}
attrs[key] = val;

@@ -443,0 +457,0 @@ }

{ "name": "imap",
"version": "0.8.4",
"version": "0.8.5",
"author": "Brian White <mscdex@mscdex.net>",

@@ -4,0 +4,0 @@ "description": "An IMAP module for node.js that makes communicating with IMAP servers easy",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc