Skip to content

Commit 7b55f05

Browse files
committed
refactor(csv-parse)!: rename RECORD_INCONSISTENT_FIELDS_LENGTH
1 parent fb391c9 commit 7b55f05

18 files changed

Lines changed: 28 additions & 47 deletions

packages/csv-parse/ROADMAP.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ We invite you to join and contribute but create an issue before engaging any wor
99
* errors: finish normalisation of all errors (easy)
1010
* encoding: new encoding_input and encoding_output options (medium)
1111
* `columns_duplicates_to_array`: this is just too long but I don't have much insipiration for a better name
12-
* `relax_column_count`: rename INCONSISTENT_RECORD_LENGTH to RECORD_INCONSISTENT_FIELDS_LENGTH (easy)
1312
* `info`: remove the `parser.info` object and move its properties to `state`
1413
* `info`: rename the `info` related properties and functions to `context`

packages/csv-parse/dist/cjs/index.cjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5879,9 +5879,7 @@ class Parser extends Transform {
58795879
}
58805880
if(recordLength !== this.state.expectedRecordLength){
58815881
const err = columns === false ?
5882-
// Todo: rename CSV_INCONSISTENT_RECORD_LENGTH to
5883-
// CSV_RECORD_INCONSISTENT_FIELDS_LENGTH
5884-
new CsvError('CSV_INCONSISTENT_RECORD_LENGTH', [
5882+
new CsvError('CSV_RECORD_INCONSISTENT_FIELDS_LENGTH', [
58855883
'Invalid Record Length:',
58865884
`expect ${this.state.expectedRecordLength},`,
58875885
`got ${recordLength} on line ${this.info.lines}`,

packages/csv-parse/dist/cjs/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ export type CsvErrorCode =
253253
| 'CSV_MAX_RECORD_SIZE'
254254
| 'CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE'
255255
| 'CSV_QUOTE_NOT_CLOSED'
256-
| 'CSV_INCONSISTENT_RECORD_LENGTH'
256+
| 'CSV_RECORD_INCONSISTENT_FIELDS_LENGTH'
257257
| 'CSV_RECORD_INCONSISTENT_COLUMNS'
258258
| 'CSV_OPTION_COLUMNS_MISSING_NAME'
259259

packages/csv-parse/dist/cjs/sync.cjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5879,9 +5879,7 @@ class Parser extends Transform {
58795879
}
58805880
if(recordLength !== this.state.expectedRecordLength){
58815881
const err = columns === false ?
5882-
// Todo: rename CSV_INCONSISTENT_RECORD_LENGTH to
5883-
// CSV_RECORD_INCONSISTENT_FIELDS_LENGTH
5884-
new CsvError('CSV_INCONSISTENT_RECORD_LENGTH', [
5882+
new CsvError('CSV_RECORD_INCONSISTENT_FIELDS_LENGTH', [
58855883
'Invalid Record Length:',
58865884
`expect ${this.state.expectedRecordLength},`,
58875885
`got ${recordLength} on line ${this.info.lines}`,

packages/csv-parse/dist/esm/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ export type CsvErrorCode =
253253
| 'CSV_MAX_RECORD_SIZE'
254254
| 'CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE'
255255
| 'CSV_QUOTE_NOT_CLOSED'
256-
| 'CSV_INCONSISTENT_RECORD_LENGTH'
256+
| 'CSV_RECORD_INCONSISTENT_FIELDS_LENGTH'
257257
| 'CSV_RECORD_INCONSISTENT_COLUMNS'
258258
| 'CSV_OPTION_COLUMNS_MISSING_NAME'
259259

packages/csv-parse/dist/esm/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5875,9 +5875,7 @@ class Parser extends Transform {
58755875
}
58765876
if(recordLength !== this.state.expectedRecordLength){
58775877
const err = columns === false ?
5878-
// Todo: rename CSV_INCONSISTENT_RECORD_LENGTH to
5879-
// CSV_RECORD_INCONSISTENT_FIELDS_LENGTH
5880-
new CsvError('CSV_INCONSISTENT_RECORD_LENGTH', [
5878+
new CsvError('CSV_RECORD_INCONSISTENT_FIELDS_LENGTH', [
58815879
'Invalid Record Length:',
58825880
`expect ${this.state.expectedRecordLength},`,
58835881
`got ${recordLength} on line ${this.info.lines}`,

packages/csv-parse/dist/esm/sync.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5875,9 +5875,7 @@ class Parser extends Transform {
58755875
}
58765876
if(recordLength !== this.state.expectedRecordLength){
58775877
const err = columns === false ?
5878-
// Todo: rename CSV_INCONSISTENT_RECORD_LENGTH to
5879-
// CSV_RECORD_INCONSISTENT_FIELDS_LENGTH
5880-
new CsvError('CSV_INCONSISTENT_RECORD_LENGTH', [
5878+
new CsvError('CSV_RECORD_INCONSISTENT_FIELDS_LENGTH', [
58815879
'Invalid Record Length:',
58825880
`expect ${this.state.expectedRecordLength},`,
58835881
`got ${recordLength} on line ${this.info.lines}`,

packages/csv-parse/dist/iife/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5878,9 +5878,7 @@ var csv_parse = (function (exports) {
58785878
}
58795879
if(recordLength !== this.state.expectedRecordLength){
58805880
const err = columns === false ?
5881-
// Todo: rename CSV_INCONSISTENT_RECORD_LENGTH to
5882-
// CSV_RECORD_INCONSISTENT_FIELDS_LENGTH
5883-
new CsvError('CSV_INCONSISTENT_RECORD_LENGTH', [
5881+
new CsvError('CSV_RECORD_INCONSISTENT_FIELDS_LENGTH', [
58845882
'Invalid Record Length:',
58855883
`expect ${this.state.expectedRecordLength},`,
58865884
`got ${recordLength} on line ${this.info.lines}`,

packages/csv-parse/dist/iife/sync.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5878,9 +5878,7 @@ var csv_parse_sync = (function (exports) {
58785878
}
58795879
if(recordLength !== this.state.expectedRecordLength){
58805880
const err = columns === false ?
5881-
// Todo: rename CSV_INCONSISTENT_RECORD_LENGTH to
5882-
// CSV_RECORD_INCONSISTENT_FIELDS_LENGTH
5883-
new CsvError('CSV_INCONSISTENT_RECORD_LENGTH', [
5881+
new CsvError('CSV_RECORD_INCONSISTENT_FIELDS_LENGTH', [
58845882
'Invalid Record Length:',
58855883
`expect ${this.state.expectedRecordLength},`,
58865884
`got ${recordLength} on line ${this.info.lines}`,

packages/csv-parse/dist/umd/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5881,9 +5881,7 @@
58815881
}
58825882
if(recordLength !== this.state.expectedRecordLength){
58835883
const err = columns === false ?
5884-
// Todo: rename CSV_INCONSISTENT_RECORD_LENGTH to
5885-
// CSV_RECORD_INCONSISTENT_FIELDS_LENGTH
5886-
new CsvError('CSV_INCONSISTENT_RECORD_LENGTH', [
5884+
new CsvError('CSV_RECORD_INCONSISTENT_FIELDS_LENGTH', [
58875885
'Invalid Record Length:',
58885886
`expect ${this.state.expectedRecordLength},`,
58895887
`got ${recordLength} on line ${this.info.lines}`,

0 commit comments

Comments
 (0)