node_modules: update (#297)

Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
Dawid Dziurla
2026-06-15 07:32:52 +02:00
committed by GitHub
parent d86d472c50
commit 1369c5b90d
27 changed files with 662 additions and 159 deletions
+14 -2
View File
@@ -4,6 +4,8 @@ const { spawn } = require('child_process');
const packageData = require('../../package.json');
const shared = require('../shared');
const errors = require('../errors');
const LeWindows = require('../mime-node/le-windows');
const LeUnix = require('../mime-node/le-unix');
/**
* Generates a Transport object for Sendmail
@@ -46,6 +48,8 @@ class SendmailTransport {
this.args = options.args;
}
}
this.winbreak = ['win', 'windows', 'dos', '\r\n'].includes((options.newline || '').toString().toLowerCase());
}
/**
@@ -178,7 +182,15 @@ class SendmailTransport {
);
const sourceStream = mail.message.createReadStream();
sourceStream.once('error', err => {
let stream = sourceStream;
if (this.options.newline) {
// apply the transport-level line ending transform; the message-level
// `newline` option is handled by MimeNode in createReadStream()
stream = sourceStream.pipe(this.winbreak ? new LeWindows() : new LeUnix());
sourceStream.once('error', err => stream.emit('error', err));
}
stream.once('error', err => {
this.logger.error(
{
err,
@@ -193,7 +205,7 @@ class SendmailTransport {
callback(err);
});
sourceStream.pipe(sendmail.stdin);
stream.pipe(sendmail.stdin);
} else {
const err = new Error('sendmail was not found');
err.code = errors.ESENDMAIL;