@streamorchard/grapevine 0.7.0 → 0.7.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.
package/README.md CHANGED
@@ -197,12 +197,20 @@ When it ships a release that uses Grapevine, record it (next section).
197
197
 
198
198
  Once an app ships a capability version, Grapevine records it. From then on that version can't change in place, and other apps can say which release to update to.
199
199
 
200
- In the app's repo, at the start of every change:
200
+ Give the app a script for it, in its `package.json`:
201
+
202
+ ```json
203
+ "scripts": { "grapevine:check": "grapevine-check" }
204
+ ```
205
+
206
+ Then, in the app's repo, at the start of every change:
201
207
 
202
208
  ```sh
203
- npx grapevine-check
209
+ npm run grapevine:check
204
210
  ```
205
211
 
212
+ Use the script, not `npx grapevine-check`: in a checkout where Grapevine isn't installed yet, `npx` would fetch and run whatever package on npm has that name. `npm run` only uses what's installed.
213
+
206
214
  - **It reads** the `grapevine` field from each of the app's release tags (`v*`), and Grapevine's record from GitHub (the installed copy if it's offline, or with `--offline`).
207
215
  - **It lists** any capability version a release shipped that isn't recorded yet, with the command to record it, e.g. `npm run released -- com.streamorchard.peardrops 0.1.6 drops.farming@1.0 players@1.0`.
208
216
  - **That command runs in a Grapevine checkout** (its `app-shipped` skill), followed by a pull request and a patch release.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamorchard/grapevine",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Lets desktop apps on the same computer find each other and talk, privately: local sockets, JSON-RPC, pairing and versioned capabilities.",
5
5
  "license": "GPL-3.0-only",
6
6
  "author": "StreamOrchard",
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
- // Run in an app's repo (npx grapevine-check): lists the capability versions the app's releases
2
+ // Run in an app's repo, through a script ("grapevine:check": "grapevine-check"; never npx, which
3
+ // would fetch a package of that name when Grapevine isn't installed): lists the capability versions the app's releases
3
4
  // have shipped that Grapevine hasn't recorded yet, with the command that records them (Grapevine's
4
5
  // app-shipped skill). Until they're recorded, those versions can still be changed in place, and
5
6
  // other apps can't say which release to update to.
@@ -7,9 +8,9 @@
7
8
  // The app says what it speaks in its package.json, so every release tag has it:
8
9
  // "grapevine": { "app": "com.streamorchard.peardrops", "provides": { "drops.farming": "1.0" }, "uses": { "players": "1.0" } }
9
10
  //
10
- // npx grapevine-check prints what needs recording (exit 0)
11
- // npx grapevine-check --strict exits 1 when something does
12
- // npx grapevine-check --offline uses the record in the installed package, not GitHub's
11
+ // npm run grapevine:check prints what needs recording (exit 0)
12
+ // npm run grapevine:check -- --strict exits 1 when something does
13
+ // npm run grapevine:check -- --offline uses the record in the installed package, not GitHub's
13
14
  'use strict';
14
15
 
15
16
  const fs = require('fs');