Skip to content

fix: map bundled sources to their release package in changeset hygiene - #74

Open
marandaneto wants to merge 1 commit into
mainfrom
chore/changeset-release-paths
Open

fix: map bundled sources to their release package in changeset hygiene#74
marandaneto wants to merge 1 commit into
mainfrom
chore/changeset-release-paths

Conversation

@marandaneto

@marandaneto marandaneto commented Sep 6, 2026

Copy link
Copy Markdown
Member

Problem

Changeset hygiene asks for separate rrweb changesets in PostHog/posthog-js, even though those sources ship inside posthog-js. Simply excluding rrweb would also stop checking that its changes have a browser SDK changeset.

Example: PostHog/posthog-js#4808 (comment)

Changes

Add optional releasePackagePaths configuration in .changeset/hygiene.json. A mapping such as "packages/rrweb/": "posthog-js" attributes changes under that directory to the package that ships them instead of the individual workspace packages.

Directory boundaries are respected, trailing slashes are optional, and the most specific mapping wins. Invalid paths or unknown target packages produce a warning and retain normal workspace detection. Repositories without this configuration keep their existing behavior.

Add regression tests and a Node 22 CI job. No SDK release is needed.

Consumer configuration and script pin: PostHog/posthog-js#4810. Merge this PR before the consumer PR.

Validation

  • Five regression tests failed before the implementation. All 14 tests now pass with node --test .github/scripts/check-changeset-coverage.test.mjs.
  • Ran the script against PR #4808's actual head in a temporary detached worktree. Without the mapping it reports missing rrweb changesets. With the mapping it emits body=, which causes the workflow to delete the stale comment.
  • git diff --check passed.
  • Pi autoreview of 1cce55f2e8766f0a4006ca39700fb0c2a903b832 against origin/main reported no actionable findings.

Agent context

Human-driven (agent-assisted). Implemented with Pi using file tools, Git, GitHub CLI, Node tests, and autoreview. The mapping approach preserves the browser release requirement instead of hiding rrweb changes entirely. Human review is required.

@marandaneto marandaneto self-assigned this Sep 6, 2026
@marandaneto
marandaneto requested a review from a team September 6, 2026 09:19
@marandaneto
marandaneto marked this pull request as ready for review September 6, 2026 09:20
@marandaneto
marandaneto requested a review from a team as a code owner September 6, 2026 09:20
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