Update to Node.js v24 (#10419)

This commit is contained in:
DS Boyce
2026-05-05 11:51:42 -07:00
committed by GitHub
parent cc5b215863
commit 6f4ae14f36
17 changed files with 302 additions and 160 deletions
+10 -4
View File
@@ -38,11 +38,11 @@ export default function (ctx: AppContext, app: Express) {
}
const imageEntries = await Promise.all(
[starterPack.creator]
.concat(starterPack.listItemsSample.map(li => li.subject))
.concat((starterPack.listItemsSample ?? []).map(li => li.subject))
// has avatar
.filter(p => p.avatar)
// no sensitive labels
.filter(p => !p.labels.some(l => hideAvatarLabels.has(l.val)))
.filter(p => !p.labels?.some(l => hideAvatarLabels.has(l.val)))
.map(async p => {
try {
assert(p.avatar)
@@ -58,7 +58,12 @@ export default function (ctx: AppContext, app: Express) {
}),
)
const images = new Map(
imageEntries.filter(([_, image]) => image !== null).slice(0, 7),
imageEntries
.filter(
(entry): entry is readonly [string, Buffer<ArrayBuffer>] =>
entry[1] !== null,
)
.slice(0, 7),
)
const svg = await satori(
<StarterPack starterPack={starterPack} images={images} />,
@@ -68,8 +73,9 @@ export default function (ctx: AppContext, app: Express) {
width: STARTERPACK_WIDTH,
loadAdditionalAsset: async (code, text) => {
if (code === 'emoji') {
return await loadEmojiAsSvg(text)
return (await loadEmojiAsSvg(text)) ?? ''
}
return ''
},
},
)