@xnetjs/core 2.5.0 → 3.0.0

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.
package/README.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  Core types, content addressing, and permission primitives for xNet. This is the leaf package -- it has no internal `@xnetjs/*` dependencies.
4
4
 
5
+ > **Alpha software.** xNet is released but early: this package is on npm and
6
+ > usable today, but its API can change between releases, sometimes without a
7
+ > migration path. Pin your version. See the
8
+ > [project README](https://github.com/crs48/xNet#readme) for what alpha means here.
9
+
5
10
  ## Installation
6
11
 
7
12
  ```bash
package/dist/index.d.ts CHANGED
@@ -997,7 +997,17 @@ interface SingleFlightOptions {
997
997
  */
998
998
  declare function singleFlight<K, V>(map: Map<K, Promise<V>>, key: K, fn: () => Promise<V>, options?: SingleFlightOptions): Promise<V>;
999
999
 
1000
- /** Protocol version at which the grinding-resistant tiebreak key activates. */
1000
+ /**
1001
+ * Protocol version at which the grinding-resistant tiebreak key activates.
1002
+ *
1003
+ * This is **not** the same constant as `CURRENT_PROTOCOL_VERSION` in
1004
+ * `@xnetjs/sync` — it happens to share the value 4 today, but it records the
1005
+ * version the tiebreak *activated at* and stays pinned there when the change
1006
+ * format moves on. Do not collapse the two.
1007
+ *
1008
+ * Mirrored by hand in `rust/xnet-core/src/lib.rs`; drift between them is caught
1009
+ * by `packages/sync/src/protocol-version-parity.test.ts`.
1010
+ */
1001
1011
  declare const LWW_TIEBREAK_KEY_VERSION = 4;
1002
1012
  /**
1003
1013
  * The grinding-resistant LWW final tiebreak key (exploration 0305):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xnetjs/core",
3
- "version": "2.5.0",
3
+ "version": "3.0.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,8 +11,8 @@
11
11
  "types": "./dist/index.d.ts",
12
12
  "exports": {
13
13
  ".": {
14
- "import": "./dist/index.js",
15
- "types": "./dist/index.d.ts"
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js"
16
16
  }
17
17
  },
18
18
  "files": [
@@ -35,6 +35,8 @@
35
35
  "scripts": {
36
36
  "build": "tsup src/index.ts --format esm --dts",
37
37
  "typecheck": "tsc --noEmit",
38
- "clean": "rm -rf dist"
38
+ "clean": "rm -rf dist",
39
+ "api:check": "api-extractor run",
40
+ "api:update": "api-extractor run --local"
39
41
  }
40
42
  }