From 8f476c388c9206c898d9ddac0eab04a1a7e0258f Mon Sep 17 00:00:00 2001 From: Mike Rodrigues Date: Wed, 20 Mar 2019 21:38:41 -0400 Subject: [PATCH 1/5] fix: push empty string if final value is empty instead of pushing comma. In #109, it was noted that if the final value of the CSV record was empty, then the JSON object's value for that final column would be ',' which was incorrect. This fixes that by checking if the field is empty and conditionally pushes an appropriate value. --- src/csv2json.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/csv2json.js b/src/csv2json.js index b2e05b5..68f0d40 100644 --- a/src/csv2json.js +++ b/src/csv2json.js @@ -95,7 +95,13 @@ const Csv2Json = function(options) { if (index === lastCharacterIndex) { // If we reached the end of the line, add the remaining value - splitLine.push(line.substring(stateVariables.startIndex)); + + splitLine.push( + // If we have an empty value, then add an empty string, otherwise add the last value + stateVariables.startIndex === index && character === options.delimiter.field + ? '' + : line.substring(stateVariables.startIndex) + ); } else if (character === options.delimiter.wrap && index === 0) { // If the line starts with a wrap delimiter stateVariables.insideWrapDelimiter = true; @@ -121,12 +127,17 @@ const Csv2Json = function(options) { // If we reached a field delimiter and are not inside the wrap delimiters (ie. *,*) charAfter !== options.delimiter.wrap && !stateVariables.insideWrapDelimiter && stateVariables.parsingValue) { + + // console.log('-----------------------'); + // If we reached a field delimiter and are not inside the wrap delimiters (ie. *,*) splitLine.push(line.substring(stateVariables.startIndex, index)); stateVariables.startIndex = index + 1; + // console.log(splitLine); } else if (character === options.delimiter.field && charBefore === options.delimiter.wrap && // If we reached a field delimiter, the previous character was a wrap delimiter, and the next character is not a wrap delimiter (ie. ",*) charAfter !== options.delimiter.wrap && !stateVariables.parsingValue) { + stateVariables.insideWrapDelimiter = false; stateVariables.parsingValue = true; stateVariables.startIndex = index + 1; From 96fdf0d3b831f83d1ba8980fc0959a4b35f4b2e0 Mon Sep 17 00:00:00 2001 From: Mike Rodrigues Date: Thu, 21 Mar 2019 23:36:32 -0400 Subject: [PATCH 2/5] fix: Add additional empty value if last character is a comma to add implied trailing value. * Since there's an implied trailing value if the last character in a line is a comma, we need to append an additional empty value to the splitLine array. Without that additional empty value, the splitLine array is essentially missing the data for the last value in the line since the line parser was previously not taking into account the implied trailing empty value. #109 --- src/csv2json.js | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/csv2json.js b/src/csv2json.js index 68f0d40..a489dda 100644 --- a/src/csv2json.js +++ b/src/csv2json.js @@ -97,46 +97,56 @@ const Csv2Json = function(options) { // If we reached the end of the line, add the remaining value splitLine.push( - // If we have an empty value, then add an empty string, otherwise add the last value + // If the start index is the current index and it's a comma, then the value being parsed is an empty value + // accordingly, add an empty string stateVariables.startIndex === index && character === options.delimiter.field ? '' + // Otherwise substring the line and add the retrieved value : line.substring(stateVariables.startIndex) ); + + // If the last character is a comma, then there's still technically one field value (trailing the comma) + // left in the row, which happens to be empty, so push an extra empty value + if (character === options.delimiter.field) { + splitLine.push(''); + } } else if (character === options.delimiter.wrap && index === 0) { - // If the line starts with a wrap delimiter + // If the line starts with a wrap delimiter (ie. "*) + stateVariables.insideWrapDelimiter = true; stateVariables.parsingValue = true; stateVariables.startIndex = index; } else if (character === options.delimiter.wrap && charAfter === options.delimiter.field) { // If we reached a wrap delimiter with a field delimiter after it (ie. *",) + splitLine.push(line.substring(stateVariables.startIndex, index + 1)); stateVariables.startIndex = index + 2; // next value starts after the field delimiter stateVariables.insideWrapDelimiter = false; stateVariables.parsingValue = false; - } else if (character === options.delimiter.wrap && charBefore === options.delimiter.field && !stateVariables.insideWrapDelimiter && stateVariables.parsingValue) { + } else if (character === options.delimiter.wrap && charBefore === options.delimiter.field && + !stateVariables.insideWrapDelimiter && stateVariables.parsingValue) { // If we reached a wrap delimiter with a field delimiter after it (ie. ,"*) + splitLine.push(line.substring(stateVariables.startIndex, index - 1)); stateVariables.insideWrapDelimiter = true; stateVariables.parsingValue = true; stateVariables.startIndex = index; } else if (character === options.delimiter.wrap && charAfter === options.delimiter.wrap) { - // If we run into an escaped quote + // If we run into an escaped quote (ie. "") skip past the second quote + index += 2; continue; } else if (character === options.delimiter.field && charBefore !== options.delimiter.wrap && - // If we reached a field delimiter and are not inside the wrap delimiters (ie. *,*) charAfter !== options.delimiter.wrap && !stateVariables.insideWrapDelimiter && stateVariables.parsingValue) { - - // console.log('-----------------------'); - // If we reached a field delimiter and are not inside the wrap delimiters (ie. *,*) + splitLine.push(line.substring(stateVariables.startIndex, index)); stateVariables.startIndex = index + 1; - // console.log(splitLine); } else if (character === options.delimiter.field && charBefore === options.delimiter.wrap && - // If we reached a field delimiter, the previous character was a wrap delimiter, and the next character is not a wrap delimiter (ie. ",*) charAfter !== options.delimiter.wrap && !stateVariables.parsingValue) { + // If we reached a field delimiter, the previous character was a wrap delimiter, and the + // next character is not a wrap delimiter (ie. ",*) stateVariables.insideWrapDelimiter = false; stateVariables.parsingValue = true; From 174a4edfd65c54d7361797e953cbae33a85254dc Mon Sep 17 00:00:00 2001 From: Mike Rodrigues Date: Fri, 22 Mar 2019 21:48:46 -0400 Subject: [PATCH 3/5] fix: Adjust parsing of last value to not capture field delimiter. * When the last character is a field delimiter, the code was capturing that delimiter value in the second to last value. This adjusts the code such that the field delimiter will not be captured in the second to last value. This issue was discovered while testing the fixes for #109. --- src/csv2json.js | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/csv2json.js b/src/csv2json.js index a489dda..ad35ed0 100644 --- a/src/csv2json.js +++ b/src/csv2json.js @@ -93,23 +93,27 @@ const Csv2Json = function(options) { // Next character charAfter = index < lastCharacterIndex ? line[index + 1] : ''; - if (index === lastCharacterIndex) { - // If we reached the end of the line, add the remaining value + if (index === lastCharacterIndex && character === options.delimiter.field) { + // If we reached the end of the line and the current character is a field delimiter... + // Push the value for the field that we were parsing splitLine.push( - // If the start index is the current index and it's a comma, then the value being parsed is an empty value - // accordingly, add an empty string - stateVariables.startIndex === index && character === options.delimiter.field + // If the start index is the current index (and since the character is a comma), + // then the value being parsed is an empty value accordingly, add an empty string + stateVariables.startIndex === index ? '' - // Otherwise substring the line and add the retrieved value - : line.substring(stateVariables.startIndex) + // Otherwise there is a valid value, but we do not want to include the current character (field delimiter) + : line.substring(stateVariables.startIndex, index) ); - // If the last character is a comma, then there's still technically one field value (trailing the comma) - // left in the row, which happens to be empty, so push an extra empty value - if (character === options.delimiter.field) { - splitLine.push(''); - } + // Since the last character is a comma, there's still an additional implied field value trailing the comma. + // Since this value is empty, we push an extra empty value + splitLine.push(''); + } else if (index === lastCharacterIndex) { + // Otherwise if we reached the end of the line (and current character is not a field delimiter) + + // Retrieve the remaining value and add it to the split line list of values + splitLine.push(line.substring(stateVariables.startIndex)); } else if (character === options.delimiter.wrap && index === 0) { // If the line starts with a wrap delimiter (ie. "*) From 98fb01e3bc44810f7238acd94a5cb34603e49811 Mon Sep 17 00:00:00 2001 From: Mike Rodrigues Date: Fri, 22 Mar 2019 22:38:29 -0400 Subject: [PATCH 4/5] test: add tests for record empty last value scenarios * Adds tests for #109. --- README.md | 6 +++--- package.json | 2 +- test/config/testCsvFilesList.js | 3 ++- test/config/testJsonFilesList.js | 3 ++- test/csv2json.js | 9 +++++++++ test/data/csv/csvEmptyLastValue.csv | 4 ++++ test/data/json/csvEmptyLastValue.json | 26 ++++++++++++++++++++++++++ test/json2csv.js | 8 ++++++++ 8 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 test/data/csv/csvEmptyLastValue.csv create mode 100644 test/data/json/csvEmptyLastValue.json diff --git a/README.md b/README.md index d6b08d4..8975394 100755 --- a/README.md +++ b/README.md @@ -176,10 +176,10 @@ $ npm run coverage Current Coverage is: ``` -Statements : 100% ( 272/272 ) -Branches : 100% ( 143/143 ) +Statements : 100% ( 275/275 ) +Branches : 100% ( 149/149 ) Functions : 100% ( 49/49 ) -Lines : 100% ( 266/266 ) +Lines : 100% ( 269/269 ) ``` ## Frequently Asked Questions (FAQ) diff --git a/package.json b/package.json index f36f7f1..3d1c51c 100755 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "types": "./src/converter.d.ts", "scripts": { "test": "mocha test/tests.js", - "coverage": "istanbul cover mocha -- -R spec", + "coverage": "istanbul cover _mocha -- -R spec", "lint": "npm run lint:eslint && npm run lint:tslint", "lint:eslint": "eslint src bin test", "lint:tslint": "tslint -c tslint.json 'src/**/*.ts'" diff --git a/test/config/testCsvFilesList.js b/test/config/testCsvFilesList.js index 2f387fc..81db5d7 100644 --- a/test/config/testCsvFilesList.js +++ b/test/config/testCsvFilesList.js @@ -26,7 +26,8 @@ const fs = require('fs'), {key: 'extraLine', file: '../data/csv/extraLine.csv'}, {key: 'noHeader', file: '../data/csv/noHeader.csv'}, {key: 'sortedHeader', file: '../data/csv/sortedHeader.csv'}, - {key: 'emptyFieldValues', file: '../data/csv/emptyFieldValues.csv'} + {key: 'emptyFieldValues', file: '../data/csv/emptyFieldValues.csv'}, + {key: 'csvEmptyLastValue', file: '../data/csv/csvEmptyLastValue.csv'} ]; function readCsvFile(filePath) { diff --git a/test/config/testJsonFilesList.js b/test/config/testJsonFilesList.js index 79ce66a..6a2490e 100644 --- a/test/config/testJsonFilesList.js +++ b/test/config/testJsonFilesList.js @@ -19,5 +19,6 @@ module.exports = { trimHeader: require('../data/json/trimHeader'), trimmedHeader: require('../data/json/trimmedHeader'), specifiedKeys: require('../data/json/specifiedKeys'), - emptyFieldValues: require('../data/json/emptyFieldValues') + emptyFieldValues: require('../data/json/emptyFieldValues'), + csvEmptyLastValue: require('../data/json/csvEmptyLastValue') }; diff --git a/test/csv2json.js b/test/csv2json.js index 96297d1..88a5b5f 100644 --- a/test/csv2json.js +++ b/test/csv2json.js @@ -137,6 +137,15 @@ function runTests(jsonTestData, csvTestData) { done(); }); }); + + // Test case for #109 + it('should properly handle the cases involving an empty field value', (done) => { + converter.csv2json(csvTestData.csvEmptyLastValue, (err, json) => { + if (err) done(err); + json.should.deepEqual(jsonTestData.csvEmptyLastValue); + done(); + }); + }); }); describe('Error Handling', () => { diff --git a/test/data/csv/csvEmptyLastValue.csv b/test/data/csv/csvEmptyLastValue.csv new file mode 100644 index 0000000..ebd559a --- /dev/null +++ b/test/data/csv/csvEmptyLastValue.csv @@ -0,0 +1,4 @@ +Name,Category,On Sale,On Closeout,Outsourced,Certification Required +Installation,Service,X,,, +"Wireless ""Wi-Fi"" Configuration",Service,X,,X, +New Phone Setup,Service,X,X,X,X \ No newline at end of file diff --git a/test/data/json/csvEmptyLastValue.json b/test/data/json/csvEmptyLastValue.json new file mode 100644 index 0000000..39f50db --- /dev/null +++ b/test/data/json/csvEmptyLastValue.json @@ -0,0 +1,26 @@ +[ + { + "Name": "Installation", + "Category": "Service", + "On Sale": "X", + "On Closeout": "", + "Outsourced": "", + "Certification Required": "" + }, + { + "Name": "Wireless \"Wi-Fi\" Configuration", + "Category": "Service", + "On Sale": "X", + "On Closeout": "", + "Outsourced": "X", + "Certification Required": "" + }, + { + "Name": "New Phone Setup", + "Category": "Service", + "On Sale": "X", + "On Closeout": "X", + "Outsourced": "X", + "Certification Required": "X" + } +] diff --git a/test/json2csv.js b/test/json2csv.js index 3ee55e7..ac57ad4 100644 --- a/test/json2csv.js +++ b/test/json2csv.js @@ -129,6 +129,14 @@ function runTests(jsonTestData, csvTestData) { done(); }); }); + + it('should properly convert the cases involving an empty field value in the csv', (done) => { + converter.json2csv(jsonTestData.csvEmptyLastValue, (err, csv) => { + if (err) done(err); + csv.should.equal(csvTestData.csvEmptyLastValue); + done(); + }); + }); }); describe('Error Handling', () => { From b68556b488658b0016abd69bb4d37cd36bda51fc Mon Sep 17 00:00:00 2001 From: Mike Rodrigues Date: Fri, 22 Mar 2019 22:54:32 -0400 Subject: [PATCH 5/5] chore(release): 3.4.2 --- package-lock.json | 362 +++++++++++++++++++++++++-------------------- package.json | 6 +- src/converter.d.ts | 4 +- 3 files changed, 206 insertions(+), 166 deletions(-) diff --git a/package-lock.json b/package-lock.json index 78eba58..a4243a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "json-2-csv", - "version": "3.4.1", + "version": "3.4.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -31,9 +31,9 @@ "dev": true }, "acorn": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.4.tgz", - "integrity": "sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", "dev": true }, "acorn-jsx": { @@ -43,9 +43,9 @@ "dev": true }, "ajv": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.2.tgz", - "integrity": "sha512-FBHEW6Jf5TB9MGBgUUA9XHkTbjXYfAUjY43ACMfmdMRHniyoMHjHjzD50OK8LGDWQwp4rWEsIq5kEqq7rvIM1g==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", @@ -62,9 +62,9 @@ "optional": true }, "ansi-escapes": { - "version": "3.1.0", - "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", "dev": true }, "ansi-regex": { @@ -190,19 +190,10 @@ "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", "dev": true }, - "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", - "dev": true, - "requires": { - "callsites": "^0.2.0" - } - }, "callsites": { - "version": "0.2.0", - "resolved": "http://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", + "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==", "dev": true }, "chalk": { @@ -239,12 +230,6 @@ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, - "circular-json": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", - "dev": true - }, "cli-cursor": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", @@ -301,12 +286,12 @@ } }, "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, "deeks": { @@ -335,14 +320,20 @@ "integrity": "sha512-OUXGMMGqZYtNcvsZmJ8014XsYdMlR75qrS1PPGLX3/WFUTBcaU8TkNK1rPjqb1UNvPpbaq7EL5kk87KP0ZkW9A==" }, "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "requires": { "esutils": "^2.0.2" } }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -363,59 +354,49 @@ } }, "eslint": { - "version": "5.11.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.11.1.tgz", - "integrity": "sha512-gOKhM8JwlFOc2acbOrkYR05NW8M6DCMSvfcJiBB5NDxRE1gv8kbvxKaC9u69e6ZGEMWXcswA/7eKR229cEIpvg==", + "version": "5.15.3", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.15.3.tgz", + "integrity": "sha512-vMGi0PjCHSokZxE0NLp2VneGw5sio7SSiDNgIUn2tC0XkWJRNOIoHIg3CliLVfXnJsiHxGAYrkw0PieAu8+KYQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "ajv": "^6.5.3", + "ajv": "^6.9.1", "chalk": "^2.1.0", "cross-spawn": "^6.0.5", "debug": "^4.0.1", - "doctrine": "^2.1.0", - "eslint-scope": "^4.0.0", + "doctrine": "^3.0.0", + "eslint-scope": "^4.0.3", "eslint-utils": "^1.3.1", "eslint-visitor-keys": "^1.0.0", - "espree": "^5.0.0", + "espree": "^5.0.1", "esquery": "^1.0.1", "esutils": "^2.0.2", - "file-entry-cache": "^2.0.0", + "file-entry-cache": "^5.0.1", "functional-red-black-tree": "^1.0.1", "glob": "^7.1.2", "globals": "^11.7.0", "ignore": "^4.0.6", + "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^6.1.0", + "inquirer": "^6.2.2", "js-yaml": "^3.12.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.3.0", - "lodash": "^4.17.5", + "lodash": "^4.17.11", "minimatch": "^3.0.4", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", "optionator": "^0.8.2", "path-is-inside": "^1.0.2", - "pluralize": "^7.0.0", "progress": "^2.0.0", "regexpp": "^2.0.1", - "require-uncached": "^1.0.3", "semver": "^5.5.1", "strip-ansi": "^4.0.0", "strip-json-comments": "^2.0.1", - "table": "^5.0.2", + "table": "^5.2.3", "text-table": "^0.2.0" }, "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, "glob": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", @@ -429,19 +410,13 @@ "once": "^1.3.0", "path-is-absolute": "^1.0.0" } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true } } }, "eslint-scope": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", - "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", "dev": true, "requires": { "esrecurse": "^4.1.0", @@ -469,12 +444,12 @@ "dev": true }, "espree": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.0.tgz", - "integrity": "sha512-1MpUfwsdS9MMoN7ZXqAr9e9UKdVHDcvrJpyx7mm1WuQlx/ygErEQBzgi5Nh5qBHIoYweprhtMkTCb9GhcAIcsA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", "dev": true, "requires": { - "acorn": "^6.0.2", + "acorn": "^6.0.7", "acorn-jsx": "^5.0.0", "eslint-visitor-keys": "^1.0.0" } @@ -570,27 +545,31 @@ } }, "file-entry-cache": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", - "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", "dev": true, "requires": { - "flat-cache": "^1.2.1", - "object-assign": "^4.0.1" + "flat-cache": "^2.0.1" } }, "flat-cache": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.4.tgz", - "integrity": "sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", "dev": true, "requires": { - "circular-json": "^0.3.1", - "graceful-fs": "^4.1.2", - "rimraf": "~2.6.2", - "write": "^0.2.1" + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" } }, + "flatted": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", + "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==", + "dev": true + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -617,15 +596,9 @@ } }, "globals": { - "version": "11.9.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.9.0.tgz", - "integrity": "sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg==", - "dev": true - }, - "graceful-fs": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", + "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==", "dev": true }, "growl": { @@ -707,6 +680,16 @@ "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, + "import-fresh": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", + "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -730,39 +713,65 @@ "dev": true }, "inquirer": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.1.tgz", - "integrity": "sha512-088kl3DRT2dLU5riVMKKr1DlImd6X7smDhpXUCkJDCKvTEJeRiXh0G132HG9u5a+6Ylw9plFRY7RuTnwohYSpg==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.2.tgz", + "integrity": "sha512-Z2rREiXA6cHRR9KBOarR3WuLlFzlIfAEIiB45ll5SSadMg7WqOh1MKEjjndfuH5ewXdixWCxqnVfGOQzPeiztA==", "dev": true, "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", "cli-cursor": "^2.1.0", "cli-width": "^2.0.0", - "external-editor": "^3.0.0", + "external-editor": "^3.0.3", "figures": "^2.0.0", - "lodash": "^4.17.10", + "lodash": "^4.17.11", "mute-stream": "0.0.7", "run-async": "^2.2.0", - "rxjs": "^6.1.0", + "rxjs": "^6.4.0", "string-width": "^2.1.0", "strip-ansi": "^5.0.0", "through": "^2.3.6" }, "dependencies": { "ansi-regex": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", - "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "strip-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.0.0.tgz", - "integrity": "sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "ansi-regex": "^4.0.0" + "ansi-regex": "^4.1.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" } } } @@ -814,9 +823,9 @@ "dev": true }, "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz", + "integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -918,10 +927,19 @@ "dependencies": { "commander": { "version": "2.15.1", - "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", @@ -942,6 +960,12 @@ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, "supports-color": { "version": "5.4.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", @@ -954,9 +978,9 @@ } }, "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true }, "mute-stream": { @@ -986,12 +1010,6 @@ "abbrev": "1" } }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1048,6 +1066,15 @@ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, + "parent-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.0.tgz", + "integrity": "sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "path-is-absolute": { "version": "1.0.1", "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -1072,12 +1099,6 @@ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, - "pluralize": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", - "dev": true - }, "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", @@ -1102,16 +1123,6 @@ "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", "dev": true }, - "require-uncached": { - "version": "1.0.3", - "resolved": "http://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", - "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", - "dev": true, - "requires": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" - } - }, "resolve": { "version": "1.1.7", "resolved": "http://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", @@ -1119,9 +1130,9 @@ "dev": true }, "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, "restore-cursor": { @@ -1135,12 +1146,12 @@ } }, "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" }, "dependencies": { "glob": { @@ -1169,9 +1180,9 @@ } }, "rxjs": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", - "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", + "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -1265,9 +1276,9 @@ "dev": true }, "slice-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.0.0.tgz", - "integrity": "sha512-4j2WTWjp3GsZ+AOagyzVbzp4vWGtZ0hEZ/gDY/uTvm6MTxUfTUIsnMIFb1bn8o0RuXiqUw15H1bue8f22Vw2oQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", "dev": true, "requires": { "ansi-styles": "^3.2.0", @@ -1326,15 +1337,43 @@ } }, "table": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/table/-/table-5.1.1.tgz", - "integrity": "sha512-NUjapYb/qd4PeFW03HnAuOJ7OMcBkJlqeClWxeNlQ0lXGSb52oZXGzkO0/I0ARegQ2eUT1g2VDJH0eUxDRcHmw==", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/table/-/table-5.2.3.tgz", + "integrity": "sha512-N2RsDAMvDLvYwFcwbPyF3VmVSSkuF+G1e+8inhBLtHpvwXGw4QRPEZhihQNeEN0i1up6/f6ObCJXNdlRG3YVyQ==", "dev": true, "requires": { - "ajv": "^6.6.1", + "ajv": "^6.9.1", "lodash": "^4.17.11", - "slice-ansi": "2.0.0", - "string-width": "^2.1.1" + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } } }, "text-table": { @@ -1365,9 +1404,9 @@ "dev": true }, "tslint": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.12.1.tgz", - "integrity": "sha512-sfodBHOucFg6egff8d1BvuofoOQ/nOeYNfbp7LDlKBcLNrL3lmS5zoiDGyOMdT7YsEXAwWpTdAHwOGOc8eRZAw==", + "version": "5.14.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.14.0.tgz", + "integrity": "sha512-IUla/ieHVnB8Le7LdQFRGlVJid2T/gaJe5VkjzRVSRR6pA2ODYrnfR1hmxi+5+au9l50jBwpbBL34txgv4NnTQ==", "dev": true, "requires": { "babel-code-frame": "^6.22.0", @@ -1378,10 +1417,11 @@ "glob": "^7.1.1", "js-yaml": "^3.7.0", "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", "resolve": "^1.3.2", "semver": "^5.3.0", "tslib": "^1.8.0", - "tsutils": "^2.27.2" + "tsutils": "^2.29.0" }, "dependencies": { "glob": { @@ -1496,9 +1536,9 @@ "dev": true }, "write": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", - "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", "dev": true, "requires": { "mkdirp": "^0.5.1" diff --git a/package.json b/package.json index 3d1c51c..e1b885d 100755 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ }, "name": "json-2-csv", "description": "A JSON to CSV and CSV to JSON converter that natively supports sub-documents and auto-generates the CSV heading.", - "version": "3.4.1", + "version": "3.4.2", "repository": { "type": "git", "url": "https://github.com/mrodrig/json-2-csv.git" @@ -47,11 +47,11 @@ }, "devDependencies": { "commander": "2.19.0", - "eslint": "5.11.1", + "eslint": "5.15.3", "istanbul": "0.4.5", "mocha": "5.2.0", "should": "13.2.3", - "tslint": "5.12.1", + "tslint": "5.14.0", "typescript": "3.3.3" }, "engines": { diff --git a/src/converter.d.ts b/src/converter.d.ts index c7c52fe..e17d57b 100644 --- a/src/converter.d.ts +++ b/src/converter.d.ts @@ -74,6 +74,6 @@ export function json2csv(data: object[], export function json2csvAsync(data: object[], options?: IFullOptions): Promise; export function csv2json(csv: string, - callback: (err?: Error, data?: Array) => void, options?: ISharedOptions): void; + callback: (err?: Error, data?: unknown[]) => void, options?: ISharedOptions): void; -export function csv2jsonAsync(csv: string, options?: ISharedOptions): Promise>; +export function csv2jsonAsync(csv: string, options?: ISharedOptions): Promise;