Specialist version-gated APIs
Prerequisite: node-diagnostics-and-reports. Objective: Classify SQLite VFS and benchmark docs. Tested locally on Node.js 22.16.0 Linux. Each example is independent. Use a fresh disposable working directory, save as main.mjs, then run node main.mjs. The harness uses a five-second timeout and synthetic environment. These are static code blocks, not ByteMind interactive execution.
How it works
The v22.16.0 runtime exposes node:sqlite experimentally; its DatabaseSync operations are synchronous. Newer SQLite features and virtual filesystem (VFS) integration must be checked against the exact runtime; do not assume arbitrary VFS or benchmark helpers exist as built-ins. The node:perf_hooks API is an available measurement primitive. node:querystring is Node-specific; URLSearchParams offers a web-compatible form-style query interface. Deprecated node:punycode and node:domain belong in migration notes, not new defaults; use URL/domain utilities and explicit error handling as appropriate. Single executable applications (SEA) and the permission model are version-sensitive and do not replace process isolation. This lesson checks known public interfaces, not an exhaustive feature inventory.
Compare query serialization for a space
import {stringify} from 'node:querystring';console.log(stringify({q:'a b'}));console.log(new URLSearchParams({q:'a b'}).toString());Expected output:
q=a%20bq=a+bBoth encode a space, using different conventions; do not assume byte-for-byte equivalence.
Detect a documented SQLite capability in the local runtime
import {DatabaseSync} from 'node:sqlite';import assert from 'node:assert/strict';const db=new DatabaseSync(':memory:');try{assert.equal(db.prepare('SELECT 2 + 3 AS total').get().total,5);console.log('SQLite query passed');}finally{db.close();}Expected output:
SQLite query passedActual in-memory SQLite execution; experimental warning expected on Node 22.16.0.
Common mistakes
Presence of an API does not establish stability, permission, portability or support for a different version. Do not enable extension loading for this lab.
Practice
Make a compatibility table for SQLite, SEA, permission controls and one historical API, marking unknown minimum versions as unresolved.
Reference candidate: node-specialist-version-gated-apis-lookup (route unverified). Documentation: https://nodejs.org/download/release/v22.16.0/docs/api/sqlite.html (opened); https://nodejs.org/download/release/v22.16.0/docs/api/querystring.html (opened); https://nodejs.org/download/release/v22.16.0/docs/api/single-executable-applications.html (unverified); https://nodejs.org/download/release/v22.16.0/docs/api/permissions.html (unverified).
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Specialist version-gated APIs — knowledge check
Apply the lesson to a fresh scenario and explain the evidence boundary.
What is the status of node:sqlite in the selected runtime?
Why can query strings differ for the same value?
What does API presence alone establish?