Skip to content

chore: keep unreleased changelog entries in per-package fragment files - #10642

Merged
pawicao merged 7 commits into
mainfrom
@pawicao/reanimated/changelog-entry-files
Sep 22, 2026
Merged

pawicao merged 7 commits into
mainfrom
@pawicao/reanimated/changelog-entry-files

Conversation

@pawicao

@pawicao pawicao commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Note

This pull request was authored by AI on behalf of @pawicao.

Summary

Every pull request that changed a package edited the same ## Unpublished section, so pull requests conflicted with each other. I moved unreleased entries into one file per pull request in packages/<pkg>/changelog/ and left CHANGELOG.md with released versions only. A fragment holds only the entry text, because the release script reads the pull request number from the squash commit that added the file and asks GitHub for the author. I added changelog:add and changelog:squash to both package workspaces, the first to write a fragment and the second to move the fragments into CHANGELOG.md, and I rewrote changelog-check to validate fragments. I added fragments for #10584, #10632, #10587, #10629 and #10650, which merged to main after the 4.7.0 cut, and removed their lines from CHANGELOG.md.

How we use the changelog from now on

  • In a pull request: run yarn workspace <pkg> changelog:add --type <breaking|feature|fix|other> --message '<One sentence>', or write packages/<pkg>/changelog/<slug>.<type>.md by hand. The script writes into the package of the workspace, and the slug defaults to the branch name. Do not write the pull request link or the author, and do not edit CHANGELOG.md.
  • To read the unpublished entries: yarn workspace <pkg> changelog:squash prints them and changes no file.
  • In a release pull request on the stable branch: yarn workspace <pkg> changelog:squash x.y.z writes the ## x.y.z — <date> section and deletes the fragments.
  • In the post-release pull request on main: yarn workspace <pkg> changelog:squash x.y.0 --date <release date> --cut origin/x.y-stable does the same, but leaves the fragments that came to main after the stable branch was cut.
  • Cherry-picks: the fragment comes with the cherry-pick, and the first (#N) in the commit subject still points to the original pull request.
  • When the script cannot resolve an entry: add a pr: <number> or a by: @user1, @user2 line to the fragment. by: always takes precedence.
  • changelog-check needs a new fragment for each changed package. It rejects edits of CHANGELOG.md and deleted fragments, unless the pull request changes the package version, which marks a release or post-release pull request.

Test plan

yarn test:scripts passes. I also ran the three scripts in scratch repositories with real squash merges, and the author lookup against GitHub.

changelog-check fails on this pull request, because it removes the ## Unpublished section from both CHANGELOG.md files and does not change a version. This is expected and happens only for this migration.

Changelog

  • I added a changelog fragment with yarn changelog:add for each changed package, or this PR does not change react-native-reanimated or react-native-worklets.

@pawicao
pawicao added this pull request to stack #10643 September 21, 2026 08:52
@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: e021c77d-9722-4872-9af5-627b74219d71

📥 Commits

Reviewing files that changed from the base of the PR and between 9adfcdd and 8ae2cf2.

📒 Files selected for processing (1)
  • AGENTS.md

Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The PR replaces unpublished CHANGELOG.md sections with typed package changelog fragments. It adds changelog:add and changelog:squash commands, fragment parsing and release rendering, GitHub metadata resolution, and changelog enforcement. Tests cover creation, validation, release collection, status parsing, and release exceptions. Contributor and release documentation now describe the fragment workflow.

Priority: ⬇️ Low

Change: Other

Merge Risk: ⚪ Minimal · up to 8ae2c

The fragment workflow validates entries, preserves rename changes, rejects duplicate metadata, and handles release migrations without an actionable merge-blocking risk.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: storing unreleased changelog entries in per-package fragment files.
Description check ✅ Passed The description is directly related to the changeset and explains the fragment workflow, new scripts, validation updates, release process, and migration details.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: a6a96be0-aaef-49b0-8d27-e4fae69a2f6c

📥 Commits

Reviewing files that changed from the base of the PR and between 5e0b91e and ba92707.

📒 Files selected for processing (21)
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/workflows/changelog-check.yml
  • AGENTS.md
  • package.json
  • packages/react-native-reanimated/.changelog/.gitkeep
  • packages/react-native-reanimated/.changelog/unreleased-changelog-entries-now-live-in-one-file.md
  • packages/react-native-reanimated/CHANGELOG.md
  • packages/react-native-reanimated/RELEASE.md
  • packages/react-native-worklets/.changelog/.gitkeep
  • packages/react-native-worklets/.changelog/unreleased-changelog-entries-now-live-in-one-file.md
  • packages/react-native-worklets/CHANGELOG.md
  • scripts/__tests__/add-changelog-entry.test.mts
  • scripts/__tests__/changelog-entries.test.mts
  • scripts/__tests__/check-changelog.test.mts
  • scripts/__tests__/collect-changelog-entries.test.mts
  • scripts/__tests__/lint-changelog.test.mts
  • scripts/add-changelog-entry.mts
  • scripts/changelog-entries.mts
  • scripts/check-changelog.mts
  • scripts/collect-changelog-entries.mts
  • scripts/lint-changelog.mts
💤 Files with no reviewable changes (2)
  • packages/react-native-reanimated/CHANGELOG.md
  • packages/react-native-worklets/CHANGELOG.md

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Comment thread scripts/add-changelog-entry.mts Outdated
Comment thread scripts/changelog-entries.mts Outdated
Comment thread scripts/changelog-entries.mts Outdated
Comment thread scripts/check-changelog.mts Outdated
Comment thread scripts/collect-changelog-entries.mts Outdated
Comment thread scripts/lint-changelog.mts Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟡 Minor · Reject duplicate front-matter keys. · changelog-entries.mts:70

scripts/changelog-entries.mts:70
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Reject duplicate front-matter keys.

Map.set replaces an earlier type, author, or pr value. An entry with two valid type lines passes validation and is released under the last type. Reject a key when fields already contains it. Add a regression test for each duplicated key.

Proposed fix
-    fields.set(key, value.trim());
+    if (fields.has(key)) {
+      errors.push(`\`${key}\` is declared more than once.`);
+      continue;
+    }
+    fields.set(key, value.trim());

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: f8c8ffe0-bd03-4252-9faf-1c16384f2f56

📥 Commits

Reviewing files that changed from the base of the PR and between ba92707 and bddf7ab.

📒 Files selected for processing (12)
  • AGENTS.md
  • packages/react-native-reanimated/RELEASE.md
  • packages/react-native-worklets/.changelog/bump-worklets-version-to-0-14-0.md
  • scripts/__tests__/changelog-entries.test.mts
  • scripts/__tests__/check-changelog.test.mts
  • scripts/__tests__/collect-changelog-entries.test.mts
  • scripts/__tests__/lint-changelog.test.mts
  • scripts/add-changelog-entry.mts
  • scripts/changelog-entries.mts
  • scripts/check-changelog.mts
  • scripts/collect-changelog-entries.mts
  • scripts/lint-changelog.mts
🚧 Files skipped from review as they are similar to previous changes (5)
  • AGENTS.md
  • scripts/tests/lint-changelog.test.mts
  • packages/react-native-reanimated/RELEASE.md
  • scripts/tests/check-changelog.test.mts
  • scripts/tests/collect-changelog-entries.test.mts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Comment thread scripts/check-changelog.mts Outdated
@pawicao
pawicao force-pushed the @pawicao/reanimated/changelog-entry-files branch from bddf7ab to a01e532 Compare September 21, 2026 22:37
@pawicao pawicao changed the title chore: keep unreleased changelog entries in per-package .changelog folders chore: keep unreleased changelog entries in per-package fragment files Sep 21, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 0caa821a-f845-4048-b404-10080952bfbd

📥 Commits

Reviewing files that changed from the base of the PR and between bddf7ab and a01e532.

📒 Files selected for processing (18)
  • .github/PULL_REQUEST_TEMPLATE.md
  • AGENTS.md
  • package.json
  • packages/react-native-reanimated/RELEASE.md
  • packages/react-native-reanimated/changelog/README.md
  • packages/react-native-reanimated/changelog/oxlint-migration.other.md
  • packages/react-native-worklets/CHANGELOG.md
  • packages/react-native-worklets/changelog/README.md
  • packages/react-native-worklets/changelog/dev-flag-in-js.fix.md
  • packages/react-native-worklets/changelog/oxlint-migration.other.md
  • scripts/__tests__/add-changelog.test.mts
  • scripts/__tests__/changelog-fragments.test.mts
  • scripts/__tests__/check-changelog.test.mts
  • scripts/__tests__/squash-changelog.test.mts
  • scripts/add-changelog.mts
  • scripts/changelog-fragments.mts
  • scripts/check-changelog.mts
  • scripts/squash-changelog.mts
💤 Files with no reviewable changes (1)
  • packages/react-native-worklets/CHANGELOG.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/PULL_REQUEST_TEMPLATE.md

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Comment thread scripts/changelog/check.mts
@pawicao
pawicao marked this pull request as ready for review September 22, 2026 08:15
@pawicao
pawicao requested a review from tjzel September 22, 2026 08:15
@pawicao
pawicao force-pushed the @pawicao/reanimated/changelog-entry-files branch from 9adfcdd to 43a9c4e Compare September 22, 2026 13:43
Base automatically changed from @pawicao/reanimated/post-release-4.7.0 to main September 22, 2026 13:44
Each pull request adds `packages/<pkg>/changelog/<slug>.<type>.md` and
no longer edits `CHANGELOG.md`, so two pull requests never touch the
same file. `yarn changelog:add` writes a fragment, `yarn changelog:squash`
moves the fragments into `CHANGELOG.md` at release, and the changelog
check validates the fragments.
@pawicao
pawicao force-pushed the @pawicao/reanimated/changelog-entry-files branch from 43a9c4e to 8ae2cf2 Compare September 22, 2026 13:44

@tjzel tjzel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coderabbitai approve machen

Comment thread package.json Outdated
Comment thread scripts/changelog/squash.mts
@pawicao
pawicao merged commit 79881d9 into main Sep 22, 2026
25 of 26 checks passed
@pawicao
pawicao deleted the @pawicao/reanimated/changelog-entry-files branch September 22, 2026 15:39
tjzel pushed a commit to robhogan/react-native-reanimated that referenced this pull request Sep 23, 2026
software-mansion#10642)

> [!NOTE]
> This pull request was authored by AI on behalf of @pawicao.

Every pull request that changed a package edited the same `##
Unpublished` section, so pull requests conflicted with each other. I
moved unreleased entries into one file per pull request in
`packages/<pkg>/changelog/` and left `CHANGELOG.md` with released
versions only. A fragment holds only the entry text, because the release
script reads the pull request number from the squash commit that added
the file and asks GitHub for the author. I added `changelog:add` and
`changelog:squash` to both package workspaces, the first to write a
fragment and the second to move the fragments into `CHANGELOG.md`, and I
rewrote `changelog-check` to validate fragments. I added fragments for
the 4.7.0 cut, and removed their lines from `CHANGELOG.md`.

- **In a pull request:** run `yarn workspace <pkg> changelog:add --type
<breaking|feature|fix|other> --message '<One sentence>'`, or write
`packages/<pkg>/changelog/<slug>.<type>.md` by hand. The script writes
into the package of the workspace, and the slug defaults to the branch
name. Do not write the pull request link or the author, and do not edit
`CHANGELOG.md`.
- **To read the unpublished entries:** `yarn workspace <pkg>
changelog:squash` prints them and changes no file.
- **In a release pull request on the stable branch:** `yarn workspace
<pkg> changelog:squash x.y.z` writes the `## x.y.z — <date>` section and
deletes the fragments.
- **In the post-release pull request on `main`:** `yarn workspace <pkg>
changelog:squash x.y.0 --date <release date> --cut origin/x.y-stable`
does the same, but leaves the fragments that came to `main` after the
stable branch was cut.
- **Cherry-picks:** the fragment comes with the cherry-pick, and the
first `(#N)` in the commit subject still points to the original pull
request.
- **When the script cannot resolve an entry:** add a `pr: <number>` or a
`by: @user1, @user2` line to the fragment. `by:` always takes
precedence.
- `changelog-check` needs a new fragment for each changed package. It
rejects edits of `CHANGELOG.md` and deleted fragments, unless the pull
request changes the package `version`, which marks a release or
post-release pull request.

`yarn test:scripts` passes. I also ran the three scripts in scratch
repositories with real squash merges, and the author lookup against
GitHub.

`changelog-check` fails on this pull request, because it removes the `##
Unpublished` section from both `CHANGELOG.md` files and does not change
a `version`. This is expected and happens only for this migration.

- [x] I added a changelog fragment with `yarn changelog:add` for each
changed package, or this PR does not change `react-native-reanimated` or
`react-native-worklets`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants