AGENTS.md
+37 −17
https://raw.githubusercontent.com/grinv/steam-games-mcp/HEAD/AGENTS.md
− # GetItems/Query/wishlist/recommendations) over storeCard.ts (their− # live concurrent players, for get_charts).− scripts/ # build-tests.mjs, run-tests.mjs, sync-version.mjs (+ its− # sync-version.d.mts declaration) (generic), check-api.mjs− # (domain), preversion-check.mjs (CHANGELOG gate)− npm test # build tests with esbuild, run with node:test− - Runtime floor is **Node ≥ 20.11** (global `fetch`, stable `node:test`,− `context.mock.timers` used throughout `__tests__/`, `AbortSignal.any()` in− `lib/http.ts`, and `import.meta.dirname` in the `scripts/*.mjs` helpers —− need 20.4+/20.3+/20.11+ respectively, so `>=20` alone would understate the− real requirement); tsup targets `node20` (esbuild's Node targets are− major-version-only, so this doesn't need to track the patch floor). `.nvmrc`− pins the maintainer's local dev version (currently `22`) for convenience, not− the supported floor — CI's `node: [20, 22, 24]` matrix is what actually− enforces `>=20.11`. Note `@types/node` tracks current Node, not the floor, so− `tsc` will happily accept an API that only exists past 20.11; the CI node-20− job is the only thing that catches it.+ # SearchSuggestions/GetItems/Query/wishlist/recommendations) over+ # storeCard.ts (their+ # Steam Deck most played / live concurrent players, for get_charts).+ scripts/ # run-tests.ts, sync-version.ts (generic), check-api.ts+ # (domain), preversion-check.ts (CHANGELOG gate) — plain+ # .ts run directly by Node's type stripping, no build step+ npm test # node:test straight on src/**/*.test.ts (native type stripping, no build)+ - Runtime floor is **Node ≥ 22.18** — the first 22.x where type stripping is+ on by default (and warning-free), which is what lets `npm test` and every+ `scripts/*.ts` run as plain `.ts` with no build step; tsup 9 needs it too.+ The range stays open-ended (`>=22.18.0`) because it guards the _runtime_+ bundle, which needs nothing newer. For development use 22.18+, 24.11+ or+ 26+: Node 23.0–23.5 has no default type stripping, and tsup 9's own engines+ skip 23.x and 24.0–24.10.+ Declared in both `package.json` `engines` and `manifest.json`+ `compatibility.runtimes.node` — a test keeps them equal. Because Node only+ _strips_ types, `tsconfig.json` sets `erasableSyntaxOnly` (no enums,+ namespaces or parameter properties) and `allowImportingTsExtensions`+ (relative imports use `.ts`, not `.js`). **No `using`/`await using`** —+ esbuild used to downlevel it for tests, but Node 22's V8 12.4 can't parse+ it; register cleanup with `t.after()` instead. tsup targets `node22`+ (esbuild's Node targets are major-version-only, so this doesn't need to+ track the patch floor); `tsconfig.json` targets `ES2024` plus only the+ ES2025 libs V8 12.4 ships (`ES2025.Collection` Set methods,+ `ES2025.Iterator` helpers) — not full `ES2025`, whose `Promise.try`,+ `RegExp.escape` and `Float16Array` need Node 24. `.nvmrc` pins the+ maintainer's local dev version (currently `22`) for convenience, not the+ supported floor — CI's `node: ["22.18", 22, 24, 26]` matrix is what actually+ enforces `>=22.18` (the pinned `22.18` job tests the exact floor, not just the+ latest 22.x). Note `@types/node` tracks current Node, not the floor, so `tsc`+ will happily accept an API that only exists past 22.18; that CI job is the+ only thing that catches it.+ - `tsc` (`npm run typecheck`, part of `npm run build`) also covers+ `scripts/`, `tsup.config.ts` and `eslint.config.js` — the latter via+ `allowJs`/`checkJs` plus ESLint's typed `defineConfig()` — so a config typo+ (unknown key, misspelled severity or preset) fails the build. Rule _options_+ stay untyped (`unknown[]`); `eslint` itself validates those at run time.