From 6b88c3e647cc9ae451d34e99bcbaab4c00a3940e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Dec 2020 06:18:28 +0000 Subject: [PATCH 1/2] Bump csv-parse from 4.14.1 to 4.14.2 Bumps [csv-parse](https://github.com/wdavidw/node-csv-parse) from 4.14.1 to 4.14.2. - [Release notes](https://github.com/wdavidw/node-csv-parse/releases) - [Changelog](https://github.com/adaltas/node-csv-parse/blob/master/CHANGELOG.md) - [Commits](https://github.com/wdavidw/node-csv-parse/compare/v4.14.1...v4.14.2) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 9e32ac12b..ff596da12 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "@actions/core": "^1.2.6", "@actions/exec": "^1.0.4", "@actions/github": "^4.0.0", - "csv-parse": "^4.14.1", + "csv-parse": "^4.14.2", "semver": "^7.3.4", "tmp": "^0.2.1" }, diff --git a/yarn.lock b/yarn.lock index eedad0575..077206946 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1236,10 +1236,10 @@ cssstyle@^2.2.0: dependencies: cssom "~0.3.6" -csv-parse@*, csv-parse@^4.14.1: - version "4.14.1" - resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-4.14.1.tgz#b6b3736508fb94682fa6d450fe1755237221d291" - integrity sha512-4wmcO7QbWtDAncGFaBwlWFPhEN4Akr64IbM4zvDwEOFekI8blLc04Nw7XjQjtSNy+3AUAgBgtUa9nWo5Cq89Xg== +csv-parse@*, csv-parse@^4.14.2: + version "4.14.2" + resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-4.14.2.tgz#c1329cff95a99b8773a92c4e62f8bff114b34726" + integrity sha512-YE2xlTKtM035/94llhgsp9qFQxGi47EkQJ1pZ+mLT/98GpIsbjkMGAb7Rmu9hNxVfYFOLf10hP+rPVqnoccLgw== dashdash@^1.12.0: version "1.14.1" From 35ab0dd217559f12a9d1376dda5f7643c1b70fc5 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Thu, 17 Dec 2020 23:16:55 +0100 Subject: [PATCH 2/2] Update generated content Signed-off-by: CrazyMax --- dist/index.js | 45 +++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/dist/index.js b/dist/index.js index b451df09f..de1031ce4 100644 --- a/dist/index.js +++ b/dist/index.js @@ -12406,37 +12406,34 @@ class Parser extends Transform { } if(recordLength !== this.state.expectedRecordLength){ const err = columns === false ? - this.__error( - // Todo: rename CSV_INCONSISTENT_RECORD_LENGTH to - // CSV_RECORD_INCONSISTENT_FIELDS_LENGTH - new CsvError('CSV_INCONSISTENT_RECORD_LENGTH', [ - 'Invalid Record Length:', - `expect ${this.state.expectedRecordLength},`, - `got ${recordLength} on line ${this.info.lines}`, - ], this.options, this.__context(), { - record: record, - }) - ) + // Todo: rename CSV_INCONSISTENT_RECORD_LENGTH to + // CSV_RECORD_INCONSISTENT_FIELDS_LENGTH + new CsvError('CSV_INCONSISTENT_RECORD_LENGTH', [ + 'Invalid Record Length:', + `expect ${this.state.expectedRecordLength},`, + `got ${recordLength} on line ${this.info.lines}`, + ], this.options, this.__context(), { + record: record, + }) : - this.__error( - // Todo: rename CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH to - // CSV_RECORD_INCONSISTENT_COLUMNS - new CsvError('CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH', [ - 'Invalid Record Length:', - `columns length is ${columns.length},`, // rename columns - `got ${recordLength} on line ${this.info.lines}`, - ], this.options, this.__context(), { - record: record, - }) - ) + // Todo: rename CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH to + // CSV_RECORD_INCONSISTENT_COLUMNS + new CsvError('CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH', [ + 'Invalid Record Length:', + `columns length is ${columns.length},`, // rename columns + `got ${recordLength} on line ${this.info.lines}`, + ], this.options, this.__context(), { + record: record, + }) if(relax_column_count === true || (relax_column_count_less === true && recordLength < this.state.expectedRecordLength) || (relax_column_count_more === true && recordLength > this.state.expectedRecordLength) ){ this.info.invalid_field_length++ this.state.error = err // Error is undefined with skip_lines_with_error - }else if(err !== undefined){ - return err + }else{ + const finalErr = this.__error(err) + if(finalErr) return finalErr } } if(skip_lines_with_empty_values === true){