Skip to content

Commit fc4405b

Browse files
committed
Merge branch '3.x' into bump-@types/chai-5.0.1
2 parents 2e9467c + 32e7f2d commit fc4405b

File tree

2 files changed

+26
-31
lines changed

2 files changed

+26
-31
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
"lodash.merge": "4.6.2",
106106
"mkdirp": "1.0.4",
107107
"mocha": "11.0.2",
108-
"monocart-coverage-reports": "2.11.3",
108+
"monocart-coverage-reports": "2.11.5",
109109
"ms": "2.1.3",
110110
"ora-classic": "5.4.2",
111111
"parse-function": "5.6.10",
@@ -129,7 +129,7 @@
129129
"@types/inquirer": "9.0.3",
130130
"@types/node": "22.10.2",
131131
"@wdio/sauce-service": "9.4.5",
132-
"@wdio/selenium-standalone-service": "8.3.2",
132+
"@wdio/selenium-standalone-service": "8.15.0",
133133
"@wdio/utils": "9.4.4",
134134
"@xmldom/xmldom": "0.9.5",
135135
"apollo-server-express": "3.13.0",
@@ -164,8 +164,8 @@
164164
"ts-node": "10.9.2",
165165
"tsd": "^0.31.0",
166166
"tsd-jsdoc": "2.5.0",
167-
"typedoc": "0.26.11",
168-
"typedoc-plugin-markdown": "4.3.2",
167+
"typedoc": "0.27.5",
168+
"typedoc-plugin-markdown": "4.3.3",
169169
"typescript": "5.7.2",
170170
"wdio-docker-service": "1.5.0",
171171
"webdriverio": "8.40.6",

runok.js

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -478,19 +478,14 @@ ${changelog}`
478478
const token = process.env.GH_TOKEN
479479

480480
try {
481-
const response = await axios.get(
482-
`https://api.github.com/repos/${owner}/${repo}/contributors`,
483-
{
484-
headers: { Authorization: `token ${token}` },
485-
},
486-
);
481+
const response = await axios.get(`https://api.github.com/repos/${owner}/${repo}/contributors`, {
482+
headers: { Authorization: `token ${token}` },
483+
})
487484

488485
// Filter out bot accounts
489-
const excludeUsers = ['dependabot[bot]', 'actions-user'];
486+
const excludeUsers = ['dependabot[bot]', 'actions-user']
490487

491-
const filteredContributors = response.data.filter(
492-
(contributor) => !excludeUsers.includes(contributor.login),
493-
);
488+
const filteredContributors = response.data.filter((contributor) => !excludeUsers.includes(contributor.login))
494489

495490
const contributors = filteredContributors.map((contributor) => {
496491
return `
@@ -499,45 +494,45 @@ ${changelog}`
499494
<img src="${contributor.avatar_url}" width="100" height="100" alt="${contributor.login}"/><br />
500495
<sub><b>${contributor.login}</b></sub>
501496
</a>
502-
</td>`;
503-
});
497+
</td>`
498+
})
504499

505500
// Chunk contributors into rows of 4
506-
const rows = [];
507-
const chunkSize = 4;
501+
const rows = []
502+
const chunkSize = 4
508503
for (let i = 0; i < contributors.length; i += chunkSize) {
509-
rows.push(`<tr>${contributors.slice(i, i + chunkSize).join('')}</tr>`);
504+
rows.push(`<tr>${contributors.slice(i, i + chunkSize).join('')}</tr>`)
510505
}
511506

512507
// Combine rows into a table
513508
const contributorsTable = `
514509
<table>
515510
${rows.join('\n')}
516511
</table>
517-
`;
512+
`
518513

519-
const readmePath = path.join(__dirname, 'README.md');
520-
let content = fs.readFileSync(readmePath, 'utf-8');
514+
const readmePath = path.join(__dirname, 'README.md')
515+
let content = fs.readFileSync(readmePath, 'utf-8')
521516

522517
// Replace or add the contributors section in the README
523-
const contributorsSectionRegex = /(## Contributors\s*\n)([\s\S]*?)(\n##|$)/;
524-
const match = content.match(contributorsSectionRegex);
518+
const contributorsSectionRegex = /(## Contributors\s*\n)([\s\S]*?)(\n##|$)/
519+
const match = content.match(contributorsSectionRegex)
525520

526521
if (match) {
527522
const updatedContent = content.replace(
528523
contributorsSectionRegex,
529-
`${match[1]}\n${contributorsTable}\n${match[3]}`
530-
);
531-
fs.writeFileSync(readmePath, updatedContent, 'utf-8');
524+
`${match[1]}\n${contributorsTable}\n${match[3]}`,
525+
)
526+
fs.writeFileSync(readmePath, updatedContent, 'utf-8')
532527
} else {
533528
// If no contributors section exists, add one at the end
534-
content += `\n${contributorsTable}`;
535-
fs.writeFileSync(readmePath, content, 'utf-8');
529+
content += `\n${contributorsTable}`
530+
fs.writeFileSync(readmePath, content, 'utf-8')
536531
}
537532

538-
console.log('Contributors section updated successfully!');
533+
console.log('Contributors section updated successfully!')
539534
} catch (error) {
540-
console.error('Error fetching contributors:', error.message);
535+
console.error('Error fetching contributors:', error.message)
541536
}
542537
},
543538

0 commit comments

Comments
 (0)