refactor: remove unneeded null coalescing
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 20 Aug 2023 18:46:30 +0000 (20:46 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 20 Aug 2023 18:46:30 +0000 (20:46 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
.npmrc [deleted file]
src/pools/abstract-pool.ts
src/worker/abstract-worker.ts

diff --git a/.npmrc b/.npmrc
deleted file mode 100644 (file)
index 22144e5..0000000
--- a/.npmrc
+++ /dev/null
@@ -1,2 +0,0 @@
-auto-install-peers=true
-legacy-peer-deps=true
index 41e7bb24cd4f69653e0e11b7d74b636bbda8a25c..1926a4a426fbcb84724ab55749778ff95c5910ee 100644 (file)
@@ -879,7 +879,7 @@ export abstract class AbstractPool<
       const taskFunctionWorkerUsage = this.workerNodes[
         workerNodeKey
       ].getTaskFunctionWorkerUsage(
-        message.taskPerformance?.name ?? DEFAULT_TASK_NAME
+        message.taskPerformance?.name as string
       ) as WorkerUsage
       this.updateTaskStatisticsWorkerUsage(taskFunctionWorkerUsage, message)
       this.updateRunTimeWorkerUsage(taskFunctionWorkerUsage, message)
index 75a8d784f87d4cd18126d2f81ce9ba54fae65323..a00e8f8faadd4e912de558c5d4f8ca980db76036 100644 (file)
@@ -496,7 +496,7 @@ export abstract class AbstractWorker<
       const errorMessage = this.handleError(e as Error | string)
       this.sendToMainWorker({
         taskError: {
-          name: name ?? DEFAULT_TASK_NAME,
+          name: name as string,
           message: errorMessage,
           data
         },
@@ -535,7 +535,7 @@ export abstract class AbstractWorker<
         const errorMessage = this.handleError(e as Error | string)
         this.sendToMainWorker({
           taskError: {
-            name: name ?? DEFAULT_TASK_NAME,
+            name: name as string,
             message: errorMessage,
             data
           },