Skip to content

Fix CI: Migrate from npm to pnpm for workspace monorepo - #21

Merged
hotlong merged 2 commits into
mainfrom
copilot/update-commit-template
Jan 27, 2026
Merged

hotlong merged 2 commits into
mainfrom
copilot/update-commit-template

Conversation

Copilot AI commented Jan 27, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • CI/CD update

Related Issues

Reference: https://github.com/hotcrm/hotcrm/actions/runs/21388499652/job/61569723827#step:4:1

Changes Made

CI Workflow (.github/workflows/ci.yml):

  • Added pnpm setup step with version 9 (matches lockfile v9.0)
  • Changed cache strategy from npm to pnpm
  • Replaced npm ci → pnpm install --frozen-lockfile
  • Replaced npm run → pnpm for all commands

Package Definition (package.json):

  • Updated engines requirement: pnpm >= 8.0.0 → pnpm >= 9.0.0 (aligns with lockfile)

Testing

  • Unit tests pass (npm test)
  • Linting passes (npm run lint)
  • Build succeeds (npm run build)
  • Manual testing completed
  • New tests added (if applicable)

Screenshots

N/A - CI configuration change only

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

Verified locally with pnpm 9.15.9 that pnpm install --frozen-lockfile succeeds and all workspace packages are resolved correctly.

Original prompt

引用: https://github.com/hotcrm/hotcrm/actions/runs/21388499652/job/61569723827#step:4:1


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

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Update commit template for consistency Fix CI: Migrate from npm to pnpm for workspace monorepo Jan 27, 2026
Copilot AI requested a review from hotlong January 27, 2026 07:38
@hotlong
hotlong marked this pull request as ready for review January 27, 2026 07:44
Copilot AI review requested due to automatic review settings January 27, 2026 07:44
@hotlong
hotlong merged commit a1eaabc into main Jan 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.yml to use pnpm instead of npm with proper setup, caching, and command execution
  • Updated package.json engines requirement from pnpm >= 8.0.0 to pnpm >= 9.0.0 to 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

Comment thread .github/workflows/ci.yml
Comment on lines 36 to +37
- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile

Copilot AI Jan 27, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment thread package.json
"engines": {
"node": ">=18.0.0",
"pnpm": ">=8.0.0"
"pnpm": ">=9.0.0"

Copilot AI Jan 27, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Suggested change
"pnpm": ">=9.0.0"
"pnpm": ">=8.0.0"

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +40 to +46
run: pnpm run lint

- name: Build project
run: npm run build
run: pnpm run build

- name: Run tests
run: npm test
run: pnpm test

Copilot AI Jan 27, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +25 to +37
- 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

Copilot AI Jan 27, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
os-steve pushed a commit that referenced this pull request Sep 5, 2026
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
os-steve pushed a commit that referenced this pull request Sep 6, 2026
…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
hotlong pushed a commit that referenced this pull request Oct 3, 2026
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>
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.

3 participants