anchordb 0.2.0 → 0.2.1

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 (3) hide show
  1. package/CHANGELOG.md +41 -1
  2. package/README.md +18 -1
  3. package/package.json +9 -2
package/CHANGELOG.md CHANGED
@@ -5,7 +5,47 @@ 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
- ## 0.1.0 — unreleased
8
+ ## 0.2.1
9
+
10
+ Documentation and discoverability only — no code changes.
11
+
12
+ - Every package README now carries a **The AnchorDB family** table, so someone landing on
13
+ `anchordb-react` from an npm search can see the other four and what each is for.
14
+ - npm keywords added to `anchordb-react`, `anchordb-angular`, `anchordb-sync-server` and
15
+ `anchordb-relay`, which had none and so did not surface in npm search at all. `anchordb` gained
16
+ aggregation, schema and document-database terms.
17
+ - Corrected stale `0.1.0` version claims in three READMEs.
18
+
19
+ ## 0.2.0 — first published release
20
+
21
+ Published as the unscoped `anchordb` family. The `@anchor` scope was never available: it needs an
22
+ npm organization, so the packages took unscoped names instead.
23
+
24
+ ### Added
25
+
26
+ - **Bulk writes on the inspector protocol** — `updateMany` and `deleteMany`, behind a new
27
+ `documents:bulk` capability, routed through the ordinary Model API so a bulk write from Anchor
28
+ Lens validates, stamps and queues exactly like an app write. An empty filter is refused unless
29
+ explicitly acknowledged.
30
+ - **CSV export and import** (`toCsv`, `fromCsv`, `detectImportFormat`), matching
31
+ `mongoexport --type=csv`. Values are cast through the collection schema on import.
32
+ - **A `filter` option on export**, for exporting query results rather than a whole collection.
33
+ - **A `default` Extended JSON mode**, alongside `relaxed` and `canonical`.
34
+ - **A MongoDB bridge** (`MongoBridgeClient` here, `MongoBridge` in `anchordb-relay`), so Lens can
35
+ pull collections from a real MongoDB or push a device into one.
36
+
37
+ ### Fixed
38
+
39
+ - **`modifiedCount` could never be 0.** `updatedAt` and the version key were stamped before the
40
+ change comparison, so every matched document counted as modified and a no-op still bumped the
41
+ timestamp. A no-op update is now matched but not modified, and writes nothing — which also stops a
42
+ bulk update over 10,000 documents queueing 10,000 mutations when only a few hundred changed.
43
+ - **`MongooseStore` was never exported** from `anchordb-sync-server`, so it was absent from the
44
+ published types and unreachable by anyone following the README.
45
+
46
+ ## 0.1.0 — never published
47
+
48
+ The initial implementation. Superseded by 0.2.0 before anything reached npm.
9
49
 
10
50
  First release. Five packages, published together.
11
51
 
package/README.md CHANGED
@@ -110,7 +110,7 @@ Extended JSON has three modes, matching the ones MongoDB Compass offers: `canoni
110
110
 
111
111
  ## Status
112
112
 
113
- **0.2.0 — early, and 0.x means breaking changes are expected.**
113
+ **0.2.1 — early, and 0.x means breaking changes are expected.**
114
114
 
115
115
  **631 tests across 17 files.** Implemented and covered: the local database, Mongoose-shaped schema
116
116
  and validation, decorators, indexes with real `E11000` enforcement, the lazy query builder,
@@ -155,6 +155,23 @@ Documented rather than silently absent: discriminators, `refPath`, transactions/
155
155
  server-side change streams, text/`2dsphere`/hashed indexes, collation, and the
156
156
  `$graphLookup`/`$geoNear`/`$search`/`$merge`/`$out`/`$unionWith` aggregation stages.
157
157
 
158
+ ## The AnchorDB family
159
+
160
+ Five packages. **Only `anchordb` is required** — the rest exist so that an offline-only app never
161
+ has to download Express, and an Express server never has to download React.
162
+
163
+ | Package | What it is | Runs where |
164
+ | --- | --- | --- |
165
+ | **`anchordb`** *(this package)* | The database — schema, models, queries, aggregation, optional sync | phone · browser · Node |
166
+ | [`anchordb-react`](https://www.npmjs.com/package/anchordb-react) | React and React Native hooks | the device |
167
+ | [`anchordb-angular`](https://www.npmjs.com/package/anchordb-angular) | Angular / Ionic module, DI and RxJS observables | the device |
168
+ | [`anchordb-sync-server`](https://www.npmjs.com/package/anchordb-sync-server) | Server half of sync — Express, NestJS, Next.js | your backend |
169
+ | [`anchordb-relay`](https://www.npmjs.com/package/anchordb-relay) | Dev relay for the Anchor Lens inspector | your laptop |
170
+
171
+ Each one needs a different third-party framework as a peer dependency, and npm resolves those per
172
+ package rather than per import — which is why they are not one package. Full reasoning and API
173
+ reference: [github.com/knnadeera/anchordb](https://github.com/knnadeera/anchordb).
174
+
158
175
  ## License
159
176
 
160
177
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anchordb",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "MongoDB + Mongoose for mobile apps. Offline-first local database with optional sync.",
5
5
  "keywords": [
6
6
  "mongodb",
@@ -12,9 +12,16 @@
12
12
  "ionic",
13
13
  "capacitor",
14
14
  "sqlite",
15
+ "indexeddb",
15
16
  "sync",
16
17
  "objectid",
17
- "database"
18
+ "database",
19
+ "nosql",
20
+ "document-database",
21
+ "embedded-database",
22
+ "mobile-database",
23
+ "aggregation",
24
+ "schema"
18
25
  ],
19
26
  "license": "MIT",
20
27
  "type": "module",