progmaweb
The site and account service of Progmasoft: a Next.js frontend and an ASP.NET Core API.
Clonegit clone https://git.progmasoft.com/progmaweb
chore(catalog): update Catch3 latestRelease to 0.5.0
- Commit
af84edd88341f2cd6e63094948f58c55ed663689- Author
- Leitwolf11 ·
- Parents
dcd19ca80a58
Changes
apps/web/lib/news.ts | 14 +++++++++----- apps/web/lib/products.ts | 6 +++--- apps/web/tests/news.test.mjs | 3 ++- apps/web/tests/structured-data.test.mjs | 2 +- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/apps/web/lib/news.ts b/apps/web/lib/news.ts index 4139f8e..87321d0 100644 --- a/apps/web/lib/news.ts +++ b/apps/web/lib/news.ts @@ -210,12 +210,16 @@ export function articleUrl(article: Article): string { return `https://news.progmasoft.com/${article.slug}`; } -/** The release notes an article points to, from the catalog. */ +/** The release notes an article points to, derived from the product repository and tag. */ export function releaseNotes(article: Article): string | undefined { - const release = productFacts(article.product).latestRelease; - return release && release.version === article.release - ? release.url - : undefined; + if (!article.release) { + return undefined; + } + const product = productFacts(article.product); + if (product.latestRelease?.version === article.release) { + return product.latestRelease.url; + } + return `${product.source}/releases/tag/${article.product}-${article.release}`; } interface NewsMessages { diff --git a/apps/web/lib/products.ts b/apps/web/lib/products.ts index 2c66202..5d8e2ae 100644 --- a/apps/web/lib/products.ts +++ b/apps/web/lib/products.ts @@ -110,9 +110,9 @@ export const products: Record<ProductSlug, ProductFacts> = { status: "released", started: "2026-09-24", latestRelease: { - version: "0.4.0", - date: "2026-11-15", - url: "https://github.com/Progmasoft/catch3/releases/tag/catch3-0.4.0", + version: "0.5.0", + date: "2026-11-30", + url: "https://github.com/Progmasoft/catch3/releases/tag/catch3-0.5.0", }, accent: "green", }, diff --git a/apps/web/tests/news.test.mjs b/apps/web/tests/news.test.mjs index 888559d..184bc5b 100644 --- a/apps/web/tests/news.test.mjs +++ b/apps/web/tests/news.test.mjs @@ -57,8 +57,9 @@ test("every article is written in every language", () => { test("an article that announces a release points to its notes", () => { for (const article of articles.filter((entry) => entry.release)) { + const product = products[article.product]; expect(releaseNotes(article)).toBe( - products[article.product].latestRelease?.url, + `${product.source}/releases/tag/${article.product}-${article.release}`, ); } }); diff --git a/apps/web/tests/structured-data.test.mjs b/apps/web/tests/structured-data.test.mjs index de50693..e8ecdf3 100644 --- a/apps/web/tests/structured-data.test.mjs +++ b/apps/web/tests/structured-data.test.mjs @@ -91,7 +91,7 @@ test("llms.txt lists every project with its facts and names no former project", `${slug} license`, ).toBeTruthy(); } - expect(text.includes("latest release 0.4.0")).toBeTruthy(); + expect(text.includes("latest release 0.5.0")).toBeTruthy(); expect(text.includes("latest release 0.2.0")).toBeTruthy(); for (const word of [/\bTala\b/, /\bXide\b/, /\bTalac\b/, /\bX#/]) { expect(!word.test(text), String(word)).toBeTruthy();