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.tsnow 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
๐ Links¶
- 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