Skip to content

Commit

Permalink
CHANGELOG updated
Browse files Browse the repository at this point in the history
  • Loading branch information
jisotalo committed Sep 1, 2024
1 parent 09f74b9 commit ed8826a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.0-beta.3] - UNRELEASED
- Added `warning` event to listen for console warnings
- Bugfix: `writeRawByPath()` didn't use the `targetOpts` parameter

## [2.0.0-beta.2] - 26.08.2024
- Changed `subscribeSymbol()` -> `subscribeValue()`
- Bug fix: Fixing [issue #144](https://github.com/jisotalo/ads-client/issues/144)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ads-client",
"version": "2.0.0-beta.2",
"version": "2.0.0-beta.3",
"description": "Beckhoff TwinCAT ADS client library for Node.js (unofficial). Connect to a Beckhoff TwinCAT automation system using the ADS protocol from a Node.js app.",
"main": "./dist/ads-client.js",
"scripts": {
Expand Down
7 changes: 5 additions & 2 deletions src/ads-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,11 @@ export class Client extends EventEmitter<ClientEvents> {
* @param message Warning message
*/
private warn(message: string) {
if (!this.settings.hideConsoleWarnings) console.log(`WARNING: ${message}`)
this.emit('warning', message)
if (!this.settings.hideConsoleWarnings) {
console.log(`WARNING: ${message}`);
}

this.emit('warning', message);
}

/**
Expand Down

0 comments on commit ed8826a

Please sign in to comment.