From 5b43123fc02370da77b9265aeec62edbdbc83728 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 17 Mar 2023 12:14:54 +0100 Subject: [PATCH] refactor(simulator): remove uneeded check MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- package-lock.json | 58 ++++++++++++------------- package.json | 2 +- src/charging-station/ChargingStation.ts | 6 +-- 3 files changed, 31 insertions(+), 35 deletions(-) diff --git a/package-lock.json b/package-lock.json index c8d89f9c..87eeeb5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -65,7 +65,7 @@ "mocha": "^10.2.0", "mochawesome": "^7.1.3", "prettier": "^2.8.4", - "release-it": "^15.8.0", + "release-it": "^15.9.0", "robohydra": "^0.6.9", "rollup": "^3.19.1", "rollup-plugin-analyzer": "^4.0.0", @@ -6637,9 +6637,9 @@ } }, "node_modules/execa": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-7.0.0.tgz", - "integrity": "sha512-tQbH0pH/8LHTnwTrsKWideqi6rFB/QNUawEwrn+WHyz7PX1Tuz2u7wfTvbaNBdP5JD5LVWxNo8/A8CHNZ3bV6g==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.1.1.tgz", + "integrity": "sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==", "dev": true, "dependencies": { "cross-spawn": "^7.0.3", @@ -13149,9 +13149,9 @@ "dev": true }, "node_modules/release-it": { - "version": "15.8.0", - "resolved": "https://registry.npmjs.org/release-it/-/release-it-15.8.0.tgz", - "integrity": "sha512-eJwYY/vXefcnWn7OHlZRcQJYPSJw/fdO+29C/Re5MZE8FZReCHu+EYq3yB0Bm39/3cTVz/5I/2Fk5rtAsVFU1g==", + "version": "15.9.0", + "resolved": "https://registry.npmjs.org/release-it/-/release-it-15.9.0.tgz", + "integrity": "sha512-uYlbEMvOHeMNLK7AOrckjxNrUB7fU2euiNQ199eGcqCaoOUxD+QqQ6MMBuYaLB0cqvjCgvH5XoaySZW5HFMPLg==", "dev": true, "dependencies": { "@iarna/toml": "2.2.5", @@ -13159,7 +13159,7 @@ "async-retry": "1.3.3", "chalk": "5.2.0", "cosmiconfig": "8.1.0", - "execa": "7.0.0", + "execa": "7.1.1", "git-url-parse": "13.1.0", "globby": "13.1.3", "got": "12.6.0", @@ -13168,7 +13168,7 @@ "lodash": "4.17.21", "mime-types": "2.1.35", "new-github-release-url": "2.0.0", - "node-fetch": "3.3.0", + "node-fetch": "3.3.1", "open": "8.4.2", "ora": "6.1.2", "os-name": "5.1.0", @@ -13189,9 +13189,9 @@ } }, "node_modules/release-it/node_modules/ansi-escapes": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.0.0.tgz", - "integrity": "sha512-IG23inYII3dWlU2EyiAiGj6Bwal5GzsgPMwjYGvc1HPE2dgbj4ZB5ToWBKSquKw74nB3TIuOwaI6/jSULzfgrw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.1.0.tgz", + "integrity": "sha512-bQyg9bzRntwR/8b89DOEhGwctcwCrbWW/TuqTQnpqpy5Fz3aovcOTj5i8NJV6AHc8OGNdMaqdxAWww8pz2kiKg==", "dev": true, "dependencies": { "type-fest": "^3.0.0" @@ -13648,9 +13648,9 @@ "dev": true }, "node_modules/release-it/node_modules/node-fetch": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz", - "integrity": "sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz", + "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==", "dev": true, "dependencies": { "data-uri-to-buffer": "^4.0.0", @@ -22631,9 +22631,9 @@ } }, "execa": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-7.0.0.tgz", - "integrity": "sha512-tQbH0pH/8LHTnwTrsKWideqi6rFB/QNUawEwrn+WHyz7PX1Tuz2u7wfTvbaNBdP5JD5LVWxNo8/A8CHNZ3bV6g==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.1.1.tgz", + "integrity": "sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==", "dev": true, "requires": { "cross-spawn": "^7.0.3", @@ -27697,9 +27697,9 @@ "dev": true }, "release-it": { - "version": "15.8.0", - "resolved": "https://registry.npmjs.org/release-it/-/release-it-15.8.0.tgz", - "integrity": "sha512-eJwYY/vXefcnWn7OHlZRcQJYPSJw/fdO+29C/Re5MZE8FZReCHu+EYq3yB0Bm39/3cTVz/5I/2Fk5rtAsVFU1g==", + "version": "15.9.0", + "resolved": "https://registry.npmjs.org/release-it/-/release-it-15.9.0.tgz", + "integrity": "sha512-uYlbEMvOHeMNLK7AOrckjxNrUB7fU2euiNQ199eGcqCaoOUxD+QqQ6MMBuYaLB0cqvjCgvH5XoaySZW5HFMPLg==", "dev": true, "requires": { "@iarna/toml": "2.2.5", @@ -27707,7 +27707,7 @@ "async-retry": "1.3.3", "chalk": "5.2.0", "cosmiconfig": "8.1.0", - "execa": "7.0.0", + "execa": "7.1.1", "git-url-parse": "13.1.0", "globby": "13.1.3", "got": "12.6.0", @@ -27716,7 +27716,7 @@ "lodash": "4.17.21", "mime-types": "2.1.35", "new-github-release-url": "2.0.0", - "node-fetch": "3.3.0", + "node-fetch": "3.3.1", "open": "8.4.2", "ora": "6.1.2", "os-name": "5.1.0", @@ -27731,9 +27731,9 @@ }, "dependencies": { "ansi-escapes": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.0.0.tgz", - "integrity": "sha512-IG23inYII3dWlU2EyiAiGj6Bwal5GzsgPMwjYGvc1HPE2dgbj4ZB5ToWBKSquKw74nB3TIuOwaI6/jSULzfgrw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.1.0.tgz", + "integrity": "sha512-bQyg9bzRntwR/8b89DOEhGwctcwCrbWW/TuqTQnpqpy5Fz3aovcOTj5i8NJV6AHc8OGNdMaqdxAWww8pz2kiKg==", "dev": true, "requires": { "type-fest": "^3.0.0" @@ -28015,9 +28015,9 @@ "dev": true }, "node-fetch": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz", - "integrity": "sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz", + "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==", "dev": true, "requires": { "data-uri-to-buffer": "^4.0.0", diff --git a/package.json b/package.json index 01ed6423..a38dfb7e 100644 --- a/package.json +++ b/package.json @@ -136,7 +136,7 @@ "mocha": "^10.2.0", "mochawesome": "^7.1.3", "prettier": "^2.8.4", - "release-it": "^15.8.0", + "release-it": "^15.9.0", "robohydra": "^0.6.9", "rollup": "^3.19.1", "rollup-plugin-analyzer": "^4.0.0", diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 9a53a2e4..c4388061 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -405,11 +405,7 @@ export class ChargingStation { } public startHeartbeat(): void { - if ( - this.getHeartbeatInterval() && - this.getHeartbeatInterval() > 0 && - !this.heartbeatSetInterval - ) { + if (this.getHeartbeatInterval() > 0 && !this.heartbeatSetInterval) { this.heartbeatSetInterval = setInterval(() => { this.ocppRequestService .requestHandler(this, RequestCommand.HEARTBEAT) -- 2.34.1