node_modules: update (#246)

Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
Dawid Dziurla
2025-12-25 10:58:28 +01:00
committed by GitHub
parent de27f3a58b
commit 6e71c855c9
125 changed files with 6609 additions and 655 deletions

View File

@@ -552,7 +552,11 @@ class MimeNode {
this._handleContentType(structured);
if (structured.value.match(/^text\/plain\b/) && typeof this.content === 'string' && /[\u0080-\uFFFF]/.test(this.content)) {
if (
structured.value.match(/^text\/plain\b/) &&
typeof this.content === 'string' &&
/[\u0080-\uFFFF]/.test(this.content)
) {
structured.params.charset = 'utf-8';
}
@@ -963,8 +967,8 @@ class MimeNode {
setImmediate(() => {
try {
contentStream.end(content._resolvedValue);
} catch (err) {
contentStream.emit('error', err);
} catch (_err) {
contentStream.emit('error', _err);
}
});
@@ -995,8 +999,8 @@ class MimeNode {
setImmediate(() => {
try {
contentStream.end(content || '');
} catch (err) {
contentStream.emit('error', err);
} catch (_err) {
contentStream.emit('error', _err);
}
});
return contentStream;
@@ -1014,7 +1018,6 @@ class MimeNode {
return [].concat.apply(
[],
[].concat(addresses).map(address => {
// eslint-disable-line prefer-spread
if (address && address.address) {
address.address = this._normalizeAddress(address.address);
address.name = address.name || '';
@@ -1113,7 +1116,6 @@ class MimeNode {
.apply(
[],
[].concat(value || '').map(elm => {
// eslint-disable-line prefer-spread
elm = (elm || '')
.toString()
.replace(/\r?\n|\r/g, ' ')
@@ -1219,7 +1221,7 @@ class MimeNode {
try {
encodedDomain = punycode.toASCII(domain.toLowerCase());
} catch (err) {
} catch (_err) {
// keep as is?
}
@@ -1282,7 +1284,7 @@ class MimeNode {
// count latin alphabet symbols and 8-bit range symbols + control symbols
// if there are more latin characters, then use quoted-printable
// encoding, otherwise use base64
nonLatinLen = (value.match(/[\x00-\x08\x0B\x0C\x0E-\x1F\u0080-\uFFFF]/g) || []).length; // eslint-disable-line no-control-regex
nonLatinLen = (value.match(/[\x00-\x08\x0B\x0C\x0E-\x1F\u0080-\uFFFF]/g) || []).length;
latinLen = (value.match(/[a-z]/gi) || []).length;
// if there are more latin symbols than binary/unicode, then prefer Q, otherwise B
encoding = nonLatinLen < latinLen ? 'Q' : 'B';