anchordb 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,42 @@ All notable changes to the `anchordb` packages.
5
5
  This project follows [semantic versioning](https://semver.org/). While the version is `0.x`, minor
6
6
  releases may contain breaking changes.
7
7
 
8
+ ## 1.0.4
9
+
10
+ `anchordb-angular` in native Capacitor builds. No change to database behaviour.
11
+
12
+ - **Capacitor links native plugins only from the package.json of the app.** `@capacitor-community/sqlite`
13
+ arrives through `anchordb-angular`, so it was installed but `npx cap sync` left it out of the
14
+ Android project — found by building the Ionic test app, whose `capacitor.settings.gradle` had no
15
+ SQLite plugin. On a device the first query would have failed with
16
+ `"CapacitorSQLite" plugin is not implemented on android`. `ionicAdapter` now checks
17
+ `Capacitor.isPluginAvailable("CapacitorSQLite")` and throws naming
18
+ `npm install @capacitor-community/sqlite` and `npx cap sync`. It does not fall back to IndexedDB,
19
+ which would strand the data in a store the app abandons once the plugin is linked.
20
+ - **`@capacitor/core` was declared `^8.5.2` and `@capacitor-community/sqlite` `^8.1.1`** — the same
21
+ `npm install -w` caret rewrite as `anchordb-react` 1.0.1. A Capacitor 6 or 7 app would have got a
22
+ second `@capacitor/core`, and plugins registered on one instance are invisible to the other. Both
23
+ are now `>=6`, held by a regression test.
24
+ - The README and package reference showed `inject(AnchorService)` and `AnchorModule.forRoot(...)`
25
+ inside `imports`. Neither works: the providers use string tokens, and `forRoot` returns plain
26
+ providers. Both now show `@Inject("AnchorService")` and spread `.providers`.
27
+ - Verified in the Ionic test app on Capacitor 8.5.2: with the plugin listed, `cap sync` reports
28
+ `@capacitor-community/sqlite@8.1.1` for Android and the Gradle settings include it.
29
+
30
+ ## 1.0.3
31
+
32
+ Guidance fix for Expo apps. No change to database behaviour.
33
+
34
+ - **`createAnchorDB` and the `anchordb-react` README recommended `npx expo install --fix`**, which
35
+ cannot help: it only realigns packages listed in the package.json of the app, and `expo-sqlite`
36
+ and `react-native-get-random-values` arrive through `anchordb-react`. Both now name
37
+ `npx expo install expo-sqlite react-native-get-random-values`, which pins the drivers at the top
38
+ level where the wide ranges from 1.0.2 dedupe onto them.
39
+ - Verified in an Expo SDK 56 app: with the pins, both drivers resolve to the versions the SDK pins
40
+ (`expo-sqlite` 56.0.6, `react-native-get-random-values` 1.11.0), deduped, and
41
+ `npx expo install --check` reports dependencies up to date. Without the pin the polyfill resolves
42
+ to 2.0.0 against the 1.11 native module Expo Go ships.
43
+
8
44
  ## 1.0.2
9
45
 
10
46
  `anchordb-react` pinned its native drivers to a single Expo SDK.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anchordb",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "MongoDB + Mongoose for mobile apps. Offline-first local database with optional sync.",
5
5
  "keywords": [
6
6
  "mongodb",