node_modules: update

This commit is contained in:
dawidd6 authored and github-actions[bot] committed 2026-10-19 06:16:48 +00:00
1 parent 955f286ed4
commit df3e9b2c0f
9 files changed
+31 -12

No files matched your search

+8 -2
View File
@@ -21,6 +21,12 @@ export function isPlainText(value, isParam) {
const re = isParam ? /[\x00-\x1f\x7f"\u0080-\uFFFF]/ : /[\x00-\x08\x0b\x0c\x0e-\x1f\u0080-\uFFFF]/;
return typeof value === 'string' && !re.test(value);
}
// A parameter value goes out as is only when it is plain text that does not look like an encoded
// word. Receivers decode encoded words found in parameter values (libmime does so for unencoded
// continuations), so as plain text it would come back as something else
function isPlainParamValue(value) {
return isPlainText(value, true) && !value.includes('=?');
}
/**
* Wraps a value into a quoted-string. Inside one a quote would end the string early
* and a backslash would escape whatever follows it, so both go out as quoted-pairs.
@@ -188,7 +194,7 @@ export function buildHeaderValue(structured) {
const value = structured.params[key];
// a parameter name is a token too and it is emitted without any quoting around it
const param = key.replace(/[\x00-\x1f\x7f]/g, '');
if (!isPlainText(value, true) || value.length >= 75) {
if (!isPlainParamValue(value) || value.length >= 75) {
buildHeaderParam(param, value, 50).forEach(encodedParam => {
if (!/[\s"\\;:/=(),<>@[\]?]|^[-']|'$/.test(encodedParam.value) || encodedParam.key.substr(-1) === '*') {
paramsArray.push(encodedParam.key + '=' + encodedParam.value);
@@ -237,7 +243,7 @@ export function buildHeaderParam(key, data, maxLength) {
let i, len;
maxLength = maxLength || 50;
// process ascii only text
if (isPlainText(data, true)) {
if (isPlainParamValue(data)) {
// check if conversion is even needed
if (encodedStr.length <= maxLength) {
return [