behavior-contracts 0.12.1 → 0.13.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
@@ -187,6 +187,26 @@ npm install behavior-contracts
187
187
  - If you **run a generated TypeScript module**, keep `behavior-contracts` as a dependency of the
188
188
  project that runs it — the generated module pulls what it needs from this package itself.
189
189
 
190
+ ### Go runtime from the npm package
191
+
192
+ The npm package also carries the Go module `github.com/foo-ogawa/behavior-contracts/go` under
193
+ `node_modules/behavior-contracts/go` (its `go.mod` and every `.go` file, at the same version as the
194
+ package). A Go project that already installs `behavior-contracts` from npm (for example, to run
195
+ `bc generate`) can build against that copy instead of fetching this repository, so its CI needs no
196
+ GitHub token. Add a `replace` to the application's own `go.mod`; the path is relative to that `go.mod` and
197
+ starts with `./` or `../`:
198
+
199
+ ```go
200
+ require github.com/foo-ogawa/behavior-contracts/go v0.13.0
201
+
202
+ replace github.com/foo-ogawa/behavior-contracts/go => ./node_modules/behavior-contracts/go
203
+ ```
204
+
205
+ - A `replace` takes effect only in the main module's `go.mod`. When you use the runtime through another
206
+ Go module (for example graphddb's Go runtime), put this `replace` in your application's `go.mod` too.
207
+ - A module replaced by a local directory has no `go.sum` entry. Its integrity rests on the `integrity`
208
+ of `behavior-contracts` in your `package-lock.json`.
209
+
190
210
  ---
191
211
 
192
212
  # Section A — For library authors (building a library on bc)