Skip to content

fix: --auto-type in dsv2json CLI - #110

Closed
cpruijsen wants to merge 2 commits into
d3:mainfrom
cpruijsen:fix/issue-101
Closed

cpruijsen wants to merge 2 commits into
d3:mainfrom
cpruijsen:fix/issue-101

Conversation

@cpruijsen

Copy link
Copy Markdown

dsv2json --auto-type threw ReferenceError: dsv is not defined. The row converter is looked up as
dsv.autoType, but bin/dsv2json.js imports dsvFormat by name and has no dsv namespace binding,
so the flag failed for every invocation rather than in some edge case.

This imports autoType alongside dsvFormat and calls it directly. Without the flag the converter
stays null, so default behaviour is untouched.

Fixes #101

Import autoType from the package instead of referencing an
undefined "dsv" namespace.

Fixes #101.
@cpruijsen

Copy link
Copy Markdown
Author

Closing this. Not something I'm going to keep current.

@cpruijsen cpruijsen closed this Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

csv2json cli throws error when using --auto-type

1 participant