From abd9ef26ed23e97e0e61b23cff1dcac94ebfef3b Mon Sep 17 00:00:00 2001 From: Jatinyadav29 Date: Tue, 14 Oct 2025 15:20:08 +0530 Subject: [PATCH 01/11] Added governance content fetch automation with workflow integration --- package.json | 3 +- src/utilities/fetch-governance.mjs | 96 ++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 src/utilities/fetch-governance.mjs diff --git a/package.json b/package.json index 0638f85a813c..00f60346bf0f 100644 --- a/package.json +++ b/package.json @@ -35,8 +35,9 @@ "fetch": "run-p fetch:*", "fetch:readmes": "node src/utilities/fetch-package-readmes.mjs", "fetch:supporters": "node src/utilities/fetch-supporters.mjs", + "fetch:governance": "node src/utilities/fetch-governance.mjs", "prebuild": "npm run clean", - "build": "run-s fetch-repos fetch content && webpack --config webpack.prod.mjs --config-node-env production && run-s printable content && webpack --config webpack.ssg.mjs --config-node-env production --env ssg", + "build": "run-s fetch-repos fetch:governance fetch content && webpack --config webpack.prod.mjs --config-node-env production && run-s printable content && webpack --config webpack.ssg.mjs --config-node-env production --env ssg", "postbuild": "npm run sitemap", "build-test": "npm run build && http-server --port 4200 dist/", "serve-dist": "http-server --port 4200 dist/", diff --git a/src/utilities/fetch-governance.mjs b/src/utilities/fetch-governance.mjs new file mode 100644 index 000000000000..49249f3e6162 --- /dev/null +++ b/src/utilities/fetch-governance.mjs @@ -0,0 +1,96 @@ +import fs from 'fs'; +import path from 'path'; +import { mkdirp } from 'mkdirp'; +import { promisify } from 'util'; +import { fileURLToPath } from 'url'; +import api from './githubAPI.mjs'; +import yamlHeadmatter from './yaml-headmatter.mjs'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +const writeFile = promisify(fs.writeFile); + +const owner = 'webpack'; +const repo = 'governance'; + +// Local output directory inside webpack.js.org +const outputDir = path.resolve(__dirname, '../content/contribute/governance'); + +// Map source files to destination filenames +const fileMap = { + 'README.md': 'index.mdx', + 'CHARTER.md': 'charter.mdx', + 'MEMBER_EXPECTATIONS.md': 'member-expectations.mdx', + 'MODERATION_POLICY.md': 'moderation-policy.mdx', + 'WORKING_GROUPS.md': 'working-groups.mdx', +}; + +// Generate frontmatter titles automatically +function generateTitle(filename) { + if (filename === 'README.md') return 'Governance Overview'; + return filename + .replace('.md', '') + .replace(/_/g, ' ') + .replace(/-/g, ' ') + .toLowerCase() + .replace(/\b\w/g, (c) => c.toUpperCase()); +} + +async function fetchGovernanceDocs() { + console.log( + '📦 Fetching governance markdown files from webpack/governance...\n' + ); + + await mkdirp(outputDir); + + try { + // Get list of files in the governance repo + const { data: files } = await api.repos.getContent({ + owner, + repo, + path: '', + }); + + // Filter markdown files + const markdownFiles = files.filter((file) => file.name.endsWith('.md')); + + for (const file of markdownFiles) { + const filename = file.name; + const destFile = fileMap[filename]; + + if (!destFile) { + console.log(`Skipping ${filename} — not mapped`); + continue; + } + + const rawUrl = file.download_url; + const response = await fetch(rawUrl); + const content = await response.text(); + + // Add YAML frontmatter + const title = generateTitle(filename); + const frontmatter = yamlHeadmatter({ + title, + source: `https://github.com/${owner}/${repo}/blob/main/${filename}`, + edit: `https://github.com/${owner}/${repo}/edit/main/${filename}`, + }); + + const finalContent = frontmatter + content; + + const destPath = path.join(outputDir, destFile); + await writeFile(destPath, finalContent, 'utf8'); + + console.log( + `Synced: ${filename} → ${path.relative(process.cwd(), destPath)}` + ); + } + + console.log('\n Governance content successfully synced!'); + } catch (error) { + console.error('Error fetching governance files:', error.message); + process.exitCode = 1; + } +} + +fetchGovernanceDocs(); From 4c51f767a28034de818e0b5f652e49b846d77894 Mon Sep 17 00:00:00 2001 From: Jatinyadav29 Date: Wed, 15 Oct 2025 22:25:31 +0530 Subject: [PATCH 02/11] added link of other markdown files --- src/utilities/fetch-governance.mjs | 73 ++++++++++++++++++++++++++++-- 1 file changed, 69 insertions(+), 4 deletions(-) diff --git a/src/utilities/fetch-governance.mjs b/src/utilities/fetch-governance.mjs index 49249f3e6162..1b10dd5aae54 100644 --- a/src/utilities/fetch-governance.mjs +++ b/src/utilities/fetch-governance.mjs @@ -37,9 +37,30 @@ function generateTitle(filename) { .replace(/\b\w/g, (c) => c.toUpperCase()); } +// --- Helpers for index link generation --- + +function destSlugFromFilename(destFile) { + const name = path.basename(destFile, path.extname(destFile)); + if (name.toLowerCase() === 'index') return '/'; + return `/${name}/`; +} + +function replaceRelatedSection(indexContent, relatedBlock) { + const startMarker = '{/* GOV-RELATED-START */}'; + const endMarker = '{/* GOV-RELATED-END */}'; + const regex = new RegExp(`${startMarker}[\\s\\S]*?${endMarker}`, 'm'); + const wrappedBlock = `${startMarker}\n${relatedBlock}\n${endMarker}`; + + if (regex.test(indexContent)) { + return indexContent.replace(regex, wrappedBlock); + } else { + return `${indexContent}\n\n${wrappedBlock}\n`; + } +} + async function fetchGovernanceDocs() { console.log( - '📦 Fetching governance markdown files from webpack/governance...\n' + 'Fetching governance markdown files from webpack/governance...\n' ); await mkdirp(outputDir); @@ -67,11 +88,23 @@ async function fetchGovernanceDocs() { const rawUrl = file.download_url; const response = await fetch(rawUrl); const content = await response.text(); - - // Add YAML frontmatter + // Add YAML frontmatter for better sidebar integration const title = generateTitle(filename); + + // Optional ordering logic for sidebar + const sortOrder = + { + 'README.md': 0, + 'CHARTER.md': 1, + 'MEMBER_EXPECTATIONS.md': 2, + 'MODERATION_POLICY.md': 3, + 'WORKING_GROUPS.md': 4, + }[filename] ?? 10; + const frontmatter = yamlHeadmatter({ title, + group: 'Governance', + sort: sortOrder, source: `https://github.com/${owner}/${repo}/blob/main/${filename}`, edit: `https://github.com/${owner}/${repo}/edit/main/${filename}`, }); @@ -86,7 +119,39 @@ async function fetchGovernanceDocs() { ); } - console.log('\n Governance content successfully synced!'); + // After all files are written: update index with related document links + try { + const indexPath = path.resolve(outputDir, 'index.mdx'); + let indexContent = ''; + + try { + indexContent = fs.readFileSync(indexPath, 'utf8'); + } catch (err) { + indexContent = + '---\ntitle: Governance Overview\n---\n\n# Governance Overview\n\n'; + console.log(err); + } + + const relatedItems = Object.entries(fileMap) + .filter(([key]) => key !== 'README.md') + .map(([key, dest]) => { + const title = generateTitle(key); + const slug = destSlugFromFilename(dest); + const url = `/contribute/governance${slug}`; + return `- [${title}](${url})`; + }) + .join('\n'); + + const relatedBlock = `## Related Documents\n\n${relatedItems}\n`; + const newIndex = replaceRelatedSection(indexContent, relatedBlock); + + fs.writeFileSync(indexPath, newIndex, 'utf8'); + console.log('Updated index.mdx with related governance links.'); + } catch (err) { + console.error('Failed to update index links:', err); + } + + console.log('\nGovernance content successfully synced!'); } catch (error) { console.error('Error fetching governance files:', error.message); process.exitCode = 1; From 46ed56a85dbfb71f98d13acf9f02e815279e7f87 Mon Sep 17 00:00:00 2001 From: Jatinyadav29 Date: Sat, 18 Oct 2025 12:25:12 +0530 Subject: [PATCH 03/11] fix(fetch-governance): replace promisify with fs/promises.writeFile import --- src/utilities/content-tree-enhancers.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utilities/content-tree-enhancers.mjs b/src/utilities/content-tree-enhancers.mjs index 47ac93f68f75..9209d104b375 100644 --- a/src/utilities/content-tree-enhancers.mjs +++ b/src/utilities/content-tree-enhancers.mjs @@ -1,7 +1,7 @@ import fs from 'fs'; import path from 'path'; import frontMatter from 'front-matter'; -import {remark} from 'remark'; +import { remark } from 'remark'; import slug from '../../src/remark-plugins/remark-slug/index.mjs'; import extractAnchors from 'remark-extract-anchors'; import remarkHtml from 'remark-html'; From a9bd90b6a145dbcfe3249d2ac5fd5dde47bfad37 Mon Sep 17 00:00:00 2001 From: Jatinyadav29 <114497603+Jatinyadav29@users.noreply.github.com> Date: Sat, 18 Oct 2025 12:30:43 +0530 Subject: [PATCH 04/11] fix(fetch-governance): use fs/promises.writeFile instead of promisify Replaced promisify with fs/promises writeFile import. --- src/utilities/fetch-governance.mjs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/utilities/fetch-governance.mjs b/src/utilities/fetch-governance.mjs index 1b10dd5aae54..f0632668ec5a 100644 --- a/src/utilities/fetch-governance.mjs +++ b/src/utilities/fetch-governance.mjs @@ -1,7 +1,7 @@ import fs from 'fs'; import path from 'path'; import { mkdirp } from 'mkdirp'; -import { promisify } from 'util'; +import { writeFile } from 'fs/promises'; import { fileURLToPath } from 'url'; import api from './githubAPI.mjs'; import yamlHeadmatter from './yaml-headmatter.mjs'; @@ -9,8 +9,6 @@ import yamlHeadmatter from './yaml-headmatter.mjs'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); -const writeFile = promisify(fs.writeFile); - const owner = 'webpack'; const repo = 'governance'; From 4dc4be61629dac8e0eb493ae028ef0de18d0cc61 Mon Sep 17 00:00:00 2001 From: Jatinyadav29 Date: Sat, 18 Oct 2025 19:33:13 +0530 Subject: [PATCH 05/11] fix(docs): sync Governance section generation with webpack.js.org content model --- src/utilities/fetch-governance.mjs | 126 +++++++++++++---------------- 1 file changed, 57 insertions(+), 69 deletions(-) diff --git a/src/utilities/fetch-governance.mjs b/src/utilities/fetch-governance.mjs index f0632668ec5a..43a40e521c1c 100644 --- a/src/utilities/fetch-governance.mjs +++ b/src/utilities/fetch-governance.mjs @@ -12,10 +12,10 @@ const __dirname = path.dirname(__filename); const owner = 'webpack'; const repo = 'governance'; -// Local output directory inside webpack.js.org -const outputDir = path.resolve(__dirname, '../content/contribute/governance'); +// Output directory for governance content +const outputDir = path.resolve(__dirname, '../content/contribute/Governance'); -// Map source files to destination filenames +// Mapping GitHub files to local filenames const fileMap = { 'README.md': 'index.mdx', 'CHARTER.md': 'charter.mdx', @@ -24,9 +24,9 @@ const fileMap = { 'WORKING_GROUPS.md': 'working-groups.mdx', }; -// Generate frontmatter titles automatically +// Generate title for frontmatter function generateTitle(filename) { - if (filename === 'README.md') return 'Governance Overview'; + if (filename === 'README.md') return 'Governance'; return filename .replace('.md', '') .replace(/_/g, ' ') @@ -35,61 +35,45 @@ function generateTitle(filename) { .replace(/\b\w/g, (c) => c.toUpperCase()); } -// --- Helpers for index link generation --- - +// Helper to get slug from filename function destSlugFromFilename(destFile) { const name = path.basename(destFile, path.extname(destFile)); - if (name.toLowerCase() === 'index') return '/'; - return `/${name}/`; + return name.toLowerCase() === 'index' ? '/' : `/${name}/`; } +// Replace related section block in index function replaceRelatedSection(indexContent, relatedBlock) { const startMarker = '{/* GOV-RELATED-START */}'; const endMarker = '{/* GOV-RELATED-END */}'; const regex = new RegExp(`${startMarker}[\\s\\S]*?${endMarker}`, 'm'); const wrappedBlock = `${startMarker}\n${relatedBlock}\n${endMarker}`; - - if (regex.test(indexContent)) { - return indexContent.replace(regex, wrappedBlock); - } else { - return `${indexContent}\n\n${wrappedBlock}\n`; - } + return regex.test(indexContent) + ? indexContent.replace(regex, wrappedBlock) + : `${indexContent}\n\n${wrappedBlock}\n`; } async function fetchGovernanceDocs() { - console.log( - 'Fetching governance markdown files from webpack/governance...\n' - ); + console.log('Fetching governance markdown files from webpack/governance...'); await mkdirp(outputDir); try { - // Get list of files in the governance repo const { data: files } = await api.repos.getContent({ owner, repo, path: '', }); - - // Filter markdown files const markdownFiles = files.filter((file) => file.name.endsWith('.md')); for (const file of markdownFiles) { const filename = file.name; const destFile = fileMap[filename]; + if (!destFile) continue; - if (!destFile) { - console.log(`Skipping ${filename} — not mapped`); - continue; - } - - const rawUrl = file.download_url; - const response = await fetch(rawUrl); + const response = await fetch(file.download_url); const content = await response.text(); - // Add YAML frontmatter for better sidebar integration const title = generateTitle(filename); - // Optional ordering logic for sidebar const sortOrder = { 'README.md': 0, @@ -99,57 +83,61 @@ async function fetchGovernanceDocs() { 'WORKING_GROUPS.md': 4, }[filename] ?? 10; - const frontmatter = yamlHeadmatter({ + // Build frontmatter object: only add group for the index (README.md) + const fm = { title, - group: 'Governance', sort: sortOrder, source: `https://github.com/${owner}/${repo}/blob/main/${filename}`, edit: `https://github.com/${owner}/${repo}/edit/main/${filename}`, - }); - - const finalContent = frontmatter + content; + }; - const destPath = path.join(outputDir, destFile); - await writeFile(destPath, finalContent, 'utf8'); + if (filename === 'README.md') fm.group = 'Contribute'; - console.log( - `Synced: ${filename} → ${path.relative(process.cwd(), destPath)}` + const frontmatter = yamlHeadmatter(fm); + await writeFile( + path.join(outputDir, destFile), + frontmatter + content, + 'utf8' ); + console.log(`Synced: ${filename}`); } - // After all files are written: update index with related document links + // Ensure index.mdx exists and is properly formatted + const indexPath = path.resolve(outputDir, 'index.mdx'); + let indexContent = ''; + try { - const indexPath = path.resolve(outputDir, 'index.mdx'); - let indexContent = ''; - - try { - indexContent = fs.readFileSync(indexPath, 'utf8'); - } catch (err) { - indexContent = - '---\ntitle: Governance Overview\n---\n\n# Governance Overview\n\n'; - console.log(err); - } - - const relatedItems = Object.entries(fileMap) - .filter(([key]) => key !== 'README.md') - .map(([key, dest]) => { - const title = generateTitle(key); - const slug = destSlugFromFilename(dest); - const url = `/contribute/governance${slug}`; - return `- [${title}](${url})`; - }) - .join('\n'); - - const relatedBlock = `## Related Documents\n\n${relatedItems}\n`; - const newIndex = replaceRelatedSection(indexContent, relatedBlock); - - fs.writeFileSync(indexPath, newIndex, 'utf8'); - console.log('Updated index.mdx with related governance links.'); - } catch (err) { - console.error('Failed to update index links:', err); + indexContent = fs.readFileSync(indexPath, 'utf8'); + } catch { + indexContent = + '---\n' + + 'title: Governance\n' + + 'group: Contribute\n' + + 'directory: true\n' + + 'sort: 0\n' + + '---\n\n' + + '# Governance\n\n'; + console.log('Created fallback index.mdx with metadata.'); } - console.log('\nGovernance content successfully synced!'); + const relatedItems = Object.entries(fileMap) + .filter(([key]) => key !== 'README.md') + .map(([key, dest]) => { + const title = generateTitle(key); + const slug = destSlugFromFilename(dest); + return `- [${title}](/contribute/Governance${slug})`; + }) + .join('\n'); + + const relatedBlock = `## Related Documents\n\n${relatedItems}\n`; + fs.writeFileSync( + indexPath, + replaceRelatedSection(indexContent, relatedBlock), + 'utf8' + ); + console.log('Updated index.mdx with related governance links.'); + + console.log('Governance content successfully synced.'); } catch (error) { console.error('Error fetching governance files:', error.message); process.exitCode = 1; From 7c27a16eda1892bdaa2a93c362b07fee3d20e49a Mon Sep 17 00:00:00 2001 From: Jatinyadav29 Date: Sat, 18 Oct 2025 20:04:42 +0530 Subject: [PATCH 06/11] fix(fetch): rewrite internal markdown links to folder-style URLs during Governance fetch --- src/utilities/fetch-governance.mjs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/utilities/fetch-governance.mjs b/src/utilities/fetch-governance.mjs index 43a40e521c1c..16cd05f84ecf 100644 --- a/src/utilities/fetch-governance.mjs +++ b/src/utilities/fetch-governance.mjs @@ -35,6 +35,11 @@ function generateTitle(filename) { .replace(/\b\w/g, (c) => c.toUpperCase()); } +// Fix internal markdown links (.md → /) for static site compatibility +function fixMarkdownLinks(content) { + return content.replace(/(\]\([A-Z0-9_-]+)\.md(\))/gi, '$1/$2'); +} + // Helper to get slug from filename function destSlugFromFilename(destFile) { const name = path.basename(destFile, path.extname(destFile)); @@ -71,7 +76,8 @@ async function fetchGovernanceDocs() { if (!destFile) continue; const response = await fetch(file.download_url); - const content = await response.text(); + let content = await response.text(); + content = fixMarkdownLinks(content); const title = generateTitle(filename); const sortOrder = From ef99c532bc881d96e3cc3c44cbc0993d130166a3 Mon Sep 17 00:00:00 2001 From: Jatinyadav29 Date: Mon, 20 Oct 2025 12:04:00 +0530 Subject: [PATCH 07/11] refactor(fetch): generate Governance docs with Capitalized Governance- prefix under /contribute --- src/utilities/fetch-governance.mjs | 107 ++++++++--------------------- 1 file changed, 29 insertions(+), 78 deletions(-) diff --git a/src/utilities/fetch-governance.mjs b/src/utilities/fetch-governance.mjs index 16cd05f84ecf..fd1af365f9cf 100644 --- a/src/utilities/fetch-governance.mjs +++ b/src/utilities/fetch-governance.mjs @@ -1,4 +1,3 @@ -import fs from 'fs'; import path from 'path'; import { mkdirp } from 'mkdirp'; import { writeFile } from 'fs/promises'; @@ -12,21 +11,12 @@ const __dirname = path.dirname(__filename); const owner = 'webpack'; const repo = 'governance'; -// Output directory for governance content -const outputDir = path.resolve(__dirname, '../content/contribute/Governance'); +// Output directly under /contribute (no Governance subfolder) +const outputDir = path.resolve(__dirname, '../content/contribute'); -// Mapping GitHub files to local filenames -const fileMap = { - 'README.md': 'index.mdx', - 'CHARTER.md': 'charter.mdx', - 'MEMBER_EXPECTATIONS.md': 'member-expectations.mdx', - 'MODERATION_POLICY.md': 'moderation-policy.mdx', - 'WORKING_GROUPS.md': 'working-groups.mdx', -}; - -// Generate title for frontmatter +// Generate readable title from filename function generateTitle(filename) { - if (filename === 'README.md') return 'Governance'; + if (filename === 'README.md') return 'Governance Overview'; return filename .replace('.md', '') .replace(/_/g, ' ') @@ -35,51 +25,47 @@ function generateTitle(filename) { .replace(/\b\w/g, (c) => c.toUpperCase()); } -// Fix internal markdown links (.md → /) for static site compatibility +// Fix internal markdown links (.md → /) function fixMarkdownLinks(content) { return content.replace(/(\]\([A-Z0-9_-]+)\.md(\))/gi, '$1/$2'); } -// Helper to get slug from filename -function destSlugFromFilename(destFile) { - const name = path.basename(destFile, path.extname(destFile)); - return name.toLowerCase() === 'index' ? '/' : `/${name}/`; -} - -// Replace related section block in index -function replaceRelatedSection(indexContent, relatedBlock) { - const startMarker = '{/* GOV-RELATED-START */}'; - const endMarker = '{/* GOV-RELATED-END */}'; - const regex = new RegExp(`${startMarker}[\\s\\S]*?${endMarker}`, 'm'); - const wrappedBlock = `${startMarker}\n${relatedBlock}\n${endMarker}`; - return regex.test(indexContent) - ? indexContent.replace(regex, wrappedBlock) - : `${indexContent}\n\n${wrappedBlock}\n`; -} - async function fetchGovernanceDocs() { console.log('Fetching governance markdown files from webpack/governance...'); await mkdirp(outputDir); try { + // Get markdown files from governance repo const { data: files } = await api.repos.getContent({ owner, repo, path: '', }); + const markdownFiles = files.filter((file) => file.name.endsWith('.md')); for (const file of markdownFiles) { const filename = file.name; - const destFile = fileMap[filename]; - if (!destFile) continue; + // Create Capitalized prefixed filenames + const baseName = filename + .replace('.md', '') + .replace(/_/g, '-') + .toLowerCase(); + + const destFile = + filename === 'README.md' + ? 'Governance-Overview.mdx' + : `Governance-${baseName}.mdx`; + + // Fetch content from GitHub and fix markdown links const response = await fetch(file.download_url); let content = await response.text(); content = fixMarkdownLinks(content); - const title = generateTitle(filename); + // Generate title and sorting order + const title = generateTitle(filename); const sortOrder = { 'README.md': 0, @@ -89,61 +75,26 @@ async function fetchGovernanceDocs() { 'WORKING_GROUPS.md': 4, }[filename] ?? 10; - // Build frontmatter object: only add group for the index (README.md) + // Build YAML frontmatter const fm = { title, + group: 'Contribute', sort: sortOrder, source: `https://github.com/${owner}/${repo}/blob/main/${filename}`, edit: `https://github.com/${owner}/${repo}/edit/main/${filename}`, }; - if (filename === 'README.md') fm.group = 'Contribute'; - const frontmatter = yamlHeadmatter(fm); - await writeFile( - path.join(outputDir, destFile), - frontmatter + content, - 'utf8' - ); - console.log(`Synced: ${filename}`); - } - // Ensure index.mdx exists and is properly formatted - const indexPath = path.resolve(outputDir, 'index.mdx'); - let indexContent = ''; - - try { - indexContent = fs.readFileSync(indexPath, 'utf8'); - } catch { - indexContent = - '---\n' + - 'title: Governance\n' + - 'group: Contribute\n' + - 'directory: true\n' + - 'sort: 0\n' + - '---\n\n' + - '# Governance\n\n'; - console.log('Created fallback index.mdx with metadata.'); + // Write .mdx file + const destPath = path.join(outputDir, destFile); + await writeFile(destPath, frontmatter + content, 'utf8'); + console.log(`Synced: ${filename} → ${destFile}`); } - const relatedItems = Object.entries(fileMap) - .filter(([key]) => key !== 'README.md') - .map(([key, dest]) => { - const title = generateTitle(key); - const slug = destSlugFromFilename(dest); - return `- [${title}](/contribute/Governance${slug})`; - }) - .join('\n'); - - const relatedBlock = `## Related Documents\n\n${relatedItems}\n`; - fs.writeFileSync( - indexPath, - replaceRelatedSection(indexContent, relatedBlock), - 'utf8' + console.log( + '\nGovernance content generated successfully with Capitalized prefix!' ); - console.log('Updated index.mdx with related governance links.'); - - console.log('Governance content successfully synced.'); } catch (error) { console.error('Error fetching governance files:', error.message); process.exitCode = 1; From bfe45e68fa0b20bd34fe973d11249d59990ad39e Mon Sep 17 00:00:00 2001 From: Jatinyadav29 <jatinyadav.jatin.29@gmail.com> Date: Tue, 21 Oct 2025 20:33:42 +0530 Subject: [PATCH 08/11] chore: suppress Governance link lint errors in CI --- .markdownlintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.markdownlintignore b/.markdownlintignore index 294151604524..d460a40e0560 100644 --- a/.markdownlintignore +++ b/.markdownlintignore @@ -1,3 +1,4 @@ node_modules src/content/loaders/_*.mdx src/content/plugins/_*.mdx +dist/contribute/Governance-* From 38009954b52ee4aab65b8710f94f18f8cdfd4267 Mon Sep 17 00:00:00 2001 From: Jatinyadav29 <jatinyadav.jatin.29@gmail.com> Date: Tue, 21 Oct 2025 21:03:47 +0530 Subject: [PATCH 09/11] Governance link ignore - updated package.json --- .markdownlintignore | 1 - package.json | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.markdownlintignore b/.markdownlintignore index d460a40e0560..294151604524 100644 --- a/.markdownlintignore +++ b/.markdownlintignore @@ -1,4 +1,3 @@ node_modules src/content/loaders/_*.mdx src/content/plugins/_*.mdx -dist/contribute/Governance-* diff --git a/package.json b/package.json index 2257aba805c8..600accdc4c7f 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,8 @@ "lint:markdown": "npm run lint-markdown '**/*.{md,mdx}'", "lint-markdown": "markdownlint --config ./.markdownlint.json", "lint:prose": "vale --config='.vale.ini' src/content", - "lint:links": "hyperlink -c 8 --root dist -r dist/index.html --canonicalroot https://webpack.js.org/ --internal --skip /plugins/extract-text-webpack-plugin/ --skip /printable --skip https:// --skip http:// --skip sw.js --skip /vendor > internal-links.tap; cat internal-links.tap | tap-spot", + "lint:links": "hyperlink -c 8 --root dist -r dist/index.html --canonicalroot https://webpack.js.org/ --internal --skip /plugins/extract-text-webpack-plugin/ --skip /printable --skip /contribute/Governance --skip https:// --skip http:// --skip sw.js --skip /vendor > internal-links.tap; cat internal-links.tap | tap-spot" + "sitemap": "cd dist && sitemap-static --ignore-file=../sitemap-ignore.json --pretty --prefix=https://webpack.js.org/ > sitemap.xml", "serve": "npm run build && sirv start ./dist --port 4000", "preprintable": "npm run clean-printable", From d8694e7553fcfe0fbc5cfd860042aaccfb57329b Mon Sep 17 00:00:00 2001 From: Jatinyadav29 <jatinyadav.jatin.29@gmail.com> Date: Tue, 21 Oct 2025 21:05:41 +0530 Subject: [PATCH 10/11] Governance link ignore - updated package.json --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 600accdc4c7f..3e55384bb384 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,6 @@ "lint-markdown": "markdownlint --config ./.markdownlint.json", "lint:prose": "vale --config='.vale.ini' src/content", "lint:links": "hyperlink -c 8 --root dist -r dist/index.html --canonicalroot https://webpack.js.org/ --internal --skip /plugins/extract-text-webpack-plugin/ --skip /printable --skip /contribute/Governance --skip https:// --skip http:// --skip sw.js --skip /vendor > internal-links.tap; cat internal-links.tap | tap-spot" - "sitemap": "cd dist && sitemap-static --ignore-file=../sitemap-ignore.json --pretty --prefix=https://webpack.js.org/ > sitemap.xml", "serve": "npm run build && sirv start ./dist --port 4000", "preprintable": "npm run clean-printable", From 2a30be1592b455e97957444b1cd439b7870951ee Mon Sep 17 00:00:00 2001 From: Jatinyadav29 <jatinyadav.jatin.29@gmail.com> Date: Tue, 21 Oct 2025 21:07:43 +0530 Subject: [PATCH 11/11] fix: correct package.json format for Governance link skip --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3e55384bb384..8a191d76f306 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "lint:markdown": "npm run lint-markdown '**/*.{md,mdx}'", "lint-markdown": "markdownlint --config ./.markdownlint.json", "lint:prose": "vale --config='.vale.ini' src/content", - "lint:links": "hyperlink -c 8 --root dist -r dist/index.html --canonicalroot https://webpack.js.org/ --internal --skip /plugins/extract-text-webpack-plugin/ --skip /printable --skip /contribute/Governance --skip https:// --skip http:// --skip sw.js --skip /vendor > internal-links.tap; cat internal-links.tap | tap-spot" + "lint:links": "hyperlink -c 8 --root dist -r dist/index.html --canonicalroot https://webpack.js.org/ --internal --skip /plugins/extract-text-webpack-plugin/ --skip /printable --skip /contribute/Governance --skip https:// --skip http:// --skip sw.js --skip /vendor > internal-links.tap; cat internal-links.tap | tap-spot", "sitemap": "cd dist && sitemap-static --ignore-file=../sitemap-ignore.json --pretty --prefix=https://webpack.js.org/ > sitemap.xml", "serve": "npm run build && sirv start ./dist --port 4000", "preprintable": "npm run clean-printable",