castwrightv0.5.2

Changelog

Generated from CHANGELOG.md in the project repository. Never maintained twice.

Unreleased

  • changedPages: the project site uses the current shared theme (0.12.6).
  • securityDependencies: development and build dependencies updated to clear all pnpm audit advisories (Vitest 4, happy-dom 21, Vite 7.3.7, Astro 7.4.4 and their transitive packages); the published packages' runtime dependencies are unchanged.

0.5.2

30 October 2026

  • changedProject page: the start page now carries a release teaser and an FAQ (theme 0.11.1).
  • fixedCompiler: a closing wait: holds the final screen in the player and in the SVG, GIF and MP4 exports, before the loop hold; it used to be dropped. Details: Player reference.

0.5.1

27 October 2026

  • changedReleases: the packages are published from a tag workflow with npm Trusted Publishing (provenance, no stored token), after approval in the npm environment.

0.5.0

26 October 2026

  • addedSVG: --start final|beginning chooses where the loop's first pass starts. Details: CLI reference.
  • changedSVG: opens on the finished screen, held for --loop-delay, and then plays from the beginning — instead of an almost empty terminal while the first command is typed. --start beginning keeps the old behaviour.
  • changedProject page: the start page shows a scene as castwright's own animated SVG export, says who castwright is for, and explains the way from a .terminal.yaml file to the web player, SVG, GIF and MP4 in a diagram, also in the documentation.
  • fixedSVG: after a clear: the previous screen stays up until the next prompt, instead of a blank terminal for the length of the step's pause.

0.4.0

28 September 2026

  • addedcastwright build demo.tape --allow-exec --record writes the recorded tape to a new demo.terminal.yaml next to it: each command as run: with exactly what it printed, hidden setup left out. The YAML then builds without running anything. An existing file is never overwritten.
  • changed--record no longer writes an empty output: step for a command that printed nothing.
  • fixed@casoon/castwright accepts Vite 8 as a peer. Astro 7 ships Vite 8, so installing @casoon/astro-castwright in an Astro 7 project warned about an unmet vite peer.

0.3.0

26 September 2026

  • addedVHS .tape files as input: castwright build, validate and dev and the Vite plugin take them next to *.terminal.yaml. With --allow-exec each typed command runs as an exec: step and its output is recorded; commands typed between Hide and Show run silently before each visible one. A documented subset, listed in the VHS tapes reference.

0.2.1

25 September 2026

  • fixed--record no longer folds long lines when it rewrites the file: a recorded line stays exactly as the program printed it, and the rest of the file keeps its layout.

0.2.0

25 September 2026

  • addedDSL parser and Script IR: *.terminal.yaml with run, type, key, output, wait, clear, prompt and marker, inline colour markup, raw ANSI, and validation errors carrying file, line, column and the offending source line.
  • addedCompiler from Script to asciicast v2, deterministic by construction: no wall clock, no unseeded randomness, grapheme-cluster typing, and snapshot tests over the whole example corpus to keep it that way.
  • addedSeven bundled themes, embedded in the cast header so a .cast looks right wherever it is played.
  • addedcastwright CLI: build, validate and dev.
  • added<castwright-demo>, a framework-agnostic web player on xterm.js — lazy, pausing when scrolled out of view, with seek implemented as replay rather than a skip.
  • addedAccessibility: the element's light-DOM children are the terminal's final text, generated at build time; the live terminal is hidden from assistive technology; reduced motion shows the final frame immediately; the terminal is never a keyboard trap.
  • addedchrome="none" and controls="hover" for a bare looping demo that still has a real, focus-revealed pause control.
  • addedVite plugin at @casoon/castwright/vite, covering every bundler-based framework, and a thin Astro integration with <TerminalDemo /> on top of it.
  • addedA self-contained player bundle, so the no-bundler path needs no CDN.
  • addedcastwright build --format svg: one self-contained animated SVG — real text, the cast's theme, no script, reduced-motion aware — that plays inside a plain <img>, as a GitHub README embeds it. Each terminal line animates only when it changes, so a minute of demo is around 120 kB. --no-chrome and --loop-delay shape it.
  • added--format gif and --format mp4, through agg and ffmpeg, with an install hint when either is missing.
  • addedshow: puts a file on screen, syntax-highlighted at build time with Shiki (an optional peer dependency) — with lines, lang and theme.
  • addedexec: runs a real command in a pseudo-terminal and records its output with real timing, only with --allow-exec / allowExec: true. --record writes the output back into the file as run: + output: { raw }, so the demo replays the same bytes on every build. node-pty is an optional peer dependency.
  • addedThe player works under a strict style-src (no 'unsafe-inline'), such as Astro's hash-based CSP. In Firefox, 24-bit colours additionally need style-src-attr 'unsafe-inline'.
  • fixedSeeking or restarting during playback could leave two runs' worth of output on screen.
  • fixedPage styles now override the player's defaults (castwright-demo { --castwright-… }), as the theming guide describes.
  • fixedThe window frame is as wide as the terminal instead of stretching across a wide page.