Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Key files to reference:
- Build (local): npm run build — runs `tsc` twice (ESM and CJS) and creates `lib/`
- Typecheck: npm run typecheck (runs `tsc --noEmit`)
- Lint: npm run lint (eslint with --fix)
- Test: npm test (uses `jest --ci`). Use `npm run testWatch` for interactive development.
- Test: npm test (uses `node:test` via `tsx`). Use `npm run testWatch` for interactive development.
- Prepack: `npm pack` will run `prepack` which triggers `npm run build` via package scripts.

If you edit TypeScript sources, run `npm run build` (or `npm run watch` during development) before publishing; consumers import from `lib/`.
Expand All @@ -34,7 +34,7 @@ If you edit TypeScript sources, run `npm run build` (or `npm run watch` during d
## Integration points and external dependencies

- Parsing: `meriyah` is the only runtime parser dependency (see `package.json`). `parseSource` calls `parseScript` with `webcompat` fallback when appropriate.
- Tests: Jest + ts-jest. Tests live in `tests/` and exercise query parsing and runtime behaviour. Look at `tests/parseQuery.test.ts` and `tests/query.test.ts` for representative cases.
- Tests: Node's built-in `node:test` runner (with `tsx` for TypeScript). Tests live in `tests/` and exercise query parsing and runtime behaviour. Look at `tests/parseQuery.test.ts` and `tests/query.test.ts` for representative cases.
- Consumers import the built files from `lib/` (types are under `lib/*/types`). Changing public API requires updating `exports` in `package.json` if you move files.

## Small, concrete examples for the agent
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
node-version: [20.x, 22.x, 24.x]
node-version: [22.x, 24.x]

steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ npm run watch # build in watch mode during development
npm run typecheck # tsc --noEmit
npm run lint # eslint --fix
npm run check # lint + typecheck
npm test # jest --ci
npm run testWatch # jest --watchAll
npm test # node:test via tsx
npm run testWatch # node:test watch mode via tsx
```

Run a single test file: `npx jest tests/query.test.ts`
Run a single test file: `node --import tsx --test tests/query.test.ts`

Consumers import from `lib/`, not `src/` — always run `npm run build` before testing integration or publishing.

Expand Down
10 changes: 0 additions & 10 deletions jest.config.js

This file was deleted.

Loading
Loading