@bitsocial/pubsub-voting 0.1.5 → 0.1.7

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
@@ -158,7 +158,7 @@ See [DESIGN.md, Republishing is the client's job](./DESIGN.md#republishing-is-th
158
158
 
159
159
  ### Many contests (a 5chan-style directory)
160
160
 
161
- One criteria document is one contest (one topic). A directory is conveniently authored as a single manifest of shared `defaults` plus one entry per slot — as in [5chan-directory-criteria.jsonc](./5chan-directory-criteria.jsonc) and [examples/5chan.ts](./examples/5chan.ts) — and `deriveDirectoryCriteria` derives the finished documents (`{ ...defaults, ...entry }`, shallow — an override replaces that whole field) and validates each one. What participants must share **byte-identically** is the derived documents (the topic is their CID), which is why every consumer of the same directory should derive through this one helper rather than re-implement the merge. The manifest is JSONC by convention; strip comments before parsing:
161
+ One criteria document is one contest (one topic). A directory is conveniently authored as a single manifest of shared `defaults` plus one entry per slot — as in the published [5chan-directory-criteria.jsonc](https://github.com/bitsocialnet/lists/blob/master/5chan-directory-criteria.jsonc) and [examples/5chan.ts](./examples/5chan.ts) — and `deriveDirectoryCriteria` derives the finished documents (`{ ...defaults, ...entry }`, shallow — an override replaces that whole field) and validates each one. What participants must share **byte-identically** is the derived documents (the topic is their CID), which is why every consumer of the same directory should derive through this one helper rather than re-implement the merge. The manifest is JSONC by convention; strip comments before parsing:
162
162
 
163
163
  ```ts
164
164
  import { deriveDirectoryCriteria } from "@bitsocial/pubsub-voting";
@@ -16,7 +16,8 @@ import { type Criteria } from "./criteria.js";
16
16
  * The merge is shallow ON PURPOSE: an entry override replaces that whole top-level field
17
17
  * (a `rule` override brings its own complete rule object), no deep merge. Editing
18
18
  * `defaults` re-forks every inheriting contest in lockstep; editing one entry forks only
19
- * that contest. See the authoring manifest example (5chan-directory-criteria.jsonc) and
19
+ * that contest. See the published 5chan manifest
20
+ * (https://github.com/bitsocialnet/lists/blob/master/5chan-directory-criteria.jsonc) and
20
21
  * DESIGN.md "Criteria document".
21
22
  *
22
23
  * Manifest files are conventionally JSONC (commented for human readers); strip comments
@@ -17,7 +17,8 @@ import { DuplicateContestIdError } from "../errors.js";
17
17
  * The merge is shallow ON PURPOSE: an entry override replaces that whole top-level field
18
18
  * (a `rule` override brings its own complete rule object), no deep merge. Editing
19
19
  * `defaults` re-forks every inheriting contest in lockstep; editing one entry forks only
20
- * that contest. See the authoring manifest example (5chan-directory-criteria.jsonc) and
20
+ * that contest. See the published 5chan manifest
21
+ * (https://github.com/bitsocialnet/lists/blob/master/5chan-directory-criteria.jsonc) and
21
22
  * DESIGN.md "Criteria document".
22
23
  *
23
24
  * Manifest files are conventionally JSONC (commented for human readers); strip comments
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitsocial/pubsub-voting",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Trustless pubsub voting over a shared libp2p/Helia node.",
5
5
  "type": "module",
6
6
  "license": "GPL-3.0-or-later",