chore: target Node 22 LTS (drop EOL Node 18) + required compat fixes
The project was pinned to the now-EOL Node 18.12.0 (.nvmrc + all CI workflows) with a stale `engines: >=16.20.2`. Move to the Node 22 LTS line, tracked by major so it doesn't go stale again: - .nvmrc: 22 · all 9 CI workflows: node-version 22 · Dockerfile: NODEJS_MAJOR_VERSION=22 - engines.node: >=22 across root + every workspace manifest - @types/node: ^18 -> ^22 Node 22 / @types/node 22 compatibility fixes (folded in so every commit builds): - cardano-services WsServer: type heartbeat/stake intervals as NodeJS.Timeout (setInterval no longer returns the legacy NodeJS.Timer; clearInterval rejects it) - e2e measurement-util: PerformanceEntry no longer carries `detail` (now on PerformanceMark/Measure) — cast the entry and narrow the mark filter - shared jest base config: fakeTimers `doNotFake: ['performance']` — Node 22's read-only global `performance` cannot be replaced by the fake-timers impl (was crashing many suites across cardano-services/ogmios/web-extension/etc.) - TypeormStakePoolProvider util test: assert `toThrow(SyntaxError)` instead of a V8 JSON.parse message string that differs across Node versions Unblocks the Node-20+ dependency majors that couldn't pass CI on Node 18. Validated: clean full build green on @types/node 22 (all 21 workspaces); core/crypto/key-management + cardano-services unit suites green except DB-backed tests (no local DB) and the in-process HTTP TxSubmit tests (local sockets) — both validated by CI. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>