rclnodejs v1.7.0 Release Notes (2025-11-26)
Overview
We're excited to announce rclnodejs v1.7.0! This release brings significant improvements to the developer experience with promise-based APIs, comprehensive error handling, and powerful parameter management capabilities.
🎉 Major Features
1. Promise-Based Service Calls (#1311)
- Added
sendRequestAsync()method for promise-based service calls - Support for
async/awaitsyntax, making code more readable and maintainable - Timeout support: Specify request timeouts with
{ timeout: milliseconds } - Cancellation support: Use
AbortSignalto cancel pending requests - Full backward compatibility: Existing callback-based API remains unchanged
- Improved error handling with specific error types (
TimeoutError,AbortError)
Example:
const response = await client.sendRequestAsync(request, {
timeout: 5000,
signal: abortController.signal
});2. ParameterClient for Remote Parameter Access (#1318)
- New
ParameterClientclass for accessing parameters on remote nodes - Full API for parameter operations:
getParameters()- Retrieve parameter valuessetParameters()- Modify parameter valueslistParameters()- List available parametersdescribeParameters()- Get parameter metadata
- Async/await support with timeout and cancellation
- Clean API:
node.createParameterClient(remoteNodeName)/node.destroyParameterClient() - Exported
parameterTypeFromValue()utility for parameter type detection
3. ParameterWatcher for Real-Time Monitoring (#1326)
- New
ParameterWatcherclass for real-time parameter change notifications - Monitor specific parameters on remote nodes
- Event-driven architecture using Node.js EventEmitter
- Dynamic parameter management with
addParameters()/removeParameters() - Async/await support for initial parameter retrieval
- Proper lifecycle management and automatic cleanup
Example:
const watcher = node.createParameterWatcher(remoteNodeName);
watcher.on('change', ({ parameterName, value }) => {
console.log(`${parameterName} changed to:`, value);
});
await watcher.start(['my_param']);4. Structured Error Handling with Class Hierarchy (#1320)
- 21 new error classes providing rich context and type safety
- Base class:
RclNodeErrorwith contextual information (code, nodeName, entityType, timestamp, details) - Validation Errors:
TypeValidationError,RangeValidationError,NameValidationError - Operation Errors:
TimeoutError,AbortError,ServiceNotFoundError,NodeNotFoundError - Parameter Errors:
ParameterNotFoundError,ParameterTypeError,ReadOnlyParameterError - Topic/Action Errors:
PublisherError,SubscriptionError,GoalRejectedError,ActionServerNotFoundError - Native Errors:
NativeErrorwraps C++ exceptions with additional context - All errors include
toJSON()method for structured logging - Fully backward compatible: All new errors extend
Error
🔧 Improvements
Node.js Compatibility
- AbortSignal.any() polyfill (#1322) for Node.js < 20.3.0
- Fixed
AbortSignal.timeout(0)behavior for Node.js < 18.20
CI/CD
🙏 Acknowledgments
Thanks to @mahmoud-ghalayini who made this release possible!
Full Changelog: 1.6.0...1.7.0