Upgraded dependencies, bumped to Node 24.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { format } from 'date-fns';
|
||||
import { parse } from 'yaml';
|
||||
import formatTemplate from 'template-format';
|
||||
import { parse } from 'yaml';
|
||||
|
||||
import slugify from '#/utils/slugify.js';
|
||||
import ellipsis from '#/utils/ellipsis.js';
|
||||
import slugify from '#/utils/slugify.js';
|
||||
|
||||
const genderMap = {
|
||||
f: 'female',
|
||||
@@ -126,13 +126,7 @@ const propProcessors = {
|
||||
};
|
||||
|
||||
function curateValue(value, item) {
|
||||
return [].concat(value) // account for both arrays (actors, tags) and strings (title, channel)
|
||||
.filter((listValue) => !!listValue)
|
||||
.slice(0, item.limit || Infinity)
|
||||
.map((listValue) => (item.slugify ? slugify(listValue, item.slugify) : listValue))
|
||||
.map((listValue) => ellipsis(listValue, item.slice || Infinity, item.ellipsis || ''))
|
||||
.map((listValue) => `${item.wrap?.[0] || ''}${listValue}${item.wrap?.[1] || ''}`)
|
||||
.join(item.delimit || ', ');
|
||||
return [].concat(value).filter((listValue) => !!listValue).slice(0, item.limit || Infinity).map((listValue) => (item.slugify ? slugify(listValue, item.slugify) : listValue)).map((listValue) => ellipsis(listValue, item.slice || Infinity, item.ellipsis || '')).map((listValue) => `${item.wrap?.[0] || ''}${listValue}${item.wrap?.[1] || ''}`).join(item.delimit || ', ');
|
||||
}
|
||||
|
||||
function traverseTemplate(chain, release, env, { delimit = ' ' } = {}) {
|
||||
|
||||
@@ -51,7 +51,7 @@ export default function slugify(strings, delimiter = '-', {
|
||||
.trim()
|
||||
.toLowerCase()
|
||||
.replace(removePunctuation && /[.,:;'"_-]/g, '')
|
||||
.match(/[A-Za-zÀ-ÖØ-öø-ÿ0-9]+/g));
|
||||
.match(/[A-Za-zÀ-ÖØ-öø-ÿ0-9]+/g)); // eslint-disable-line regexp/no-obscure-range -- intentional accented-Latin range for slugification
|
||||
|
||||
if (!slugComponents) {
|
||||
return '';
|
||||
@@ -62,7 +62,7 @@ export default function slugify(strings, delimiter = '-', {
|
||||
|
||||
if (accSlug.length < limit) {
|
||||
if (removeAccents) {
|
||||
return accSlug.replace(/[à-ÿ]/g, (match) => substitutes[match] || '');
|
||||
return accSlug.replace(/[à-ÿ]/g, (match) => substitutes[match] || ''); // eslint-disable-line regexp/no-obscure-range -- intentional accented-Latin range for slugification
|
||||
}
|
||||
|
||||
return accSlug;
|
||||
|
||||
Reference in New Issue
Block a user