diff --git a/package-lock.json b/package-lock.json index ebf62b92..3183d3a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2324,30 +2324,30 @@ } }, "csv": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/csv/-/csv-6.3.1.tgz", - "integrity": "sha512-ZTcWLvr0Ux0IQDz/QzhCToBVIZtF5GDrStMt9I8mRSk0jPnfF9OeYKz0EZTspaAEOK6hf515ag97nKmwoyU8ZA==", + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/csv/-/csv-6.3.3.tgz", + "integrity": "sha512-TuOM1iZgdDiB6IuwJA8oqeu7g61d9CU9EQJGzCJ1AE03amPSh/UK5BMjAVx+qZUBb/1XEo133WHzWSwifa6Yqw==", "requires": { - "csv-generate": "^4.2.6", - "csv-parse": "^5.4.0", - "csv-stringify": "^6.4.0", - "stream-transform": "^3.2.6" + "csv-generate": "^4.2.8", + "csv-parse": "^5.5.0", + "csv-stringify": "^6.4.2", + "stream-transform": "^3.2.8" } }, "csv-generate": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/csv-generate/-/csv-generate-4.2.6.tgz", - "integrity": "sha512-VtnYqhWLcsUocA346ewFOk+rrqcoT663j11vXzD2uelXq9WguQ3QzDeVD8ISso7hhVtkDSHcWl9psdemeiEHDA==" + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/csv-generate/-/csv-generate-4.2.8.tgz", + "integrity": "sha512-qQ5CUs4I58kfo90EDBKjdp0SpJ3xWnN1Xk1lZ1ITvfvMtNRf+jrEP8tNPeEPiI9xJJ6Bd/km/1hMjyYlTpY42g==" }, "csv-parse": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-5.4.0.tgz", - "integrity": "sha512-JiQosUWiOFgp4hQn0an+SBoV9IKdqzhROM0iiN4LB7UpfJBlsSJlWl9nq4zGgxgMAzHJ6V4t29VAVD+3+2NJAg==" + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-5.5.0.tgz", + "integrity": "sha512-RxruSK3M4XgzcD7Trm2wEN+SJ26ChIb903+IWxNOcB5q4jT2Cs+hFr6QP39J05EohshRFEvyzEBoZ/466S2sbw==" }, "csv-stringify": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/csv-stringify/-/csv-stringify-6.4.0.tgz", - "integrity": "sha512-HQsw0QXiN5fdlO+R8/JzCZnR3Fqp8E87YVnhHlaPtNGJjt6ffbV0LpOkieIb1x6V1+xt878IYq77SpXHWAqKkA==" + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/csv-stringify/-/csv-stringify-6.4.2.tgz", + "integrity": "sha512-DXIdnnCUQYjDKTu6TgCSzRDiAuLxDjhl4ErFP9FGMF3wzBGOVMg9bZTLaUcYtuvhXgNbeXPKeaRfpgyqE4xySw==" }, "dargs": { "version": "7.0.0", @@ -8337,7 +8337,7 @@ "stdout-stderr": { "version": "0.1.9", "resolved": "https://registry.npmjs.org/stdout-stderr/-/stdout-stderr-0.1.9.tgz", - "integrity": "sha512-0qCmEREjlcvMHMcxCQ0iF2uuEXub2ixPh2s//jMu+v/BoqTaJLhLHjwKFkCPmQfvZMgPwXW7tXPdRI0AMJ/Vmg==", + "integrity": "sha1-m0juBO/5Ve4Hd24nEl1VJNnQL1c=", "dev": true, "requires": { "debug": "^3.1.0", @@ -8371,9 +8371,9 @@ } }, "stream-transform": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/stream-transform/-/stream-transform-3.2.6.tgz", - "integrity": "sha512-/pyOvaCQFqYTmrFhmMbnAEVo3SsTx1H39eUVPOtYeAgbEUc+rDo7GoP8LbHJgU83mKtzJe/7Nq/ipaAnUOHgJQ==" + "version": "3.2.8", + "resolved": "https://registry.npmjs.org/stream-transform/-/stream-transform-3.2.8.tgz", + "integrity": "sha512-NUx0mBuI63KbNEEh9Yj0OzKB7iMOSTpkuODM2G7By+TTVihEIJ0cYp5X+pq/TdJRlsznt6CYR8HqxexyC6/bTw==" }, "string-width": { "version": "2.1.1", diff --git a/package.json b/package.json index ef85b646..59854452 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "box-node-sdk": "^3.1.1", "chalk": "^2.4.1", "cli-progress": "^2.1.0", - "csv": "^6.3.1", + "csv": "^6.3.3", "date-fns": "^1.29.0", "debug": "^4.1.0", "express": "^4.17.1", diff --git a/src/box-command.js b/src/box-command.js index dad48144..053e91f1 100644 --- a/src/box-command.js +++ b/src/box-command.js @@ -494,6 +494,7 @@ class BoxCommand extends Command { */ async _handleCsvFile(fileContents, fieldMapping) { let parsedData = await csvParse(fileContents, { + bom: true, delimiter: ',', cast(value, context) { if (value.length === 0) {