Skip to content

fix(ci): use root npm install for workspace monorepo#34

Merged
chevyphillip merged 2 commits into
mainfrom
auggie/ci-fix
Apr 11, 2026
Merged

fix(ci): use root npm install for workspace monorepo#34
chevyphillip merged 2 commits into
mainfrom
auggie/ci-fix

Conversation

@chevyphillip
Copy link
Copy Markdown
Collaborator

Summary

The CI workflow was running npm ci --prefix packages/cli, which fails because this is an npm workspace monorepo — the root package-lock.json manages all workspace dependencies. Running npm ci with --prefix skips the root lock file and can't find dependencies like posthog-node and @posthog/core.

Changes

  • .github/workflows/ci.yml: Changed npm ci --prefix packages/clinpm ci in both lint and test jobs
  • Lint and test run commands still target packages/cli via --prefix

Why

This unblocks PR #33 (dependabot next.js security bump) and fixes CI for all future PRs.

Verification

  • YAML validated locally
  • Diff limited to .github/workflows/ci.yml only

Pull Request opened by Augment Code with guidance from the PR author

dependabot Bot and others added 2 commits April 10, 2026 17:26
…update

Bumps the npm_and_yarn group with 1 update in the / directory: [next](https://github.com/vercel/next.js).
Bumps the npm_and_yarn group with 1 update in the /apps/web directory: [next](https://github.com/vercel/next.js).


Updates `next` from 15.5.14 to 15.5.15
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](vercel/next.js@v15.5.14...v15.5.15)

Updates `next` from 15.5.14 to 15.5.15
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](vercel/next.js@v15.5.14...v15.5.15)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 15.5.15
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: next
  dependency-version: 15.5.15
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
…ns dependency state

This repository uses a root npm workspace lockfile, so installing from
`packages/cli` in CI bypasses the dependency graph that npm expects.
Running `npm ci` at the repo root keeps install behavior aligned with the
workspace layout while preserving the existing CLI-specific lint and test
commands.

Constraint: npm workspace dependencies are resolved by the root package-lock.json
Rejected: Keep `npm ci --prefix packages/cli` and add a package-local lockfile | would duplicate workspace dependency state and fight npm workspace conventions
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep root-level install steps in CI unless the monorepo stops using a shared workspace lockfile
Tested: YAML parse of `.github/workflows/ci.yml`; diff review confirming only the two install commands changed
Not-tested: End-to-end GitHub Actions execution after push
@snyk-io
Copy link
Copy Markdown

snyk-io Bot commented Apr 11, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@chevyphillip chevyphillip self-assigned this Apr 11, 2026
@chevyphillip chevyphillip added the dependencies Pull requests that update a dependency file label Apr 11, 2026
@chevyphillip chevyphillip marked this pull request as ready for review April 11, 2026 04:09
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Apr 11, 2026

🤖 Augment PR Summary

Summary: Updates CI to install dependencies correctly for an npm workspaces monorepo by running npm ci at the repository root, and includes a Next.js dependency bump in the web app.

Changes:

  • CI workflow: replaced npm ci --prefix packages/cli with root-level npm ci in both lint and test jobs.
  • CI workflow: lint/test commands still target the CLI package via --prefix packages/cli.
  • Web app: bumped apps/web Next.js from ^15.2.0 to ^15.5.15 (with corresponding lockfile updates).

Technical Notes: Root installs align with the repo’s workspaces configuration (apps/, packages/) and avoid missing dependencies when installing from a subdirectory.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

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

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread apps/web/package.json
},
"dependencies": {
"next": "^15.2.0",
"next": "^15.5.15",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

apps/web/package.json:12 — The PR title/description reads like a CI-only change, but this also bumps next (and updates lockfiles). If intentional, consider updating the PR description/title (or splitting) so reviewers don’t miss the dependency upgrade.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Comment thread .github/workflows/ci.yml
cache: npm
- name: Install CLI dependencies
run: npm ci --prefix packages/cli
run: npm ci
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

.github/workflows/ci.yml:23-24 — This step is named “Install CLI dependencies” but now runs npm ci at the repo root (installing all workspaces); consider renaming to avoid confusion (also applies to the test job).

Severity: low

Other Locations
  • .github/workflows/ci.yml:39

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@chevyphillip chevyphillip merged commit 2857897 into main Apr 11, 2026
7 checks passed
@chevyphillip chevyphillip deleted the auggie/ci-fix branch April 11, 2026 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant