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

Commit

Permalink
fix: use non-strict ndjson parsing (#21)
Browse files Browse the repository at this point in the history
Fixes #20
  • Loading branch information
savetheclocktower authored Apr 23, 2022
1 parent 6e61b7e commit 78cda66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/job-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class JobManager {
this.worker.on('error', reject);

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

Expand Down

0 comments on commit 78cda66

Please sign in to comment.