@romedb/client 0.2.14 → 0.2.15

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/README.md +13 -7
  2. package/package.json +4 -1
package/README.md CHANGED
@@ -4,9 +4,9 @@
4
4
  serve --directory` or RomeDB Cloud. It runs in Node.js, Cloudflare Workers, browsers
5
5
  and any other runtime with `fetch`.
6
6
 
7
- The package is about 30 KB to download, has no dependencies and has no native addon. It holds the
8
- same code as `@romedb/node/client` and `@romedb/node/values`, byte for byte, at the same
9
- version. To open a local database file, use [`@romedb/node`](https://www.npmjs.com/package/@romedb/node).
7
+ The package is about 30 KB to download, has no dependencies and has no native addon. To
8
+ open a local database file, use [`@romedb/node`](https://www.npmjs.com/package/@romedb/node),
9
+ which depends on this package.
10
10
 
11
11
  ## Install
12
12
 
@@ -52,10 +52,16 @@ export default {
52
52
 
53
53
  ## Using it with `@romedb/node`
54
54
 
55
- Each package has its own value classes. A `Record` from `@romedb/client` is not an
56
- instance of the `Record` from `@romedb/node/client`, so a client refuses a value from
57
- the other package. Use one package for all your client code, or convert values at the
58
- boundary.
55
+ `@romedb/node` depends on this package at the same version. Its `client`, `values` and
56
+ `embedded-client` entries use the classes from here, so a `Record` or `Float64` made by
57
+ one package works in the other.
58
+
59
+ That needs one installed copy of `@romedb/client`, so keep both packages at the same
60
+ version. If the versions differ, your package manager installs a second copy, and a
61
+ client refuses values made by the other copy with `unsupported parameter value`.
62
+
63
+ The `Database` and `AsyncDatabase` classes of the main `@romedb/node` entry keep their
64
+ own `Record` and `Vector`. Use the types of that entry with them.
59
65
 
60
66
  ## Saved requests
61
67
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@romedb/client",
3
- "version": "0.2.14",
3
+ "version": "0.2.15",
4
4
  "description": "RomeDB client for Node.js, Cloudflare Workers and browsers. Connects by URL to romedb serve or RomeDB Cloud, with no native addon.",
5
5
  "main": "client.cjs",
6
6
  "types": "client.d.ts",
@@ -15,6 +15,9 @@
15
15
  "node": "./values.cjs",
16
16
  "default": "./values.mjs"
17
17
  },
18
+ "./internal": {
19
+ "node": "./client-internal.cjs"
20
+ },
18
21
  "./package.json": "./package.json"
19
22
  },
20
23
  "files": [