Skip to content

Commit fb391c9

Browse files
committed
refactor(csv-parse)!: rename RECORD_DONT_MATCH_COLUMNS_LENGTH
1 parent 0376af7 commit fb391c9

17 files changed

Lines changed: 22 additions & 41 deletions

packages/csv-parse/ROADMAP.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ We invite you to join and contribute but create an issue before engaging any wor
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
1212
* `relax_column_count`: rename INCONSISTENT_RECORD_LENGTH to RECORD_INCONSISTENT_FIELDS_LENGTH (easy)
13-
* `relax_column_count`: rename RECORD_DONT_MATCH_COLUMNS_LENGTH to RECORD_INCONSISTENT_COLUMNS (easy)
1413
* `info`: remove the `parser.info` object and move its properties to `state`
1514
* `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
@@ -5889,9 +5889,7 @@ class Parser extends Transform {
58895889
record: record,
58905890
})
58915891
:
5892-
// Todo: rename CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH to
5893-
// CSV_RECORD_INCONSISTENT_COLUMNS
5894-
new CsvError('CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH', [
5892+
new CsvError('CSV_RECORD_INCONSISTENT_COLUMNS', [
58955893
'Invalid Record Length:',
58965894
`columns length is ${columns.length},`, // rename columns
58975895
`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
@@ -254,7 +254,7 @@ export type CsvErrorCode =
254254
| 'CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE'
255255
| 'CSV_QUOTE_NOT_CLOSED'
256256
| 'CSV_INCONSISTENT_RECORD_LENGTH'
257-
| 'CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH'
257+
| 'CSV_RECORD_INCONSISTENT_COLUMNS'
258258
| 'CSV_OPTION_COLUMNS_MISSING_NAME'
259259

260260
export class CsvError extends Error {

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5889,9 +5889,7 @@ class Parser extends Transform {
58895889
record: record,
58905890
})
58915891
:
5892-
// Todo: rename CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH to
5893-
// CSV_RECORD_INCONSISTENT_COLUMNS
5894-
new CsvError('CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH', [
5892+
new CsvError('CSV_RECORD_INCONSISTENT_COLUMNS', [
58955893
'Invalid Record Length:',
58965894
`columns length is ${columns.length},`, // rename columns
58975895
`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
@@ -254,7 +254,7 @@ export type CsvErrorCode =
254254
| 'CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE'
255255
| 'CSV_QUOTE_NOT_CLOSED'
256256
| 'CSV_INCONSISTENT_RECORD_LENGTH'
257-
| 'CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH'
257+
| 'CSV_RECORD_INCONSISTENT_COLUMNS'
258258
| 'CSV_OPTION_COLUMNS_MISSING_NAME'
259259

260260
export class CsvError extends Error {

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5885,9 +5885,7 @@ class Parser extends Transform {
58855885
record: record,
58865886
})
58875887
:
5888-
// Todo: rename CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH to
5889-
// CSV_RECORD_INCONSISTENT_COLUMNS
5890-
new CsvError('CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH', [
5888+
new CsvError('CSV_RECORD_INCONSISTENT_COLUMNS', [
58915889
'Invalid Record Length:',
58925890
`columns length is ${columns.length},`, // rename columns
58935891
`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
@@ -5885,9 +5885,7 @@ class Parser extends Transform {
58855885
record: record,
58865886
})
58875887
:
5888-
// Todo: rename CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH to
5889-
// CSV_RECORD_INCONSISTENT_COLUMNS
5890-
new CsvError('CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH', [
5888+
new CsvError('CSV_RECORD_INCONSISTENT_COLUMNS', [
58915889
'Invalid Record Length:',
58925890
`columns length is ${columns.length},`, // rename columns
58935891
`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
@@ -5888,9 +5888,7 @@ var csv_parse = (function (exports) {
58885888
record: record,
58895889
})
58905890
:
5891-
// Todo: rename CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH to
5892-
// CSV_RECORD_INCONSISTENT_COLUMNS
5893-
new CsvError('CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH', [
5891+
new CsvError('CSV_RECORD_INCONSISTENT_COLUMNS', [
58945892
'Invalid Record Length:',
58955893
`columns length is ${columns.length},`, // rename columns
58965894
`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
@@ -5888,9 +5888,7 @@ var csv_parse_sync = (function (exports) {
58885888
record: record,
58895889
})
58905890
:
5891-
// Todo: rename CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH to
5892-
// CSV_RECORD_INCONSISTENT_COLUMNS
5893-
new CsvError('CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH', [
5891+
new CsvError('CSV_RECORD_INCONSISTENT_COLUMNS', [
58945892
'Invalid Record Length:',
58955893
`columns length is ${columns.length},`, // rename columns
58965894
`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
@@ -5891,9 +5891,7 @@
58915891
record: record,
58925892
})
58935893
:
5894-
// Todo: rename CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH to
5895-
// CSV_RECORD_INCONSISTENT_COLUMNS
5896-
new CsvError('CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH', [
5894+
new CsvError('CSV_RECORD_INCONSISTENT_COLUMNS', [
58975895
'Invalid Record Length:',
58985896
`columns length is ${columns.length},`, // rename columns
58995897
`got ${recordLength} on line ${this.info.lines}`,

0 commit comments

Comments
 (0)