node_modules: update (#146)

Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
Dawid Dziurla
2026-08-07 08:08:41 +02:00
committed by GitHub
co-authored by dawidd6
parent 6b3dfab4e0
commit 3d5a3a75cc
44 changed files with 660 additions and 284 deletions
+13 -3
View File
@@ -102,12 +102,22 @@ function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
if (comment)
reqNewline = true;
let str = stringify(item, itemCtx, () => (comment = null));
if (i < items.length - 1)
reqNewline || (reqNewline = lines.length > linesAtValue || str.includes('\n'));
if (i < items.length - 1) {
str += ',';
}
else if (ctx.options.trailingComma) {
if (ctx.options.lineWidth > 0) {
reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) +
(str.length + 2) >
ctx.options.lineWidth);
}
if (reqNewline) {
str += ',';
}
}
if (comment)
str += lineComment(str, itemIndent, commentString(comment));
if (!reqNewline && (lines.length > linesAtValue || str.includes('\n')))
reqNewline = true;
lines.push(str);
linesAtValue = lines.length;
}