Skip to content

Commit c681a62

Browse files
authored
chore: add pnpm.onlyBuiltDependencies and cloud-specific AGENTS.md instructions (#249)
1 parent 54b8d26 commit c681a62

File tree

3 files changed

+46
-94
lines changed

3 files changed

+46
-94
lines changed

AGENTS.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,36 @@ pnpm lint
100100
pnpm typecheck # runs type checking
101101
pnpm format
102102
```
103+
104+
## Cursor Cloud specific instructions
105+
106+
This is a pnpm + Turborepo monorepo (19 packages under `packages/`). No external services (databases, Docker, etc.) are required.
107+
108+
### Build before test
109+
110+
`pnpm build` must complete before `pnpm test` or `pnpm lint` — Turborepo `dependsOn` enforces this, but be aware that `pnpm test` will rebuild if the build cache is cold. After modifying source files, always rebuild before running tests.
111+
112+
### Approved build scripts
113+
114+
The root `package.json` has `pnpm.onlyBuiltDependencies` configured for `@parcel/watcher`, `esbuild`, `sharp`, `spawn-sync`, and `unrs-resolver`. Without this, `pnpm install` silently skips their native builds and downstream packages may fail.
115+
116+
### Playwright
117+
118+
E2E tests (`pnpm test` at root) run Playwright against the `e2e-playground` Vite dev server on port 5175 (auto-started by the Playwright config). Chromium must be installed: `npx --prefix packages/react-grab playwright install chromium --with-deps`.
119+
120+
### Known flaky test
121+
122+
`e2e/history-items.spec.ts` > "should reposition when toolbar is dragged to top edge" intermittently times out in headless CI environments. This is a pre-existing issue.
123+
124+
### Key commands reference
125+
126+
See root `package.json` scripts and `CONTRIBUTING.md` for the full list. Quick reference:
127+
- **Install**: `ni` (or `pnpm install`)
128+
- **Build**: `nr build` (or `pnpm build`)
129+
- **Dev watch**: `nr dev` (or `pnpm dev`) — watches core packages
130+
- **Test**: `pnpm test` — runs Playwright E2E + Vitest CLI tests
131+
- **Lint**: `pnpm lint` — oxlint on react-grab package
132+
- **Typecheck**: `pnpm typecheck` — tsc on react-grab package
133+
- **Format**: `pnpm format` — oxfmt
134+
- **CLI dev**: `npm_command=exec node packages/cli/dist/cli.js`
135+
- **E2E playground**: `pnpm --filter @react-grab/e2e-playground dev` (port 5175)

package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,13 @@
2929
"pnpm": ">=8"
3030
},
3131
"packageManager": "pnpm@10.24.0",
32-
"pnpm": {}
32+
"pnpm": {
33+
"onlyBuiltDependencies": [
34+
"@parcel/watcher",
35+
"esbuild",
36+
"sharp",
37+
"spawn-sync",
38+
"unrs-resolver"
39+
]
40+
}
3341
}

pnpm-lock.yaml

Lines changed: 4 additions & 93 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)