@weaveprotocol/core 0.1.1 → 0.1.2

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 +20 -3
  2. package/package.json +7 -2
package/README.md CHANGED
@@ -739,8 +739,10 @@ Browser-to-browser communication via WebRTC.
739
739
 
740
740
  #### Signaling relay
741
741
 
742
- `server/signaling-server.mjs` is a dumb relay in a couple hundred lines of
743
- Node on the `ws` library: a peer holds one socket and joins a room on it for
742
+ `server/relay.mjs` is a dumb relay in a couple hundred lines of Node with no
743
+ dependencies of its own. It runs on its own as `server/signaling-server.mjs`
744
+ (an HTTP server and the `ws` library around it), and inside every always-on
745
+ node (`weave serve`), so the two are the same relay. A peer holds one socket and joins a room on it for
744
746
  each space, and the relay passes join notices and WebRTC offers, answers and
745
747
  candidates between peers that share a room. (A socket opened with `?room=` is
746
748
  the older one-room form, still served.) The room is a hash of
@@ -1095,7 +1097,7 @@ the protocol straight from `src/`. It knows no kinds of data in advance: every
1095
1097
  screen is worked out from what a space says about itself (see *Derived UI* below):
1096
1098
 
1097
1099
  ```bash
1098
- npm install && (cd example && npm install) && (cd home && npm install) && (cd cli && npm install)
1100
+ npm install && (cd example && npm install) && (cd home && npm install) # the CLI is a workspace: the first one installs it
1099
1101
  npm run dev
1100
1102
  ```
1101
1103
 
@@ -1190,6 +1192,21 @@ with every tab closed. What it writes shows "via agent", and every peer
1190
1192
  ignores an agent changing collections, who may do what, or the account's own
1191
1193
  list of spaces. See BLOCK-20.
1192
1194
 
1195
+ ## Releasing
1196
+
1197
+ `@weaveprotocol/core` (this folder) and `@weaveprotocol/cli` (`cli/`, an npm
1198
+ workspace) are released together, always with the same version:
1199
+
1200
+ ```bash
1201
+ npm run release
1202
+ ```
1203
+
1204
+ It typechecks and runs the tests, then [bumpp](https://github.com/antfu-collective/bumpp)
1205
+ asks for the next version, writes it to both packages, and commits and tags
1206
+ it (`v0.1.2`). Both are published (each builds itself first: `dist/` for the
1207
+ core, one bundled file for the CLI), and only then is the commit pushed. The
1208
+ settings are in `bump.config.ts`.
1209
+
1193
1210
  ## Tests
1194
1211
 
1195
1212
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weaveprotocol/core",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "description": "Self-sovereign P2P protocol for the browser — identity, schemas, storage, networking, and gossip sync",
6
6
  "repository": {
@@ -11,6 +11,9 @@
11
11
  "dist",
12
12
  "README.md"
13
13
  ],
14
+ "workspaces": [
15
+ "cli"
16
+ ],
14
17
  "main": "dist/index.js",
15
18
  "types": "dist/index.d.ts",
16
19
  "exports": {
@@ -78,11 +81,13 @@
78
81
  "typecheck": "tsc --noEmit",
79
82
  "test": "node --experimental-vm-modules --import tsx --test tests/**/*.test.ts",
80
83
  "signal": "node server/signaling-server.mjs",
81
- "prepublishOnly": "npm run build"
84
+ "prepublishOnly": "npm run build",
85
+ "release": "npm run typecheck && npm test && bumpp && npm publish --workspaces --include-workspace-root && git push --follow-tags"
82
86
  },
83
87
  "devDependencies": {
84
88
  "@types/react": "^19.3.0",
85
89
  "@types/ws": "^8.18.1",
90
+ "bumpp": "^12.3.0",
86
91
  "tsx": "^4.19.0",
87
92
  "typescript": "^5.6.0",
88
93
  "ws": "^8.21.3",