Skip to content

Track monorepo dependency updates #1822

Open

Description

@lukasIO

In a monorepo where my-package depends on my-dependency (both are packages within the same monorepo) what's the recommended way to ensure a new release to my-dependency also results in a new release for my-package with that updated dependency?

I have the dependencies configured in knope.toml using this guide. Using the bot currently and the Release packages PR only appears to release the ones that are explicitly tagged with changesets.

Activity

  1. dbanty commented on Mar 10, 2026

    @dbanty
    Member

    Yeah right now Knope doesn't automatically do "maintenance releases" or anything. It only makes releases that have documented changes (like with changesets). So you have to flag a changeset with every package which should be released due to that change.

    That's not to say we couldn't add such a feature, though. Would just need to figure out how it should work. In particular, what goes in the release notes for dependents and how the version is affected.

  2. lukasIO commented on Mar 10, 2026

    @lukasIO
    Author

    I think the option that changesets provides is quite good: https://github.com/changesets/changesets/blob/main/docs/config-file-options.md#updateinternaldependencies.

    In line with this project it might be worth thinking about whether the scopes field should implicitly also serve as a "if something in the scope gets an update, this package should also get an update" – at least that was my first naive understanding of the scope field.

    Here's an example of what changesets puts in the release notes:

    Image

    the updated dependencies section makes sense to me

  3. ryanobjc commented on Jun 5, 2026

    @ryanobjc
    Contributor

    This is a missing feature that really makes or breaks the usage of knope in a monorepo imo. Even if there is no perfect solution, a parameterized solution is better than no solution at all.

    The workaround involves a lot of bash it seems. That is a crime against coders, to write so much DAG stuff in bash.

  4. ryanobjc commented on Jun 5, 2026

    @ryanobjc
    Contributor

    I may have a fix for this, I am testing on my 9-package mono repo, and will put up a PR when I am satisfies it works well. Curious people can check out my fork.

  5. ryanobjc commented on Jun 12, 2026

    @ryanobjc
    Contributor

    So I've been iterating on my change, and here are some highlights:

    • added two attributes for packages: track_paths and update_internal_dependencies = patch|minor|none
    • The track_paths allows knope to determine the 'scope' based on which file paths were changed. Sibling and descendant files of the versioned_files are considered to be within a package
    • the update_internal_dependencies lets you control which kind of release you get when a dependency changes
    • knope picks up package dependencies automatically from the package resolver

    My general guiding principle is to reduce user toil (developer using knope managed repos), make sure the config is as DRY as possible, and provide reasonable non-intrusive defaults, along with opt-in functionality as much as possible.

    I'll open a PR soon with this code.

  6. ryanobjc commented on Jun 12, 2026

    @ryanobjc
    Contributor

    Check out PR #1930

  7. lukasIO commented on Jul 10, 2026

    @lukasIO
    Author

    @dbanty are you open to this?

    We had multiple occasions now where the current workflow using knope broke releases on cargo due to a missing changeset for a monorepo dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions