Repository navigation
What's Changed
This is a major release. Existing calls to csvToMarkdown() should continue to work, but parsing now uses a fully featured CSV parser and output may differ slightly.
If you depend on the current parsing behaviour you should continue to use 1.x - it will continue to be maintained for securty and compatibility for the forseeable future but will not see new development.
Breaking changes
- Node.js 20 or newer is now required.
- CSV parsing now uses a full CSV parser. Output may change, especially for quoted fields, escaped characters, embedded newlines, and malformed CSV.
- Quotes from quoted cells are no longer included in the output. Fixes #118.
- CSV delimiters must be one character.
- The
browserpackage field was removed; use the package exports or the UMD build directly.
Upgrading
- Upgrade Node to 20+.
- Verify output for CSV containing quotes, escapes, or multiline fields.
- Pass a single-character delimiter.
- Browser build setups that read
browserdirectly should uselib/CsvToMarkdown.js.
Changes
- Added an optional fourth
optionsargument tocsvToMarkdown(). - Added
enclosureandescapeoptions for CSV parsing. - Added
newlineReplacementto control newlines within cells. - Added
cellFilterto transform cell values; it receives zero-based row and column indexes. - Added
prettyPrint: falsefor compact Markdown output. - Improved CommonJS and TypeScript support, CLI UTF-8 handling, and CLI validation.
Pull Requests
- Enhance dependabot config for TypeScript ESLint by @donatj in #159
- Modernize npm dev toolchain by @donatj with @Copilot in #164
- Small handful of lessons learned from upgrading a different node project. by @donatj in #178
- Upgrade to TypeScript 6 by @donatj in #202
- Use Oxlint and Oxfmt by @donatj in #199
- Use Oxlint and Oxfmt by @donatj in #209
- Test CLI input safely by @donatj in #210
- v2 - Modernization & Rework by @donatj in #198
- Add conversion options for cell filtering and table formatting by @donatj in #212
- Add optional enclosure and escape settings by @donatj in #214
- Add pretty print checkbox to browser example by @donatj in #213
- Preserve UTF-8 characters across CLI input chunks by @donatj in #215
- Match CommonJS declarations to the callable export by @donatj in #217
- Preserve boundary whitespace in CLI and browser input by @donatj in #216
- Pass row and column indexes to cellFilter by @donatj in #219
Dependabot Updates
- Bump actions/setup-node from 5 to 6 by @dependabot[bot] in #139
- Bump typescript from 5.8.3 to 5.9.3 by @dependabot[bot] in #140
- Bump eslint from 9.36.0 to 9.39.0 by @dependabot[bot] in #142
- Bump @rollup/plugin-typescript from 12.1.4 to 12.3.0 by @dependabot[bot] in #144
- Bump @typescript-eslint/eslint-plugin from 8.45.0 to 8.46.2 by @dependabot[bot] in #143
- Bump @rollup/plugin-node-resolve from 16.0.1 to 16.0.3 by @dependabot[bot] in #141
- Bump glob from 10.4.5 to 10.5.0 by @dependabot[bot] in #146
- Bump js-yaml by @dependabot[bot] in #145
- Bump actions/checkout from 5 to 6 by @dependabot[bot] in #147
- Bump @typescript-eslint/parser from 8.46.2 to 8.51.0 by @dependabot[bot] in #148
- Bump ts-jest from 29.4.0 to 29.4.6 by @dependabot[bot] in #152
- Bump @typescript-eslint/eslint-plugin from 8.46.2 to 8.51.0 by @dependabot[bot] in #151
- Bump rollup from 4.46.2 to 4.54.0 by @dependabot[bot] in #150
- Bump eslint from 9.39.0 to 9.39.2 by @dependabot[bot] in #149
- Bump rollup from 4.54.0 to 4.59.0 by @dependabot[bot] in #157
- Bump minimatch from 3.1.2 to 3.1.5 by @dependabot[bot] in #158
- Bump the typescript-eslint group with 2 updates by @dependabot[bot] in #160
- Bump eslint from 9.39.2 to 10.0.2 by @dependabot[bot] in #161
- Bump flatted from 3.3.3 to 3.4.2 by @dependabot[bot] in #162
- Bump rollup from 4.59.1 to 4.60.1 by @dependabot[bot] in #169
- Bump handlebars from 4.7.8 to 4.7.9 by @dependabot[bot] in #166
- Bump the typescript-eslint group with 2 updates by @dependabot[bot] in #167
- Bump picomatch from 2.3.1 to 2.3.2 by @dependabot[bot] in #165
- Bump serialize-javascript from 7.0.4 to 7.0.5 by @dependabot[bot] in #170
- Bump eslint from 10.1.0 to 10.3.0 by @dependabot[bot] in #176
- Bump ts-jest from 29.4.6 to 29.4.9 by @dependabot[bot] in #175
- Bump the typescript-eslint group with 2 updates by @dependabot[bot] in #172
- Bump rollup from 4.60.1 to 4.60.2 by @dependabot[bot] in #174
- Bump the jest group with 3 updates by @dependabot[bot] in #183
- Bump the typescript-eslint group across 1 directory with 2 updates by @dependabot[bot] in #179
- Bump rollup from 4.60.2 to 4.61.0 by @dependabot[bot] in #184
- Bump eslint from 10.3.0 to 10.4.1 by @dependabot[bot] in #185
- Bump rollup from 4.61.0 to 4.62.2 by @dependabot[bot] in #189
- Bump eslint from 10.4.1 to 10.6.0 by @dependabot[bot] in #188
- Bump the typescript-eslint group with 2 updates by @dependabot[bot] in #187
- Bump actions/checkout from 6 to 7 by @dependabot[bot] in #186
- Bump actions/setup-node from 6 to 7 by @dependabot[bot] in #190
- Bump rollup from 4.62.2 to 4.62.3 by @dependabot[bot] in #194
- Bump eslint from 10.6.0 to 10.8.0 by @dependabot[bot] in #193
- Bump the typescript-eslint group with 2 updates by @dependabot[bot] in #191
- Bump ts-jest from 29.4.11 to 29.4.12 in the jest group across 1 directory by @dependabot[bot] in #192
- Bump brace-expansion by @dependabot[bot] in #196
- Bump rollup from 4.62.3 to 4.62.4 by @dependabot[bot] in #197
- Bump browserslist from 4.28.1 to 4.28.8 by @dependabot[bot] in #208
- Bump @babel/core from 7.29.0 to 7.29.7 by @dependabot[bot] in #211
- Bump the jest group across 1 directory with 2 updates by @dependabot[bot] in #204
- Bump rollup from 4.62.4 to 4.63.1 by @dependabot[bot] in #206
Full Changelog: v1.6.3...v2.0.0