Skip to content

Commit

Permalink
fix: upgrade csv-parse to 5.3.3 and update option names (#300)
Browse files Browse the repository at this point in the history
Fixes #299
  • Loading branch information
chrispcampbell authored Dec 10, 2022
1 parent 921014a commit 71d0c8b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/compile/src/_shared/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export let readCsv = (pathname, delimiter = ',') => {
columns: false,
trim: true,
skip_empty_lines: true,
skip_lines_with_empty_values: true
skip_records_with_empty_values: true
}
try {
let data = B.read(pathname)
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"dependencies": {
"byline": "^5.0.0",
"csv-parse": "^4.15.4",
"csv-parse": "^5.3.3",
"sanitize-html": "^2.7.1"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-config/src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { readFileSync } from 'fs'
import { join as joinPath, relative } from 'path'

import parseCsv from 'csv-parse/lib/sync.js'
import { parse as parseCsv } from 'csv-parse/sync'

import type { BuildContext, InputSpec, LogLevel, OutputSpec } from '@sdeverywhere/build'

Expand Down Expand Up @@ -174,7 +174,7 @@ function readCsvFile(path: string): CsvRow[] {
columns: true,
trim: true,
skip_empty_lines: true,
skip_lines_with_empty_values: true
skip_records_with_empty_values: true
})
}

Expand Down
8 changes: 2 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 71d0c8b

Please sign in to comment.