diff --git a/demo/browser/CHANGELOG.md b/demo/browser/CHANGELOG.md index e7970da54..d8da3d588 100644 --- a/demo/browser/CHANGELOG.md +++ b/demo/browser/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.1.13](https://github.com/adaltas/node-csv/compare/csv-demo-browser@0.1.12...csv-demo-browser@0.1.13) (2023-08-25) + +**Note:** Version bump only for package csv-demo-browser + + + + + ## [0.1.12](https://github.com/adaltas/node-csv/compare/csv-demo-browser@0.1.11...csv-demo-browser@0.1.12) (2023-08-24) **Note:** Version bump only for package csv-demo-browser diff --git a/demo/browser/package.json b/demo/browser/package.json index f39e9c5bc..1e79f0e32 100644 --- a/demo/browser/package.json +++ b/demo/browser/package.json @@ -1,6 +1,6 @@ { "name": "csv-demo-browser", - "version": "0.1.12", + "version": "0.1.13", "main": "index.js", "license": "MIT", "type": "module", @@ -20,11 +20,11 @@ "start": "node server.js" }, "dependencies": { - "csv": "^6.3.2", - "csv-generate": "^4.2.7", - "csv-parse": "^5.4.1", - "csv-stringify": "^6.4.1", + "csv": "^6.3.3", + "csv-generate": "^4.2.8", + "csv-parse": "^5.5.0", + "csv-stringify": "^6.4.2", "express": "^4.18.2", - "stream-transform": "^3.2.7" + "stream-transform": "^3.2.8" } } diff --git a/demo/cjs/CHANGELOG.md b/demo/cjs/CHANGELOG.md index 0d03a592e..a6c69c1e7 100644 --- a/demo/cjs/CHANGELOG.md +++ b/demo/cjs/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.11](https://github.com/adaltas/node-csv/compare/csv-demo-cjs@0.2.10...csv-demo-cjs@0.2.11) (2023-08-25) + + +### Bug Fixes + +* **csv-demo-ts-cjs-node16:** upgrade module definition after latest typescript ([87fe919](https://github.com/adaltas/node-csv/commit/87fe91996fb2a8895c252177fca4f0cb59a518f9)) + + + ## [0.2.10](https://github.com/adaltas/node-csv/compare/csv-demo-cjs@0.2.9...csv-demo-cjs@0.2.10) (2023-08-24) **Note:** Version bump only for package csv-demo-cjs diff --git a/demo/cjs/package.json b/demo/cjs/package.json index a0521411b..8d6f2cd0c 100644 --- a/demo/cjs/package.json +++ b/demo/cjs/package.json @@ -1,22 +1,22 @@ { "name": "csv-demo-cjs", - "version": "0.2.10", + "version": "0.2.11", "main": "index.js", "license": "MIT", "type": "commonjs", "private": true, "dependencies": { - "csv": "^6.3.2", - "csv-parse": "^5.4.1", - "csv-stringify": "^6.4.1" + "csv": "^6.3.3", + "csv-parse": "^5.5.0", + "csv-stringify": "^6.4.2" }, "devDependencies": { - "@types/node": "^20.5.0", + "@types/node": "^20.5.6", "coffeescript": "^2.7.0", "mocha": "^10.2.0", "should": "^13.2.3", "ts-node": "^10.9.1", - "typescript": "^5.1.6" + "typescript": "^5.2.2" }, "mocha": { "inline-diffs": true, diff --git a/demo/eslint/CHANGELOG.md b/demo/eslint/CHANGELOG.md index f266406db..f7ce5da27 100644 --- a/demo/eslint/CHANGELOG.md +++ b/demo/eslint/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.1.16](https://github.com/adaltas/node-csv/compare/csv-demo-eslint@0.1.15...csv-demo-eslint@0.1.16) (2023-08-25) + + +### Bug Fixes + +* **csv-demo-ts-cjs-node16:** upgrade module definition after latest typescript ([87fe919](https://github.com/adaltas/node-csv/commit/87fe91996fb2a8895c252177fca4f0cb59a518f9)) + + + ## [0.1.15](https://github.com/adaltas/node-csv/compare/csv-demo-eslint@0.1.14...csv-demo-eslint@0.1.15) (2023-08-24) diff --git a/demo/eslint/package.json b/demo/eslint/package.json index 6abfe6922..ba1a22d60 100644 --- a/demo/eslint/package.json +++ b/demo/eslint/package.json @@ -1,6 +1,6 @@ { "name": "csv-demo-eslint", - "version": "0.1.15", + "version": "0.1.16", "description": "", "main": "index.js", "private": true, @@ -10,11 +10,11 @@ }, "license": "MIT", "dependencies": { - "csv-stringify": "^6.4.1" + "csv-stringify": "^6.4.2" }, "devDependencies": { "eslint": "^8.47.0", "eslint-config-airbnb-base": "^15.0.0", - "eslint-plugin-import": "^2.28.0" + "eslint-plugin-import": "^2.28.1" } } diff --git a/demo/esm/CHANGELOG.md b/demo/esm/CHANGELOG.md index a734e60b6..ae50457dd 100644 --- a/demo/esm/CHANGELOG.md +++ b/demo/esm/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.0.25](https://github.com/adaltas/node-csv/compare/csv-demo-esm@0.0.24...csv-demo-esm@0.0.25) (2023-08-25) + +**Note:** Version bump only for package csv-demo-esm + + + + + ## [0.0.24](https://github.com/adaltas/node-csv/compare/csv-demo-esm@0.0.23...csv-demo-esm@0.0.24) (2023-08-24) **Note:** Version bump only for package csv-demo-esm diff --git a/demo/esm/package.json b/demo/esm/package.json index 04813c252..62be1dd1a 100644 --- a/demo/esm/package.json +++ b/demo/esm/package.json @@ -1,13 +1,13 @@ { "name": "csv-demo-esm", - "version": "0.0.24", + "version": "0.0.25", "main": "index.js", "license": "MIT", "type": "module", "private": true, "dependencies": { - "csv": "^6.3.2", - "csv-parse": "^5.4.1" + "csv": "^6.3.3", + "csv-parse": "^5.5.0" }, "devDependencies": { "coffeescript": "^2.7.0", diff --git a/demo/issues-cjs/CHANGELOG.md b/demo/issues-cjs/CHANGELOG.md index 70ed5a5cb..e4e1d9e1f 100644 --- a/demo/issues-cjs/CHANGELOG.md +++ b/demo/issues-cjs/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.0](https://github.com/adaltas/node-csv/compare/csv-issues-cjs@0.1.11...csv-issues-cjs@0.2.0) (2023-08-25) + + +### Features + +* **csv-issues-cjs:** 399 issue ([b8df8db](https://github.com/adaltas/node-csv/commit/b8df8dbf071021aa398ea82dbe650ab3e7b16a0b)) + + + ## [0.1.11](https://github.com/adaltas/node-csv/compare/csv-issues-cjs@0.1.10...csv-issues-cjs@0.1.11) (2023-08-24) **Note:** Version bump only for package csv-issues-cjs diff --git a/demo/issues-cjs/lib/327.cws.buf.csv b/demo/issues-cjs/lib/327.cws.buf.csv new file mode 100644 index 000000000..54c83eb3d --- /dev/null +++ b/demo/issues-cjs/lib/327.cws.buf.csv @@ -0,0 +1,2 @@ +field1,field2 +Acentuação1,acentuação2 diff --git a/demo/issues-cjs/lib/327.cws.csv b/demo/issues-cjs/lib/327.cws.csv new file mode 100644 index 000000000..819c580a3 --- /dev/null +++ b/demo/issues-cjs/lib/327.cws.csv @@ -0,0 +1,2 @@ +field1,field2 +Acentuação1,acentuação2 diff --git a/demo/issues-cjs/lib/327.js b/demo/issues-cjs/lib/327.js new file mode 100644 index 000000000..d48338f05 --- /dev/null +++ b/demo/issues-cjs/lib/327.js @@ -0,0 +1,32 @@ +const { stringify } = require('csv-stringify'); +const fs = require('fs'); + +(() => { + const stringifier = stringify({ + defaultEncoding: 'latin1', + }); + stringifier.pipe( + fs.createWriteStream(__dirname+'/327.stringifier.csv') + ); + stringifier.write(['field1', 'field2']); + stringifier.write(['Acentuação1', 'acentuação2']); + stringifier.end(); +})(); + +(() => { + const out = fs.createWriteStream(__dirname+'/327.cws.csv', { + encoding: 'latin1', // <== Here the encoding works + }); + out.write('field1,field2\n'); + out.write('Acentuação1,acentuação2\n'); + out.end(); +})(); + +(() => { + const out = fs.createWriteStream(__dirname+'/327.cws.buf.csv', { + encoding: 'latin1', // <== Here the encoding works + }); + out.write(Buffer.from('field1,field2\n', 'utf8')); + out.write(Buffer.from('Acentuação1,acentuação2\n', 'utf8')); + out.end(); +})(); diff --git a/demo/issues-cjs/lib/327.stringifier.csv b/demo/issues-cjs/lib/327.stringifier.csv new file mode 100644 index 000000000..819c580a3 --- /dev/null +++ b/demo/issues-cjs/lib/327.stringifier.csv @@ -0,0 +1,2 @@ +field1,field2 +Acentuação1,acentuação2 diff --git a/demo/issues-cjs/lib/399.csv b/demo/issues-cjs/lib/399.csv new file mode 100644 index 000000000..aab5afe5a --- /dev/null +++ b/demo/issues-cjs/lib/399.csv @@ -0,0 +1,2 @@ +"" +value diff --git a/demo/issues-cjs/lib/399.js b/demo/issues-cjs/lib/399.js new file mode 100644 index 000000000..698391f0f --- /dev/null +++ b/demo/issues-cjs/lib/399.js @@ -0,0 +1,18 @@ +const fs = require('fs'); +const { parse: parseCsv } = require("csv-parse"); + +async function main() { + const parser1 = fs.createReadStream(__dirname + '/399.csv').pipe(parseCsv()); + const parser2 = fs.createReadStream(__dirname + '/399.csv').pipe(parseCsv({relax_quotes:true,from_line:2})); + setImmediate(async () => { + for await (record of parser1) { + console.log(record); + } + }) + setImmediate(async () => { + for await (record of parser2) { + console.log(record); + } + }) +} +main(); diff --git a/demo/issues-cjs/package.json b/demo/issues-cjs/package.json index 5861d788c..7fce2cd32 100644 --- a/demo/issues-cjs/package.json +++ b/demo/issues-cjs/package.json @@ -1,12 +1,12 @@ { "name": "csv-issues-cjs", - "version": "0.1.11", + "version": "0.2.0", "main": "index.js", "license": "MIT", "private": true, "dependencies": { - "csv-parse": "^5.4.1", - "csv-stringify": "^6.4.1" + "csv-parse": "^5.5.0", + "csv-stringify": "^6.4.2" }, "devDependencies": { "coffeescript": "^2.7.0", diff --git a/demo/issues-esm/CHANGELOG.md b/demo/issues-esm/CHANGELOG.md index 748d45c28..75b0af7c1 100644 --- a/demo/issues-esm/CHANGELOG.md +++ b/demo/issues-esm/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.0.16](https://github.com/adaltas/node-csv/compare/csv-issues-esm@0.0.15...csv-issues-esm@0.0.16) (2023-08-25) + +**Note:** Version bump only for package csv-issues-esm + + + + + ## [0.0.15](https://github.com/adaltas/node-csv/compare/csv-issues-esm@0.0.14...csv-issues-esm@0.0.15) (2023-08-24) **Note:** Version bump only for package csv-issues-esm diff --git a/demo/issues-esm/lib/391.ts b/demo/issues-esm/lib/391.ts new file mode 100644 index 000000000..38a5aedc9 --- /dev/null +++ b/demo/issues-esm/lib/391.ts @@ -0,0 +1,30 @@ + +import assert from 'assert' +import { stringify, Stringifier } from 'csv-stringify'; + +// Create the parser +const output: string[] = []; +const stringifier: Stringifier = stringify({ + header: true, + cast: { + boolean: (value, ctx) => { + if (ctx.header) return String(value) + if (ctx.column === 'Removed' && value === false) { + return '0' + } + return String(value) + } + } +}); +// Write data to the stream +stringifier.write({a: 1, b: 2, c: 3}); +// Close the readable stream +stringifier.end(); +// Read output +stringifier.on('data', (buf) => { + output.push(buf.toString()); +}) +stringifier.on('end', () => { + console.log(output); + assert(output.join(), 'a,b,c\n1,2,3\n') +}) diff --git a/demo/issues-esm/package.json b/demo/issues-esm/package.json index 6e35a8dbb..ad362abb2 100644 --- a/demo/issues-esm/package.json +++ b/demo/issues-esm/package.json @@ -1,6 +1,6 @@ { "name": "csv-issues-esm", - "version": "0.0.15", + "version": "0.0.16", "main": "index.js", "license": "MIT", "type": "module", @@ -26,9 +26,9 @@ "test": "mocha 'test/**/*.coffee'" }, "dependencies": { - "csv-generate": "^4.2.7", - "csv-parse": "^5.4.1", - "csv-stringify": "^6.4.1", + "csv-generate": "^4.2.8", + "csv-parse": "^5.5.0", + "csv-stringify": "^6.4.2", "desm": "^1.3.0" } } diff --git a/demo/issues-esm/test/samples.coffee b/demo/issues-esm/test/samples.coffee index 8a4e1e82d..55679c433 100644 --- a/demo/issues-esm/test/samples.coffee +++ b/demo/issues-esm/test/samples.coffee @@ -17,11 +17,11 @@ describe 'Samples', -> .map (sample) -> it "Sample #{sample}", (callback) -> ext = /\.(\w+)?$/.exec(sample)[0] - cmd = switch ext + [cmd, ...args] = switch ext when '.js' - 'node' + ['node', path.resolve dir, sample] when '.ts' - 'node --loader ts-node/esm' - spawn(cmd, [path.resolve dir, sample]) + ['node', '--loader', 'ts-node/esm', path.resolve dir, sample] + spawn(cmd, args) .on 'close', (code) -> callback(code isnt 0 and new Error 'Failure') .stdout.on 'data', (->) diff --git a/demo/issues-esm/tsconfig.json b/demo/issues-esm/tsconfig.json new file mode 100644 index 000000000..53445dd75 --- /dev/null +++ b/demo/issues-esm/tsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "esModuleInterop": true, + "module": "NodeNext", + "moduleResolution": "NodeNext", + "strict": true, + } +} diff --git a/demo/ts-cjs-node16/CHANGELOG.md b/demo/ts-cjs-node16/CHANGELOG.md index a7503be32..d3ff6f771 100644 --- a/demo/ts-cjs-node16/CHANGELOG.md +++ b/demo/ts-cjs-node16/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## 0.2.11 (2023-08-25) + + +### Bug Fixes + +* **csv-demo-ts-cjs-node16:** upgrade module definition after latest typescript ([87fe919](https://github.com/adaltas/node-csv/commit/87fe91996fb2a8895c252177fca4f0cb59a518f9)) +* support ts node16 resolution in cjs ([#354](https://github.com/adaltas/node-csv/issues/354)) ([fa09d03](https://github.com/adaltas/node-csv/commit/fa09d03aaf0008b2790656871ca6b2c4be12d14c)) + + + ## [0.2.10](https://github.com/adaltas/node-csv/compare/csv-demo-ts-moduleresolution-node16-cjs@0.2.9...csv-demo-ts-moduleresolution-node16-cjs@0.2.10) (2023-08-24) **Note:** Version bump only for package csv-demo-ts-moduleresolution-node16-cjs diff --git a/demo/ts-cjs-node16/README.md b/demo/ts-cjs-node16/README.md new file mode 100644 index 000000000..45a203e39 --- /dev/null +++ b/demo/ts-cjs-node16/README.md @@ -0,0 +1,65 @@ + +# TypeScript with CommonJS and moduleresolution set to node16 + +This demo is created after issue #354. The package is defined as CommonJS. The code, written in TypeScript, import each CSV packages, for example with `import { parse, Parser } from 'csv-parse';`. + +## Original error + +The original issue describes how TypeScript failed to import from a CommonJS package. For example with `tsc`: + +```bash +$ tsc +main.ts:1:23 - error TS1471: Module 'csv-parse' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. + +1 import { parse } from 'csv-parse'; + ~~~~~~~~~~~ + + +Found 1 error in main.ts:1 +``` + +To fix this, the demo used the following `tsconfig.json` file: + +```json +{ + "compilerOptions": { + "esModuleInterop": true, + "module": "CommonJS", + "moduleResolution": "node16", + "strict": true + } +} +``` + +## Second error + +After the upgrade of TypeScript from version `^5.1.6` to `^5.2.2`, a new error is thrown: + +```bash +$ yarn test +yarn run v1.22.19 +$ tsc --noEmit +tsconfig.json:4:15 - error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. + +4 "module": "CommonJS", + ~~~~~~~~~~ + + +Found 1 error in tsconfig.json:4 + +error Command failed with exit code 2. +``` + + +To fix this, the demo now uses the following `tsconfig.json` file: + +```json +{ + "compilerOptions": { + "esModuleInterop": true, + "module": "node16", + "moduleResolution": "node16", + "strict": true + } +} +``` diff --git a/demo/ts-cjs-node16/package.json b/demo/ts-cjs-node16/package.json index ac2fa46c7..3b6fdef8d 100644 --- a/demo/ts-cjs-node16/package.json +++ b/demo/ts-cjs-node16/package.json @@ -1,17 +1,17 @@ { - "name": "csv-demo-ts-moduleresolution-node16-cjs", - "version": "0.2.10", + "name": "csv-demo-ts-cjs-node16", + "version": "0.2.11", "dependencies": { - "csv-generate": "^4.2.7", - "csv-parse": "^5.4.1", - "csv-stringify": "^6.4.1", - "stream-transform": "^3.2.7" + "csv-generate": "^4.2.8", + "csv-parse": "^5.5.0", + "csv-stringify": "^6.4.2", + "stream-transform": "^3.2.8" }, "main": "index.js", "license": "MIT", "private": true, "devDependencies": { - "typescript": "^5.1.6" + "typescript": "^5.2.2" }, "scripts": { "test": "tsc --noEmit" diff --git a/demo/ts-cjs-node16/tsconfig.json b/demo/ts-cjs-node16/tsconfig.json index 79bbae71f..1f403e45a 100644 --- a/demo/ts-cjs-node16/tsconfig.json +++ b/demo/ts-cjs-node16/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { "esModuleInterop": true, - "module": "CommonJS", - "moduleResolution": "node16", + "module": "Node16", + "moduleResolution": "Node16", "strict": true } } diff --git a/demo/ts-esm-node16/CHANGELOG.md b/demo/ts-esm-node16/CHANGELOG.md index 3536e5a16..62a3fb55d 100644 --- a/demo/ts-esm-node16/CHANGELOG.md +++ b/demo/ts-esm-node16/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.11](https://github.com/adaltas/node-csv/compare/csv-demo-ts-module-node16@0.2.10...csv-demo-ts-module-node16@0.2.11) (2023-08-25) + + +### Bug Fixes + +* **csv-demo-ts-cjs-node16:** upgrade module definition after latest typescript ([87fe919](https://github.com/adaltas/node-csv/commit/87fe91996fb2a8895c252177fca4f0cb59a518f9)) + + + ## [0.2.10](https://github.com/adaltas/node-csv/compare/csv-demo-ts-module-node16@0.2.9...csv-demo-ts-module-node16@0.2.10) (2023-08-24) **Note:** Version bump only for package csv-demo-ts-module-node16 diff --git a/demo/ts-esm-node16/package.json b/demo/ts-esm-node16/package.json index 0aa69afda..e69c7aa73 100644 --- a/demo/ts-esm-node16/package.json +++ b/demo/ts-esm-node16/package.json @@ -1,23 +1,23 @@ { "name": "csv-demo-ts-module-node16", - "version": "0.2.10", + "version": "0.2.11", "main": "index.js", "license": "MIT", "type": "module", "private": true, "dependencies": { - "csv-generate": "^4.2.7", - "csv-parse": "^5.4.1", - "csv-stringify": "^6.4.1", - "stream-transform": "^3.2.7" + "csv-generate": "^4.2.8", + "csv-parse": "^5.5.0", + "csv-stringify": "^6.4.2", + "stream-transform": "^3.2.8" }, "devDependencies": { - "@types/node": "^20.5.0", + "@types/node": "^20.5.6", "coffeescript": "^2.7.0", "mocha": "^10.2.0", "should": "^13.2.3", "ts-node": "^10.9.1", - "typescript": "^5.1.6" + "typescript": "^5.2.2" }, "mocha": { "inline-diffs": true, diff --git a/demo/webpack-ts/CHANGELOG.md b/demo/webpack-ts/CHANGELOG.md index 4ba2221c7..675c8b301 100644 --- a/demo/webpack-ts/CHANGELOG.md +++ b/demo/webpack-ts/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.1.13](https://github.com/adaltas/node-csv/compare/csv-demo-webpack-ts@0.1.12...csv-demo-webpack-ts@0.1.13) (2023-08-25) + + +### Bug Fixes + +* **csv-demo-ts-cjs-node16:** upgrade module definition after latest typescript ([87fe919](https://github.com/adaltas/node-csv/commit/87fe91996fb2a8895c252177fca4f0cb59a518f9)) + + + ## [0.1.12](https://github.com/adaltas/node-csv/compare/csv-demo-webpack-ts@0.1.11...csv-demo-webpack-ts@0.1.12) (2023-08-24) **Note:** Version bump only for package csv-demo-webpack-ts diff --git a/demo/webpack-ts/package.json b/demo/webpack-ts/package.json index 841e6cb27..14f531074 100644 --- a/demo/webpack-ts/package.json +++ b/demo/webpack-ts/package.json @@ -1,24 +1,24 @@ { "name": "csv-demo-webpack-ts", - "version": "0.1.12", + "version": "0.1.13", "description": "", "private": true, "keywords": [], "author": "", "license": "ISC", "dependencies": { - "csv-generate": "^4.2.7", - "csv-parse": "^5.4.1", - "csv-stringify": "^6.4.1", + "csv-generate": "^4.2.8", + "csv-parse": "^5.5.0", + "csv-stringify": "^6.4.2", "http-server": "^14.1.1", - "stream-transform": "^3.2.7" + "stream-transform": "^3.2.8" }, "devDependencies": { "buffer-browserify": "^0.2.5", "node-polyfill-webpack-plugin": "^2.0.1", "stream-browserify": "^3.0.0", "ts-loader": "^9.4.4", - "typescript": "^5.1.6", + "typescript": "^5.2.2", "webpack": "^5.88.2", "webpack-cli": "^5.1.4" }, diff --git a/demo/webpack/CHANGELOG.md b/demo/webpack/CHANGELOG.md index c135fc1f1..1992c1861 100644 --- a/demo/webpack/CHANGELOG.md +++ b/demo/webpack/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.1.15](https://github.com/adaltas/node-csv/compare/csv-demo-webpack@0.1.14...csv-demo-webpack@0.1.15) (2023-08-25) + +**Note:** Version bump only for package csv-demo-webpack + + + + + ## [0.1.14](https://github.com/adaltas/node-csv/compare/csv-demo-webpack@0.1.13...csv-demo-webpack@0.1.14) (2023-08-24) **Note:** Version bump only for package csv-demo-webpack diff --git a/demo/webpack/package.json b/demo/webpack/package.json index cb061dbd2..aa12f77a3 100644 --- a/demo/webpack/package.json +++ b/demo/webpack/package.json @@ -1,6 +1,6 @@ { "name": "csv-demo-webpack", - "version": "0.1.14", + "version": "0.1.15", "description": "", "private": true, "scripts": { @@ -16,12 +16,12 @@ "webpack-cli": "^5.1.4" }, "dependencies": { - "csv": "^6.3.2", - "csv-generate": "^4.2.7", - "csv-parse": "^5.4.1", - "csv-stringify": "^6.4.1", + "csv": "^6.3.3", + "csv-generate": "^4.2.8", + "csv-parse": "^5.5.0", + "csv-stringify": "^6.4.2", "http-server": "^14.1.1", "stream-browserify": "^3.0.0", - "stream-transform": "^3.2.7" + "stream-transform": "^3.2.8" } } diff --git a/packages/csv-generate/CHANGELOG.md b/packages/csv-generate/CHANGELOG.md index d84e97390..dcc99a103 100644 --- a/packages/csv-generate/CHANGELOG.md +++ b/packages/csv-generate/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [4.2.8](https://github.com/adaltas/node-csv/compare/csv-generate@4.2.7...csv-generate@4.2.8) (2023-08-25) + + +### Bug Fixes + +* **csv-demo-ts-cjs-node16:** upgrade module definition after latest typescript ([87fe919](https://github.com/adaltas/node-csv/commit/87fe91996fb2a8895c252177fca4f0cb59a518f9)) + + + ## [4.2.7](https://github.com/adaltas/node-csv/compare/csv-generate@4.2.6...csv-generate@4.2.7) (2023-08-24) diff --git a/packages/csv-generate/package.json b/packages/csv-generate/package.json index 9d0acba25..7aa4b692d 100644 --- a/packages/csv-generate/package.json +++ b/packages/csv-generate/package.json @@ -1,5 +1,5 @@ { - "version": "4.2.7", + "version": "4.2.8", "name": "csv-generate", "description": "CSV and object generation implementing the Node.js `stream.Readable` API", "keywords": [ @@ -12,20 +12,20 @@ "author": "David Worms (https://www.adaltas.com)", "devDependencies": { "@rollup/plugin-eslint": "^9.0.4", - "@rollup/plugin-node-resolve": "^15.1.0", + "@rollup/plugin-node-resolve": "^15.2.1", "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", + "@types/node": "^20.5.6", "@types/should": "^13.0.0", "coffeescript": "~2.7.0", "each": "^2.4.0", "eslint": "^8.47.0", "mocha": "~10.2.0", - "rollup": "^3.28.0", + "rollup": "^3.28.1", "rollup-plugin-node-builtins": "^2.1.2", "rollup-plugin-node-globals": "^1.4.0", "should": "~13.2.3", "ts-node": "^10.9.1", - "typescript": "^5.1.6" + "typescript": "^5.2.2" }, "exports": { ".": { diff --git a/packages/csv-parse/CHANGELOG.md b/packages/csv-parse/CHANGELOG.md index 0af2d9721..9c71d4ed0 100644 --- a/packages/csv-parse/CHANGELOG.md +++ b/packages/csv-parse/CHANGELOG.md @@ -3,6 +3,20 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.5.0](https://github.com/adaltas/node-csv/compare/csv-parse@5.4.1...csv-parse@5.5.0) (2023-08-25) + + +### Features + +* **csv-parse:** new comment_no_infix option (fix [#325](https://github.com/adaltas/node-csv/issues/325)) ([caca5c3](https://github.com/adaltas/node-csv/commit/caca5c3044541acfc9fe4a7f32167bb1179b6253)) + + +### Bug Fixes + +* **csv-demo-ts-cjs-node16:** upgrade module definition after latest typescript ([87fe919](https://github.com/adaltas/node-csv/commit/87fe91996fb2a8895c252177fca4f0cb59a518f9)) + + + ## [5.4.1](https://github.com/adaltas/node-csv/compare/csv-parse@5.4.0...csv-parse@5.4.1) (2023-08-24) diff --git a/packages/csv-parse/dist/cjs/index.cjs b/packages/csv-parse/dist/cjs/index.cjs index 4336b2744..3fffa1444 100644 --- a/packages/csv-parse/dist/cjs/index.cjs +++ b/packages/csv-parse/dist/cjs/index.cjs @@ -278,6 +278,16 @@ const normalize_options = function(opts){ ], options); } } + // Normalize option `comment_no_infix` + if(options.comment_no_infix === undefined || options.comment_no_infix === null || options.comment_no_infix === false){ + options.comment_no_infix = false; + }else if(options.comment_no_infix !== true){ + throw new CsvError('CSV_INVALID_OPTION_COMMENT', [ + 'Invalid option comment_no_infix:', + 'value must be a boolean,', + `got ${JSON.stringify(options.comment_no_infix)}` + ], options); + } // Normalize option `delimiter` const delimiter_json = JSON.stringify(options.delimiter); if(!Array.isArray(options.delimiter)) options.delimiter = [options.delimiter]; @@ -639,7 +649,7 @@ const transform = function(original_options = {}) { }, // Central parser implementation parse: function(nextBuf, end, push, close){ - const {bom, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; + const {bom, comment_no_infix, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; let {comment, escape, quote, record_delimiter} = this.options; const {bomSkipped, previousBuf, rawBuffer, escapeIsQuote} = this.state; let buf; @@ -838,7 +848,7 @@ const transform = function(original_options = {}) { continue; } const commentCount = comment === null ? 0 : this.__compareBytes(comment, buf, pos, chr); - if(commentCount !== 0){ + if(commentCount !== 0 && (comment_no_infix === false || this.state.field.length === 0)){ this.state.commenting = true; continue; } diff --git a/packages/csv-parse/dist/cjs/index.d.cts b/packages/csv-parse/dist/cjs/index.d.cts index d082c7133..ec8aa027e 100644 --- a/packages/csv-parse/dist/cjs/index.d.cts +++ b/packages/csv-parse/dist/cjs/index.d.cts @@ -88,6 +88,12 @@ export interface Options { * Treat all the characters after this one as a comment, default to '' (disabled). */ comment?: string; + /** + * Restrict the definition of comments to a full line. Comment characters + * defined in the middle of the line are not interpreted as such. The + * option require the activation of comments. + */ + comment_no_infix?: boolean; /** * Set the field delimiter. One character only, defaults to comma. */ diff --git a/packages/csv-parse/dist/cjs/sync.cjs b/packages/csv-parse/dist/cjs/sync.cjs index bb5ee4dfb..4d0058d38 100644 --- a/packages/csv-parse/dist/cjs/sync.cjs +++ b/packages/csv-parse/dist/cjs/sync.cjs @@ -276,6 +276,16 @@ const normalize_options = function(opts){ ], options); } } + // Normalize option `comment_no_infix` + if(options.comment_no_infix === undefined || options.comment_no_infix === null || options.comment_no_infix === false){ + options.comment_no_infix = false; + }else if(options.comment_no_infix !== true){ + throw new CsvError('CSV_INVALID_OPTION_COMMENT', [ + 'Invalid option comment_no_infix:', + 'value must be a boolean,', + `got ${JSON.stringify(options.comment_no_infix)}` + ], options); + } // Normalize option `delimiter` const delimiter_json = JSON.stringify(options.delimiter); if(!Array.isArray(options.delimiter)) options.delimiter = [options.delimiter]; @@ -637,7 +647,7 @@ const transform = function(original_options = {}) { }, // Central parser implementation parse: function(nextBuf, end, push, close){ - const {bom, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; + const {bom, comment_no_infix, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; let {comment, escape, quote, record_delimiter} = this.options; const {bomSkipped, previousBuf, rawBuffer, escapeIsQuote} = this.state; let buf; @@ -836,7 +846,7 @@ const transform = function(original_options = {}) { continue; } const commentCount = comment === null ? 0 : this.__compareBytes(comment, buf, pos, chr); - if(commentCount !== 0){ + if(commentCount !== 0 && (comment_no_infix === false || this.state.field.length === 0)){ this.state.commenting = true; continue; } diff --git a/packages/csv-parse/dist/esm/index.d.ts b/packages/csv-parse/dist/esm/index.d.ts index d082c7133..ec8aa027e 100644 --- a/packages/csv-parse/dist/esm/index.d.ts +++ b/packages/csv-parse/dist/esm/index.d.ts @@ -88,6 +88,12 @@ export interface Options { * Treat all the characters after this one as a comment, default to '' (disabled). */ comment?: string; + /** + * Restrict the definition of comments to a full line. Comment characters + * defined in the middle of the line are not interpreted as such. The + * option require the activation of comments. + */ + comment_no_infix?: boolean; /** * Set the field delimiter. One character only, defaults to comma. */ diff --git a/packages/csv-parse/dist/esm/index.js b/packages/csv-parse/dist/esm/index.js index 732835411..1371e2d39 100644 --- a/packages/csv-parse/dist/esm/index.js +++ b/packages/csv-parse/dist/esm/index.js @@ -5400,6 +5400,16 @@ const normalize_options = function(opts){ ], options); } } + // Normalize option `comment_no_infix` + if(options.comment_no_infix === undefined || options.comment_no_infix === null || options.comment_no_infix === false){ + options.comment_no_infix = false; + }else if(options.comment_no_infix !== true){ + throw new CsvError('CSV_INVALID_OPTION_COMMENT', [ + 'Invalid option comment_no_infix:', + 'value must be a boolean,', + `got ${JSON.stringify(options.comment_no_infix)}` + ], options); + } // Normalize option `delimiter` const delimiter_json = JSON.stringify(options.delimiter); if(!Array.isArray(options.delimiter)) options.delimiter = [options.delimiter]; @@ -5761,7 +5771,7 @@ const transform = function(original_options = {}) { }, // Central parser implementation parse: function(nextBuf, end, push, close){ - const {bom, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; + const {bom, comment_no_infix, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; let {comment, escape, quote, record_delimiter} = this.options; const {bomSkipped, previousBuf, rawBuffer, escapeIsQuote} = this.state; let buf; @@ -5960,7 +5970,7 @@ const transform = function(original_options = {}) { continue; } const commentCount = comment === null ? 0 : this.__compareBytes(comment, buf, pos, chr); - if(commentCount !== 0){ + if(commentCount !== 0 && (comment_no_infix === false || this.state.field.length === 0)){ this.state.commenting = true; continue; } diff --git a/packages/csv-parse/dist/esm/sync.js b/packages/csv-parse/dist/esm/sync.js index 09cf2f247..405662846 100644 --- a/packages/csv-parse/dist/esm/sync.js +++ b/packages/csv-parse/dist/esm/sync.js @@ -2246,6 +2246,16 @@ const normalize_options = function(opts){ ], options); } } + // Normalize option `comment_no_infix` + if(options.comment_no_infix === undefined || options.comment_no_infix === null || options.comment_no_infix === false){ + options.comment_no_infix = false; + }else if(options.comment_no_infix !== true){ + throw new CsvError('CSV_INVALID_OPTION_COMMENT', [ + 'Invalid option comment_no_infix:', + 'value must be a boolean,', + `got ${JSON.stringify(options.comment_no_infix)}` + ], options); + } // Normalize option `delimiter` const delimiter_json = JSON.stringify(options.delimiter); if(!Array.isArray(options.delimiter)) options.delimiter = [options.delimiter]; @@ -2607,7 +2617,7 @@ const transform = function(original_options = {}) { }, // Central parser implementation parse: function(nextBuf, end, push, close){ - const {bom, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; + const {bom, comment_no_infix, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; let {comment, escape, quote, record_delimiter} = this.options; const {bomSkipped, previousBuf, rawBuffer, escapeIsQuote} = this.state; let buf; @@ -2806,7 +2816,7 @@ const transform = function(original_options = {}) { continue; } const commentCount = comment === null ? 0 : this.__compareBytes(comment, buf, pos, chr); - if(commentCount !== 0){ + if(commentCount !== 0 && (comment_no_infix === false || this.state.field.length === 0)){ this.state.commenting = true; continue; } diff --git a/packages/csv-parse/dist/iife/index.js b/packages/csv-parse/dist/iife/index.js index 1638bc9fe..ea6b9afb1 100644 --- a/packages/csv-parse/dist/iife/index.js +++ b/packages/csv-parse/dist/iife/index.js @@ -5403,6 +5403,16 @@ var csv_parse = (function (exports) { ], options); } } + // Normalize option `comment_no_infix` + if(options.comment_no_infix === undefined || options.comment_no_infix === null || options.comment_no_infix === false){ + options.comment_no_infix = false; + }else if(options.comment_no_infix !== true){ + throw new CsvError('CSV_INVALID_OPTION_COMMENT', [ + 'Invalid option comment_no_infix:', + 'value must be a boolean,', + `got ${JSON.stringify(options.comment_no_infix)}` + ], options); + } // Normalize option `delimiter` const delimiter_json = JSON.stringify(options.delimiter); if(!Array.isArray(options.delimiter)) options.delimiter = [options.delimiter]; @@ -5764,7 +5774,7 @@ var csv_parse = (function (exports) { }, // Central parser implementation parse: function(nextBuf, end, push, close){ - const {bom, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; + const {bom, comment_no_infix, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; let {comment, escape, quote, record_delimiter} = this.options; const {bomSkipped, previousBuf, rawBuffer, escapeIsQuote} = this.state; let buf; @@ -5963,7 +5973,7 @@ var csv_parse = (function (exports) { continue; } const commentCount = comment === null ? 0 : this.__compareBytes(comment, buf, pos, chr); - if(commentCount !== 0){ + if(commentCount !== 0 && (comment_no_infix === false || this.state.field.length === 0)){ this.state.commenting = true; continue; } diff --git a/packages/csv-parse/dist/iife/sync.js b/packages/csv-parse/dist/iife/sync.js index bbd9a751a..b4e3de6cc 100644 --- a/packages/csv-parse/dist/iife/sync.js +++ b/packages/csv-parse/dist/iife/sync.js @@ -2249,6 +2249,16 @@ var csv_parse_sync = (function (exports) { ], options); } } + // Normalize option `comment_no_infix` + if(options.comment_no_infix === undefined || options.comment_no_infix === null || options.comment_no_infix === false){ + options.comment_no_infix = false; + }else if(options.comment_no_infix !== true){ + throw new CsvError('CSV_INVALID_OPTION_COMMENT', [ + 'Invalid option comment_no_infix:', + 'value must be a boolean,', + `got ${JSON.stringify(options.comment_no_infix)}` + ], options); + } // Normalize option `delimiter` const delimiter_json = JSON.stringify(options.delimiter); if(!Array.isArray(options.delimiter)) options.delimiter = [options.delimiter]; @@ -2610,7 +2620,7 @@ var csv_parse_sync = (function (exports) { }, // Central parser implementation parse: function(nextBuf, end, push, close){ - const {bom, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; + const {bom, comment_no_infix, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; let {comment, escape, quote, record_delimiter} = this.options; const {bomSkipped, previousBuf, rawBuffer, escapeIsQuote} = this.state; let buf; @@ -2809,7 +2819,7 @@ var csv_parse_sync = (function (exports) { continue; } const commentCount = comment === null ? 0 : this.__compareBytes(comment, buf, pos, chr); - if(commentCount !== 0){ + if(commentCount !== 0 && (comment_no_infix === false || this.state.field.length === 0)){ this.state.commenting = true; continue; } diff --git a/packages/csv-parse/dist/umd/index.js b/packages/csv-parse/dist/umd/index.js index d691d0fe1..36b36060a 100644 --- a/packages/csv-parse/dist/umd/index.js +++ b/packages/csv-parse/dist/umd/index.js @@ -5406,6 +5406,16 @@ ], options); } } + // Normalize option `comment_no_infix` + if(options.comment_no_infix === undefined || options.comment_no_infix === null || options.comment_no_infix === false){ + options.comment_no_infix = false; + }else if(options.comment_no_infix !== true){ + throw new CsvError('CSV_INVALID_OPTION_COMMENT', [ + 'Invalid option comment_no_infix:', + 'value must be a boolean,', + `got ${JSON.stringify(options.comment_no_infix)}` + ], options); + } // Normalize option `delimiter` const delimiter_json = JSON.stringify(options.delimiter); if(!Array.isArray(options.delimiter)) options.delimiter = [options.delimiter]; @@ -5767,7 +5777,7 @@ }, // Central parser implementation parse: function(nextBuf, end, push, close){ - const {bom, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; + const {bom, comment_no_infix, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; let {comment, escape, quote, record_delimiter} = this.options; const {bomSkipped, previousBuf, rawBuffer, escapeIsQuote} = this.state; let buf; @@ -5966,7 +5976,7 @@ continue; } const commentCount = comment === null ? 0 : this.__compareBytes(comment, buf, pos, chr); - if(commentCount !== 0){ + if(commentCount !== 0 && (comment_no_infix === false || this.state.field.length === 0)){ this.state.commenting = true; continue; } diff --git a/packages/csv-parse/dist/umd/sync.js b/packages/csv-parse/dist/umd/sync.js index 1c4fe5822..4b3c2b72d 100644 --- a/packages/csv-parse/dist/umd/sync.js +++ b/packages/csv-parse/dist/umd/sync.js @@ -2252,6 +2252,16 @@ ], options); } } + // Normalize option `comment_no_infix` + if(options.comment_no_infix === undefined || options.comment_no_infix === null || options.comment_no_infix === false){ + options.comment_no_infix = false; + }else if(options.comment_no_infix !== true){ + throw new CsvError('CSV_INVALID_OPTION_COMMENT', [ + 'Invalid option comment_no_infix:', + 'value must be a boolean,', + `got ${JSON.stringify(options.comment_no_infix)}` + ], options); + } // Normalize option `delimiter` const delimiter_json = JSON.stringify(options.delimiter); if(!Array.isArray(options.delimiter)) options.delimiter = [options.delimiter]; @@ -2613,7 +2623,7 @@ }, // Central parser implementation parse: function(nextBuf, end, push, close){ - const {bom, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; + const {bom, comment_no_infix, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; let {comment, escape, quote, record_delimiter} = this.options; const {bomSkipped, previousBuf, rawBuffer, escapeIsQuote} = this.state; let buf; @@ -2812,7 +2822,7 @@ continue; } const commentCount = comment === null ? 0 : this.__compareBytes(comment, buf, pos, chr); - if(commentCount !== 0){ + if(commentCount !== 0 && (comment_no_infix === false || this.state.field.length === 0)){ this.state.commenting = true; continue; } diff --git a/packages/csv-parse/lib/api/index.js b/packages/csv-parse/lib/api/index.js index b71843ba9..9833a68fc 100644 --- a/packages/csv-parse/lib/api/index.js +++ b/packages/csv-parse/lib/api/index.js @@ -61,7 +61,7 @@ const transform = function(original_options = {}) { }, // Central parser implementation parse: function(nextBuf, end, push, close){ - const {bom, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; + const {bom, comment_no_infix, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; let {comment, escape, quote, record_delimiter} = this.options; const {bomSkipped, previousBuf, rawBuffer, escapeIsQuote} = this.state; let buf; @@ -260,7 +260,7 @@ const transform = function(original_options = {}) { continue; } const commentCount = comment === null ? 0 : this.__compareBytes(comment, buf, pos, chr); - if(commentCount !== 0){ + if(commentCount !== 0 && (comment_no_infix === false || this.state.field.length === 0)){ this.state.commenting = true; continue; } diff --git a/packages/csv-parse/lib/api/normalize_options.js b/packages/csv-parse/lib/api/normalize_options.js index 98925943e..fa5838804 100644 --- a/packages/csv-parse/lib/api/normalize_options.js +++ b/packages/csv-parse/lib/api/normalize_options.js @@ -108,6 +108,16 @@ const normalize_options = function(opts){ ], options); } } + // Normalize option `comment_no_infix` + if(options.comment_no_infix === undefined || options.comment_no_infix === null || options.comment_no_infix === false){ + options.comment_no_infix = false; + }else if(options.comment_no_infix !== true){ + throw new CsvError('CSV_INVALID_OPTION_COMMENT', [ + 'Invalid option comment_no_infix:', + 'value must be a boolean,', + `got ${JSON.stringify(options.comment_no_infix)}` + ], options); + } // Normalize option `delimiter` const delimiter_json = JSON.stringify(options.delimiter); if(!Array.isArray(options.delimiter)) options.delimiter = [options.delimiter]; diff --git a/packages/csv-parse/lib/index.d.ts b/packages/csv-parse/lib/index.d.ts index d082c7133..ec8aa027e 100644 --- a/packages/csv-parse/lib/index.d.ts +++ b/packages/csv-parse/lib/index.d.ts @@ -88,6 +88,12 @@ export interface Options { * Treat all the characters after this one as a comment, default to '' (disabled). */ comment?: string; + /** + * Restrict the definition of comments to a full line. Comment characters + * defined in the middle of the line are not interpreted as such. The + * option require the activation of comments. + */ + comment_no_infix?: boolean; /** * Set the field delimiter. One character only, defaults to comma. */ diff --git a/packages/csv-parse/package.json b/packages/csv-parse/package.json index 224e0d385..9723ba107 100644 --- a/packages/csv-parse/package.json +++ b/packages/csv-parse/package.json @@ -1,5 +1,5 @@ { - "version": "5.4.1", + "version": "5.5.0", "name": "csv-parse", "description": "CSV parsing implementing the Node.js `stream.Transform` API", "keywords": [ @@ -61,24 +61,24 @@ }, "devDependencies": { "@rollup/plugin-eslint": "^9.0.4", - "@rollup/plugin-node-resolve": "^15.1.0", + "@rollup/plugin-node-resolve": "^15.2.1", "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", + "@types/node": "^20.5.6", "coffeelint": "^2.1.0", "coffeescript": "^2.7.0", - "csv-generate": "^4.2.7", + "csv-generate": "^4.2.8", "csv-spectrum": "^1.0.0", "each": "^2.4.0", "eslint": "^8.47.0", "mocha": "^10.2.0", "pad": "^3.2.0", - "rollup": "^3.28.0", + "rollup": "^3.28.1", "rollup-plugin-node-builtins": "^2.1.2", "rollup-plugin-node-globals": "^1.4.0", "should": "^13.2.3", - "stream-transform": "^3.2.7", + "stream-transform": "^3.2.8", "ts-node": "^10.9.1", - "typescript": "^5.1.6" + "typescript": "^5.2.2" }, "files": [ "dist", diff --git a/packages/csv-parse/test/api.types.ts b/packages/csv-parse/test/api.types.ts index 82fbeb7a5..c57c34f27 100644 --- a/packages/csv-parse/test/api.types.ts +++ b/packages/csv-parse/test/api.types.ts @@ -28,7 +28,8 @@ describe('API Types', () => { const options: Options = parser.options const keys: string[] = Object.keys(options) keys.sort().should.eql([ - 'bom', 'cast', 'cast_date', 'cast_first_line_to_header', 'cast_function', 'columns', 'comment', 'delimiter', + 'bom', 'cast', 'cast_date', 'cast_first_line_to_header', + 'cast_function', 'columns', 'comment', 'comment_no_infix', 'delimiter', 'encoding', 'escape', 'from', 'from_line', 'group_columns_by_name', 'ignore_last_delimiters', 'info', 'ltrim', 'max_record_size', 'objname', 'on_record', 'on_skip', 'quote', 'raw', 'record_delimiter', diff --git a/packages/csv-parse/test/option.comment_no_infix.coffee b/packages/csv-parse/test/option.comment_no_infix.coffee new file mode 100644 index 000000000..e3ccf76dc --- /dev/null +++ b/packages/csv-parse/test/option.comment_no_infix.coffee @@ -0,0 +1,38 @@ + +import { parse } from '../lib/index.js' + +describe 'Option `comment_no_infix`', -> + + it 'validation', -> + parse '', comment_no_infix: undefined, (->) + parse '', comment_no_infix: null, (->) + parse '', comment_no_infix: false, (->) + parse '', comment_no_infix: true, (->) + (-> + parse '', comment_no_infix: '', (->) + ).should.throw + message: 'Invalid option comment_no_infix: value must be a boolean, got ""' + code: 'CSV_INVALID_OPTION_COMMENT' + (-> + parse '', comment_no_infix: 2, (->) + ).should.throw + message: 'Invalid option comment_no_infix: value must be a boolean, got 2' + code: 'CSV_INVALID_OPTION_COMMENT' + + it 'with `true`', (next) -> + parse ''' + a,b#,c + ''', comment: '#', comment_no_infix: true, (err, records) -> + records.should.eql [ + ['a', 'b#', 'c'] + ] unless err + next err + + it 'with `false`', (next) -> + parse ''' + a,b#,c + ''', comment: '#', comment_no_infix: false, (err, records) -> + records.should.eql [ + ['a', 'b'] + ] unless err + next err diff --git a/packages/csv-stringify/CHANGELOG.md b/packages/csv-stringify/CHANGELOG.md index 2612e740c..a8a8d14f0 100644 --- a/packages/csv-stringify/CHANGELOG.md +++ b/packages/csv-stringify/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.4.2](https://github.com/adaltas/node-csv/compare/csv-stringify@6.4.1...csv-stringify@6.4.2) (2023-08-25) + + +### Bug Fixes + +* **csv-demo-ts-cjs-node16:** upgrade module definition after latest typescript ([87fe919](https://github.com/adaltas/node-csv/commit/87fe91996fb2a8895c252177fca4f0cb59a518f9)) + + + ## [6.4.1](https://github.com/adaltas/node-csv/compare/csv-stringify@6.4.0...csv-stringify@6.4.1) (2023-08-24) diff --git a/packages/csv-stringify/package.json b/packages/csv-stringify/package.json index 556115e82..205f896a0 100644 --- a/packages/csv-stringify/package.json +++ b/packages/csv-stringify/package.json @@ -1,5 +1,5 @@ { - "version": "6.4.1", + "version": "6.4.2", "name": "csv-stringify", "description": "CSV stringifier implementing the Node.js `stream.Transform` API", "keywords": [ @@ -10,22 +10,22 @@ "author": "David Worms (https://www.adaltas.com)", "devDependencies": { "@rollup/plugin-eslint": "^9.0.4", - "@rollup/plugin-node-resolve": "^15.1.0", + "@rollup/plugin-node-resolve": "^15.2.1", "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", + "@types/node": "^20.5.6", "@types/should": "^13.0.0", "coffeescript": "~2.7.0", - "csv-generate": "^4.2.7", + "csv-generate": "^4.2.8", "each": "^2.4.0", "eslint": "^8.47.0", "express": "^4.18.2", "mocha": "~10.2.0", - "rollup": "^3.28.0", + "rollup": "^3.28.1", "rollup-plugin-node-builtins": "^2.1.2", "rollup-plugin-node-globals": "^1.4.0", "should": "~13.2.3", "ts-node": "^10.9.1", - "typescript": "^5.1.6" + "typescript": "^5.2.2" }, "exports": { ".": { diff --git a/packages/csv-stringify/samples/api.async.iterator.js b/packages/csv-stringify/samples/api.async.iterator.js index af2f7222d..173554f8b 100644 --- a/packages/csv-stringify/samples/api.async.iterator.js +++ b/packages/csv-stringify/samples/api.async.iterator.js @@ -5,7 +5,7 @@ import { stringify } from 'csv-stringify'; (async () => { // Initialise the parser by generating random records - const parser = generate({ + const stringifier = generate({ length: 1000, objectMode: true, seed: true @@ -17,7 +17,7 @@ import { stringify } from 'csv-stringify'; // Report start process.stdout.write('start\n'); // Iterate through each records - for await (const row of parser) { + for await (const row of stringifier) { // Report current line process.stdout.write(`${count++} ${row}\n`); // Fake asynchronous operation diff --git a/packages/csv/CHANGELOG.md b/packages/csv/CHANGELOG.md index e16f01849..aa6b4ebb3 100644 --- a/packages/csv/CHANGELOG.md +++ b/packages/csv/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.3.3](https://github.com/adaltas/node-csv/compare/csv@6.3.2...csv@6.3.3) (2023-08-25) + + +### Bug Fixes + +* **csv-demo-ts-cjs-node16:** upgrade module definition after latest typescript ([87fe919](https://github.com/adaltas/node-csv/commit/87fe91996fb2a8895c252177fca4f0cb59a518f9)) + + + ## [6.3.2](https://github.com/adaltas/node-csv/compare/csv@6.3.1...csv@6.3.2) (2023-08-24) diff --git a/packages/csv/dist/cjs/index.cjs b/packages/csv/dist/cjs/index.cjs index b4f1a8754..2d70e2fe5 100644 --- a/packages/csv/dist/cjs/index.cjs +++ b/packages/csv/dist/cjs/index.cjs @@ -534,6 +534,16 @@ const normalize_options$1 = function(opts){ ], options); } } + // Normalize option `comment_no_infix` + if(options.comment_no_infix === undefined || options.comment_no_infix === null || options.comment_no_infix === false){ + options.comment_no_infix = false; + }else if(options.comment_no_infix !== true){ + throw new CsvError$1('CSV_INVALID_OPTION_COMMENT', [ + 'Invalid option comment_no_infix:', + 'value must be a boolean,', + `got ${JSON.stringify(options.comment_no_infix)}` + ], options); + } // Normalize option `delimiter` const delimiter_json = JSON.stringify(options.delimiter); if(!Array.isArray(options.delimiter)) options.delimiter = [options.delimiter]; @@ -895,7 +905,7 @@ const transform$1 = function(original_options = {}) { }, // Central parser implementation parse: function(nextBuf, end, push, close){ - const {bom, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; + const {bom, comment_no_infix, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; let {comment, escape, quote, record_delimiter} = this.options; const {bomSkipped, previousBuf, rawBuffer, escapeIsQuote} = this.state; let buf; @@ -1094,7 +1104,7 @@ const transform$1 = function(original_options = {}) { continue; } const commentCount = comment === null ? 0 : this.__compareBytes(comment, buf, pos, chr); - if(commentCount !== 0){ + if(commentCount !== 0 && (comment_no_infix === false || this.state.field.length === 0)){ this.state.commenting = true; continue; } diff --git a/packages/csv/dist/cjs/sync.cjs b/packages/csv/dist/cjs/sync.cjs index b79b17fb6..0e41c6423 100644 --- a/packages/csv/dist/cjs/sync.cjs +++ b/packages/csv/dist/cjs/sync.cjs @@ -531,6 +531,16 @@ const normalize_options$1 = function(opts){ ], options); } } + // Normalize option `comment_no_infix` + if(options.comment_no_infix === undefined || options.comment_no_infix === null || options.comment_no_infix === false){ + options.comment_no_infix = false; + }else if(options.comment_no_infix !== true){ + throw new CsvError$1('CSV_INVALID_OPTION_COMMENT', [ + 'Invalid option comment_no_infix:', + 'value must be a boolean,', + `got ${JSON.stringify(options.comment_no_infix)}` + ], options); + } // Normalize option `delimiter` const delimiter_json = JSON.stringify(options.delimiter); if(!Array.isArray(options.delimiter)) options.delimiter = [options.delimiter]; @@ -892,7 +902,7 @@ const transform$1 = function(original_options = {}) { }, // Central parser implementation parse: function(nextBuf, end, push, close){ - const {bom, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; + const {bom, comment_no_infix, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; let {comment, escape, quote, record_delimiter} = this.options; const {bomSkipped, previousBuf, rawBuffer, escapeIsQuote} = this.state; let buf; @@ -1091,7 +1101,7 @@ const transform$1 = function(original_options = {}) { continue; } const commentCount = comment === null ? 0 : this.__compareBytes(comment, buf, pos, chr); - if(commentCount !== 0){ + if(commentCount !== 0 && (comment_no_infix === false || this.state.field.length === 0)){ this.state.commenting = true; continue; } diff --git a/packages/csv/dist/esm/index.js b/packages/csv/dist/esm/index.js index 2567db8c3..f2e440010 100644 --- a/packages/csv/dist/esm/index.js +++ b/packages/csv/dist/esm/index.js @@ -5725,6 +5725,16 @@ const normalize_options$1 = function(opts){ ], options); } } + // Normalize option `comment_no_infix` + if(options.comment_no_infix === undefined || options.comment_no_infix === null || options.comment_no_infix === false){ + options.comment_no_infix = false; + }else if(options.comment_no_infix !== true){ + throw new CsvError$1('CSV_INVALID_OPTION_COMMENT', [ + 'Invalid option comment_no_infix:', + 'value must be a boolean,', + `got ${JSON.stringify(options.comment_no_infix)}` + ], options); + } // Normalize option `delimiter` const delimiter_json = JSON.stringify(options.delimiter); if(!Array.isArray(options.delimiter)) options.delimiter = [options.delimiter]; @@ -6086,7 +6096,7 @@ const transform$1 = function(original_options = {}) { }, // Central parser implementation parse: function(nextBuf, end, push, close){ - const {bom, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; + const {bom, comment_no_infix, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; let {comment, escape, quote, record_delimiter} = this.options; const {bomSkipped, previousBuf, rawBuffer, escapeIsQuote} = this.state; let buf; @@ -6285,7 +6295,7 @@ const transform$1 = function(original_options = {}) { continue; } const commentCount = comment === null ? 0 : this.__compareBytes(comment, buf, pos, chr); - if(commentCount !== 0){ + if(commentCount !== 0 && (comment_no_infix === false || this.state.field.length === 0)){ this.state.commenting = true; continue; } diff --git a/packages/csv/dist/esm/sync.js b/packages/csv/dist/esm/sync.js index a9c144be6..53de2f0f3 100644 --- a/packages/csv/dist/esm/sync.js +++ b/packages/csv/dist/esm/sync.js @@ -5722,6 +5722,16 @@ const normalize_options$1 = function(opts){ ], options); } } + // Normalize option `comment_no_infix` + if(options.comment_no_infix === undefined || options.comment_no_infix === null || options.comment_no_infix === false){ + options.comment_no_infix = false; + }else if(options.comment_no_infix !== true){ + throw new CsvError$1('CSV_INVALID_OPTION_COMMENT', [ + 'Invalid option comment_no_infix:', + 'value must be a boolean,', + `got ${JSON.stringify(options.comment_no_infix)}` + ], options); + } // Normalize option `delimiter` const delimiter_json = JSON.stringify(options.delimiter); if(!Array.isArray(options.delimiter)) options.delimiter = [options.delimiter]; @@ -6083,7 +6093,7 @@ const transform$1 = function(original_options = {}) { }, // Central parser implementation parse: function(nextBuf, end, push, close){ - const {bom, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; + const {bom, comment_no_infix, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; let {comment, escape, quote, record_delimiter} = this.options; const {bomSkipped, previousBuf, rawBuffer, escapeIsQuote} = this.state; let buf; @@ -6282,7 +6292,7 @@ const transform$1 = function(original_options = {}) { continue; } const commentCount = comment === null ? 0 : this.__compareBytes(comment, buf, pos, chr); - if(commentCount !== 0){ + if(commentCount !== 0 && (comment_no_infix === false || this.state.field.length === 0)){ this.state.commenting = true; continue; } diff --git a/packages/csv/dist/iife/index.js b/packages/csv/dist/iife/index.js index 895dd35ca..843cfeef3 100644 --- a/packages/csv/dist/iife/index.js +++ b/packages/csv/dist/iife/index.js @@ -5728,6 +5728,16 @@ var csv = (function (exports) { ], options); } } + // Normalize option `comment_no_infix` + if(options.comment_no_infix === undefined || options.comment_no_infix === null || options.comment_no_infix === false){ + options.comment_no_infix = false; + }else if(options.comment_no_infix !== true){ + throw new CsvError$1('CSV_INVALID_OPTION_COMMENT', [ + 'Invalid option comment_no_infix:', + 'value must be a boolean,', + `got ${JSON.stringify(options.comment_no_infix)}` + ], options); + } // Normalize option `delimiter` const delimiter_json = JSON.stringify(options.delimiter); if(!Array.isArray(options.delimiter)) options.delimiter = [options.delimiter]; @@ -6089,7 +6099,7 @@ var csv = (function (exports) { }, // Central parser implementation parse: function(nextBuf, end, push, close){ - const {bom, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; + const {bom, comment_no_infix, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; let {comment, escape, quote, record_delimiter} = this.options; const {bomSkipped, previousBuf, rawBuffer, escapeIsQuote} = this.state; let buf; @@ -6288,7 +6298,7 @@ var csv = (function (exports) { continue; } const commentCount = comment === null ? 0 : this.__compareBytes(comment, buf, pos, chr); - if(commentCount !== 0){ + if(commentCount !== 0 && (comment_no_infix === false || this.state.field.length === 0)){ this.state.commenting = true; continue; } diff --git a/packages/csv/dist/iife/sync.js b/packages/csv/dist/iife/sync.js index 71daaf343..d56124a54 100644 --- a/packages/csv/dist/iife/sync.js +++ b/packages/csv/dist/iife/sync.js @@ -5725,6 +5725,16 @@ var csv_sync = (function (exports) { ], options); } } + // Normalize option `comment_no_infix` + if(options.comment_no_infix === undefined || options.comment_no_infix === null || options.comment_no_infix === false){ + options.comment_no_infix = false; + }else if(options.comment_no_infix !== true){ + throw new CsvError$1('CSV_INVALID_OPTION_COMMENT', [ + 'Invalid option comment_no_infix:', + 'value must be a boolean,', + `got ${JSON.stringify(options.comment_no_infix)}` + ], options); + } // Normalize option `delimiter` const delimiter_json = JSON.stringify(options.delimiter); if(!Array.isArray(options.delimiter)) options.delimiter = [options.delimiter]; @@ -6086,7 +6096,7 @@ var csv_sync = (function (exports) { }, // Central parser implementation parse: function(nextBuf, end, push, close){ - const {bom, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; + const {bom, comment_no_infix, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; let {comment, escape, quote, record_delimiter} = this.options; const {bomSkipped, previousBuf, rawBuffer, escapeIsQuote} = this.state; let buf; @@ -6285,7 +6295,7 @@ var csv_sync = (function (exports) { continue; } const commentCount = comment === null ? 0 : this.__compareBytes(comment, buf, pos, chr); - if(commentCount !== 0){ + if(commentCount !== 0 && (comment_no_infix === false || this.state.field.length === 0)){ this.state.commenting = true; continue; } diff --git a/packages/csv/dist/umd/index.js b/packages/csv/dist/umd/index.js index c4ed3fcdc..3aacaa240 100644 --- a/packages/csv/dist/umd/index.js +++ b/packages/csv/dist/umd/index.js @@ -5731,6 +5731,16 @@ ], options); } } + // Normalize option `comment_no_infix` + if(options.comment_no_infix === undefined || options.comment_no_infix === null || options.comment_no_infix === false){ + options.comment_no_infix = false; + }else if(options.comment_no_infix !== true){ + throw new CsvError$1('CSV_INVALID_OPTION_COMMENT', [ + 'Invalid option comment_no_infix:', + 'value must be a boolean,', + `got ${JSON.stringify(options.comment_no_infix)}` + ], options); + } // Normalize option `delimiter` const delimiter_json = JSON.stringify(options.delimiter); if(!Array.isArray(options.delimiter)) options.delimiter = [options.delimiter]; @@ -6092,7 +6102,7 @@ }, // Central parser implementation parse: function(nextBuf, end, push, close){ - const {bom, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; + const {bom, comment_no_infix, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; let {comment, escape, quote, record_delimiter} = this.options; const {bomSkipped, previousBuf, rawBuffer, escapeIsQuote} = this.state; let buf; @@ -6291,7 +6301,7 @@ continue; } const commentCount = comment === null ? 0 : this.__compareBytes(comment, buf, pos, chr); - if(commentCount !== 0){ + if(commentCount !== 0 && (comment_no_infix === false || this.state.field.length === 0)){ this.state.commenting = true; continue; } diff --git a/packages/csv/dist/umd/sync.js b/packages/csv/dist/umd/sync.js index e4c6ed874..1e71bc02f 100644 --- a/packages/csv/dist/umd/sync.js +++ b/packages/csv/dist/umd/sync.js @@ -5728,6 +5728,16 @@ ], options); } } + // Normalize option `comment_no_infix` + if(options.comment_no_infix === undefined || options.comment_no_infix === null || options.comment_no_infix === false){ + options.comment_no_infix = false; + }else if(options.comment_no_infix !== true){ + throw new CsvError$1('CSV_INVALID_OPTION_COMMENT', [ + 'Invalid option comment_no_infix:', + 'value must be a boolean,', + `got ${JSON.stringify(options.comment_no_infix)}` + ], options); + } // Normalize option `delimiter` const delimiter_json = JSON.stringify(options.delimiter); if(!Array.isArray(options.delimiter)) options.delimiter = [options.delimiter]; @@ -6089,7 +6099,7 @@ }, // Central parser implementation parse: function(nextBuf, end, push, close){ - const {bom, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; + const {bom, comment_no_infix, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options; let {comment, escape, quote, record_delimiter} = this.options; const {bomSkipped, previousBuf, rawBuffer, escapeIsQuote} = this.state; let buf; @@ -6288,7 +6298,7 @@ continue; } const commentCount = comment === null ? 0 : this.__compareBytes(comment, buf, pos, chr); - if(commentCount !== 0){ + if(commentCount !== 0 && (comment_no_infix === false || this.state.field.length === 0)){ this.state.commenting = true; continue; } diff --git a/packages/csv/package.json b/packages/csv/package.json index 55e6a265a..5b8f47dea 100644 --- a/packages/csv/package.json +++ b/packages/csv/package.json @@ -1,6 +1,6 @@ { "name": "csv", - "version": "6.3.2", + "version": "6.3.3", "description": "A mature CSV toolset with simple api, full of options and tested against large datasets.", "keywords": [ "node", @@ -21,27 +21,27 @@ "David Worms (https://www.adaltas.com)" ], "dependencies": { - "csv-generate": "^4.2.7", - "csv-parse": "^5.4.1", - "csv-stringify": "^6.4.1", - "stream-transform": "^3.2.7" + "csv-generate": "^4.2.8", + "csv-parse": "^5.5.0", + "csv-stringify": "^6.4.2", + "stream-transform": "^3.2.8" }, "devDependencies": { "@rollup/plugin-eslint": "^9.0.4", - "@rollup/plugin-node-resolve": "^15.1.0", + "@rollup/plugin-node-resolve": "^15.2.1", "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", + "@types/node": "^20.5.6", "@types/should": "^13.0.0", "coffeescript": "~2.7.0", "each": "^2.4.0", "eslint": "^8.47.0", "mocha": "~10.2.0", - "rollup": "^3.28.0", + "rollup": "^3.28.1", "rollup-plugin-node-builtins": "^2.1.2", "rollup-plugin-node-globals": "^1.4.0", "should": "~13.2.3", "ts-node": "^10.9.1", - "typescript": "^5.1.6" + "typescript": "^5.2.2" }, "engines": { "node": ">= 0.1.90" diff --git a/packages/stream-transform/CHANGELOG.md b/packages/stream-transform/CHANGELOG.md index c3669edfe..eb6379115 100644 --- a/packages/stream-transform/CHANGELOG.md +++ b/packages/stream-transform/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [3.2.8](https://github.com/adaltas/node-csv/compare/stream-transform@3.2.7...stream-transform@3.2.8) (2023-08-25) + + +### Bug Fixes + +* **csv-demo-ts-cjs-node16:** upgrade module definition after latest typescript ([87fe919](https://github.com/adaltas/node-csv/commit/87fe91996fb2a8895c252177fca4f0cb59a518f9)) + + + ## [3.2.7](https://github.com/adaltas/node-csv/compare/stream-transform@3.2.6...stream-transform@3.2.7) (2023-08-24) diff --git a/packages/stream-transform/package.json b/packages/stream-transform/package.json index 8f4b00456..ed614812b 100644 --- a/packages/stream-transform/package.json +++ b/packages/stream-transform/package.json @@ -1,5 +1,5 @@ { - "version": "3.2.7", + "version": "3.2.8", "name": "stream-transform", "description": "Object transformations implementing the Node.js `stream.Transform` API", "keywords": [ @@ -11,21 +11,21 @@ "author": "David Worms (https://www.adaltas.com)", "devDependencies": { "@rollup/plugin-eslint": "^9.0.4", - "@rollup/plugin-node-resolve": "^15.1.0", + "@rollup/plugin-node-resolve": "^15.2.1", "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", + "@types/node": "^20.5.6", "coffeescript": "~2.7.0", - "csv-generate": "^4.2.7", + "csv-generate": "^4.2.8", "each": "^2.4.0", "eslint": "^8.47.0", "mocha": "~10.2.0", "pad": "~3.2.0", - "rollup": "^3.28.0", + "rollup": "^3.28.1", "rollup-plugin-node-builtins": "^2.1.2", "rollup-plugin-node-globals": "^1.4.0", "should": "~13.2.3", "ts-node": "^10.9.1", - "typescript": "^5.1.6" + "typescript": "^5.2.2" }, "exports": { ".": {