Skip to content

Releases: vizzly-testing/cli

✨ v0.22.0

05 Jan 08:18

Choose a tag to compare

What's Changed

  • 🔖 v0.22.0
  • ✨ Add --fail-on-diff option and improve SDK resilience (#169)
  • ✨ Add static HTML report generation for TDD run (#168)
  • 🐛 Fix npm bin path and repository URL format

✨ v0.21.2

03 Jan 00:29

Choose a tag to compare

What's Changed

  • 🔖 v0.21.2
  • ✨ Add minClusterSize to config service (#163)
  • 🐛 Fix TDD comparison caching and cloud minClusterSize (#161)
  • ♻️ Migrate storybook tests to node:test (#157)
  • ⬆️ Bump @tanstack/react-query from 5.90.12 to 5.90.14 in the dependencies group (#156)
  • 🧪 Improve reporter Playwright test reliability

✨ v0.21.1

23 Dec 22:27

Choose a tag to compare

What's Changed

  • 🔖 v0.21.1
  • 🐛 Fix baseline download from builds page using OAuth authentication (#155)

🏗️ Static Site Plugin v0.0.9

22 Dec 06:51

Choose a tag to compare

[0.0.9] - 2025-12-22

What's Changed

Added

  • --dry-run option - Preview discovered pages and screenshot count without actually capturing screenshots. Perfect for debugging page discovery and understanding what will be tested.
  • Interactive progress display - Real-time progress updates with ETA in terminal mode, showing completion percentage and time remaining

Changed

  • Smart concurrency defaults - Automatically detects optimal concurrency based on CPU cores (uses half of available cores, minimum 2, maximum 8). No more manual tuning needed!
  • Improved error messages - Clear, actionable guidance when no TDD server or API token is found, showing both local and cloud workflow options

Fixed

  • Sitemap index handling - Properly follows child sitemap references instead of treating sitemap files as pages to screenshot
  • Progress output - Better handling of errors and completion messages in both interactive (TTY) and CI environments

Full Changelog: static-site/v0.0.8...static-site/v0.0.9

🏗️ Static Site Plugin v0.0.8

22 Dec 05:42

Choose a tag to compare

[0.0.8] - 2025-12-22

What's Changed

Changed

  • Refactor to functional tab pool + work queue architecture for improved performance and reliability
    • True tab-level concurrency (max tabs actually means max browser tabs, not max pages)
    • Tab reuse via pooling eliminates create/destroy overhead
    • Task-based processing where each (page, viewport) tuple is independent
    • Better work distribution across concurrent tasks
  • Migrate test suite from Vitest to Node.js built-in test runner (22+ required)
  • Migrate from ESLint + Prettier to Biome for unified, faster linting and formatting

Fixed

  • Fix cloud mode crash when using services.get() API (now uses direct property access)
  • Fix accessibility issues in example code (button types, aria-hidden attributes)

Full Changelog: static-site/v0.0.7...static-site/v0.0.8

🏗️ Static Site Plugin v0.0.10

22 Dec 17:20

Choose a tag to compare

[0.0.10] - 2025-12-22

What's Changed

Added

  • Screenshot timeout configuration: New --timeout option (default: 45 seconds) prevents hanging on slow-loading pages
  • Automatic retry logic: Failed screenshots now retry once with a fresh browser tab to recover from timeouts and protocol errors
  • Tab recycling: Browser tabs are automatically recycled after 10 uses to prevent memory leaks in long-running screenshot jobs

Changed

  • CI Performance: Optimized browser arguments for resource-constrained CI environments (disabled GPU, reduced memory usage, limited V8 heap to 512MB)
  • Protocol timeout reduced from 180s to 60s for faster failure detection
  • CLI output now uses proper formatting methods for better readability

Fixed

  • Improved reliability in CI environments where resource constraints previously caused timeout spikes and hanging jobs
  • Better handling of crashed tabs and protocol errors through automatic retry mechanism

Full Changelog: static-site/v0.0.9...static-site/v0.0.10

✨ v0.21.0

21 Dec 01:45

Choose a tag to compare

🎉 Major Release: Architecture Overhaul

A massive overhaul including test framework migration, functional architecture refactor, and significant new features.


✨ New Features

  • Server-Sent Events - Real-time dashboard updates without polling (#148)
  • Delete Comparisons - Remove unwanted new screenshots from dashboard (#145)
  • TUI Toolkit - Branded CLI output with polished help commands (#141)
  • Quiet-by-Default - Cleaner, focused CLI output (#138)
  • Observatory Design System - Refreshed reporter UI (#147)

🐛 Bug Fixes

  • Wire authService and projectService into TDD server (#149)
  • Fix HTTP keep-alive preventing clean process exit (#146)
  • Fix acceptBaseline saving with double .png extension (#144)
  • Fix comparison rejection not working in TDD mode (#137)
  • Fix undefined dependencies in TddService methods (#136)

⚙️ Breaking Changes

  • Node.js requirement updated to >=22.0.0 (was >=20.0.0)

♻️ Functional Architecture Refactor

Eliminated thin service wrapper classes and rebuilt around functional modules with explicit dependency injection.

New Module Structure

Module Location Purpose
API src/api/ createApiClient(), endpoints, request handling
Auth src/auth/ createAuthClient(), login/logout, token refresh
Config src/config/ Config merging, serialization, validation
Project src/project/ Project operations, status updates
TDD src/tdd/ Comparisons, baselines, hotspots, results
Report src/report-generator/ HTML report generation
Server src/screenshot-server/ HTTP handling, middleware

Migration Guide

// Old (deprecated, still works)
import { createServices } from '@vizzly-testing/cli'
const services = createServices(config)
await services.apiService.request(...)

// New (recommended)
import { createApiClient, getBuild } from '@vizzly-testing/cli/api'
const client = createApiClient(config)
const build = await getBuild(client, buildId)
🧪 Test Framework Migration

Migrated from Vitest to Node.js 22+ built-in test runner with c8 for coverage.

Coverage Improvements

Metric Before After
Lines ~30% 87%
Functions ~25% 91%
Branches ~40% 95%

1,432 tests with full coverage of all CLI commands, API client, auth, config, TDD service, and error handling.

📊 Stats
  • ~30,000 insertions / ~21,000 deletions
  • ~700 lines removed from services layer
  • Service wrappers removed: ApiService, AuthService, ConfigService, ProjectService, BuildManager
  • All public APIs remain backward compatible

✨ v0.20.1

19 Dec 20:11

Choose a tag to compare

What's Changed

  • 🔖 v0.20.1
  • ♻️ Migrate reporter to Observatory design system (#147)

🧪 v0.20.1-beta.1

17 Dec 09:25

Choose a tag to compare

🧪 v0.20.1-beta.1 Pre-release
Pre-release

What's Changed

  • 🔖 v0.20.1-beta.1
  • 🐛 Fix HTTP keep-alive preventing clean process exit (#146)
  • ✨ Add delete comparison feature for new screenshots (#145)
  • 🐛 Fix acceptBaseline saving to wrong path with double .png extension (#144)
  • ✨ Add TUI visual tests using tui-driver (#143)
  • ✨ Add TUI toolkit with branded help output and dynamic context (#141)
  • ⬆️ Bump the dependencies group with 8 updates (#139)
  • ⬆️ Bump @types/node from 24.10.1 to 25.0.2 (#140)
  • ✨ Improve CLI output with quiet-by-default behavior and clean summaries (#138)
  • 🐛 Fix comparison rejection not working in TDD mode (#137)
  • 🐛 Fix undefined dependencies in TddService methods (#136)

🧪 v0.20.1-beta.0

15 Dec 00:52

Choose a tag to compare

🧪 v0.20.1-beta.0 Pre-release
Pre-release

Test Framework Migration

Migrated the entire test suite from Vitest to Node.js 20+ built-in test runner with c8 for coverage. The old Vitest configuration and coverage tooling have been completely removed.

Coverage improvements:

  • Line coverage: ~30% → 87.07%
  • Function coverage: ~25% → 90.79%
  • Branch coverage: ~40% → 94.99%

New test coverage:

  • All CLI commands: run, tdd, upload, finalize, login, logout, project, whoami, doctor, status (100% coverage)
  • API client: request handling, endpoint operations, error responses
  • Auth module: token refresh, login flows, token store operations
  • Config system: file loading, environment variable merging, validation, serialization
  • TDD service: baseline management, comparison logic, hotspot detection
  • Screenshot server: HTTP handling, middleware, routers
  • Error handling: All VizzlyError subclasses at 100% coverage
  • Utilities: git operations, CI environment detection, security, output formatting

The test suite now has 1,432 tests total. Scripts updated to use node --test instead of vitest, with no configuration files required.

Functional Architecture Refactor

Eliminated the thin service wrapper classes (ApiService, AuthService, ConfigService, ProjectService, TddService) and rebuilt the codebase around functional modules with explicit dependency injection.

New module structure:

API Module (src/api/)

  • client.js: Factory function createApiClient() that returns a request handler with token refresh logic
  • core.js: Pure functions for building URLs, headers, auth tokens, payload formatting, and error parsing
  • endpoints.js: Functions like createBuild(), getBuild(), uploadScreenshot(), checkShas(), etc.
  • index.js: Public exports for all above

Auth Module (src/auth/)

  • client.js: Factory function createAuthClient() for auth operations
  • core.js: Pure functions for building auth payloads, parsing responses, validating credentials
  • operations.js: High-level operations like login, logout, token refresh
  • index.js: Public exports including createTokenStore() helper for commands

Config Module (src/config/)

  • core.js: Pure functions for merging config objects, serializing to JSON/JavaScript, validating read/write scopes
  • operations.js: Functions like getConfig(), updateConfig(), getMergedConfig() that take filesystem and cosmiconfig functions as dependencies
  • index.js: Public exports

Project Module (src/project/)

  • core.js: Pure functions for parsing project responses, building project operations
  • operations.js: Functions like getCurrentProject(), updateProjectStatus(), getProjectByOrg() that take API client as dependency
  • index.js: Public exports

TDD Module (src/tdd/)

  • Restructured into services/ subdirectory with specialized modules:
    • comparison-service.js: Core screenshot comparison logic using honeydiff
    • baseline-manager.js: Baseline storage and retrieval
    • hotspot-service.js: Hotspot detection and coverage
    • baseline-downloader.js: Downloading baselines from cloud
    • result-service.js: Result aggregation and status tracking
  • core/: Pure functions for signature generation and hotspot coverage calculations
  • metadata/: Baseline and hotspot metadata management
  • index.js: Public exports for TDD operations

Report Generator Module (src/report-generator/)

  • New functional module for generating HTML reports
  • Replaces old asset-based approach with computed reports
  • Functions like generateReport(), collectComparisons()

Screenshot Server Module (src/screenshot-server/)

  • Extracted from TddService into dedicated module
  • core.js: HTTP request/response handling
  • operations.js: Router operations and middleware
  • Server lifecycle management

Commands now import directly from these functional modules instead of going through createServices(). This eliminates indirection and makes testing straightforward—just pass mock dependencies.

Migration for v0.21+:

The testRunner and serverManager classes remain in src/services/ for backward compatibility with the plugin API. These are marked for removal in the next major version. Plugin authors should migrate to using the functional modules directly:

```javascript
// Old (still works, deprecated)
import { createServices } from '@vizzly-testing/cli'
const services = createServices(config)
await services.apiService.request(...)

// New (recommended)
import { createApiClient, getBuild } from '@vizzly-testing/cli/api'
const client = createApiClient(config)
const build = await getBuild(client, buildId)
```

Command Changes

All commands refactored to use functional modules directly with dependency injection for testability.

run.js, tdd.js, upload.js, finalize.js, login.js, logout.js, project.js, whoami.js, doctor.js, status.js: All updated to import from functional modules with dependency injection. Commands accept deps parameter for test mocking. No changes to command-line interfaces or user-facing behavior.

Dependency Changes

Removed:

  • vitest (v4.0.3)
  • @vitest/coverage-v8

Build scripts: Removed copy-assets step (report-generator now uses functional code, not static assets)

Lint commands: Updated from biome lint to biome check

Engine Requirements

Node.js requirement updated to >=22.0.0 (was >=20.0.0)

Bug Fixes

Fixed createTokenStore export — A simplification in the auth module migration accidentally made helper functions unavailable in scope. Changed to import-then-re-export pattern.

Removed flaky tests — Tests that were intermittently failing in CI have been removed and will be rewritten with proper isolation.

E2E Test Coverage

Added end-to-end tests for reporter UI workflows using Playwright, covering navigation, baseline acceptance, settings updates, and project linking.

Summary

  • 202 files changed: 30,740 insertions / 21,004 deletions
  • 13 commits since v0.20.0
  • 1,432 tests with 87% code coverage
  • ~700 lines removed from services layer through functional refactoring
  • Service wrappers removed: ApiService, AuthService, ConfigService, ProjectService (class wrappers), BuildManager (class), html-report-generator

All commands, configuration, and public APIs remain backward compatible. This is an internal restructuring to improve code quality and testability.