From e1838875bf1dfeb93481f5d94ef7a75f1f37f118 Mon Sep 17 00:00:00 2001 From: "Ricardo Q. Bazan" Date: Tue, 13 Oct 2026 07:45:03 -0500 Subject: [PATCH] chore(changeset): format scoped package names as code in changelogs `@changesets/changelog-github` writes dependency lines with bare scoped package names, which GitHub renders as mentions of unrelated accounts in CHANGELOG.md, release notes and the version PR. A local changelog module delegates to it and wraps those names in backticks. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01MrWogBto4w6eFAaVEkczQf --- .changeset/changelog.cjs | 22 ++++++++++++++++++++++ .changeset/config.json | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .changeset/changelog.cjs diff --git a/.changeset/changelog.cjs b/.changeset/changelog.cjs new file mode 100644 index 0000000..875d87c --- /dev/null +++ b/.changeset/changelog.cjs @@ -0,0 +1,22 @@ +const github = require("@changesets/changelog-github").default; + +// GitHub renders bare scoped package names as @mentions unless they are code. +const SCOPED = + /(?=+*-]*[\w*])?|(? (i % 2 ? part : part.replace(SCOPED, (name) => `\`${name}\``))) + .join(""); +} + +module.exports = { + async getReleaseLine(...args) { + return codeScopes(await github.getReleaseLine(...args)); + }, + async getDependencyReleaseLine(...args) { + return codeScopes(await github.getDependencyReleaseLine(...args)); + }, +}; diff --git a/.changeset/config.json b/.changeset/config.json index 48a14ed..fb3ad5d 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,6 +1,6 @@ { "$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json", - "changelog": ["@changesets/changelog-github", { "repo": "withvariablelab/theme-toggle" }], + "changelog": ["./changelog.cjs", { "repo": "withvariablelab/theme-toggle" }], "commit": true, "fixed": [], "linked": [],