v0.4.0
TypeScript (npm)
- Added: var-core: Detect spec drift — a paragraph that was an example and now matches zero steps
- Added: var-core: Drift re-identifies examples by text similarity, so moving and rewording never false-alarm
- Added: var-core: Report drift as a Diagnostic and add a BaselineStore port
- Added: var-core: ReconcileDrift orchestrates baseline read → detect → write through the BaselineStore port
- Added: var-cli: Var run detects spec drift and gates on it
- Added: var-vitest: Read-only drift gate — a spec whose example stopped matching fails the suite
- Fixed: var: Resolve a step's source file from bundled, minified stack traces
Python (PyPI)
- Added: var-core: Detect spec drift with a byte-identical var.lock.json baseline
- Added: var-pytest: Pytest and unittest gate on spec drift, writing var.lock.json
- Added: var-runner: Scaffold a starter project with
var init
Java & Kotlin (Maven Central)
- Added: var-core: Detect spec drift with a byte-identical var.lock.json baseline
- Added: var-junit: The JUnit engine gates on spec drift
- Added: var-kotest: Kotest VarSpec gates on spec drift
Ruby (RubyGems)
⚠️ Breaking: var: Block-based step DSL
step files no longer destructurestepsinto
param, stimulus, sensorand call them with.call/.(). Move the
registrations into asteps(...) do … endblock and pass the initial state as
an argument instead of a factory block.- Added: var-core: Scaffold the ruby workspace and port the UTF-16 span layer
- Added: var-core: Parse Markdown specs to a var-doc AST with UTF-16 spans
- Added: var-core: Register step definitions via cucumber-expressions
- Added: var-core: Match steps and build execution plans
- Added: var-core: Execute plans and compare returns against the document
- Added: var-core: Detect spec drift with a byte-identical var.lock.json baseline
- Added: var-config: Read var.config.json
- Added: var-rspec: Run Markdown specs as RSpec examples
- Added: var-runner: Scaffold a starter project with
var init
VS Code extension (Marketplace & Open VSX)
- Added: Drift shows as an editor warning with an "Accept as prose" quick fix
- Added: Recognize Ruby step definitions in the editor
- Fixed: Kotlin parameter types declared with raw-string regexes are now discovered
Specification (all ports)
-
⚠️ Breaking: Custom parameter types pair parse with a format function — mismatches render in the document's notation
declare a custom parameter type's transform function as
parse (was transformer) in defineState (TypeScript), define_state (Python),
Registrar.defineParameterType (Java) and parameterType (Kotlin). -
⚠️ Breaking: Step matching runs against raw inline text — markup is never stripped
expressions that relied on emphasis stripping must move
the markers into a parameter type (e.g. regexp /*[^*]+*/ with parse
raw.slice(1, -1)); the var-doc artifact's inlineMap field is now
segmentMap. -
⚠️ Breaking: Unify step authoring on steps() → param, stimulus, sensor
the step-authoring API is renamed and restructured in every
port;parseis now a varargs function over the capture groups. -
TypeScript:
const { stimulus, sensor } = defineState(factory, paramTypes)
becomesconst { stimulus, sensor } = steps(factory).param(name, regexp, parse?, format?).
Chain.param()before destructuring to keep custom-param handler-arg
inference. -
Python:
stimulus, sensor = define_state(factory, param_types=...)becomes
param, stimulus, sensor = steps(factory), then
param(name, regexp, parse=None, format=None). -
Java:
registrar.defineState(factory)becomesregistrar.steps(factory),
andregistrar.defineParameterType(...)becomess.param(name, Pattern, parse?, format?)
on the returned binder (parseis aString...varargs SAM; a
two-argumentparam(name, Pattern)gives identity parse). -
Kotlin: top-level
defineState { ... }becomessteps { ... }, and
parameterType(...)becomesparam(...). -
Added: The state factory argument to defineState/define_state is now optional — step files with pure steps can omit it