Skip to content

Supported Runtimes

bQuery.js targets multiple JavaScript runtimes from a single codebase. This page lists the supported targets, the minimum versions, and which modules have runtime-specific behaviour.

Engines

RuntimeMinimum versionStatusNotes
Node.js24.0.0PrimaryUsed for the canonical examples/ssr-node and CI baseline.
Bun1.3.13PrimaryUsed for repo workflows (bun run lint, bun test, bun run build).
Denolatest stableSupportedexamples/ssr-deno demonstrates the SSR adapter.
Chrome90+BrowserBaseline for all browser-facing features.
Firefox90+BrowserSame baseline.
Safari15+BrowserSame baseline.
Edge90+BrowserSame baseline.
Edge runtimesWorkers / Vercel / Netlify EdgeSupportedUse the SSR module's edge adapter (createEdgeHandler).

The engine ranges are enforced in package.json under engines.

Modules by runtime

Most modules are runtime-agnostic. The ones with runtime-specific behaviour:

ModuleBrowserNodeBunDenoEdgeNotes
core----DOM-only; in non-browser contexts use only its non-DOM utilities.
reactivePure logic. HTTP / WebSocket helpers use the runtime's fetch / WebSocket.
concurrency-Uses Worker / MessagePort. Feature-detect with isConcurrencySupported().
component----Custom elements (browser-only).
motion----DOM and requestAnimationFrame.
view----DOM directive compilation.
router----Uses history and URL.
storePure; persistence plugins are browser-only.
formsValidation is pure; bindField / bindForm are browser-only.
securityTrusted Types integration is browser-only.
platform----Storage, cookies, page meta are browser APIs.
i18nUses Intl.* everywhere.
a11y----Focus management is browser-only.
dnd----Pointer / keyboard events; browser-only.
media----Media queries, clipboard, network info — browser-only.
pluginPure registry; directives need a browser.
devtoolsInspection is pure; browser bridge uses postMessage.
testing-Runs under happy-dom in test environments.
ssr-DOM-free; runtime-agnostic; adapters per runtime.
server-Dependency-free routing; SSR responses; WebSocket sessions.
storybook----Browser-only (Storybook host).

A blank cell means "not applicable" — not "broken".

SSR adapters

@bquery/bquery/ssr provides runtime-specific adapters that bridge the renderer to the host's request / response abstractions:

  • Node — uses IncomingMessage / ServerResponse. See examples/ssr-node.
  • Bun — uses Request / Response directly.
  • Deno — uses Request / Response from the standard Deno HTTP server.
  • EdgecreateEdgeHandler() produces a Request → Promise<Response> function suitable for Cloudflare Workers, Vercel Edge, Netlify Edge, Deno Deploy.

All four share the same renderToStringAsync / renderToStream / renderToResponse underneath.

TypeScript baseline

The TypeScript compile target is ES2020 with lib: ["ES2022", "DOM"]. Public APIs do not depend on stage < 4 proposals.

Polyfills

bQuery does not ship polyfills. If you target older browsers than the baseline, add the polyfills your bundler recommends. The repository's own build does not register any polyfill globally.

See also

Released under the MIT License.