Changelog
All notable changes to @devioarts/capacitor-sqlite, following
Keep a Changelog. The canonical, always-current file is
CHANGELOG.md in the
repository.
0.1.1 - 2026-07-12
Added
- The cross-platform
runMany()API for one SQL statement and many value sets — validates every set before the first write, is atomic by default, reuses one prepared statement on Android/iOS/Electron, uses a compact single-SQL request on sqlite-wasm Worker1, returns only aggregate changes by default, and optionally returns per-item changes/row IDs. Existing APIs are unchanged. runMany(10,000)added to the full-load stress profile alongsiderunBatch(10,000).- Expanded regression coverage for bind counts, UPSERT row IDs, query planning, migrations, busy timeout, Electron worker lifecycle, compact query transport, and Android device-reported failures.
- A separate 24-case performance-diagnostic profile (
d-01..d-24) with latency percentiles and controlled comparisons across JS harness cost, platform dispatch, plugin queue/registry, transactional vs. autocommit writes, concurrent bridge throughput, batch/runMany()wrapping, and more. The original full-load profile remains separate and unchanged.
Changed
- Removed leftover Capacitor-plugin-generator boilerplate test stubs — dead code, never published in the npm package.
- Excluded
dist/docs.json(a docgen intermediate artifact) from the published npm package. - Added
electronas an optional peer dependency so npm can flag a version mismatch when Electron is present, without warning pure iOS/Android/Web consumers. - Documented that a multi-version
migrationslist is not atomic as a whole (see Migrations), the new UPSERTlastInsertIdbehavior, andCapacitorSqlite.dispose()for Electron. - Transaction documentation now checks every resolved
SqliteResultinstead of relying ontry/catch(see Transactions).
Fixed
- Cross-platform SQL validation is now consistent.
run(),query(),runBatch(), andrunMany()reject missing/extra bind values, unsupported placeholders, malformed multi-statement SQL, non-finite native numbers, and other invalid-parameter cases with the expected error codes on every platform. - Transaction and lifecycle state is more reliable. Reopening an already-open database
applies pending migrations consistently, invalid manual-transaction migration attempts are
rejected,
OR ROLLBACKresynchronizes mirrored state, Web readonly connections reassertquery_only, Android teardown no longer blocks/drops queued calls, and iOS close/open registry races are guarded. lastInsertIdis now conservative and portable. UPSERT update paths,WITHOUT ROWIDtables, unchanged connection rowids, replacement of the same explicit key, and rowid reuse all return0; useRETURNINGwhen the exact affected row ID is required.- Web parity gaps were closed. Web now enforces the already-open
directorycontract, setsbusy_timeout, and mirrors connection-local rowid state to avoid extra round trips on successfulrun()calls. - Binary and result transport avoid unnecessary object expansion. Android/iOS use a private
tagged-base64 BLOB envelope, Electron keeps
Uint8Arraythrough structured clone, and Android/iOS/Electron use compact column/value transport internally. - Bulk write paths avoid duplicated native work. Transactional
runBatch()reuses prepared statements for repeated SQL and validates the full input before the first write. - Packaging fixes. The published package now includes
android/proguard-rules.pro, generated ESM output is importable by plain Node ESM consumers, and Electron'srunMany()compatibility path is covered.
0.1.0 - 2026-07-06
Added
- A real Web/OPFS CLI suite runner:
npm run test:suite:webandnpm run test:suite:web:stress. - Web runner validation for cross-origin isolation and OPFS availability before executing the suite.
- Shared suite regression coverage for
query()rejecting DML withoutRETURNING. - Explicit SQL trust-boundary documentation (see Platform notes).
- Native lifecycle cleanup for open database handles on Android and iOS.
- Cross-platform stress benchmark results for Electron, Web/OPFS, Android, and iOS.
- GitHub Actions workflows for fast CI and a manually triggered release matrix with retained platform logs.
Changed
query()now only accepts result-producing SQL:SELECT,PRAGMA,EXPLAIN, andINSERT/UPDATE/DELETE/REPLACE ... RETURNING.- Android SQLite work now runs on a single executor thread to preserve transaction thread affinity.
- Stress benchmarks now use release-relevant sizes: 10,000 writes, 100,000-row reads, 1 MB large values, and 2 x 10,000-row multi-DB load.
- iOS Swift implementation was split into smaller helper files for maintainability.
Fixed
- Fixed
query()allowing write DML without result rows on some backends. - Fixed Android manual transactions hanging when
beginTransaction()and later statements ran on different executor threads. - Fixed Android executor resource risk from unbounded cached thread creation.
- Fixed Android/iOS plugin teardown leaving open database handles until process cleanup.
- Fixed migration
versionaccepting values above the 32-bituser_versionceiling on Web, Electron, and iOS — Web/Electron previously silently truncated an out-of-range version when writingPRAGMA user_version, which could make a migration re-apply on a lateropen()without any error surfacing; iOS had no upper bound at all. All four platforms now rejectversion > 2147483647up front withMIGRATION_FAILED. - Fixed iOS BLOB bind values passed as a plain byte array (
number[]) silently clamping an out-of-range byte instead of rejecting it, matching Android and Electron. - Fixed the single-statement guard misreading a bare
beginorcaseidentifier (e.g. a column namedbegin) as a trigger-body keyword, which could swallow a following semicolon and letexecute()silently run a second statement it should have rejected. - Fixed
npm run test:suite:webhanging indefinitely on CI after the suite finished, caused by an orphaned headless-Chrome helper process holding an inherited stdio pipe open.
Older releases
0.0.1 and 0.0.2 are tagged in the repository but predate this changelog. See the
releases page and
CHANGELOG.md for the
most current record.