Repository navigation
Spectral Logs v0.1.9
v0.1.9 Release Notes
Fixed
-
Hex color parsing: Fixed an issue where hexadecimal colors with more than 6 characters (like
#2bff00ffor#ffffff) were not being recognized. ThehexToRgbfunction now properly handles 3, 6, and 8-character hex formats, ignoring the alpha channel when present. -
CLI configuration enhancement: The CLI now generates a simple JavaScript configuration file called
specConf.jscontaining a default configuration object that can be easily imported in Node.js, Bun, or other JavaScript environments.
Stuff you need to know
- This release focuses on color consistency and developer experience improvements
- No breaking changes to the core logging API
- The new
specConf.jsfile provides a more straightforward way to configure SpectralLogs across different JavaScript environments - Color parsing now supports all standard hex formats including those with alpha channels (though alpha is ignored for terminal output)
Install
- Fresh install:
npm install spectrallogs- Update existing:
npm install spectrallogs@^0.1.9- or
npm update spectrallogsUsage
After installation, you can generate the configuration file:
npx spec config set [parameter=value]Then import it in your project:
For ESM (ECMAScript Modules):
import config from './specConf.js';For CommonJS:
const config = require('./specConf.js').default;Note: The configuration file uses export default for better compatibility with modern JavaScript environments. Use .default when importing with CommonJS require().
The generated specConf.js contains sensible defaults that you can customize for your project's logging needs.