Compare commits
3 Commits
16f827e8f0
...
f9f1dc7403
| Author | SHA1 | Date | |
|---|---|---|---|
|
f9f1dc7403
|
|||
|
b27a977809
|
|||
|
7edc4ba8a9
|
19
CLAUDE.md
19
CLAUDE.md
@@ -1,5 +1,12 @@
|
||||
# Claude Code Notes
|
||||
|
||||
## Running Tests
|
||||
|
||||
Use `bun run test:cov` to run all tests with coverage. This runs both unit tests and e2e tests that require a database connection.
|
||||
|
||||
- `bun run test:cov` - Run all tests with coverage (preferred)
|
||||
- `bun run test:unit:cov` - Run only unit tests with coverage (no database required)
|
||||
|
||||
## Database Scripts
|
||||
|
||||
Use the wrapper scripts instead of running dbmate directly:
|
||||
@@ -22,13 +29,13 @@ This repo uses Gitea (git.rev.iq) with the `tea` CLI for pull requests:
|
||||
- tea 0.10.1 is pinned in `nix/tea.nix` (0.11.x has TTY bugs)
|
||||
- Always specify `-r igm/publisher-dashboard` flag (SSH remote auto-detection doesn't work)
|
||||
|
||||
## macOS sed Syntax
|
||||
## sed Syntax (GNU coreutils)
|
||||
|
||||
macOS uses BSD sed which differs from GNU sed:
|
||||
- In-place edit requires empty string for backup: `sed -i '' 's/old/new/g' file`
|
||||
- GNU sed (Linux): `sed -i 's/old/new/g' file`
|
||||
- Use `|` as delimiter when patterns contain `/`: `sed -i '' 's|old/path|new/path|g' file`
|
||||
- For multiple files: `for f in *.txt; do sed -i '' 's/old/new/g' "$f"; done`
|
||||
This project uses GNU coreutils via devenv, so use standard GNU sed syntax:
|
||||
- In-place edit: `sed -i 's/old/new/g' file`
|
||||
- Use `|` as delimiter when patterns contain `/`: `sed -i 's|old/path|new/path|g' file`
|
||||
- For multiple files: `for f in *.txt; do sed -i 's/old/new/g' "$f"; done`
|
||||
- Do NOT use BSD sed syntax (`sed -i ''`) - we have GNU sed available
|
||||
|
||||
## SvelteKit resolve() Usage
|
||||
|
||||
|
||||
@@ -113,7 +113,10 @@ bun run dev
|
||||
| `bun run typecheck` | Run TypeScript type checking |
|
||||
| `bun run lint` | Run Biome and ESLint |
|
||||
| `bun run lint:fix` | Fix linting issues |
|
||||
| `bun run test` | Run tests |
|
||||
| `bun run test` | Run all tests (requires database) |
|
||||
| `bun run test:unit` | Run unit tests only (no database required) |
|
||||
| `bun run test:cov` | Run all tests with coverage report |
|
||||
| `bun run test:unit:cov` | Run unit tests with coverage (no database) |
|
||||
| `bun run db:codegen` | Generate database types |
|
||||
| `./scripts/db-dump` | Dump database schema (strips `\restrict` lines) |
|
||||
| `./scripts/db-migrate` | Run migrations (strips `\restrict` lines) |
|
||||
|
||||
@@ -14,6 +14,7 @@ in
|
||||
dbmate
|
||||
ast-grep
|
||||
dbip-city-lite
|
||||
gnused # GNU sed for consistent cross-platform behavior
|
||||
];
|
||||
|
||||
dotenv.enable = true;
|
||||
|
||||
Reference in New Issue
Block a user