Skip to content

feat(monorepo-tools): allow single repo COMPASS-10984 - #889

Merged
esvm merged 3 commits into
mainfrom
COMPASS-10984-allow-single-repo
Sep 15, 2026
Merged

esvm merged 3 commits into
mainfrom
COMPASS-10984-allow-single-repo

Conversation

@esvm

@esvm esvm commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Description

I'll be making use of the bump-packages script in https://github.com/mongodb-js/electron-wix-msi/.
Today, this script requires a workspace to exist, but that only makes sense for monorepos with multiple packages.

I'm changing the script to allow a fallback to the root dir in case the workspaces is not defined in package.json.

Testing

  • Unit tests
  • Manual tests in the repo I want to use it

Open Questions

Checklist

@esvm esvm self-assigned this Sep 15, 2026
Copilot AI lite review requested due to automatic review settings September 15, 2026 11:04
@esvm
esvm requested review from a team as code owners September 15, 2026 11:04
@esvm
esvm requested a review from nbbeeken September 15, 2026 11:04
Comment thread packages/monorepo-tools/src/utils/get-packages-in-topological-order.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The requested fallback and unit coverage are included, with no unresolved review issues.

Pull request overview

Adds support for single-package repositories by treating the repository root as the default package when workspaces is absent.

Changes:

  • Defaults workspace patterns to ['.'].
  • Adds unit coverage for repositories without workspaces.
File summaries
File Description
packages/monorepo-tools/src/utils/get-packages-in-topological-order.ts Adds root-package fallback behavior.
packages/monorepo-tools/src/utils/get-packages-in-topological-order.spec.ts Tests single-repository discovery.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@gribnoysup gribnoysup left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not sure if there's any documentation we might want to adjust also, code change lgtm 🙂

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage is 78.161%COMPASS-10984-allow-single-repo into main. No base build found for main.

@esvm
esvm merged commit 4ca3977 into main Sep 15, 2026
45 of 47 checks passed
@esvm
esvm deleted the COMPASS-10984-allow-single-repo branch September 15, 2026 12:21
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.

4 participants