gherkin-cli@0.2.0
Minor Changes
-
5445c7c: Formalize the programmatic API. The
.entrypoint (import { … } from 'gherkin-cli') is now a documented library surface exposing the pure engines —parse,parseAst(newly exported),validate,diff,GitError— and their types. The render/stream layer stays CLI-only, so importing gherkin-cli runs no CLI side effect. The CLI now consumes this same API barrel.Add a dependency-injection seam for easy testing, passed as a separate 3rd
depsargument — a narrow role interface (ISP), not an option.parse,parseAst, andvalidatetake aReadsFile(defaultnodeReadsFile);difftakes aReadsGitDiff(defaultgitReadsDiff). Each engine receives only the seam it uses, so they can be driven from in-memory fixtures with no filesystem or git access. TheReadsFileandReadsGitDiffrole interfaces and both node defaults (nodeReadsFile,gitReadsDiff) are exported. No CLI behavior or output routing changes. -
28b08ea:
diffnow omitsunchangedscenarios by default;--fullincludes them.The
--fullflag was documented as "include unchanged scenarios in full detail" but was never wired todiff()—diffalways returned every scenario, and the flag only bypassed output truncation. The flag now does what its help says.Breaking (0.x minor): the default
files[].scenarioslist is now changed-only. A consumer that reads theunchangedentries must pass--full(CLI) or{ full: true }(diff). Consumers that readsummary(includingsummary.unchanged),addOnly, or only theadded/modified/removedentries need no change — the classification still covers the whole file and every aggregate is computed before the projection.