Skip to content

✅ chore: verify monorepo support implementation#24

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/add-monorepo-support
Closed

✅ chore: verify monorepo support implementation#24
Copilot wants to merge 1 commit intomainfrom
copilot/add-monorepo-support

Conversation

Copy link
Contributor

Copilot AI commented Feb 12, 2026

This PR documents verification that the monorepo support feature request is fully implemented and production-ready.

Verification Scope

All 5 requested input parameters implemented in action.yml:

  • monorepo: Enable monorepo mode (default: false)
  • package-paths: Manual package list specification
  • workspace-detection: Auto-discover from root package.json workspaces
  • changed-only: Event-aware git diff to build only changed packages
  • dependency-order: Topological sort using Kahn's algorithm

Implementation Evidence

Core Scripts (2,696+ LOC total):

  • monorepo-orchestrator.sh (586L): Main orchestration with per-package flow detection
  • discover-workspaces.sh (348L): Workspace auto-discovery with glob pattern support
  • detect-changed-packages.sh (284L): Event-aware change detection (PR/push/release)
  • resolve-dependency-order.js (214L): Dependency-aware build ordering with circular dependency detection
  • pr-comment.js (400L): Enhanced PR comments with package status table
  • generate-outputs.sh (131L): Aggregated monorepo outputs

Key Features Verified:

  • 100% backwards compatible (conditional if: inputs.monorepo == 'true' gates)
  • Workspace discovery supports both array and object formats, filters private packages
  • Change detection handles root config changes, shallow clones, and safe fallbacks
  • Dependency ordering with O(n+e) performance, duplicate/circular detection
  • Security audit per package, dry-run support, GitHub package scoping

Documentation:

  • README with comprehensive monorepo section (25+ references)
  • Example workflows: examples/monorepo-workflow.yml, examples/workspace-auto-discovery.yml
  • All 9 monorepo-specific outputs documented

Usage Example

- uses: wgtechlabs/package-build-flow-action@v2
  with:
    monorepo: 'true'                    # Activates monorepo pipeline
    workspace-detection: 'true'         # Auto-discover from workspaces field
    changed-only: 'true'                # Build only changed packages
    dependency-order: 'true'            # Topological sort
    registry: 'both'
    npm-token: ${{ secrets.NPM_TOKEN }}

Design Principles Met

  • Backwards compatible: existing users change nothing
  • Opt-in: single monorepo: 'true' flag
  • Phased delivery: incremental commits in git history
  • Single-package scripts untouched

The feature is complete and ready for production use.

Original prompt

This section details on the original issue you should resolve

<issue_title>Monorepo Support</issue_title>
<issue_description>### Description

Add monorepo/workspace support to Package Build Flow Action, enabling users to build, version, and publish multiple packages from a single repository while maintaining full backwards compatibility with single-package mode.

Motivation

Currently the action operates on a single package.json. Many modern projects (like tinyclaw) use monorepo structures with workspaces containing multiple publishable packages (core libraries, plugins, CLIs). Users need the same intelligent flow detection, pre-release versioning, and publishing capabilities — but applied per-package across the monorepo.

This gives Package Build Flow a significant advantage over Changesets:

  • ✅ Automatic SHA-based pre-releases for debugging (no manual changeset files)
  • ✅ Dry-run mode built-in
  • ✅ Security audit per package
  • ✅ PR comments with ALL package install instructions
  • ✅ Zero manual steps — fully git-event driven

Design Principles

  1. 100% backwards compatiblemonorepo defaults to false, existing users change nothing
  2. Opt-in via single flagmonorepo: 'true' activates the new pipeline
  3. Phased delivery — ship value incrementally across 5 phases
  4. Existing scripts stay untouched for single-package mode — new scripts + conditional if: gates in action.yml

New Input Parameters

monorepo:
  description: 'Enable monorepo mode'
  default: 'false'

package-paths:
  description: 'Comma-separated list of package.json paths (Phase 1 manual mode)'
  default: ''

workspace-detection:
  description: 'Auto-detect workspaces from root package.json'
  default: 'true'

changed-only:
  description: 'Only build/publish packages that changed since last release'
  default: 'true'

dependency-order:
  description: 'Build packages in dependency order (topological sort)'
  default: 'true'
```</issue_description>

<agent_instructions>Verify if this feature request has been implemented.</agent_instructions>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add monorepo/workspace support to Package Build Flow Action ✅ chore: verify monorepo support implementation Feb 12, 2026
Copilot AI requested a review from warengonzaga February 12, 2026 10:09
@warengonzaga warengonzaga marked this pull request as ready for review February 12, 2026 11:31
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.

Monorepo Support

2 participants