You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Parser.options.columns no longer contains array of column names from csv@6.1.0+ #460
When we upgraded from csv@6.0.4 to version >=6.1.0, our csv parsing logic broke.
We use from_line in our logic depending on the file.
We noticed that in csv@6.0.4, Parser.options.columns used to be set to something that looks like:
Which works for any value that is set for from_line.
However in 6.1.0+, when you set from_line >= 2, Parser.options.columns becomes:
true
To Reproduce
I believe this also needs a CSV file with a BOM char.
Example:
const csvIterator = Fs.createReadStream(localFilePath).pipe(
CsvParser({
columns: true,
trim: true,
bom: true,
from_line: 2
})
);
for await (let record of csvIterator) {
console.log(csvIterator.options?.columns); // will log out 'true'
}
Additional context
It looks like we can use another field Parser.api.options.columns. This is set correctly for all scenarios.
But hopefully this might help someone who had the same issue.
Activity
wdavidw commentedon Jul 16, 2025
Hi, I just published csv 6.4.1 and csv-parse 6.1.0 which fix the issue. The problem was associated with bom auto detection
fix(csv-parse): normalized columns with auto-detected bom (fix adalta…