Use pnpm (not npm or yarn). The lockfile is pnpm-lock.yaml. Install deps
with pnpm install; run scripts with pnpm run <script> or pnpm <script>.
The library is built with tsc (not vite build). vite.config.ts exists only
to configure Vitest and to run vite dev as a server for Playwright. Running
pnpm run build compiles src/ to dist/ via tsconfig.json.
tsconfig.json— library build only; includessrc/**/*tsconfig.dev.json— extends the above withnoEmit: true; addstest/**/*,vite.config.ts, andplaywright.config.tsso ESLint's type-aware rules cover all files
Do not add test files to tsconfig.json — they would be emitted into dist/.
test/node/— Vitest unit tests (pnpm run test-node); run in Nodetest/browser/— Playwright tests (pnpm run test-browser); run in real Chromium via a Vite dev server (pnpm run dev)
The dev script exists solely to give Playwright a server that can serve and
transform TypeScript source files on the fly. There is no browser app.
The package is ESM-only ("type": "module"). Local imports must use the .js
extension even though source files are .ts — e.g.
import { Example } from '../../src/index.js'. TypeScript's moduleResolution: Bundler
resolves these to the .ts source at compile time.
Code style, refactoring, JSDoc, comment, and error-handling conventions live in @CONTRIBUTING.md -- follow them.