Add publishRoot option - #1405
Open
Elizabeth Craig (ecraig12345) wants to merge 2 commits into
Open
Conversation
Copilot started reviewing on behalf of
Elizabeth Craig (ecraig12345)
August 26, 2026 00:26
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds publishRoot to support publishing packages from build-output directories.
Changes:
- Adds and validates the
publishRootconfiguration. - Applies it to
npm publishwith functional tests. - Documents the option and adds a change file.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
packages/beachball/src/validation/validate.ts |
Rejects absolute string paths. |
packages/beachball/src/types/BeachballOptions.ts |
Defines the new option. |
packages/beachball/src/packageManager/packagePublish.ts |
Resolves the publish working directory. |
packages/beachball/src/commands/configGet.ts |
Exposes the setting through config inspection. |
packages/beachball/src/__tests__/validate/validate.test.ts |
Tests path validation. |
packages/beachball/src/__functional__/packageManager/packagePublish.test.ts |
Tests string and callback forms. |
packages/beachball/src/__e2e__/syncE2E.test.ts |
Updates test options for the expanded signature. |
docs/overview/v3-migration.md |
Lists the new v3 feature. |
docs/overview/configuration.md |
Documents configuration behavior. |
change/beachball-69545193-97e4-4964-a332-29bfe825f8ba.json |
Records the minor package change. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Copilot started reviewing on behalf of
Elizabeth Craig (ecraig12345)
August 26, 2026 00:34
View session
| ? options.publishRoot({ packagePath: packageRoot, options }) | ||
| : options.publishRoot; | ||
|
|
||
| return configuredPublishRoot ? path.resolve(packageRoot, configuredPublishRoot) : packageRoot; |
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.
Add an option
publishRoot?: string | (({ packagePath, options }) => string)to customize the directory wherenpm publish/packis run for each package.Added as a proper fix for this patch: https://github.com/microsoft/griffel/blob/main/.yarn/patches/beachball-npm-2.65.4-4bf34ce8d5.patch
The object parameter type leaves it open to add more context (like name or full package info) if there's a proven need.