Repository navigation
Fix CI: Migrate from npm to pnpm for workspace monorepo - #21
Conversation
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR migrates the CI workflow from npm to pnpm to fix a build failure caused by the repository using pnpm workspaces with the workspace:* protocol, which npm does not support.
Changes:
- Updated
.github/workflows/ci.ymlto use pnpm instead of npm with proper setup, caching, and command execution - Updated
package.jsonengines requirement frompnpm >= 8.0.0topnpm >= 9.0.0to align with the lockfile version
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
.github/workflows/ci.yml |
Added pnpm setup step, changed cache from npm to pnpm, and migrated all npm commands to pnpm equivalents |
package.json |
Updated minimum pnpm version requirement from 8.0.0 to 9.0.0 |
| - name: Install dependencies | ||
| run: npm ci | ||
| run: pnpm install --frozen-lockfile |
There was a problem hiding this comment.
The PR updates the CI workflow to use pnpm, but the repository still contains package-lock.json (9951 lines) which is npm's lockfile. This file is incompatible with pnpm and should be removed since pnpm-lock.yaml is now the authoritative lockfile. Additionally, CONTRIBUTING.md still references npm commands throughout (lines 10, 23, 35, 41, 47, 53) instead of pnpm, which will confuse contributors and lead them to use the wrong package manager.
| "engines": { | ||
| "node": ">=18.0.0", | ||
| "pnpm": ">=8.0.0" | ||
| "pnpm": ">=9.0.0" |
There was a problem hiding this comment.
The pnpm version requirement has been updated to >=9.0.0, but this is inconsistent with the documentation in README.md which still states "pnpm 8+ (recommended for monorepo management)" at line 143. The documentation should be updated to reflect the new minimum version requirement of pnpm 9.0.0.
| "pnpm": ">=9.0.0" | |
| "pnpm": ">=8.0.0" |
| run: pnpm run lint | ||
|
|
||
| - name: Build project | ||
| run: npm run build | ||
| run: pnpm run build | ||
|
|
||
| - name: Run tests | ||
| run: npm test | ||
| run: pnpm test |
There was a problem hiding this comment.
The PR description's testing section states that tests were run using npm commands (e.g., "npm test", "npm run lint", "npm run build"), but since this PR migrates from npm to pnpm, these tests should have been executed using pnpm commands instead. This creates a discrepancy between what was tested and what the PR changes implement.
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 9 | ||
|
|
||
| - name: Setup Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| cache: 'npm' | ||
| cache: 'pnpm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
| run: pnpm install --frozen-lockfile |
There was a problem hiding this comment.
While only ci.yml has been updated to use pnpm, other workflow files in the repository still use npm, which will fail with the same "Unsupported URL Type workspace:" error. The following workflows also need to be migrated to pnpm:
- .github/workflows/code-quality.yml (lines 31, 34, 48, 51)
- .github/workflows/release.yml (lines 25, 28, 31, and line 38 which references package-lock.json in the release archive)
All npm references in these workflows should be updated to use pnpm with the same setup pattern as implemented in ci.yml.
Piece 2 of #1144, ruled Option A in decision batch #21 (2026-09-03). The claim already worked: an agent takes an unowned case out of triage by moving it to a status that means a person is on it, and `case_self_claim` stamps `owner_id` with the caller. Nothing on the screen said so. This adds the affordance and nothing else. - `claim_case` action (`type: 'flow'`, record header + triage row menu), visible on exactly the set `case_unassigned_triage_sharing` grants edit on; - `claim_case` screen flow performing the STATUS MOVE only, `runAs: 'user'` because an elevated run makes the claim seam inert; - one guard proving ownership keeps exactly one writer; - four locale packs and the automation flow table in three doc locales. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DuzfS5chho38Yx1jxx9DEj
…T flow Both fields were writable, translated in four locales, and reachable from no screen: no form, no detail section, no list column, no filter. Nothing wrote them outside seed data, and neither was named in any profile's `fields` map — on this platform field permissions are built only from named fields, so an unnamed field is default-open. A satisfaction score typed by the person being scored is not the same fact as one the customer gave, and a CRM that cannot tell them apart reports a number it cannot defend. Retired under ADR-0049 enforce-or-remove per the maintainer ruling on #1428 (decision batch #21). `case_csat_followup` is retired rather than rewritten. Its only purpose was to notify the case owner, a day after close, to log a rating against a record page that had nowhere to take one. With the fields gone it feeds nothing, and no other purpose was measured to want it. Also removed: the four-locale label/help entries, the flow's row and the flow numeral in the built-in automation table (three doc locales), the CSAT knob and the satisfaction section of the packaged admin/service guides, and the flow's frontmatter source refs. The analytics pages now explain "CSAT by Agent" as having no satisfaction data at all rather than a field no measure aggregates. `crm_case` re-measured: `case_metrics` never declared a dimension or measure over either field, so `src/datasets/` was outside this change. The #1505 pin is reconciled: it asserts the columns are GONE rather than nulled. Measured while doing so — this engine refuses an undeclared write (`Unknown field 'customer_rating' on object 'crm_case'`, before hooks, sharing and security), so the plant path closes by construction. Co-authored-by: Claude
The lead record page's record:details sections become ten `{ group }`
references to crm_lead's fieldGroups (ruling C, decision batch #21), so
membership has one declaration site and the page curates only the order.
Notes, Do Not Call / Email Opt Out, the follow-up dates and the conversion
block become reachable on the Details tab.
The four page-only section names leave the locale packs with the sections
(`os validate` refuses a translation keyed to an undeclared section), and
the two pins that read the sections resolve the group's members instead.
Claude-Session: https://claude.ai/code/session_01ER8ntXZhYebyQ66aXWdjfT
Co-authored-by: Claude <noreply@anthropic.com>
Description
CI failing with
npm error Unsupported URL Type "workspace:"because the monorepo uses pnpm workspaces but the workflow was configured for npm.Type of Change
Related Issues
Reference: https://github.com/hotcrm/hotcrm/actions/runs/21388499652/job/61569723827#step:4:1
Changes Made
CI Workflow (
.github/workflows/ci.yml):npmtopnpmnpm ci→pnpm install --frozen-lockfilenpm run→pnpmfor all commandsPackage Definition (
package.json):pnpm >= 8.0.0→pnpm >= 9.0.0(aligns with lockfile)Testing
npm test)npm run lint)npm run build)Screenshots
N/A - CI configuration change only
Checklist
Additional Notes
Verified locally with pnpm 9.15.9 that
pnpm install --frozen-lockfilesucceeds and all workspace packages are resolved correctly.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.