Skip to content

v2.0.0 - Quick Wins + Lua Validation

Choose a tag to compare

@ikari-pl ikari-pl released this 08 Jan 12:53
· 36 commits to main since this release
ffbc053

v2.0.0 - Quick Wins and Lua Code Validation

This release adds developer experience improvements and Lua code validation.

New Features

Lua Code Validation

  • Pre-upload Lua syntax validation using luaparse (Lua 5.2)
  • Validates code before sending to Fibaro to catch syntax errors early
  • Detailed error messages with line/column information
  • Integrated into createScene, updateScene, createQuickApp, updateQuickAppCode

Developer Experience Improvements

  • ESLint configuration with TypeScript-aware rules
  • Prettier code formatting (semi, trailing commas, 100 char width)
  • Structured logging with configurable levels (ERROR, WARN, INFO, DEBUG)
    • Set FIBARO_LOG_LEVEL environment variable
    • DEBUG mode logs API requests/responses with timing
  • Enhanced error messages with detailed diagnostics and troubleshooting tips
  • JSDoc comments on key methods for better IDE support

Technical Details

  • 136 tests passing (29 new tests for Lua validator)
  • 98.56% test coverage maintained
  • All code formatted with Prettier
  • All code linted with ESLint

Upgrade Notes

From v1.0.0:

  • Optional: Set FIBARO_LOG_LEVEL=DEBUG for detailed API logging
  • Lua code is now validated before upload (validation failures will throw errors)

Installation

npm install -g fibaro-mcp@2.0.0

Full Changelog

  • feat: add Lua code validation with luaparse
  • feat: add structured logging with configurable levels
  • feat: add ESLint and Prettier configuration
  • feat: enhance error messages with diagnostics
  • docs: add JSDoc comments to key methods
  • ci: migrate to npm trusted publishing with provenance
  • test: add 29 comprehensive Lua validator tests