Skip to content

oj v0.2.23

Latest

Choose a tag to compare

@david1gp david1gp released this 12 Oct 12:43
· 0 commits to main since this release

Added

  • Structured diagnostics (oj_diag): compile errors, resolve misses, plugin-hook throws, plugin-host lifecycle, optimizer failures, restarts and panics are recorded in a bounded in-memory ring with per-kind counters, served at GET /@oj/diagnostics (with plugin-host health and an ?after= cursor). OJ_LOG_JSON=1 additionally prints each fresh event as one NDJSON stderr line marked "oj":"diag" for supervisors that ingest logs; human terminal output is unchanged.
  • Browser console forwarding, matching Vite 8's server.forwardConsole: the HMR client forwards unhandled errors, unhandled rejections and the configured console levels to the dev server over the existing socket, where stack frames are remapped through the served modules' source maps and printed. Resolution follows Vite (config value, then the OJ_FORWARD_CONSOLE env override, then on-by-default under an AI-agent environment). Client-sourced text is length-capped and scrubbed of control characters before it reaches stderr.
  • oj:hmr-result: the client reports an HMR update that failed to apply (a signal Vite does not have), recorded as an hmr_apply_failed diagnostic.
  • The restart log line now names what asked for the restart (a config/env change vs a plugin's server.restart()).

Adaptive oj fork

  • Independent Solid-support fork published as the adaptive-oj Cargo package, with the oj executable, seven adaptive-oj-* fork crates (cache, compiler, config, env, resolver, server) and eight reused upstream oj_* 0.2.22 dependencies. Supports npm-based Vite/Solid projects, including Solid Start. After publication, install with cargo install adaptive-oj --locked.