Skip to content

fix(release): strip every comment from changelog entries and notes - #25

Merged
THPubs merged 1 commit into
devfrom
fix/strip-nested-comments
Oct 20, 2026
Merged

THPubs merged 1 commit into
devfrom
fix/strip-nested-comments

Conversation

@THPubs

@THPubs THPubs commented Oct 20, 2026

Copy link
Copy Markdown
Member

What changed

cleanEntry and draftNotes in scripts/release-lib.mjs now strip HTML comments until none is left, through a small stripComments helper, instead of in a single pass.

Why

CodeQL flagged both on the release pull request (#24) as incomplete multi-character sanitization. A single pass of /<!--[\s\S]*?-->/g over <!<!-- x -->-- y --> leaves a whole <!-- y -->, which would reach the release notes and latest.json. The input is our own commit titles and changelog, so the risk is low, but the fix is small.

How I tested it

  • A new test feeds the split comment to both functions and expects no comment left. It failed before the change, leaving <!-- y -->.
  • pnpm check passes.

Checklist

  • The PR targets dev.
  • I wrote or updated tests, and pnpm check passes.
  • I read and tested every line, and I can explain it in review.
  • AI tools wrote most of this change. (Tick if true. See Using AI tools.)

🤖 Generated with Claude Code

cleanEntry and draftNotes removed guidance comments in one pass, so a
comment split around another (`<!<!-- x -->-- y -->`) left a whole
`<!-- y -->` behind in the release notes. They now repeat until no comment
is left. CodeQL flagged both as incomplete multi-character sanitization on
the release pull request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@THPubs

THPubs commented Oct 20, 2026

Copy link
Copy Markdown
Member Author

Review and fix — pass 1

No new findings.

Checked by 1 finder (correctness, tests) · architecture review · nothing to score.


Ready to merge, as far as this review can see. Nothing is open from this pass or any pass before it.

@THPubs
THPubs merged commit 9caf9b9 into dev Oct 20, 2026
13 checks passed
@THPubs THPubs mentioned this pull request Oct 20, 2026
4 tasks done
THPubs added a commit that referenced this pull request Oct 20, 2026
Add #25 to the 0.13.0 entry. It merged into dev after the release commit,
so the release check on main refused to build until the entry lists it.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant