Skip to content

Commit 3c4ad4a

Browse files
author
Elena Contreras
committed
build(deps): update depencencies
1 parent b5416ba commit 3c4ad4a

File tree

3 files changed

+920
-353
lines changed

3 files changed

+920
-353
lines changed

index.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
'use strict';
22
const { createReadStream, createWriteStream } = require('fs');
33
const strStream = require('string-to-stream');
4-
const {
5-
AsyncParser,
6-
transforms: { unwind, flatten }
7-
} = require('json2csv');
4+
const { unwind, flatten } = require('@json2csv/transforms');
5+
const { AsyncParser } = require('@json2csv/node');
86

97
const Executor = require('@runnerty/module-core').Executor;
108

@@ -39,10 +37,9 @@ class json2csvExecutor extends Executor {
3937

4038
const output = createWriteStream(outputPath, { encoding: 'utf8' });
4139
const asyncParser = new AsyncParser(opts);
42-
const parsingProcessor = asyncParser.fromInput(input).toOutput(output);
4340

4441
try {
45-
await parsingProcessor.promise();
42+
asyncParser.parse(input).pipe(output);
4643
this.end(this.endOptions);
4744
} catch (err) {
4845
this.endOptions.end = 'error';

0 commit comments

Comments
 (0)