Repository navigation
Closed
Labels
RFCRequest For Comments.scope: code-infraInvolves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd).
Description
Summary
Allow publishing a subset of a repo's packages — typically internal/utility packages such as @base-ui/utils — without publishing the public package (@base-ui/react) in the same release. Today our publish flow assumes a full, coordinated release, so shipping only an internal package is not even in consideration and is only possible as a side effect of the publish cli (which doesn't consider changelog, GH release, git tag).
Motivation
We sometimes need to ship a fix or change to an internal package on its own:
- The internal package (
@base-ui/utils) is consumed by other packages or repos, and we want to roll out a change there without forcing a full@base-ui/reactrelease. - The public package isn't ready to release, or has unrelated unreleased work.
The current pipeline is built around a single repo-wide version.
Goals
- Make it possible to publish only the internal package(s).
- Keep the operation explicit and safe — no surprise releases, especially the repo-wide one.
Non-goals
- Custom dist-tags for these partial publishes. Changelogs and GitHub releases are in scope — the GH release is how we showcase the changelog, it just must not be marked as the repo's "Latest".
- Automating this as part of the default release trigger.
Background: current publish flow
Relevant tooling lives in mui-public/packages/code-infra:
src/cli/cmdPublish.mjs— reads root version, parses rootCHANGELOG.md, creates avX.Y.Zgit tag, optionally creates a GitHub draft release (--github-release), publishes to npm with an optional--tagdist-tag..github/workflows/publish.yml—workflow_dispatchwith inputs:preview,dry-run,github-release(checkbox),dist-tag.
Decision
Keep this deliberately minimal:
- Only publish the internal package(s). Do not create a custom dist-tag for these partial publishes. If canary versions are required, we already have that as a separate tool.
- Changelogs are mandatory. Users of the package will want to know what's new, so every partial publish must ship an updated changelog for the package(s) being published. The publish must fail if no changelog entry exists for the version being published. Generation follows the same flow as the current process, but writes to
packages/<pkg>/CHANGELOG.mdinstead of the rootCHANGELOG.md. - Showcase the changelog via a GitHub release, not marked "Latest". Create a GitHub release tied to the package's
<package>@<version>tag, with the changelog as the release body — this is the canonical, linkable place for consumers to see what changed. - Push per-package git tags as
<package>@<version>. Instead of the repo-widevX.Y.Ztag (which belongs to the full release flow), each partial publish pushes a tag scoped to the package, e.g.@base-ui/utils@1.4.0. This gives every internal package an independent release marker — which will make per-package changelog generation possible. - Fail on range dependencies. If any package in our repos depends on one of these internal packages via a range version (e.g.
^x.y.z/~x.y.z/worksapce:^) rather than a pinned/exact version, the partial publish must fail. A range dependency means an out-of-band internal publish could silently change what consumers resolve, which we want to prevent. - Keep it manual. This must not be triggered by the default publish flow — it's an explicit, opt-in on-demand operation.
- The mode is determined by the
--filterflag — no new flag.- No
--filter→ repo-wide publish (current behavior). --filterpresent → partial publish (everything above).
- No
Open questions / follow-ups
- Lerna behavior: verify lerna doesn't corrupt or mis-tag state for packages released in the meantime. Needs a concrete check before relying on this in practice. [to be followed up by @brijeshb42]
- Should the auto-generation step run locally (dev runs a command before opening the PR, as the global release) or as a CI step that creates the release?
- Should we still push package tags/releases when publishing repo-wide ? git tags at the least will be required for later changelogs.
Implementation
- Branch on
--filterpresence in src/cli/cmdPublish.mjs. - Add pre-publish validation that aborts with a clear error if any range dependency on the target packages is found.
- In the partial path, read version and changelog per selected package rather than from the root
package.json/ rootCHANGELOG.md(currently only reads the root). - Require a per-package changelog entry for the target version; abort if missing.
- Push @ git tags (skip repo-wide vX.Y.Z tag in partial mode).
- Create a GitHub release (make_latest: false) against the per-package tag.
- Update the current publish workflow. We'll need one more step in the
.github/workflows/publish.ymlto target this filter, either via a checkbox or via a dropdown selector from the Github workflow dispatch UI to target partial release.
Metadata
Metadata
Assignees
Labels
RFCRequest For Comments.scope: code-infraInvolves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd).
Activity
brijeshb42 commentedon Oct 8, 2026
Partial publishing is now handled in the current pipeline. Closing this as completed.
github-actions commentedon Oct 8, 2026
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.