Skip to content

gaslamp v0.21.0 Release Notes

  • Released: 2025-09-05
  • gaslamp: 59 - v0.21.0
  • pilotlamp: 16 - v0.21.0

๐ŸŽ‰ Major Changes

โœจ AfterGlow Module Complete Refactoring

Major logging system enhancement - Completely refactored the afterglow module with comprehensive usability improvements:

  • AfterGlowBuilder: New Builder pattern for chainable logger configuration
  • Enhanced Usability: Fluent API methods with method chaining support
  • Counter Integration: Built-in counter functionality with automatic logging
  • Advanced Utility Methods: Timer integration, filtering, and querying capabilities
  • TypeDoc Documentation: Complete docstring unification with beginner-friendly explanations
TypeScript
// New AfterGlow Builder pattern
import { AfterGlowBuilder } from 'gaslamp';

const logger = new AfterGlowBuilder()
  .withLogLevel("debug")
  .withLogMode("eager")
  .withLogTarget("console")
  .build();

// Enhanced fluent API
logger.setLogLevel("debug")
  .setLogMode("eager")
  .setLogTarget("console");

// Integrated timing capabilities
logger.time("api-call");
// ... your code ...
logger.timeEnd("api-call"); // Logs elapsed time

// Counter functionality
logger.count("requests");
logger.count("requests"); // Automatically tracks increments

๐Ÿ—๏ธ Enhanced Logging Architecture

Before (v0.20.0):

TypeScript
const logger = new AfterGlow();
logger.setLogLevel("debug");
logger.setLogMode("eager");
logger.setLogTarget("console");

After (v0.21.0):

TypeScript
// Builder pattern approach
const logger = new AfterGlowBuilder()
  .withLogLevel("debug")
  .withLogMode("eager")
  .withLogTarget("console")
  .build();

// Or fluent API approach
const logger = new AfterGlow()
  .setLogLevel("debug")
  .setLogMode("eager")
  .setLogTarget("console");

This enhancement improves: - Developer Experience: Intuitive builder pattern and fluent APIs - Integration: Seamless ClockSmith and Counter integration - Usability: Advanced filtering and querying capabilities - Documentation: Complete TypeDoc format with practical examples

โœจ Features

AfterGlow Enhancements

  • AfterGlowBuilder Class: Chainable configuration with builder pattern
  • Fluent API Methods: Method chaining support for all configuration methods
  • Timer Integration: Built-in time() and timeEnd() methods using ClockSmith
  • Counter Functionality: Automatic increment tracking with count() method
  • Advanced Filtering: Query methods like getLogsByLevel(), getLogsAfter(), getLogsByCaller()
  • Enhanced Options: Full LoggerOptions interface implementation

Counter Module Integration

  • Counter Class: Efficient counting with JunkPocket-based storage
  • Multiple Counters: Support for multiple named counters in single instance
  • DataFrame Integration: Convert counter data to DataFrame-compatible Map format

Build & Development

  • Quality Assurance: Comprehensive Phase 5 validation with full test coverage
  • Code Quality: Enhanced linting and formatting validation
  • Bundle Optimization: Improved GAS compatibility verification

๐Ÿ› Bug Fixes

  • LoggerOptions: Fixed unused option properties implementation
  • Type Safety: Enhanced validation for LogLevel, LogMode, and LogTarget values
  • Memory Management: Improved efficiency in logger registry management

๐Ÿ”ง Refactoring

  • TypeDoc Migration: Complete JSDoc โ†’ TypeDoc conversion with unified @group tags
  • Documentation Structure: Consistent @category classification across all modules
  • Code Organization: Improved internal structure with better separation of concerns
  • Import Optimization: Streamlined import paths and dependency management

๐Ÿ“– Documentation

  • Complete TypeDoc Coverage: All classes and methods documented with practical examples
  • Beginner-Friendly: Simplified explanations with step-by-step usage guides
  • @group Unification: All AfterGlow components unified under "@group AfterGlow"
  • API Reference: Updated with new Builder pattern and utility methods

๐Ÿš€ Migration Guide

For Existing AfterGlow Users

Basic usage remains unchanged:

TypeScript
// Still works
const logger = new AfterGlow("myApp");
logger.info("Application started");

New Builder pattern (recommended):

TypeScript
// Enhanced approach
const logger = new AfterGlowBuilder()
  .withName("myApp")
  .withLogLevel("info")
  .build();

New utility methods:

TypeScript
// Timer functionality
logger.time("process");
// ... processing ...
logger.timeEnd("process");

// Counter functionality
logger.count("api-calls");

// Advanced querying
const errorLogs = logger.getLogsByLevel("error");
const recentLogs = logger.getLogsAfter(new Date("2025-01-01"));

Google Apps Script Users

All new features work seamlessly in GAS:

JavaScript
// Builder pattern in GAS
const logger = new AfterGlowBuilder()
  .withLogLevel("debug")
  .withLogTarget("logger")
  .build();

// Fluent API in GAS
logger.setLogLevel("info").setLogMode("eager");

๐Ÿงช Testing & Compatibility

  • โœ… All 47 test suites pass (507 individual tests, 21 skipped, 22 todo)
  • โœ… TypeScript compilation successful with zero errors
  • โœ… Google Apps Script compatibility maintained
  • โœ… Rollup bundling successful with minor circular dependency warning
  • โœ… Code formatting and linting validation complete

๐Ÿ“Š Performance

  • No Performance Regression: All architectural changes maintain existing performance
  • Enhanced Efficiency: Improved memory management in logger registry
  • Optimized Integration: Seamless ClockSmith and Counter integration without overhead

๐Ÿ” Quality Assurance

Phase 5 Validation Results:

  • Build Verification: โœ… Clean TypeScript compilation and GAS bundling
  • Code Quality: โœ… All formatting and linting standards met
  • Test Coverage: โœ… Comprehensive test suite validation
  • Documentation: โœ… Complete TypeDoc format consistency

๐Ÿ‘ฅ Contributors

  • @shotakaha - Complete AfterGlow module refactoring and enhancement
  • Documentation: https://gaslamp.readthedocs.io/
  • Repository: https://gitlab.com/qumasan/gaslamp
  • Issues: https://gitlab.com/qumasan/gaslamp/-/issues
  • API Documentation: Generated TypeDoc available in docs/api/

Full Changelog: v0.20.0...v0.21.0