Bump csv-parse from 6.1.0 to 6.2.1 (#440)
a36098e · dependabot[bot] · 2026-03-27 12:27
Message
{commit_body(@commit)}
Files changed
modified
dist/index.js
+9
−3
@@ -55811,8 +55811,8 @@ const normalize_columns_array = function (columns) {
| 55811 | 55811 | const column = columns[i]; |
| 55812 | 55812 | if (column === undefined || column === null || column === false) { |
| 55813 | 55813 | normalizedColumns[i] = { disabled: true }; |
| 55814 | − } else if (typeof column === "string") { | |
| 55815 | − normalizedColumns[i] = { name: column }; | |
| 55814 | + } else if (typeof column === "string" || typeof column === "number") { | |
| 55815 | + normalizedColumns[i] = { name: `${column}` }; | |
| 55816 | 55816 | } else if (is_object(column)) { |
| 55817 | 55817 | if (typeof column.name !== "string") { |
| 55818 | 55818 | throw new CsvError("CSV_OPTION_COLUMNS_MISSING_NAME", [ |
@@ -56703,6 +56703,7 @@ const boms = {
| 56703 | 56703 | const transform = function (original_options = {}) { |
| 56704 | 56704 | const info = { |
| 56705 | 56705 | bytes: 0, |
| 56706 | + bytes_records: 0, | |
| 56706 | 56707 | comment_lines: 0, |
| 56707 | 56708 | empty_lines: 0, |
| 56708 | 56709 | invalid_field_length: 0, |
@@ -56980,7 +56981,7 @@ const transform = function (original_options = {}) {
| 56980 | 56981 | this.info.comment_lines++; |
| 56981 | 56982 | // Skip full comment line |
| 56982 | 56983 | } else { |
| 56983 | − // Activate records emition if above from_line | |
| 56984 | + // Activate records emission if above from_line | |
| 56984 | 56985 | if ( |
| 56985 | 56986 | this.state.enabled === false && |
| 56986 | 56987 | this.info.lines + |
@@ -57378,6 +57379,7 @@ const transform = function (original_options = {}) {
| 57378 | 57379 | return; |
| 57379 | 57380 | } |
| 57380 | 57381 | } |
| 57382 | + this.info.bytes_records += this.info.bytes; | |
| 57381 | 57383 | push(record); |
| 57382 | 57384 | }, |
| 57383 | 57385 | // Return a tuple with the error and the casted value |
@@ -57565,6 +57567,7 @@ const transform = function (original_options = {}) {
| 57565 | 57567 | const { columns, raw, encoding } = this.options; |
| 57566 | 57568 | return { |
| 57567 | 57569 | ...this.__infoDataSet(), |
| 57570 | + bytes_records: this.info.bytes, | |
| 57568 | 57571 | error: this.state.error, |
| 57569 | 57572 | header: columns === true, |
| 57570 | 57573 | index: this.state.record.length, |
@@ -57574,8 +57577,11 @@ const transform = function (original_options = {}) {
| 57574 | 57577 | __infoField: function () { |
| 57575 | 57578 | const { columns } = this.options; |
| 57576 | 57579 | const isColumns = Array.isArray(columns); |
| 57580 | + // Bytes records are only incremented when all records'fields are parsed | |
| 57581 | + const bytes_records = this.info.bytes_records; | |
| 57577 | 57582 | return { |
| 57578 | 57583 | ...this.__infoRecord(), |
| 57584 | + bytes_records: bytes_records, | |
| 57579 | 57585 | column: |
| 57580 | 57586 | isColumns === true |
| 57581 | 57587 | ? columns.length > this.state.record.length |
modified
package-lock.json
+4
−4
@@ -10,7 +10,7 @@
| 10 | 10 | "@actions/core": "3.0.0", |
| 11 | 11 | "@actions/exec": "3.0.0", |
| 12 | 12 | "@actions/tool-cache": "4.0.0", |
| 13 | − "csv-parse": "6.1.0", | |
| 13 | + "csv-parse": "6.2.1", | |
| 14 | 14 | "lodash": "4.17.23", |
| 15 | 15 | "semver": "7.7.4", |
| 16 | 16 | "toml": "3.0.0" |
@@ -839,9 +839,9 @@
| 839 | 839 | } |
| 840 | 840 | }, |
| 841 | 841 | "node_modules/csv-parse": { |
| 842 | − "version": "6.1.0", | |
| 843 | − "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-6.1.0.tgz", | |
| 844 | − "integrity": "sha512-CEE+jwpgLn+MmtCpVcPtiCZpVtB6Z2OKPTr34pycYYoL7sxdOkXDdQ4lRiw6ioC0q6BLqhc6cKweCVvral8yhw==", | |
| 842 | + "version": "6.2.1", | |
| 843 | + "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-6.2.1.tgz", | |
| 844 | + "integrity": "sha512-LRLMV+UCyfMokp8Wb411duBf1gaBKJfOfBWU9eHMJ+b+cJYZsNu3AFmjJf3+yPGd59Exz1TsMjaSFyxnYB9+IQ==", | |
| 845 | 845 | "license": "MIT" |
| 846 | 846 | }, |
| 847 | 847 | "node_modules/debug": { |
modified
package.json
+1
−1
@@ -20,7 +20,7 @@
| 20 | 20 | "@actions/core": "3.0.0", |
| 21 | 21 | "@actions/exec": "3.0.0", |
| 22 | 22 | "@actions/tool-cache": "4.0.0", |
| 23 | − "csv-parse": "6.1.0", | |
| 23 | + "csv-parse": "6.2.1", | |
| 24 | 24 | "lodash": "4.17.23", |
| 25 | 25 | "semver": "7.7.4", |
| 26 | 26 | "toml": "3.0.0" |
Parents: 87781dc