Skip to content

Parse changelog fragments without the release script's dependencies - #9004

Merged
cknitt merged 1 commit into
masterfrom
semantic-diff-no-deps
Oct 23, 2026
Merged

cknitt merged 1 commit into
masterfrom
semantic-diff-no-deps

Conversation

@cknitt

@cknitt cknitt commented Oct 23, 2026

Copy link
Copy Markdown
Member

Fixes the Semantic Diff check failing on every pull request since #9000 and #9002 met on master (e.g. #8950):

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'semver'

#9002 made commitRecords.js import changelog.js for the changelog's categories and parseFragment. #9000 made changelog.js import magicNumbers.js, which imports semver. The Semantic Diff workflow runs commitRecords.js without installing node_modules (deliberately: for fork pull requests it runs only the base branch's code and installs nothing), so the import fails.

  • categories, parseFragment and the PR-link patterns move to a new scripts/changelogFragments.js, which imports nothing. changelog.js imports them from there and re-exports categories, parseFragment and placeholderLink, so its importers and tests are unchanged.
  • commitRecords.js imports from changelogFragments.js.
  • New test in commitRecords.test.js: follows the renderer's imports from commitRecords.js and fails on any that is neither node: nor a relative file. On master's version it fails with magicNumbers.js imports semver.

Checked by running the renderer from a copy of scripts/ with no node_modules anywhere around it: master's version fails as above, this one starts.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AzPS5F8RDSGZ6dhfK6NdZp

The Semantic Diff workflow runs commitRecords.js without node_modules,
and changelog.js now imports magicNumbers.js, which imports semver, so
every pull request's semantic diff failed. Fragment parsing moves to
changelogFragments.js, which imports nothing, and a test keeps the
renderer's imports to Node's modules and its own files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AzPS5F8RDSGZ6dhfK6NdZp
Signed-off-by: Christoph Knittel <ck@cca.io>
@cknitt cknitt added the changelog:skip No release notes needed label Oct 23, 2026
@github-actions

Copy link
Copy Markdown

Changelog

No changelog entry.

Semantic Diff

1 commit · Full page

Parse changelog fragments without the release script's dependencies

edad641 · cknitt + Claude · Oct 23, 2026, 17:34 UTC

The Semantic Diff workflow runs commitRecords.js without node_modules, and changelog.js now imports magicNumbers.js, which imports semver, so every pull request's semantic diff failed. Fragment parsing moves to changelogFragments.js, which imports nothing, and a test keeps the renderer's imports to Node's modules and its own files.

@cknitt

cknitt commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-23T17:37:23.724247Z edad641 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cknitt
cknitt requested a review from fhammerschmidt October 23, 2026 17:41
@pkg-pr-new

pkg-pr-new Bot commented Oct 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@9004

@rescript/belt

npm i https://pkg.pr.new/@rescript/belt@9004

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@9004

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@9004

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@9004

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@9004

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@9004

commit: edad641

@github-actions

Copy link
Copy Markdown

@cknitt
cknitt merged commit 39bf4a1 into master Oct 23, 2026
26 of 27 checks passed
@cknitt
cknitt deleted the semantic-diff-no-deps branch October 23, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:skip No release notes needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants