Skip to content

Releases: loginov-rocks/bluetooth-terminal

Release v1.6.0

22 Apr 05:05
9553df3

Choose a tag to compare

Version 1.6.0 enhances the bluetooth-terminal library with a modernized configuration system, improved logging capabilities, and better connection management while maintaining backward compatibility through deprecated method support.

API Enhancements

  • Added new onReceive callback for message handling.
  • Renamed methods for better consistency (e.g., setOnConnectedonConnect) while keeping old methods as deprecated.
  • Added setCharacteristicValueSize to configure maximum data chunk size.
  • Improved parameter naming for clarity (datamessage).

Configuration System

  • Introduced options object for more flexible configuration while maintaining parameter-based initialization.
  • Refactored the constructor to accept both the options object and legacy parameters.
  • Enhanced error handling with more specific error messages.

Logging System

  • Implemented comprehensive logging with multiple levels (none, error, warn, info, log, debug).
  • Added onLog callback for custom logging integration.
  • Created context-aware logging with method names and descriptive messages.

Connection Management

  • Refactored connection logic for better reliability.
  • Improved reconnection mechanics.
  • Enhanced error handling during connection and communication.

Documentation & Testing

  • Updated README with revised introduction, quick start guide, and API documentation.
  • Improved JSDoc comments throughout the codebase.
  • Reorganized tests into separate files for better maintainability.
  • Expanded test coverage for new features.

Other Improvements

  • Maintained backward compatibility with no breaking changes.
  • Updated dependencies to the latest versions.
  • Improved consistency with Arduino BluetoothTerminal library.
  • Removed splitByLength method due to implementation simplification.

This release focuses on developer experience improvements while ensuring existing implementations continue to work without modification.

Full Changelog: v1.5.0...v1.6.0

Release v1.5.0

07 Apr 05:50

Choose a tag to compare

Version 1.5.0 modernizes the bluetooth-terminal library with TypeScript and contemporary JavaScript practices while maintaining 100% API compatibility with previous versions. No breaking changes were introduced to the public API.

API Compatibility

  • All public methods and their signatures remain unchanged.
  • Constructor parameters and defaults are identical to previous versions.
  • Same runtime behavior and Bluetooth communication functionality.
  • Completely backward-compatible with existing applications.

Implementation Changes

  • Converted codebase from JavaScript to TypeScript.
  • Replaced Promise chains with an async/await pattern internally.
  • Enhanced error messages for better debugging.
  • Fixed issue where calling disconnect() with no device connected would throw an error.
  • Added proper TypeScript type definitions for better developer experience.

Package Changes

  • Changed: the package entry point moved from src/BluetoothTerminal.js to dist/BluetoothTerminal.js
    • This is the only potential breaking change if you were importing specific files directly.
    • No impact if you're importing via npm normally.
  • Now distributes only built files in the npm package.

Development Infrastructure

  • Migrated testing from Mocha/Chai/Sinon to Jest.
  • Updated to Node.js v22 and npm 10 for development environment.
  • Implemented BabelJS for TypeScript transpilation.
  • Updated ESLint configuration to v9.
  • Switched from Coveralls to Sonar Qube for code coverage.

Full Changelog: v1.4.2...v1.5.0