mirror of https://github.com/eleith/emailjs.git
chore: upgrade deps
This commit is contained in:
parent
99bdf2fb14
commit
723b68ed19
30
package.json
30
package.json
|
@ -16,23 +16,23 @@
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ledge/configs": "23.3.223",
|
"@ledge/configs": "23.3.22332",
|
||||||
"@rollup/plugin-typescript": "6.1.0",
|
"@rollup/plugin-typescript": "8.2.1",
|
||||||
"@types/mailparser": "3.0.0",
|
"@types/mailparser": "3.0.1",
|
||||||
"@types/smtp-server": "3.5.5",
|
"@types/smtp-server": "3.5.6",
|
||||||
"@typescript-eslint/eslint-plugin": "4.8.2",
|
"@typescript-eslint/eslint-plugin": "4.24.0",
|
||||||
"@typescript-eslint/parser": "4.8.2",
|
"@typescript-eslint/parser": "4.24.0",
|
||||||
"ava": "3.13.0",
|
"ava": "3.15.0",
|
||||||
"eslint": "7.14.0",
|
"eslint": "7.26.0",
|
||||||
"eslint-config-prettier": "6.15.0",
|
"eslint-config-prettier": "8.3.0",
|
||||||
"eslint-plugin-prettier": "3.1.4",
|
"eslint-plugin-prettier": "3.4.0",
|
||||||
"mailparser": "3.0.1",
|
"mailparser": "3.2.0",
|
||||||
"prettier": "2.2.1",
|
"prettier": "2.3.0",
|
||||||
"rollup": "2.34.0",
|
"rollup": "2.48.0",
|
||||||
"smtp-server": "3.8.0",
|
"smtp-server": "3.8.0",
|
||||||
"ts-node": "9.0.0",
|
"ts-node": "9.0.0",
|
||||||
"tslib": "2.0.3",
|
"tslib": "2.2.0",
|
||||||
"typescript": "4.1.2"
|
"typescript": "4.2.4"
|
||||||
},
|
},
|
||||||
"engine": [
|
"engine": [
|
||||||
"node >= 10"
|
"node >= 10"
|
||||||
|
|
|
@ -39,7 +39,8 @@ export function getRFC2822DateUTC(date = new Date()) {
|
||||||
* @see https://tools.ietf.org/html/rfc2822#section-3.3
|
* @see https://tools.ietf.org/html/rfc2822#section-3.3
|
||||||
* @see https://github.com/moment/moment/blob/a831fc7e2694281ce31e4f090bbcf90a690f0277/src/lib/create/from-string.js#L101
|
* @see https://github.com/moment/moment/blob/a831fc7e2694281ce31e4f090bbcf90a690f0277/src/lib/create/from-string.js#L101
|
||||||
*/
|
*/
|
||||||
const rfc2822re = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/.compile();
|
const rfc2822re =
|
||||||
|
/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/.compile();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} [date] a string to check for conformance to the [rfc2822](https://tools.ietf.org/html/rfc2822#section-3.3) standard
|
* @param {string} [date] a string to check for conformance to the [rfc2822](https://tools.ietf.org/html/rfc2822#section-3.3) standard
|
||||||
|
|
|
@ -13,9 +13,8 @@ const RANGES = [
|
||||||
[0x20, 0x3c], // <SP>!"#$%&'()*+,-./0123456789:;
|
[0x20, 0x3c], // <SP>!"#$%&'()*+,-./0123456789:;
|
||||||
[0x3e, 0x7e], // >?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}
|
[0x3e, 0x7e], // >?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}
|
||||||
];
|
];
|
||||||
const LOOKUP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(
|
const LOOKUP =
|
||||||
''
|
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
|
||||||
);
|
|
||||||
const MAX_CHUNK_LENGTH = 16383; // must be multiple of 3
|
const MAX_CHUNK_LENGTH = 16383; // must be multiple of 3
|
||||||
const MAX_MIME_WORD_LENGTH = 52;
|
const MAX_MIME_WORD_LENGTH = 52;
|
||||||
const MAX_B64_MIME_WORD_BYTE_LENGTH = 39;
|
const MAX_B64_MIME_WORD_BYTE_LENGTH = 39;
|
||||||
|
|
|
@ -260,13 +260,13 @@ test('client supports greylisting', async (t) => {
|
||||||
greylistServer.onRcptTo = (a, s, cb) => {
|
greylistServer.onRcptTo = (a, s, cb) => {
|
||||||
t.pass();
|
t.pass();
|
||||||
const err = new Error('greylist');
|
const err = new Error('greylist');
|
||||||
((err as never) as { responseCode: number }).responseCode = 450;
|
(err as never as { responseCode: number }).responseCode = 450;
|
||||||
greylistServer.onRcptTo = onRcptTo;
|
greylistServer.onRcptTo = onRcptTo;
|
||||||
onRcptTo(a, s, cb);
|
onRcptTo(a, s, cb);
|
||||||
};
|
};
|
||||||
|
|
||||||
const err = new Error('greylist');
|
const err = new Error('greylist');
|
||||||
((err as never) as { responseCode: number }).responseCode = 450;
|
(err as never as { responseCode: number }).responseCode = 450;
|
||||||
callback(err);
|
callback(err);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -307,7 +307,7 @@ test('client only responds once to greylisting', async (t) => {
|
||||||
onRcptTo(_address, _session, callback) {
|
onRcptTo(_address, _session, callback) {
|
||||||
t.pass();
|
t.pass();
|
||||||
const err = new Error('greylist');
|
const err = new Error('greylist');
|
||||||
((err as never) as { responseCode: number }).responseCode = 450;
|
(err as never as { responseCode: number }).responseCode = 450;
|
||||||
callback(err);
|
callback(err);
|
||||||
},
|
},
|
||||||
onAuth(auth, _session, callback) {
|
onAuth(auth, _session, callback) {
|
||||||
|
|
|
@ -168,8 +168,7 @@ test('very large text data message', async (t) => {
|
||||||
subject: 'this is a test TEXT+DATA message from emailjs',
|
subject: 'this is a test TEXT+DATA message from emailjs',
|
||||||
from: 'lobsters@gmail.com',
|
from: 'lobsters@gmail.com',
|
||||||
to: 'lizards@gmail.com',
|
to: 'lizards@gmail.com',
|
||||||
text:
|
text: 'hello friend if you are seeing this, you can not view html emails. it is attached inline.',
|
||||||
'hello friend if you are seeing this, you can not view html emails. it is attached inline.',
|
|
||||||
attachment: {
|
attachment: {
|
||||||
data: text,
|
data: text,
|
||||||
alternative: true,
|
alternative: true,
|
||||||
|
@ -365,8 +364,7 @@ test('streams message', async (t) => {
|
||||||
subject: 'this is a test TEXT+2+STREAMED+ATTACHMENTS message from emailjs',
|
subject: 'this is a test TEXT+2+STREAMED+ATTACHMENTS message from emailjs',
|
||||||
from: 'stanford@gmail.com',
|
from: 'stanford@gmail.com',
|
||||||
to: 'mit@gmail.com',
|
to: 'mit@gmail.com',
|
||||||
text:
|
text: 'hello friend, i hope this message and streamed attachments finds you well.',
|
||||||
'hello friend, i hope this message and streamed attachments finds you well.',
|
|
||||||
attachment: [
|
attachment: [
|
||||||
{ stream, type: 'application/pdf', name: 'smtp-info.pdf' },
|
{ stream, type: 'application/pdf', name: 'smtp-info.pdf' },
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue