Skip to content

fix: install published CLI runtime dependencies - #46

Merged
ManningWorks merged 1 commit into
ManningWorks:mainfrom
7487:fix/issue-42-regression-of-11-published-cli-cannot-st
Oct 13, 2026
Merged

ManningWorks merged 1 commit into
ManningWorks:mainfrom
7487:fix/issue-42-regression-of-11-published-cli-cannot-st

Conversation

@7487

@7487 7487 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #42 — [regression of #11] Published CLI cannot start: optional peerDependencies (commander, ts-morph, chalk, @inquirer/prompts) not installed by npm/npx
Source issue: #42

Spec

Spec — Issue #42: Published CLI cannot start

Source: #42

Problem

The published CLI imports eight packages at runtime, but the package marks them as optional peers. npm therefore omits them for consumers, so every CLI command fails before argument parsing.

Acceptance criteria

  • Every package imported by the CLI is installed as a regular dependency.
  • A freshly packed artifact installs into an empty consumer project and projex --version succeeds.

Approach

Move only the eight hard runtime imports from optional peer dependencies to regular dependencies. Keep their existing versions and add one manifest-level regression test.

Files likely touched

  • packages/core/package.json — classify CLI runtime imports as dependencies.
  • packages/core/src/__tests__/package.test.ts — prevent publishing without those dependencies.

Risk / blast radius

  • Scope: small
  • Breaking: no
  • Migration needed: no

The published install becomes larger because it now includes dependencies already required by the shipped CLI.

Test plan

  • Unit: package-manifest regression test.
  • Integration: build, pack, install in an empty project, then execute the installed CLI.
  • Visual: not applicable; no UI behavior changes.

Out of scope

Splitting the CLI into another package, upgrading dependencies, or changing unrelated CLI behavior.

Work breakdown (TDD)

TODO — Issue #42

Setup

  • Read the issue, repository instructions, and linked history.
  • Confirm the issue is open, unassigned, and has no fixing PR.
  • Trace every CLI import affected by dependency classification.

TDD loop

  • Red — The package regression test fails while runtime imports remain optional peers.
  • Green — Move only those runtime imports to regular dependencies.
  • Refactor — Assert dependency presence without coupling the test to version bumps.

Verification

  • Focused package regression test passes.
  • Fresh packed-consumer install and CLI execution pass.
  • Full lint, typecheck, test, and build gates pass.
  • Self-review confirms only the manifest and regression test are tracked changes.

Wrap-up

  • Commit the verified two-file fix.
  • Push normally to the fork branch.
  • Open the PR against ManningWorks/Projex:main.

Visual verification

No screenshots captured (stub or non-UI change).

Blockers / open questions

Test plan

  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • pnpm build
  • Packed-consumer install and projex --version smoke test

Generated by the auto-github-contributor skill. The agent followed a red-green-refactor loop and captured visual artefacts under .auto-pr/screenshots/.

@vercel

vercel Bot commented Oct 13, 2026

Copy link
Copy Markdown

@7487 is attempting to deploy a commit to the reallukemanning's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 61ea863f-62f9-40b4-b14e-641213e6e6e0
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ManningWorks
ManningWorks merged commit 76f90ee into ManningWorks:main Oct 13, 2026
1 of 2 checks passed
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.

[regression of #11] Published CLI cannot start: optional peerDependencies (commander, ts-morph, chalk, @inquirer/prompts) not installed by npm/npx

2 participants