castwrightv0.6.0

Changelog

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

Unreleased

  • changedPages: the project site uses the current shared theme (0.12.12).

0.6.0

8 November 2026

  • breakingshow: a show: file must live inside the project root (the working directory, or Vite's root); a path outside it is an error unless --allow-show-outside-root or the plugin option allowShowOutsideRoot is set. Shown text also gets the secret and home-directory warnings that exec: output has. Details: DSL reference.
  • breakingParser: pause on a wait step is a positioned error instead of being silently ignored.
  • addedCLI: castwright --version and per-command --help.
  • addedCLI: castwright validate checks show: steps (file, lines: range, language) without running the highlighter.
  • addedCLI: an exec: step on Windows stops with a clear "not supported on Windows" message instead of a spawn failure.
  • addedCursor: terminal.cursor takes effect — the cast carries it as DECSCUSR at t=0, and the SVG export draws block, bar or underline (no blink).
  • addedPlayer: plays asciicast v3 recordings, honours idle_time_limit, skips truncated or malformed event lines with a warning, and rejects v1 and unknown versions with a clear error.
  • addedPlayer: the progress bar is an accessible seek slider; while focus is inside the demo, Left/Right/Home/End seek and k toggles play/pause.
  • addedPlayer: castwright:ready, castwright:play, castwright:pause, castwright:ended and castwright:error events, and poster="marker:<label>".
  • addedAstro: <TerminalDemo src="…"> takes the accessibility fallback as slot content and warns at build time when none is given.
  • addednpm: node-pty is declared as an optional peer dependency of @casoon/castwright.
  • addedPlayer: marker ticks on the seek bar, plus handle.markers and handle.seekToMarker(label); the slider's value text names the latest marker passed.
  • addedPlayer: drag scrubbing on the seek bar for mouse, touch and pen; it pauses while dragging and restores the previous play state on release.
  • addedPlayer: speed attribute and option (0.25–4×) and handle.speed; optional speed-control adds a labelled speed button to the transport row.
  • addedPlayer: optional copy attribute adds a button that copies the terminal's final text, with an aria-live confirmation.
  • changedParser: "unknown markup tag" hints at the {{ escape for shell braces such as awk '{print $1}'.
  • changedParser: the output line-width warning measures terminal columns — escape sequences are ignored, wide characters and emoji count twice.
  • changedRecord: --record writes raw output as a double-quoted scalar.
  • changedPlayer: changing attributes or cast on a mounted <castwright-demo> rebuilds the player; playback pauses in hidden tabs.
  • changedAstro: the reserved height includes the title bar and transport row and honours rows, chrome and controls.
  • changedPages: the project site uses the current shared theme (0.12.6).
  • changedContributors: CI runs on Node 22 and 24 and builds on Windows and macOS; the publish gate runs the asciicast compatibility check; a tag creates a GitHub Release; issue and pull request templates and SECURITY.md added.
  • fixedCompiler: output with delay > 0 no longer appends a newline the text did not have, so --record replays match the live screen.
  • fixedParser: a double-quoted output.raw is no longer decoded twice — "C:\\Users" keeps its backslashes.
  • fixedParser: error positions inside block and quoted scalars point at the offending character, including bad raw escapes.
  • fixedSVG: characters forbidden in XML 1.0 are dropped instead of producing a malformed file, and non-#rrggbb theme colours are rejected.
  • fixedRecord: --record keeps comments written on an exec: step.
  • fixedTape: a line edited with an unsupported key such as Home is typed but not run, and Backspace removes a whole grapheme.
  • fixedCLI: a missing or unwritable file prints castwright: cannot read|write <file>: … instead of a stack trace, and castwright dev checks the file exists.
  • fixedVite: the plugin forwards YAML parse warnings and watches show: files before reading them, so creating a missing file recompiles the demo.
  • fixedPlayer: a looping demo no longer restarts or keeps playing after it scrolls out of view during the final-frame hold.
  • fixedPlayer: the terminal size is restored on seek, restart and loop after a recording's resize events.
  • fixedPlayer: switching prefers-reduced-motion on while a demo plays stops it and shows the final frame.
  • fixedPlayer: disconnecting restores the host element's attributes and --castwright-* properties; controls="hover" controls no longer capture clicks while invisible.
  • securityAstro: the inline cast JSON no longer breaks out of its <script> block when a demo's output contains </script> or <!--.
  • 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.