feat(changeset-hygiene): opt-in transitive re-export config#42
Merged
Merged
Conversation
Lets caller repos opt in via .changeset/hygiene.json to suppress the
"extra package declared" warning when a downstream re-exporter
legitimately needs to bump alongside its upstream. Targets cases the
workspace graph can't see — e.g. Gradle api(project(":x")) re-exports
where a downstream artifact must be republished to deliver an upstream
change to its own consumers.
Schema:
{ "transitiveReExports": { "<upstream>": ["<downstream>", ...] } }
Backward-compatible: repos without the file behave exactly as before.
Motivating case: PostHog/posthog-android#525
Piccirello
approved these changes
May 21, 2026
4 tasks
turnipdabeets
added a commit
to PostHog/posthog-android
that referenced
this pull request
May 22, 2026
Declares posthog-android and posthog-server as transitive re-exporters
of posthog so the hygiene check stops flagging them as 'extra' when
declared in a changeset alongside posthog without their own source
changes.
Both modules declare api(project(":posthog")) in Gradle and must
republish to deliver upstream core changes to their Maven consumers.
Config schema added in PostHog/.github#42.
Triggered by warning on #525.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The hygiene check flags downstream packages declared in a changeset without source changes of their own as "extra" — but that's a false positive when the downstream legitimately needs to republish to deliver an upstream change to its consumers.
Motivating case: PostHog/posthog-android#525
posthog-androiddeclaresapi(project(":posthog"))in Gradle. Whenposthogships a public API change,posthog-androidmust be republished so its Maven POM points at the new core version — otherwise Android consumers don't get the feature. The hygiene script can't see Gradle deps and warns "Changeset declaresposthog-androidbut no source files in that package changed."Changes
.changeset/hygiene.json:{ "transitiveReExports": { "<upstream>": ["<downstream>", ...] } }<upstream>has source changes AND is declared in the changeset, declarations of its listed re-exporters are no longer flagged as "extra".Edge cases preserved