Skip to content

oj v0.2.32

Choose a tag to compare

@github-actions github-actions released this 14 Oct 11:52
· 45 commits to main since this release
6266a85

Fixed

  • A native addon's call into JS (a napi threadsafe function, the way rolldown's worker threads run JS plugins) no longer waits for an unrelated wake of oj's engine. deno_core's cross-thread task queue checks for work before registering its waker, so a task queued in between woke nothing. On CI that stalled about one Start dev rebundle in eight by ~30s inside Vite's config bundling, so an edit took half a minute to reach the browser. oj's engine now polls its event loop again whenever a poll comes back pending, which closes the window for every engine (the dev server's, the plugin host's, the Start scripts').
  • Dev SSR and TanStack Start SSR no longer resolve dependencies through their browser main field. Vite's environments never inherit the top-level resolve.mainFields (its config drops mainFields and conditions from what environments inherit), so its server environment resolves with the browser-less server defaults; oj's SSR resolver took the top-level list, which a resolved config always carries filled with Vite's client defaults (browser first). A package like react-simple-maps@3 (browser = UMD build, module = ESM, main = CJS) then served its UMD to the server runtime, whose static CJS analysis cannot see exports a factory assigns at runtime, and every route 500'd at link time with "The requested module … does not provide an export named …". The SSR resolver and the SSR production bundle now take environments.ssr.resolve.mainFields (or ssr.resolve.mainFields) when set and the server defaults otherwise; client resolution keeps the browser field, as Vite's client environment does.

Added

  • OJ_BOOT_PHASES also traces the Start scripts: the client bundle child's rolldown import, plugin config load, build and output writes, and the child's spawn and exit, as [oj-phase] lines alongside the dev server's.