From db4f13ce185b41bab52f94ecf0e779a264e77d0f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 01:43:16 +0100 Subject: [PATCH] Bump csv-parse from 5.6.0 to 6.0.0 (#364) * Bump csv-parse from 5.6.0 to 6.0.0 Bumps [csv-parse](https://github.com/adaltas/node-csv/tree/HEAD/packages/csv-parse) from 5.6.0 to 6.0.0. - [Changelog](https://github.com/adaltas/node-csv/blob/master/packages/csv-parse/CHANGELOG.md) - [Commits](https://github.com/adaltas/node-csv/commits/csv-parse@6.0.0/packages/csv-parse) --- updated-dependencies: - dependency-name: csv-parse dependency-version: 6.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * Help Dependabot: push `npm run build-dist`'s results --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Paulo F. Oliveira --- dist/index.js | 25 ++++++++++++++++--------- package-lock.json | 8 ++++---- package.json | 2 +- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/dist/index.js b/dist/index.js index 7d8932c..bd63ff1 100644 --- a/dist/index.js +++ b/dist/index.js @@ -27526,7 +27526,7 @@ const normalize_options = function (opts) { ); } // Normalize option `columns` - options.cast_first_line_to_header = null; + options.cast_first_line_to_header = undefined; if (options.columns === true) { // Fields in the first line are converted as-is to columns options.cast_first_line_to_header = undefined; @@ -28954,10 +28954,14 @@ const transform = function (original_options = {}) { if (skip_records_with_error) { this.state.recordHasError = true; if (this.options.on_skip !== undefined) { - this.options.on_skip( - err, - raw ? this.state.rawBuffer.toString(encoding) : undefined, - ); + try { + this.options.on_skip( + err, + raw ? this.state.rawBuffer.toString(encoding) : undefined, + ); + } catch (err) { + return err; + } } // this.emit('skip', err, raw ? this.state.rawBuffer.toString(encoding) : undefined); return undefined; @@ -29011,10 +29015,13 @@ const parse = function (data, opts = {}) { } }; const close = () => {}; - const err1 = parser.parse(data, false, push, close); - if (err1 !== undefined) throw err1; - const err2 = parser.parse(undefined, true, push, close); - if (err2 !== undefined) throw err2; + const error = parser.parse(data, true, push, close); + if (error !== undefined) throw error; + // 250606: `parser.parse` was implemented as 2 calls: + // const err1 = parser.parse(data, false, push, close); + // if (err1 !== undefined) throw err1; + // const err2 = parser.parse(undefined, true, push, close); + // if (err2 !== undefined) throw err2; return records; }; diff --git a/package-lock.json b/package-lock.json index ee0eb8c..fde8b10 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "@actions/core": "1.11.1", "@actions/exec": "1.1.1", "@actions/tool-cache": "2.0.2", - "csv-parse": "5.6.0", + "csv-parse": "6.0.0", "lodash": "4.17.21", "semver": "7.7.2" }, @@ -686,9 +686,9 @@ } }, "node_modules/csv-parse": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-5.6.0.tgz", - "integrity": "sha512-l3nz3euub2QMg5ouu5U09Ew9Wf6/wQ8I++ch1loQ0ljmzhmfZYrH9fflS22i/PQEvsPvxCwxgz5q7UB8K1JO4Q==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-6.0.0.tgz", + "integrity": "sha512-6aB9WrymEruVDwQOwa5AuYk4/Gb+HaJgLHGKOA9BXTqgsIFvbdHzQzZOuqNCOooTGciPDaHzTlGkU5P6kYVUYw==", "license": "MIT" }, "node_modules/debug": { diff --git a/package.json b/package.json index ffec98c..ba0b094 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@actions/core": "1.11.1", "@actions/exec": "1.1.1", "@actions/tool-cache": "2.0.2", - "csv-parse": "5.6.0", + "csv-parse": "6.0.0", "semver": "7.7.2", "lodash": "4.17.21" },