Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Setup Node
uses: actions/setup-node@v6
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: 24
cache: npm
Expand All @@ -46,9 +46,6 @@ jobs:
npm run eslint
npm run prettier -- --check

- name: Build package
run: npm run build

- name: Run Electron suite
run: npm run test:suite:electron

Expand All @@ -62,16 +59,16 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Setup Node
uses: actions/setup-node@v6
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: 24
cache: npm

- name: Setup Java
uses: actions/setup-java@v5
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: 21
Expand All @@ -84,15 +81,15 @@ jobs:

ios:
name: iOS build and tests
runs-on: macos-15
runs-on: macos-15-intel
timeout-minutes: 30

steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Setup Node
uses: actions/setup-node@v6
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: 24
cache: npm
Expand Down
22 changes: 16 additions & 6 deletions .github/workflows/release-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
suite_command: npm run test:suite:android
stress_command: npm run test:suite:android:stress
- platform: ios
runner: macos-latest
runner: macos-15-intel
timeout: 90
suite_command: npm run test:suite:ios
stress_command: npm run test:suite:ios:stress
Expand All @@ -59,17 +59,17 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Setup Node
uses: actions/setup-node@v6
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: 24
cache: npm

- name: Setup Java for Android
if: matrix.platform == 'android'
uses: actions/setup-java@v5
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: 21
Expand All @@ -84,10 +84,20 @@ jobs:
- name: Install dependencies
run: npm ci

# file:.. resolves the published dist entry; a clean checkout has no generated output.
- name: Build plugin
run: npm run build

- name: Install playground dependencies
if: matrix.platform != 'electron'
run: npm ci --prefix playground

# Native playground projects are intentionally ignored and must exist before cap sync.
- name: Create native playground project
if: matrix.platform == 'android' || matrix.platform == 'ios'
working-directory: playground
run: npx cap add ${{ matrix.platform }}

- name: Select and boot iOS Simulator
if: matrix.platform == 'ios'
run: |
Expand All @@ -104,7 +114,7 @@ jobs:

- name: Run Android suite
if: matrix.platform == 'android'
uses: reactivecircus/android-emulator-runner@v2
uses: reactivecircus/android-emulator-runner@a421e43855164a8197daf9d8d40fe71c6996bb0d # v2
with:
api-level: 35
target: google_apis
Expand Down Expand Up @@ -133,7 +143,7 @@ jobs:

- name: Upload test log
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: release-matrix-${{ matrix.platform }}-${{ github.run_attempt }}
path: artifacts/
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
aud*.md

# Local dated audit evidence; fixes, regression tests and rationale remain versioned.
/docs/audits/

# node files
dist
node_modules
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Changelog

## [Unreleased]

## [0.2.0] - 2026-11-13

### Fixed

- Consistent SQL, placeholder and migration validation across platforms, including Unicode SQL, comments and triggers.
- Correct transaction state and rollback after constraint, statement preparation and commit failures.
- Batch statements execute in order, preserving dependencies on earlier schema changes.
- Correct native `RETURNING` execution and change counts, Android typed bindings and large-row reads on API 35+.
- Preserve special query column names, UTF-8 text and BLOB values; invalid native query inputs return failure results.
- Recover failed Web workers without replaying writes and preserve data when reopening `:memory:` with a different directory.
- Fix Electron large-rowid handling and worker shutdown.
- Fix plain Node ESM imports, Electron settings declarations and CocoaPods source tags.

### Changed

- Electron cache storage is isolated per application. Rebuild data from the former shared cache directory; existing files are not migrated automatically.
- Automatic batches and migrations reject explicit transaction-control SQL. Malformed inputs previously accepted by some backends now return failures consistently.
- Web builds include an internal worker and SQLite WASM/OPFS assets. Public TypeScript method signatures remain unchanged from 0.1.1.

### Added

- Upgrade guidance for 0.2.0, including transaction recovery, cache storage and large-query/bridge memory limits.

## [0.1.1] - 2026-07-12

### Added
Expand Down
13 changes: 9 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,16 @@ changes.
### `npm run build`

Builds the plugin, regenerates API docs with `@capacitor/docgen`, compiles TypeScript, bundles
the Web plugin, and builds the Electron entry points.
the Web plugin and its internal worker/WASM assets, and builds the Electron entry points.

### `npm run lint`

Runs ESLint, Prettier, and SwiftLint. SwiftLint should report 0 violations before review.
Runs ESLint, Prettier, SwiftLint, and ktlint. SwiftLint must report no serious violations; existing warnings are tolerated but should not grow.

### `npm run test:ts`

Builds the package through `pretest:ts` before running JS and worker tests, so tests
exercise current bundles and work on a clean checkout. `npm test` uses the same hook.

### `npm run test:p2`

Expand All @@ -42,8 +47,8 @@ Web/Electron builds, and migration validation tests.

### Full Suite

The shared behavioral suite currently has 367 tests and 11 stress benchmarks. The same test
definitions are used by the playground UI and the CLI runners.
The shared behavioral suite currently has 457 tests in 77 groups, 12 stress benchmarks,
and 24 layer diagnostics. The same test definitions are used by the playground UI and the CLI runners.

```shell
npm run test:suite:electron
Expand Down
2 changes: 1 addition & 1 deletion CapacitorSqlite.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Pod::Spec.new do |s|
s.license = package['license']
s.homepage = package['repository']['url'].sub(/^git\+/, '')
s.author = package['author']
s.source = { :git => package['repository']['url'].sub(/^git\+/, ''), :tag => s.version.to_s }
s.source = { :git => package['repository']['url'].sub(/^git\+/, ''), :tag => "v#{s.version}" }
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
s.ios.deployment_target = '15.0'
s.dependency 'Capacitor'
Expand Down
3 changes: 2 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ let package = Package(
.testTarget(
name: "CapacitorSqlitePluginTests",
dependencies: ["CapacitorSqlitePlugin"],
path: "ios/Tests/CapacitorSqlitePluginTests")
path: "ios/Tests/CapacitorSqlitePluginTests",
resources: [.copy("Fixtures")])
]
)
Loading
Loading