You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reflects recent branch changes: lint is green and gated in CI, Node is 24 in both .nvmrc and CI, toolchain on TS 6 / ESLint 10. Also carries the intro-line wording change (Claude Code -> AI agents).
`npm test` runs Jest. TypeScript is transpiled by a tiny esbuild-based transformer (`test/esbuild-transform.cjs`, wired via `jest.config.js`) — the same bundler as the production build, so there is **no ts-jest/babel dependency**(those don't currently resolve against the repo's eslint 10 / jest 30 peers). Tests live in `test/*.test.ts` and import straight from `src/`.
27
+
`npm test` runs Jest. TypeScript is transpiled by a tiny esbuild-based transformer (`test/esbuild-transform.cjs`, wired via `jest.config.js`) — the same bundler as the production build, so there is **no ts-jest/babel dependency**to keep in sync with TypeScript (the repo is on TS 6 / ESLint 10, and ts-jest tends to lag TypeScript majors). Tests live in `test/*.test.ts` and import straight from `src/`.
30
28
31
29
`test/api.test.ts` covers the pure units — `decodeLatLonZoom`, `normalizeZoom`, `normalizeNameAndTitle` (including the Windows-1251 fallback), `CLEAR_COORDINATES_REGEX` — plus `onGe0Decode` end-to-end (encoded + clear-text paths, HTML-escaping, out-of-range rejection). To test a new helper, **`export` it from `src/ge0.ts`** — only exported symbols are reachable from tests. Run one test with `npx jest -t '<name substring>'`.
32
30
33
-
Note: `npm run lint` (`tsc` + eslint) is currently **red on pre-existing issues**(`no-explicit-any`, unused `catch` bindings) unrelated to the tests — CI does not run it.
31
+
`npm run lint` (ESLint over `src/` + `tsc --noEmit`) is expected to pass — **CI runs it on PRs**— so treat a lint failure as a real regression, not pre-existing noise.
34
32
35
33
## Request pipeline — `src/index.ts`
36
34
@@ -74,4 +72,4 @@ So a rewrite rule you add will "work everywhere" in dev but only fire on `omaps.
74
72
75
73
-`workers-site/index.js` is the **esbuild output and is gitignored** — never edit it by hand; edit `src/` and rebuild. `wrangler.toml`'s `[build]` step runs `npm run build` automatically on deploy.
76
74
- Pushing to `master` triggers `.github/workflows/deploy-master-to-prod.yml`, which deploys the **`omaps` (production)** environment via `cloudflare/wrangler-action`.
77
-
- CI (`.github/workflows/check.yml`) runs on PRs with **Node 20** (note:`.nvmrc` pins the older `v17.3.1`) and runs `npm run format`, `npm run build`, then `npm test`.
75
+
- CI (`.github/workflows/check.yml`) runs on PRs with **Node 24** (matching`.nvmrc`) and runs `npm run format`, `npm run lint`, `npm run build`, then `npm test`.
0 commit comments