Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

imapflow

Package Overview
Dependencies
Maintainers
1
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

imapflow - npm Package Compare versions

Comparing version 1.0.42 to 1.0.43

4

CHANGELOG.md
# CHANGELOG
- 1.0.43 - 2020-04-20
- Better handling of NIL as delimiter
- 1.0.42 - 2020-04-13

@@ -4,0 +8,0 @@

12

lib/commands/list.js

@@ -27,3 +27,3 @@ 'use strict';

flags: new Set(untagged.attributes[0].map(entry => entry.value)),
delimiter: (untagged.attributes[1] && untagged.attributes[1].value) || connection.namespace.prefix,
delimiter: untagged.attributes[1] && untagged.attributes[1].value,
listed: true

@@ -45,7 +45,7 @@ };

if (entry.path.charAt(0) === entry.delimiter) {
if (entry.delimiter && entry.path.charAt(0) === entry.delimiter) {
entry.path = entry.path.slice(1);
}
entry.parent = entry.path.split(entry.delimiter).map(folder => {
entry.parent = (entry.delimiter ? entry.path.split(entry.delimiter) : [entry.path]).map(folder => {
if (!connection.enabled.has('UTF8=ACCEPT')) {

@@ -94,3 +94,3 @@ try {

flags: new Set(untagged.attributes[0].map(entry => entry.value)),
delimiter: (untagged.attributes[1] && untagged.attributes[1].value) || connection.namespace.prefix,
delimiter: untagged.attributes[1] && untagged.attributes[1].value,
path: (untagged.attributes[2] && untagged.attributes[2].value) || '',

@@ -104,7 +104,7 @@ subscribed: true

if (entry.path.charAt(0) === entry.delimiter) {
if (entry.delimiter && entry.path.charAt(0) === entry.delimiter) {
entry.path = entry.path.slice(1);
}
entry.parent = entry.path.split(entry.delimiter).map(folder => {
entry.parent = (entry.delimiter ? entry.path.split(entry.delimiter) : [entry.path]).map(folder => {
if (!connection.enabled.has('UTF8=ACCEPT')) {

@@ -111,0 +111,0 @@ try {

@@ -13,7 +13,7 @@ 'use strict';

let { prefix, delimiter } = await getListPrefix(connection);
if (prefix && prefix.charAt(prefix.length - 1) !== delimiter) {
if (delimiter && prefix && prefix.charAt(prefix.length - 1) !== delimiter) {
prefix += delimiter;
}
let map = {
personal: [{ prefix: prefix || '', delimiter: delimiter || '.' }],
personal: [{ prefix: prefix || '', delimiter }],
other: false,

@@ -49,3 +49,2 @@ shared: false

connection.namespaces.personal[0].prefix = connection.namespaces.personal[0].prefix || '';
connection.namespaces.personal[0].delimiter = connection.namespaces.personal[0].delimiter || '';
response.next();

@@ -78,5 +77,5 @@

map.flags = new Set(untagged.attributes[0].map(entry => entry.value));
map.delimiter = (untagged.attributes[1] && untagged.attributes[1].value) || '.';
map.delimiter = untagged.attributes[1] && untagged.attributes[1].value;
map.prefix = (untagged.attributes[2] && untagged.attributes[2].value) || '';
if (map.prefix.charAt(0) === map.delimiter) {
if (map.delimiter && map.prefix.charAt(0) === map.delimiter) {
map.prefix = map.prefix.slice(1);

@@ -88,3 +87,3 @@ }

response.next();
if (map.flags.has('\\Noselect')) {
if (map.flags.has('\\Noselect') && map.delimiter) {
// can not use root namespace

@@ -100,6 +99,6 @@ let inboxEntry = {};

inboxEntry.flags = new Set(untagged.attributes[0].map(entry => entry.value));
inboxEntry.delimiter = (untagged.attributes[1] && untagged.attributes[1].value) || '.';
inboxEntry.delimiter = untagged.attributes[1] && untagged.attributes[1].value;
inboxEntry.prefix = (untagged.attributes[2] && untagged.attributes[2].value) || '';
if (inboxEntry.prefix.charAt(0) === inboxEntry.delimiter) {
if (inboxEntry.delimiter && inboxEntry.prefix.charAt(0) === inboxEntry.delimiter) {
inboxEntry.prefix = inboxEntry.prefix.slice(1);

@@ -133,3 +132,3 @@ }

if (prefix && prefix.charAt(prefix.length - 1) !== delimiter) {
if (delimiter && prefix && prefix.charAt(prefix.length - 1) !== delimiter) {
prefix += delimiter;

@@ -136,0 +135,0 @@ }

@@ -13,3 +13,3 @@ 'use strict';

if (Array.isArray(path)) {
path = path.join((connection.namespace && connection.namespace.delimiter) || '.');
path = path.join((connection.namespace && connection.namespace.delimiter) || '');
}

@@ -335,7 +335,3 @@

map.id =
map.emailId ||
createHash('md5')
.update([path, mailbox.uidValidity.toString(), map.uid.toString()].join(':'))
.digest('hex');
map.id = map.emailId || createHash('md5').update([path, mailbox.uidValidity.toString(), map.uid.toString()].join(':')).digest('hex');
}

@@ -347,4 +343,4 @@

parseEnvelope(entry) {
let processAddresses = function(list) {
return [].concat(list || []).map(function(addr) {
let processAddresses = function (list) {
return [].concat(list || []).map(function (addr) {
return {

@@ -436,3 +432,3 @@ name: libmime.decodeWords((addr[0] && addr[0].value) || ''),

curNode.parameters = {};
[].concat(node[i] || []).forEach(function(val, j) {
[].concat(node[i] || []).forEach(function (val, j) {
if (j % 2) {

@@ -542,3 +538,3 @@ curNode.parameters[key] = libmime.decodeWords(((val && val.value) || '').toString());

curNode.dispositionParameters = {};
[].concat(node[i][1] || []).forEach(function(val, j) {
[].concat(node[i][1] || []).forEach(function (val, j) {
if (j % 2) {

@@ -558,3 +554,3 @@ curNode.dispositionParameters[key] = libmime.decodeWords(((val && val.value) || '').toString());

if (node[i]) {
curNode.language = [].concat(node[i] || []).map(function(val) {
curNode.language = [].concat(node[i] || []).map(function (val) {
return ((val && val.value) || '').toString().toLowerCase();

@@ -667,6 +663,3 @@ });

getDecoder(charset) {
charset = (charset || 'ascii')
.toString()
.trim()
.toLowerCase();
charset = (charset || 'ascii').toString().trim().toLowerCase();
if (/^jis|^iso-?2022-?jp|^EUCJP/i.test(charset)) {

@@ -673,0 +666,0 @@ // special case not supported by iconv-lite

{
"name": "imapflow",
"version": "1.0.42",
"version": "1.0.43",
"description": "IMAP Client for Node",

@@ -41,3 +41,3 @@ "main": "./lib/imap-flow.js",

"dependencies": {
"@types/node": "13.11.1",
"@types/node": "13.13.0",
"encoding-japanese": "1.0.30",

@@ -44,0 +44,0 @@ "iconv-lite": "0.5.1",

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