Skip to content

Conversation

@Leundai
Copy link

@Leundai Leundai commented Dec 16, 2025

This adds support for the 'additional-paths' configuration option that allows a package to declare dependencies on file paths outside its main package directory. When commits modify files in these additional paths, they will be included in the release for the dependent package.

This is useful for monorepos where multiple packages may depend on shared code that lives outside their package directories.

Inspired by googleapis#2534


Summary of Changes

Core Implementation

  • schemas/config.json: Added additional-paths schema definition (array of strings, manifest-only)
  • src/manifest.ts: Added additionalPaths to ReleaserConfig interface and updated CommitSplit instantiation to pass Record<string, string[]> format
  • src/util/commit-split.ts: Changed packagePaths type from string[] to Record<string, string[]> and implemented two-pass commit assignment:
    1. First pass: assign commits to primary package based on main path
    2. Second pass: assign commits to additional packages based on their additional-paths
  • src/util/commit-utils.ts: Extracted normalizePath function for single path normalization

Tests

  • Added test fixture test/fixtures/manifest/config/additional-paths.json
  • Added test for reading additional-paths from manifest config
  • Added test for commits in additionalPaths triggering releases
  • Added test for commits belonging to multiple components via additional-paths
  • Updated existing CommitSplit tests to use new Record<string, string[]> format

CI Fix

  • Updated .github/workflows/ci.yaml to reference nominal-io/release-please instead of googleapis/release-please for the build-action job

Human Review Checklist

  • Verify the two-pass commit assignment logic in commit-split.ts:98-140 correctly assigns commits to both primary and additional packages
  • Check that the dedupe Set properly prevents duplicate commit assignments while still allowing commits to be shared across packages via additional-paths
  • Confirm the Record<string, string[]> format change doesn't break any other usages

Link to Devin run: https://app.devin.ai/sessions/60f42b0519ac4cd2bdd8ab1de108eddf
Requested by: Leo Galindo-Frias (@Leundai)


Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

devin-ai-integration bot and others added 4 commits December 16, 2025 01:20
…package

This adds support for the 'additional-paths' configuration option that allows
a package to declare dependencies on file paths outside its main package
directory. When commits modify files in these additional paths, they will be
included in the release for the dependent package.

This is useful for monorepos where multiple packages may depend on shared
code that lives outside their package directories.

Inspired by googleapis#2534

Co-Authored-By: Leo Galindo-Frias <[email protected]>
…package

This adds support for the 'additional-paths' configuration option that allows
a package to declare dependencies on file paths outside its main package
directory. When commits modify files in these additional paths, they will be
included in the release for the dependent package.

This is useful for monorepos where multiple packages may depend on shared
code that lives outside their package directories.

Inspired by googleapis#2534

Co-Authored-By: Leo Galindo-Frias <[email protected]>
… googleapis

The build-action job was referencing googleapis/release-please which caused
CI failures for PRs in this fork. Updated to use nominal-io/release-please
with the PR head SHA for proper testing.

Co-Authored-By: Leo Galindo-Frias <[email protected]>
@devin-ai-integration devin-ai-integration bot changed the title feat: Add additional-paths config to specify dependencies outside of … feat: Add additional-paths config to specify dependencies outside of package Dec 16, 2025
"exclude-paths": true,
"component-no-space": false
"component-no-space": false,
"additional-paths": true

Choose a reason for hiding this comment

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

is this making it required?

Copy link
Author

@Leundai Leundai Dec 16, 2025

Choose a reason for hiding this comment

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

This is more of a whitelist to control what properties can be used at the json "root" level.

Its used in conjunction with:
https://json-schema.org/understanding-json-schema/reference/object#additionalproperties

Copy link
Author

Choose a reason for hiding this comment

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

I.e if this was false, we would only be able to use additional-paths in the "packages" directory. Its sometimes useful if a repo wants to apply a trigger on ALL packages. (fern docs is an example of this)

scout not so much

@Leundai Leundai merged commit 760afee into main Dec 16, 2025
6 checks passed
Leundai pushed a commit that referenced this pull request Dec 16, 2025
🤖 I have created a release *beep* *boop*
---


##
[18.1.0](v18.0.2...v18.1.0)
(2025-12-16)


### Features

* Add additional-paths config to specify dependencies outside of package
([#5](#5))
([760afee](760afee))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

3 participants