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 +20 -0
- package/go/api_test.go +675 -0
- package/go/behavior.go +1202 -0
- package/go/cmd/conformance/main.go +40 -0
- package/go/codec.go +170 -0
- package/go/coderuntime/behaviorcore.go +93 -0
- package/go/coderuntime/canonical.go +287 -0
- package/go/coderuntime/exprcore.go +334 -0
- package/go/coderuntime/plan.go +422 -0
- package/go/coderuntime/primitives.go +383 -0
- package/go/coderuntime/rawabi.go +281 -0
- package/go/coderuntime/spec.go +17 -0
- package/go/coderuntime/template.go +139 -0
- package/go/coderuntime/value.go +138 -0
- package/go/coderuntime/version.go +9 -0
- package/go/compat.go +289 -0
- package/go/conformance.go +1046 -0
- package/go/envelope.go +77 -0
- package/go/expr.go +347 -0
- package/go/fingerprint.go +147 -0
- package/go/fingerprint_test.go +94 -0
- package/go/go.mod +3 -0
- package/go/guard.go +538 -0
- package/go/jsonord.go +151 -0
- package/go/plan_parallel_test.go +279 -0
- package/go/primitives_test.go +227 -0
- package/package.json +3 -1
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)
|