From 982044cd6c819951a7566e9e044e9e24f66b2d2b Mon Sep 17 00:00:00 2001 From: Claas Augner <495429+caugner@users.noreply.github.com> Date: Thu, 28 Nov 2024 14:53:09 +0100 Subject: [PATCH 1/4] chore(deps-dev): bump cross-spawn from 6.0.5 to 6.0.6 in /cloud-function (#12198) --- cloud-function/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cloud-function/package-lock.json b/cloud-function/package-lock.json index 0d002eaedd66..b113159a204b 100644 --- a/cloud-function/package-lock.json +++ b/cloud-function/package-lock.json @@ -3970,9 +3970,9 @@ "license": "MIT" }, "node_modules/npm-run-all/node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz", + "integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==", "dev": true, "license": "MIT", "dependencies": { From 2e76945220cbe67258c9a510fecf44b3f1935a19 Mon Sep 17 00:00:00 2001 From: Leo McArdle Date: Thu, 28 Nov 2024 15:18:53 +0000 Subject: [PATCH 2/4] fix(generic-content): ssr about and community page page path had a double slash --- build/spas.ts | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/build/spas.ts b/build/spas.ts index 61400c8c8622..70ace875cb59 100644 --- a/build/spas.ts +++ b/build/spas.ts @@ -276,7 +276,7 @@ export async function buildSPAs(options: { async function buildStaticPages( dirpath: string, slugPrefix?: string, - title = "MDN" + title?: string ) { const crawler = new fdir() .withFullPaths() @@ -287,7 +287,7 @@ export async function buildSPAs(options: { for (const filepath of filepaths) { const file = filepath.replace(dirpath, ""); - const page = file.split(".")[0]; + const page = file.split(".")[0].slice(1); const locale = DEFAULT_LOCALE; const pathLocale = locale.toLowerCase(); @@ -327,9 +327,9 @@ export async function buildSPAs(options: { }; const context: HydrationData = { hyData, - pageTitle: frontMatter.attributes.title + pageTitle: title ? `${frontMatter.attributes.title} | ${title}` - : title, + : frontMatter.attributes.title, url, }; @@ -361,16 +361,8 @@ export async function buildSPAs(options: { "observatory/docs", OBSERVATORY_TITLE ); - await buildStaticPages( - path.join(GENERIC_CONTENT_ROOT, "community"), - "", - "Contribute to MDN" - ); - await buildStaticPages( - path.join(GENERIC_CONTENT_ROOT, "about"), - "", - "About MDN" - ); + await buildStaticPages(path.join(GENERIC_CONTENT_ROOT, "community")); + await buildStaticPages(path.join(GENERIC_CONTENT_ROOT, "about")); } // Build all the home pages in all locales. From ade5d6f89683797c3b71d43d5419b6969587dd82 Mon Sep 17 00:00:00 2001 From: Leo McArdle Date: Thu, 28 Nov 2024 15:18:53 +0000 Subject: [PATCH 3/4] fix(generic-content): ssr community page page path had a double slash --- build/spas.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/build/spas.ts b/build/spas.ts index 39b3387a63bf..39fc7e696983 100644 --- a/build/spas.ts +++ b/build/spas.ts @@ -272,7 +272,7 @@ export async function buildSPAs(options: { async function buildStaticPages( dirpath: string, slugPrefix?: string, - title = "MDN" + title?: string ) { const crawler = new fdir() .withFullPaths() @@ -283,7 +283,7 @@ export async function buildSPAs(options: { for (const filepath of filepaths) { const file = filepath.replace(dirpath, ""); - const page = file.split(".")[0]; + const page = file.split(".")[0].slice(1); const locale = DEFAULT_LOCALE; const pathLocale = locale.toLowerCase(); @@ -321,9 +321,9 @@ export async function buildSPAs(options: { }; const context: HydrationData = { hyData, - pageTitle: frontMatter.attributes.title + pageTitle: title ? `${frontMatter.attributes.title} | ${title}` - : title, + : frontMatter.attributes.title, url, }; @@ -355,11 +355,7 @@ export async function buildSPAs(options: { "observatory/docs", OBSERVATORY_TITLE ); - await buildStaticPages( - path.join(GENERIC_CONTENT_ROOT, "community"), - "", - "Contribute to MDN" - ); + await buildStaticPages(path.join(GENERIC_CONTENT_ROOT, "community")); } // Build all the home pages in all locales. From 3d37cee5251139a40f4958639508f15d4385e607 Mon Sep 17 00:00:00 2001 From: Leo McArdle Date: Thu, 28 Nov 2024 15:23:40 +0000 Subject: [PATCH 4/4] fix(generic-content): fix lint --- build/spas.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/build/spas.ts b/build/spas.ts index 39fc7e696983..45af96a9040c 100644 --- a/build/spas.ts +++ b/build/spas.ts @@ -1,6 +1,5 @@ import fs from "node:fs"; import path from "node:path"; -import { fileURLToPath } from "node:url"; import frontmatter from "front-matter"; import { fdir, PathsOutput } from "fdir";