Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit 78cda66

Browse files
fix: use non-strict ndjson parsing (#21)
Fixes #20
1 parent 6e61b7e commit 78cda66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/job-manager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class JobManager {
8686
this.worker.on('error', reject);
8787

8888
this.worker.stdout
89-
.pipe(ndjson.parse())
89+
.pipe(ndjson.parse({ strict: false }))
9090
.on('data', (obj) => {
9191
// We could listen for the `spawn` event to know when the worker is
9292
// ready, but that event wasn't added until Node v14.17. Instead,
@@ -101,7 +101,7 @@ class JobManager {
101101
// Even unanticipated runtime errors will get sent as newline-delimited
102102
// JSON.
103103
this.worker.stderr
104-
.pipe(ndjson.parse())
104+
.pipe(ndjson.parse({ strict: false }))
105105
.on('data', this.receiveError.bind(this));
106106
});
107107

0 commit comments

Comments
 (0)