Skip to content
Playground(another site)

v0.132.0

Released on 4 July 2026 as v0.132.0, with the increments from v0.130.0 to v0.132.0. See Upgrading for what to change when you move to it.

VersionHighlights
v0.132.0bynkc test resolves a commons split across a directory (emitter fix; ADR 0160). A commons split across a folder (src/thing/a.bynk, src/thing/b.bynk, each commons thing) is a supported source layout that passes bynkc check and emits correctly in production (per file, out/thing/*.ts), but bynkc test failed at tsc with TS2307 Cannot find module — the generated test module imports the commons as one namespace (import * as thing from "./thing.js"), a file a multi-file commons never produces. The test build now emits an aggregating barrel out/thing.ts that export *s each of the commons’ files, so the namespace import resolves for the directory layout exactly as it does for a single file — at all four import sites (the suite target, each consumes/uses target, and the integration harness). The barrel is test-path-only (a non-test build ships no barrel, so production output is byte-for-byte unchanged), emitted once per commons across the unit + integration passes, and composes for dotted names (commons a.b barrels at out/a/b.ts). Emit-only — no grammar, checker, or AST change; hover/completion/semantic-tokens/signature-help unchanged (ADR 0156). Closes #451. Also fixes a related multi-file-commons emit defect (#479): under --target workers, the boundary codec (serialise_T/deserialise_T) for a commons’ refined type was emitted in every file of the commons rather than once in the file that declares the type — so a sibling file (e.g. the one holding fn T.make, not type T) shipped an orphan codec with the type and its imports out of scope, breaking tsc (and, over the barrel above, colliding with TS2308). The codec is now scoped to the declaring file.
v0.131.0CORS for from http services (language + emitter; ADR 0159). A from http service emitted a fixed header set and had no OPTIONS handler, so a Bynk Worker could not be called cross-origin from a browser (#396, deferred from the retired in-browser track). A service now declares a cors { } policy in header position — origins (a static allowlist, or ["*"]), optional headers/credentials/maxAge — from which the compiler synthesises an OPTIONS preflight (answered before the by/Bearer auth seam, since a preflight is credential-less by spec) and stamps Access-Control-* on every response of that service, uniformly across the Ok/Raw/redirect/error/stream variants. Access-Control-Allow-Methods is derived from the routes (never restated); Allow-Headers defaults to content-type (+ Authorization when the service has a Bearer route). A concrete allowlist reflects the matched origin with Vary: Origin (a no-match omits the grant — fail closed); a wildcard emits *. credentials: true with ["*"] is a compile-time error (bynk.http.cors_wildcard_credentials — the Fetch spec forbids it). Opt-in and fully additive: a service without cors { } emits byte-for-byte identical output, and the closed HttpResult registry (ADR 0126/0143) is untouched. bynk-syntax (a cors contextual keyword + CorsPolicy AST) + bynk-emit (the checker validation, the workers_entry.rs preflight/stamping, two runtime.ts helpers) + bynk-fmt; hover/completion track the new section (ADR 0156). Closes #396.
v0.130.0Literal patterns in match (language). match now dispatches a primitive Int/String/Bool scrutinee — or a refinement over one — against literal patterns (31 => …, "english" => …, true => …, and negated ints -1 => …), closing the gap between the type-system spec’s §2.3.4 grammar (which always listed c) and the parser (which rejected any bare literal). This is the idiomatic way to map a raw external value to a domain type, replacing an if/else if == chain. A match is now classified as either variant-kind (sum/Result/Option) or literal-kind; the two don’t mix. Exhaustiveness: Int/String need a wildcard _; Bool is complete once both true and false appear. A repeated literal arm is rejected (duplicate_literal_arm), and a literal on the right of is is rejected (is_literal_pattern) — is tests type/refinement, not value equality. The literal set is ADR 0001’s closed set (no Float, no ()). Lowers to a value-switch (JS === semantics). where-refined patterns and or-patterns remain deferred. Closes #441. Grammar + parser + checker + emitter + formatter + tree-sitter; match-arm completion stays silent on a primitive scrutinee.