Skip to content

Commit e170c59

Browse files
chore: migrate to pnpm (#704)
- Updated package.json to use pnpm and added packageManager field - Generated pnpm-lock.yaml and removed package-lock.json - Updated GitHub Actions (CI) to use pnpm for installation and caching - Updated VS Code settings and tasks to use pnpm - Updated all scripts in scripts/ to use pnpm - Updated Dev Container bootstrap script - Updated documentation (README.md, AGENTS.md, docs/*) to reference pnpm commands - Updated Claude agent configuration and hooks to use pnpm Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Tim Froehlich <timothyfroehlich@gmail.com>
1 parent f0a8b76 commit e170c59

20 files changed

+11843
-121
lines changed

.claude/agents/enforcer.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,15 @@ color: red
146146
</memory-safety-check>
147147

148148
<migration-prevention>
149-
<scan-for patterns="supabase/migrations/|drizzle-kit generate|npm run db:generate">
149+
<scan-for patterns="supabase/migrations/|drizzle-kit generate|pnpm run db:generate">
150150
<severity>CRITICAL</severity>
151151
<action>BLOCK_PR</action>
152152
<message>Migration files forbidden in pre-beta phase</message>
153153
</scan-for>
154154
</migration-prevention>
155155

156156
<vitest-safety>
157-
<scan-for patterns="npm test.*2>&1|vitest.*>>|npm test.*>">
157+
<scan-for patterns="pnpm test.*2>&1|vitest.*>>|pnpm test.*>">
158158
<severity>CRITICAL</severity>
159159
<action>BLOCK_PR</action>
160160
<message>Vitest redirection breaks test execution</message>
@@ -239,25 +239,25 @@ color: red
239239
```xml
240240
<quality-gates>
241241
<compilation>
242-
<command>npm run typecheck</command>
242+
<command>pnpm run typecheck</command>
243243
<requirement>MUST pass without errors</requirement>
244244
<failure-action>BLOCK_PR</failure-action>
245245
</compilation>
246246

247247
<linting>
248-
<command>npm run lint</command>
248+
<command>pnpm run lint</command>
249249
<requirement>MUST pass without violations</requirement>
250250
<failure-action>BLOCK_PR</failure-action>
251251
</linting>
252252

253253
<testing>
254-
<command>npm run test:brief</command>
254+
<command>pnpm run test:brief</command>
255255
<requirement>All relevant tests pass</requirement>
256256
<failure-action>INVESTIGATE_FAILURES</failure-action>
257257
</testing>
258258

259259
<build>
260-
<command>npm run build</command>
260+
<command>pnpm run build</command>
261261
<requirement>Successful completion</requirement>
262262
<failure-action>BLOCK_PR</failure-action>
263263
</build>

.claude/agents/investigator.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ color: blue
5151

5252
### Error Analysis Workflow
5353

54-
1. **Quality Assessment**: Run `npm run typecheck:verbose`, `npm run lint:verbose`, `npm run test`
54+
1. **Quality Assessment**: Run `pnpm run typecheck:verbose`, `pnpm run lint:verbose`, `pnpm run test`
5555
2. **Pattern Detection**: Use `rg` searches for systematic issues and anti-patterns
5656
3. **Context Analysis**: Analyze related files, imports, and dependencies
5757
4. **Historical Analysis**: Review git history and GitHub issues for correlation
@@ -78,33 +78,33 @@ color: blue
7878

7979
```bash
8080
# TypeScript Analysis (Brief & Verbose)
81-
npm run typecheck
82-
npm run typecheck:brief
83-
npm run typecheck:verbose
81+
pnpm run typecheck
82+
pnpm run typecheck:brief
83+
pnpm run typecheck:verbose
8484

8585
# Linting Analysis (Brief & Verbose)
86-
npm run lint
87-
npm run lint:brief
88-
npm run lint:verbose
89-
npm run lint:eslint:verbose
86+
pnpm run lint
87+
pnpm run lint:brief
88+
pnpm run lint:verbose
89+
pnpm run lint:eslint:verbose
9090

9191
# Format Checking (Read-Only)
92-
npm run format
93-
npm run format:brief
92+
pnpm run format
93+
pnpm run format:brief
9494

9595
# Build Analysis
96-
npm run build
96+
pnpm run build
9797
```
9898

9999
### Test Analysis
100100

101101
```bash
102102
# Test Execution & Analysis
103-
npm run test
104-
npm run test:watch
105-
npm run test:brief
106-
npm run test:rls
107-
npm run test:all
103+
pnpm run test
104+
pnpm run test:watch
105+
pnpm run test:brief
106+
pnpm run test:rls
107+
pnpm run test:all
108108
```
109109

110110
### Search & Pattern Detection

.claude/commands/z-ship-it.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Take boring meta changes and LAUNCH THEM INTO PRODUCTION with the power of autom
5353

5454
6. **Run the quick tests** (because we're not _completely_ reckless):
5555
```bash
56-
npm run check:brief
56+
pnpm run check:brief
5757
```
5858
7. **If tests fail**:
5959

.claude/commands/z-smart-rebase.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Perform an intelligent rebase operation with the following workflow:
4848

4949
6. **Validate the result**:
5050
- Ensure all conflicts are resolved
51-
- Run `npm run quick` to verify code quality
51+
- Run `pnpm run quick` to verify code quality
5252
- If validation fails, provide clear next steps
5353

5454
7. **Complete the operation**:
@@ -94,7 +94,7 @@ Perform an intelligent rebase operation with the following workflow:
9494

9595
- ✅ Branch is up-to-date with target (main or parent)
9696
- ✅ All merge conflicts resolved
97-
- ✅ Code quality checks pass (`npm run quick`)
97+
- ✅ Code quality checks pass (`pnpm run quick`)
9898
- ✅ User understands what changes were made
9999
- ✅ Clear next steps provided
100100

.claude/hooks/pattern-reminder.cjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const FORBIDDEN_PATTERNS = {
4242
patterns: [
4343
/supabase\/migrations\//g,
4444
/drizzle-kit generate/g,
45-
/npm run db:generate/g
45+
/pnpm run db:generate/g
4646
],
4747
severity: 'CRITICAL',
4848
message: 'Migration files forbidden in pre-beta phase (zero users, schema in flux)',
@@ -52,13 +52,13 @@ const FORBIDDEN_PATTERNS = {
5252
// Vitest Command Issues (HIGH)
5353
'Vitest Redirection': {
5454
patterns: [
55-
/npm test.*2>&1/g,
55+
/pnpm test.*2>&1/g,
5656
/vitest.*>>/g,
57-
/npm test.*>/g
57+
/pnpm test.*>/g
5858
],
5959
severity: 'HIGH',
6060
message: 'Vitest interprets redirection as test name filters, breaking execution',
61-
solution: 'Use npm run test:brief or npm run test:verbose instead'
61+
solution: 'Use pnpm run test:brief or pnpm run test:verbose instead'
6262
},
6363

6464
// Database Naming Conventions (HIGH)

.claude/hooks/quality-check.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,7 @@ async function main() {
11811181
const commands = [];
11821182

11831183
if (problemCounts.typescript > 0) {
1184-
commands.push(`npm run typecheck:brief`);
1184+
commands.push(`pnpm run typecheck:brief`);
11851185
}
11861186
if (problemCounts.eslint > 0) {
11871187
commands.push(`npx eslint "${relativePath}"`);

.claude/settings.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,25 @@
1111
"WebFetch(domain:eslint.org)",
1212
"WebFetch(domain:prettier.io)",
1313
"WebFetch(domain:docs.npmjs.com)",
14-
"Bash(npm test:*)",
14+
"Bash(pnpm test:*)",
1515
"Bash(npx jest:*)",
16-
"Bash(npm run typecheck:*)",
17-
"Bash(npm run typecheck:brief:*)",
18-
"Bash(npm run build:*)",
19-
"Bash(timeout 10 npm run build:*)",
20-
"Bash(timeout 30 npm run build:*)",
21-
"Bash(timeout 10s npm run dev)",
22-
"Bash(npm run lint:*)",
23-
"Bash(npm run check:brief:*)",
24-
"Bash(npm run smoke:*)",
16+
"Bash(pnpm run typecheck:*)",
17+
"Bash(pnpm run typecheck:brief:*)",
18+
"Bash(pnpm run build:*)",
19+
"Bash(timeout 10 pnpm run build:*)",
20+
"Bash(timeout 30 pnpm run build:*)",
21+
"Bash(timeout 10s pnpm run dev)",
22+
"Bash(pnpm run lint:*)",
23+
"Bash(pnpm run check:brief:*)",
24+
"Bash(pnpm run smoke:*)",
2525
"Bash(npx eslint:*)",
2626
"Bash(npx prettier:*)",
2727
"Bash(npx next:*)",
28-
"Bash(npx shadcn:*)",
28+
"Bash(pnpm dlx shadcn:*)",
2929
"WebFetch(domain:ui.shadcn.com)",
30-
"Bash(npx playwright test:*)",
31-
"Bash(npx playwright show-trace:*)",
32-
"Bash(PLAYWRIGHT_PORT=3001 npm run smoke)",
30+
"Bash(pnpm exec playwright test:*)",
31+
"Bash(pnpm exec playwright show-trace:*)",
32+
"Bash(PLAYWRIGHT_PORT=3001 pnpm run smoke)",
3333
"Bash(./scripts/safe-curl.sh:*)",
3434
"Bash(npx tsc:*)",
3535
"Bash(ls:*)",
@@ -54,7 +54,7 @@
5454
"Bash(./scripts/check-security-deps.sh:*)",
5555
"Bash(./scripts/check-file-security.sh:*)",
5656
"Bash(./scripts/check-db-schema.sh:*)",
57-
"Bash(./scripts/check-npm-audit.sh:*)",
57+
"Bash(./scripts/check-pnpm-audit.sh:*)",
5858
"Bash(./scripts/safe-psql.sh:*)",
5959
"WebFetch(domain:docs.anthropic.com)",
6060
"WebFetch(domain:github.com)",

AGENTS.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,38 +16,38 @@ trigger: always_on
1616
**Run BEFORE every commit:**
1717

1818
```bash
19-
npm run preflight # Typecheck, lint, format, test, build, integration tests
19+
pnpm run preflight # Typecheck, lint, format, test, build, integration tests
2020
```
2121

2222
**Development:**
2323

2424
```bash
25-
npm run dev # Start dev server (uses PORT from .env.local)
26-
npm run build # Production build
27-
npm run typecheck # TypeScript validation
28-
npm run lint # ESLint check
29-
npm test # Unit tests only
30-
npm run test:integration # DB integration tests (requires `supabase start`)
31-
npm run smoke # E2E smoke tests (Playwright)
25+
pnpm run dev # Start dev server (uses PORT from .env.local)
26+
pnpm run build # Production build
27+
pnpm run typecheck # TypeScript validation
28+
pnpm run lint # ESLint check
29+
pnpm test # Unit tests only
30+
pnpm run test:integration # DB integration tests (requires `supabase start`)
31+
pnpm run smoke # E2E smoke tests (Playwright)
3232
```
3333

3434
**Database Migrations (ALWAYS use migrations, never `push`):**
3535

3636
```bash
3737
# 1. Edit src/server/db/schema.ts
3838
# 2. Generate migration:
39-
npm run db:generate -- --name <descriptive-name>
39+
pnpm run db:generate -- --name <descriptive-name>
4040
# 3. Apply migration:
41-
npm run db:migrate
41+
pnpm run db:migrate
4242
# 4. Update test schema:
43-
npm run test:_generate-schema
43+
pnpm run test:_generate-schema
4444
# 5. Commit schema.ts, drizzle/, and src/test/setup/schema.sql
4545
```
4646

4747
**Components:**
4848

4949
```bash
50-
npx shadcn@latest add [component] # Add shadcn/ui components
50+
pnpm dlx shadcn@latest add [component] # Add shadcn/ui components
5151
```
5252

5353
## Tech Stack
@@ -72,7 +72,7 @@ npx shadcn@latest add [component] # Add shadcn/ui components
7272
7. **CSP with nonces**: Security headers required. Use `middleware.ts` for dynamic nonces, `next.config.ts` for static headers.
7373
8. **Type safety (strictest)**: No `any`, no `!`, no unsafe `as`. Write type guards for validation.
7474
9. **Path aliases (`~/`)**: Always use `~/lib/...` instead of relative imports `../../../lib/...`.
75-
10. **Preflight before commit**: `npm run preflight` must pass. Pre-commit hooks enforce this.
75+
10. **Preflight before commit**: `pnpm run preflight` must pass. Pre-commit hooks enforce this.
7676

7777
## Quick Code Examples
7878

@@ -267,12 +267,12 @@ For detailed guidance, use Agent Skills (if supported) or reference docs directl
267267

268268
**Dev Loop**:
269269

270-
| Command | When to use |
271-
| ---------------------------------- | -------------------------------- |
272-
| `npm run check` | After ANY code change (~5s) |
273-
| `npm test -- path/to/file.test.ts` | Debug specific test |
274-
| `npm run preflight` | Before commit (full suite, ~60s) |
275-
| **Mobile Safari** | **DO NOT RUN LOCALLY** (CI only) |
270+
| Command | When to use |
271+
| ----------------------------------- | -------------------------------- |
272+
| `pnpm run check` | After ANY code change (~5s) |
273+
| `pnpm test -- path/to/file.test.ts` | Debug specific test |
274+
| `pnpm run preflight` | Before commit (full suite, ~60s) |
275+
| **Mobile Safari** | **DO NOT RUN LOCALLY** (CI only) |
276276

277277
**Key Constraints**:
278278

@@ -312,7 +312,7 @@ For detailed guidance, use Agent Skills (if supported) or reference docs directl
312312
## Commit Guidelines
313313

314314
- **Style**: Conventional commits (`feat:`, `fix:`, `chore:`)
315-
- **Process**: Run `npm run preflight` → commit → push
315+
- **Process**: Run `pnpm run preflight` → commit → push
316316
- **Hooks**: Husky + lint-staged enforce quality gates
317317

318318
## GitHub Copilot Reviews

docs/CI_WORKFLOW_SETUP.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ The actual configuration lives in `.github/workflows/ci.yml` and is committed to
88
On pushes and pull requests to `main`:
99

1010
- **Install & Cache Dependencies**
11-
- Runs `npm ci`
12-
- Caches `node_modules` and Playwright browsers for faster subsequent runs
11+
- Runs `pnpm install`
12+
- Caches `pnpm` store and Playwright browsers for faster subsequent runs
1313
- **Quality Checks (Parallel)**
14-
- `npm run typecheck`
15-
- `npm run lint`
16-
- `npm run format`
14+
- `pnpm run typecheck`
15+
- `pnpm run lint`
16+
- `pnpm run format`
1717
- **Build**
18-
- `npm run build` (runs after quality checks pass)
18+
- `pnpm run build` (runs after quality checks pass)
1919
- **Tests**
20-
- Unit tests: `npm test`
21-
- Integration tests: `npm run test:integration`
22-
- Smoke E2E tests: `npm run smoke` (after a successful build)
20+
- Unit tests: `pnpm test`
21+
- Integration tests: `pnpm run test:integration`
22+
- Smoke E2E tests: `pnpm run smoke` (after a successful build)
2323
- **Artifacts**
2424
- Uploads Playwright reports on E2E failures to aid debugging
2525

@@ -28,7 +28,7 @@ On pushes and pull requests to `main`:
2828
Before pushing, run:
2929

3030
```bash
31-
npm run preflight
31+
pnpm run preflight
3232
```
3333

3434
This mirrors the CI pipeline locally (typecheck, lint, format, tests, build, integration tests, smoke tests).

docs/DISCIPLINE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,13 @@ Session 4: Issue filtering (DB + Action + UI) - WORKS
240240

241241
```bash
242242
# 1. Write test for current behavior
243-
npm test -- issue-creation
243+
pnpm test -- issue-creation
244244

245245
# 2. Refactor
246246
# ... make changes ...
247247

248248
# 3. Verify test still passes
249-
npm test -- issue-creation
249+
pnpm test -- issue-creation
250250

251251
# 4. Ship if it works
252252
git commit -m "refactor: simplify issue creation"

0 commit comments

Comments
 (0)