Skip to content

Commit

Permalink
Fix issue with missing CSV output values
Browse files Browse the repository at this point in the history
  • Loading branch information
maxschmeling committed Apr 19, 2024
1 parent 737d4ad commit 7b8ddf6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/lib/cli/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,14 @@ function ids( data: Record< string, unknown >[] ): string {
function csv( data: Record< string, unknown >[] ): string {
const fields = Object.keys( data[ 0 ] );

const parser = new Parser( { fields: formatFields( fields ) } );
const parser = new Parser( {
formatters: {
header: ( value: string ) => {
return value.split( /(?=[A-Z])/ ).join( ' ' ).toLowerCase()

Check failure on line 75 in src/lib/cli/format.ts

View workflow job for this annotation

GitHub Actions / Lint

Replace `.split(·/(?=[A-Z])/·).join(·'·'·).toLowerCase()` with `⏎↹↹↹↹↹.split(·/(?=[A-Z])/·)⏎↹↹↹↹↹.join(·'·'·)⏎↹↹↹↹↹.toLowerCase();`
}

Check failure on line 76 in src/lib/cli/format.ts

View workflow job for this annotation

GitHub Actions / Lint

Insert `,`
},
fields,

Check failure on line 78 in src/lib/cli/format.ts

View workflow job for this annotation

GitHub Actions / Lint

Delete `·`
} );

return parser.parse( data );
}
Expand Down

0 comments on commit 7b8ddf6

Please sign in to comment.