Skip to content

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 31 Jul 11:41
· 8 commits to main since this release
20d51ed

Before you upgrade

Boundary verdicts move. Two false positives are fixed, so a repository can report fewer violations on 0.2.0 than it did on 0.1.0 with nothing in it having changed. A gate that was passing keeps passing; one that was failing may stop, and if it does, 0.1.0 was wrong rather than 0.2.0 being lenient.

Nothing was removed or renamed, and no existing exit code changed.

Fixed — verdicts that were never real

A top-level declaration was read as part of the type above it (#4). A declaration's body ran to the next class, interface or object, so anything between two of them was absorbed upward and every type it named became a reference from that declaration:

data class IncidentListFilter(val status: String?)

typealias IncidentSlice = List<MediaIncident>   // ← counted against the DTO above

interface MediaIncidentRepository { … }

That reported IncidentListFilter → MediaIncident DTO exposes Entity against a type whose fields never mention it. The alias was one instance — file-level fun, val and const val all did the same, so the fix is at the body boundary rather than in typealias handling.

Aliases are now resolved rather than dropped, including one imported from another file. Removing a false positive by losing the reference underneath it would only have traded the error for a quieter one.

A type named inside a string counted as a reference (#7). Comments were stripped; string literals were not:

fun describe() = "no MediaIncident on this page"   // ← counted as a reference

Log lines, exception text, serialization keys and SQL all name types routinely. String literals are now blanked along with comments — except the code inside a ${…} template, which is real code and still counted.

Added — drawing the state a branch started from

A PR that removes violations was only half describable: the after picture was one command, the before picture took a git worktree and a throwaway commit (#3).

hexwright render --repo . --base origin/main --at base --image before.png
hexwright render --repo . --base origin/main            --image after.png
  • --at base draws the types the delta covers as they stood before the branch. Delta styling is dropped — nothing in a picture of the past can be added — and violations stay red, which is the question a before picture exists to answer.
  • --view violations keeps only the breaches and the types they run through. A state view: what is wrong now, not what changed. Unlike the web UI toggle it is not narrowed by component, because a violation with one end hidden reads as no violation at all.

The two images line up (#10) — same coordinates, same domain colours, same canvas — so they can be flipped between, not just set side by side. Both commands work that out on their own; there is no flag to remember and no order to run them in.

Changed

  • render treats an empty picture as an answer. No violations, or a purely additive branch with no before state, print what happened and exit 0. A non-zero exit there would break the script that renders both halves.
  • The added / modified legend keys now appear only on images that can contain them. They were previously drawn on every render, including views produced without a base.
  • Dev dependencies moved off versions carrying a critical and a high advisory.

Also

Releases are now published from CI on a tag push, with provenance attested through npm trusted publishing — no long-lived token exists. v0.1.0 has been tagged after the fact, so both releases now point at the commit they were cut from.


What's Changed

  • style: use string literals where no interpolation is needed by @hagyutae in #5
  • build(deps): Bump vite and vitest by @dependabot[bot] in #2
  • fix: stop attributing top-level constructs to the declaration above by @hagyutae in #6
  • fix: a type named in a string literal is not a reference by @hagyutae in #8
  • feat: draw the before state — a violations view, and rendering at the base by @hagyutae in #9
  • test: remove the temp directory the render test creates by @hagyutae in #11
  • fix: lay a before/after pair out from both halves so it lines up by @hagyutae in #12
  • ci: publish from a release tag, and check pull requests on both supported nodes by @hagyutae in #13
  • release: v0.2.0 by @hagyutae in #14
  • ci: publish through trusted publishing instead of a token by @hagyutae in #15

Full Changelog: v0.1.0...v0.2.0