Skip to content

gaslamp v0.21.1 Release Notes

  • Released: 2025-09-05
  • gaslamp: 60 - v0.21.1
  • pilotlamp: 17 - v0.21.1

๐ŸŽ‰ Major Changes

โœจ JestLite Module Complete Refactoring

Major testing framework enhancement - Successfully completed the modular refactoring of the JestLite testing framework with improved maintainability and structure:

  • Modular Architecture: Split monolithic 769-line file into 6 focused modules
  • Enhanced Maintainability: Clean separation of concerns with single-responsibility modules
  • Improved Testing: Fixed test execution and counting issues for reliable testing
  • TypeDoc Documentation: Complete docstring coverage with beginner-friendly explanations
  • Backward Compatibility: Maintained full compatibility via compatibility layer
TypeScript
// JestLite modular imports (new approach)
import { describe, TestSuite, Expect, runTests } from 'gaslamp/jestlite';

// Still works (backward compatibility)
import { describe, TestSuite, Expect, runTests } from 'gaslamp/torch/jestlite';

const suite = describe("My Test Suite", ({ test }) => {
  test("should work correctly", (expect) => {
    expect(1 + 1).toBe(2);
    expect([1, 2, 3]).toContain(2);
    expect(() => { throw new Error(); }).toThrow();
  });
});

runTests([suite]);

๐Ÿ—๏ธ Enhanced JestLite Architecture

Before (v0.21.0):

Text Only
src/torch/jestlite.ts (769 lines - monolithic)

After (v0.21.1):

Text Only
src/jestlite/
โ”œโ”€โ”€ index.ts        # Main exports and GAS compatibility
โ”œโ”€โ”€ types.ts        # Type definitions
โ”œโ”€โ”€ expect.ts       # Expect class
โ”œโ”€โ”€ matcher.ts      # Matcher class with all assertion methods
โ”œโ”€โ”€ suite.ts        # TestSuite class with lifecycle hooks
โ””โ”€โ”€ runner.ts       # describe function and runTests

This refactoring improves: - Code Organization: Each component in its own focused file - Maintainability: Easier to understand and modify individual parts - Testing Reliability: Fixed execution bugs and counting issues - Developer Experience: Better IDE support and code navigation

๐Ÿ› Bug Fixes

JestLite Test Execution

  • Fixed "expect.expect is not a function" errors: Corrected Expect instance passing in TestSuite
  • Improved Error Handling: Fixed afterEach hook error counting logic
  • Test Counting: Resolved pass/fail counting discrepancies in test results
  • TypeScript Types: Updated test callback signatures for proper type checking

๐Ÿ”ง Refactoring

JestLite Module Restructuring

  • File Splitting: Converted 769-line monolith into 6 focused modules
  • Compatibility Layer: src/torch/jestlite.ts now serves as backward-compatible re-export
  • Clean Imports: Organized exports with proper module boundaries
  • Type Organization: Centralized type definitions in dedicated types.ts

๐Ÿ“– Documentation

API Documentation Updates

  • New Matcher Class: Complete documentation for 443-line Matcher class
  • Interface Documentation: Added TestCase, TestContext, TestResult, SuiteRunResult, AllRunResults
  • Removed Deprecated: Cleaned up AfterGlowBuilder and related deprecated interfaces
  • TypeDoc Consistency: Updated all documentation to reflect modular structure

๐Ÿงช Testing & Quality

Test Results

  • โœ… All Tests Pass: 507 tests across 47 test suites (21 skipped, 22 todo)
  • โœ… JestLite Tests: All 34 JestLite framework tests now pass successfully
  • โœ… Build Success: TypeScript compilation with zero errors
  • โœ… Bundle Update: Updated gaslamp.bundle.js with modular JestLite structure

Quality Assurance

  • โœ… Code Quality: All pre-commit hooks passing (linting, formatting, security)
  • โœ… Conventional Commits: Proper commit message formatting maintained
  • โœ… Issue Tracking: Comprehensive GitLab issue #124 documentation and closure

๐Ÿš€ Migration Guide

For Existing JestLite Users

No changes required - All existing code continues to work:

TypeScript
// This still works exactly as before
import { describe, TestSuite, Expect, runTests } from 'gaslamp/torch/jestlite';

New modular imports available (optional):

TypeScript
// New preferred approach
import { describe, TestSuite, Expect, runTests } from 'gaslamp/jestlite';

For Framework Developers

New modular structure enables easier contributions:

TypeScript
// Import specific components
import { Matcher } from 'gaslamp/jestlite/matcher';
import { TestSuite } from 'gaslamp/jestlite/suite';
import { Expect } from 'gaslamp/jestlite/expect';

๐Ÿ” Technical Details

Issue #124 Resolution

  • Phase 1-4: All refactoring phases completed successfully
  • Phase 3 Review: Confirmed no remnants require deletion
  • Compatibility: Maintained full backward compatibility via compatibility layer
  • Quality Gates: All build, test, and documentation requirements met

Code Metrics

  • Lines Reduced: Improved organization without reducing functionality
  • Files Added: 6 focused modules vs 1 monolithic file
  • Test Coverage: Maintained 100% test coverage for JestLite functionality
  • Bundle Size: No significant impact on final bundle size

๐Ÿ‘ฅ Contributors

  • @shotakaha - Complete JestLite module refactoring and testing framework improvements
  • Documentation: https://gaslamp.readthedocs.io/
  • Repository: https://gitlab.com/qumasan/gaslamp
  • Issue #124: https://gitlab.com/qumasan/gaslamp/-/issues/124 (Completed)
  • API Documentation: Updated TypeDoc available in docs/api/

Full Changelog: v0.21.0...v0.21.1