Publish new version
https://github.com/ryu1kn/csv-writer/pull/57 was merged a long time ago, but no new releases were made since. Our project has been relying on a patch to get this fix for almost 3 years
I was looking at updating projects and realized this was still not available
At a quick glance this seems to be the only fix/src changes since the last version
I migrated to https://csv.js.org/stringify/options/.
Before
const csvWriter = createCsvWriter({
path: `${path}.csv`,
header: [...data.headers],
fieldDelimiter: ';',
});
await csvWriter.writeRecords(data.items);
After
const records = [data.headers.map((h) => h.title), ...data.items.map((row) => data.headers.map((h) => row[h.id]))];
const output = stringify(records, { delimiter: ';' });
fs.writeFileSync(`${path}.csv`, output);
Hi @Cellule,
I noticed your comment about #57 and the lack of new releases. I've forked the project and am going through the list of issues to either fix them or incorporate already submitted patches.
Check it out here:
- GitHub: csv-writer-portable
- npm: csv-writer-portable
Hope this helps!
Best, Harris