From a36098e7415c702808cc414302b5a3fa2c83df52 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 12:27:46 +0000 Subject: [PATCH] Bump csv-parse from 6.1.0 to 6.2.1 (#440) * Bump csv-parse from 6.1.0 to 6.2.1 Bumps [csv-parse](https://github.com/adaltas/node-csv/tree/HEAD/packages/csv-parse) from 6.1.0 to 6.2.1. - [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.2.1/packages/csv-parse) --- updated-dependencies: - dependency-name: csv-parse dependency-version: 6.2.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Help Dependabot out: npm run build-dist --------- 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 | 12 +++++++++--- package-lock.json | 8 ++++---- package.json | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/dist/index.js b/dist/index.js index c71667f..ddf0a71 100644 --- a/dist/index.js +++ b/dist/index.js @@ -55811,8 +55811,8 @@ const normalize_columns_array = function (columns) { const column = columns[i]; if (column === undefined || column === null || column === false) { normalizedColumns[i] = { disabled: true }; - } else if (typeof column === "string") { - normalizedColumns[i] = { name: column }; + } else if (typeof column === "string" || typeof column === "number") { + normalizedColumns[i] = { name: `${column}` }; } else if (is_object(column)) { if (typeof column.name !== "string") { throw new CsvError("CSV_OPTION_COLUMNS_MISSING_NAME", [ @@ -56703,6 +56703,7 @@ const boms = { const transform = function (original_options = {}) { const info = { bytes: 0, + bytes_records: 0, comment_lines: 0, empty_lines: 0, invalid_field_length: 0, @@ -56980,7 +56981,7 @@ const transform = function (original_options = {}) { this.info.comment_lines++; // Skip full comment line } else { - // Activate records emition if above from_line + // Activate records emission if above from_line if ( this.state.enabled === false && this.info.lines + @@ -57378,6 +57379,7 @@ const transform = function (original_options = {}) { return; } } + this.info.bytes_records += this.info.bytes; push(record); }, // Return a tuple with the error and the casted value @@ -57565,6 +57567,7 @@ const transform = function (original_options = {}) { const { columns, raw, encoding } = this.options; return { ...this.__infoDataSet(), + bytes_records: this.info.bytes, error: this.state.error, header: columns === true, index: this.state.record.length, @@ -57574,8 +57577,11 @@ const transform = function (original_options = {}) { __infoField: function () { const { columns } = this.options; const isColumns = Array.isArray(columns); + // Bytes records are only incremented when all records'fields are parsed + const bytes_records = this.info.bytes_records; return { ...this.__infoRecord(), + bytes_records: bytes_records, column: isColumns === true ? columns.length > this.state.record.length diff --git a/package-lock.json b/package-lock.json index cdfd243..9e4ac8e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "@actions/core": "3.0.0", "@actions/exec": "3.0.0", "@actions/tool-cache": "4.0.0", - "csv-parse": "6.1.0", + "csv-parse": "6.2.1", "lodash": "4.17.23", "semver": "7.7.4", "toml": "3.0.0" @@ -839,9 +839,9 @@ } }, "node_modules/csv-parse": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-6.1.0.tgz", - "integrity": "sha512-CEE+jwpgLn+MmtCpVcPtiCZpVtB6Z2OKPTr34pycYYoL7sxdOkXDdQ4lRiw6ioC0q6BLqhc6cKweCVvral8yhw==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-6.2.1.tgz", + "integrity": "sha512-LRLMV+UCyfMokp8Wb411duBf1gaBKJfOfBWU9eHMJ+b+cJYZsNu3AFmjJf3+yPGd59Exz1TsMjaSFyxnYB9+IQ==", "license": "MIT" }, "node_modules/debug": { diff --git a/package.json b/package.json index 88e9b5c..59f17f5 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "@actions/core": "3.0.0", "@actions/exec": "3.0.0", "@actions/tool-cache": "4.0.0", - "csv-parse": "6.1.0", + "csv-parse": "6.2.1", "lodash": "4.17.23", "semver": "7.7.4", "toml": "3.0.0"