diff --git a/CHANGELOG.md b/CHANGELOG.md index d77556c..2d68697 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [6.1.3](https://github.com/juanjodiaz/json2csv/compare/v6.1.2...v6.1.3) (2023-04-02) + + +### Bug Fixes + +* add AsyncParser to whatwg export ([81ada93](https://github.com/juanjodiaz/json2csv/commit/81ada93184ed96bbc43d95fb2cfb6aa545b0e017)) +* add transform dependency to CLI ([e06961c](https://github.com/juanjodiaz/json2csv/commit/e06961c4308ead917094e8bd6f29357eb21901b4)) + ### [6.1.2](https://github.com/juanjodiaz/json2csv/compare/v6.1.1...v6.1.2) (2022-11-14) diff --git a/build-cdn.js b/build-cdn.js index bca2e5f..d0b8134 100644 --- a/build-cdn.js +++ b/build-cdn.js @@ -27,7 +27,7 @@ const replaceDependenciesByJsdelivr = { }); const dependencies = { - '@streamparser/json': 'https://cdn.jsdelivr.net/npm/@streamparser/json@0.0.9/dist/mjs/index.mjs', + '@streamparser/json': 'https://cdn.jsdelivr.net/npm/@streamparser/json@0.0.12/dist/mjs/index.mjs', 'lodash.get': 'https://cdn.jsdelivr.net/gh/lodash/lodash@master/get.js' }; diff --git a/dist/cdn/plainjs/StreamParser.js b/dist/cdn/plainjs/StreamParser.js index 4ac2429..e14c1d9 100644 --- a/dist/cdn/plainjs/StreamParser.js +++ b/dist/cdn/plainjs/StreamParser.js @@ -1,5 +1,5 @@ // packages/plainjs/src/StreamParser.js -import { Tokenizer, TokenParser, TokenType } from "https://cdn.jsdelivr.net/npm/@streamparser/json@0.0.9/dist/mjs/index.mjs"; +import { Tokenizer, TokenParser, TokenType } from "https://cdn.jsdelivr.net/npm/@streamparser/json@0.0.12/dist/mjs/index.mjs"; import JSON2CSVBase from "./BaseParser.js"; var JSON2CSVStreamParser = class extends JSON2CSVBase { constructor(opts, asyncOpts) { @@ -37,7 +37,7 @@ var JSON2CSVStreamParser = class extends JSON2CSVBase { if (!this.tokenParser.isEnded) this.tokenParser.end(); }; - tokenParser.onValue = (value) => this.pushLine(value); + tokenParser.onValue = ({ value }) => this.pushLine(value); tokenParser.onError = (err) => this.onError(err); tokenParser.onEnd = () => { this.pushHeaderIfNotWritten(); @@ -56,7 +56,7 @@ var JSON2CSVStreamParser = class extends JSON2CSVBase { } getBinaryModeTokenizer(asyncOpts) { const tokenizer = new Tokenizer(asyncOpts); - tokenizer.onToken = (token, value, offset) => { + tokenizer.onToken = ({ token, value, offset }) => { if (token === TokenType.LEFT_BRACKET) { this.tokenParser = new TokenParser({ paths: ["$.*"], @@ -69,7 +69,7 @@ var JSON2CSVStreamParser = class extends JSON2CSVBase { return; } this.configureCallbacks(tokenizer, this.tokenParser); - this.tokenParser.write(token, value, offset); + this.tokenParser.write({ token, value, offset }); }; tokenizer.onError = () => this.onError(new Error("Data should be a JSON object or array")); tokenizer.onEnd = () => { diff --git a/docs/advanced-options/formatters.md b/docs/advanced-options/formatters.md index 7b58448..898641d 100644 --- a/docs/advanced-options/formatters.md +++ b/docs/advanced-options/formatters.md @@ -81,7 +81,7 @@ You can also select a specific version: ```html ``` diff --git a/docs/advanced-options/transforms.md b/docs/advanced-options/transforms.md index 793429a..f4b8338 100644 --- a/docs/advanced-options/transforms.md +++ b/docs/advanced-options/transforms.md @@ -53,7 +53,7 @@ You can also select a specific version: ```html ``` diff --git a/docs/index.html b/docs/index.html index 97621f2..a780ace 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,9 +170,9 @@ diff --git a/docs/others/CHANGELOG.md b/docs/others/CHANGELOG.md index d77556c..2d68697 100644 --- a/docs/others/CHANGELOG.md +++ b/docs/others/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [6.1.3](https://github.com/juanjodiaz/json2csv/compare/v6.1.2...v6.1.3) (2023-04-02) + + +### Bug Fixes + +* add AsyncParser to whatwg export ([81ada93](https://github.com/juanjodiaz/json2csv/commit/81ada93184ed96bbc43d95fb2cfb6aa545b0e017)) +* add transform dependency to CLI ([e06961c](https://github.com/juanjodiaz/json2csv/commit/e06961c4308ead917094e8bd6f29357eb21901b4)) + ### [6.1.2](https://github.com/juanjodiaz/json2csv/compare/v6.1.1...v6.1.2) (2022-11-14) diff --git a/docs/parsers/parser.md b/docs/parsers/parser.md index cd7ac15..1de215c 100644 --- a/docs/parsers/parser.md +++ b/docs/parsers/parser.md @@ -42,7 +42,7 @@ You can also select a specific version: ```html ``` diff --git a/docs/parsers/stream-parser.md b/docs/parsers/stream-parser.md index a2e742a..95559ec 100644 --- a/docs/parsers/stream-parser.md +++ b/docs/parsers/stream-parser.md @@ -46,7 +46,7 @@ You can also select a specific version: ```html ``` diff --git a/docs/parsers/whatwg-async-parser.md b/docs/parsers/whatwg-async-parser.md index 8d906bc..228e1c2 100644 --- a/docs/parsers/whatwg-async-parser.md +++ b/docs/parsers/whatwg-async-parser.md @@ -41,7 +41,7 @@ You can also select a specific version: ```html ``` diff --git a/docs/parsers/whatwg-transform-stream.md b/docs/parsers/whatwg-transform-stream.md index b169e06..0ed372c 100644 --- a/docs/parsers/whatwg-transform-stream.md +++ b/docs/parsers/whatwg-transform-stream.md @@ -44,7 +44,7 @@ You can also select a specific version: ```html ``` diff --git a/package-lock.json b/package-lock.json index cebefef..2bea25b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "json2csv", - "version": "6.1.2", + "version": "6.1.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "json2csv", - "version": "6.1.2", + "version": "6.1.3", "license": "MIT", "workspaces": [ "packages/cli", @@ -8735,11 +8735,11 @@ }, "packages/cli": { "name": "@json2csv/cli", - "version": "6.1.2", + "version": "6.1.3", "license": "MIT", "dependencies": { - "@json2csv/node": "^6.1.2", - "@json2csv/transforms": "^6.1.2", + "@json2csv/node": "^6.1.3", + "@json2csv/transforms": "^6.1.3", "commander": "^10.0.0" }, "bin": { @@ -8748,36 +8748,36 @@ }, "packages/formatters": { "name": "@json2csv/formatters", - "version": "6.1.2", + "version": "6.1.3", "license": "MIT" }, "packages/node": { "name": "@json2csv/node", - "version": "6.1.2", + "version": "6.1.3", "license": "MIT", "dependencies": { - "@json2csv/plainjs": "^6.1.2" + "@json2csv/plainjs": "^6.1.3" } }, "packages/plainjs": { "name": "@json2csv/plainjs", - "version": "6.1.2", + "version": "6.1.3", "license": "MIT", "dependencies": { - "@json2csv/formatters": "^6.1.2", + "@json2csv/formatters": "^6.1.3", "@streamparser/json": "^0.0.12", "lodash.get": "^4.4.2" } }, "packages/test-helpers": { "name": "@json2csv/test-helpers", - "version": "6.1.2", + "version": "6.1.3", "license": "MIT", "devDependencies": {} }, "packages/test-performance": { "name": "@json2csv/test-performance", - "version": "6.1.2", + "version": "6.1.3", "license": "MIT", "devDependencies": { "0x": "^5.3.1", @@ -8786,7 +8786,7 @@ }, "packages/transforms": { "name": "@json2csv/transforms", - "version": "6.1.2", + "version": "6.1.3", "license": "MIT", "dependencies": { "lodash.get": "^4.4.2" @@ -8794,10 +8794,10 @@ }, "packages/whatwg": { "name": "@json2csv/whatwg", - "version": "6.1.2", + "version": "6.1.3", "license": "MIT", "dependencies": { - "@json2csv/plainjs": "^6.1.2" + "@json2csv/plainjs": "^6.1.3" } } } diff --git a/package.json b/package.json index 608d697..18a4cd5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "json2csv", - "version": "6.1.2", + "version": "6.1.3", "private": true, "description": "Fast and highly configurable JSON to CSV converter", "keywords": [ diff --git a/packages/cli/package.json b/packages/cli/package.json index 8826061..69d7def 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@json2csv/cli", - "version": "6.1.2", + "version": "6.1.3", "description": "Command Line Interface to convert JSON to CSV.", "keywords": [ "json", @@ -35,8 +35,8 @@ "dependencies:update-internal": "npm uninstall @json2csv/node @json2csv/transforms && npm install @json2csv/node @json2csv/transforms" }, "dependencies": { - "@json2csv/node": "^6.1.2", - "@json2csv/transforms": "^6.1.2", + "@json2csv/node": "^6.1.3", + "@json2csv/transforms": "^6.1.3", "commander": "^10.0.0" } } diff --git a/packages/formatters/package.json b/packages/formatters/package.json index 89d7962..43cb571 100644 --- a/packages/formatters/package.json +++ b/packages/formatters/package.json @@ -1,6 +1,6 @@ { "name": "@json2csv/formatters", - "version": "6.1.2", + "version": "6.1.3", "description": "json2csv built-in formatters. A formatter is a function that receives the raw js value of a given type and formats it as a valid CSV cell.", "keywords": [ "json", diff --git a/packages/node/package.json b/packages/node/package.json index e31333a..11089d3 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -1,6 +1,6 @@ { "name": "@json2csv/node", - "version": "6.1.2", + "version": "6.1.3", "description": "Node.js Transform and Async interface to convert JSON into CSV.", "keywords": [ "json", @@ -45,6 +45,6 @@ "prepublishOnly": "npm run build:cjs" }, "dependencies": { - "@json2csv/plainjs": "^6.1.2" + "@json2csv/plainjs": "^6.1.3" } } diff --git a/packages/plainjs/package.json b/packages/plainjs/package.json index 8341530..2017692 100644 --- a/packages/plainjs/package.json +++ b/packages/plainjs/package.json @@ -1,6 +1,6 @@ { "name": "@json2csv/plainjs", - "version": "6.1.2", + "version": "6.1.3", "description": "Pure Javascript JSON to CSV converter.", "keywords": [ "json", @@ -45,7 +45,7 @@ "prepublishOnly": "npm run build:cjs" }, "dependencies": { - "@json2csv/formatters": "^6.1.2", + "@json2csv/formatters": "^6.1.3", "@streamparser/json": "^0.0.12", "lodash.get": "^4.4.2" } diff --git a/packages/test-helpers/package.json b/packages/test-helpers/package.json index 90447b4..1e5c37d 100644 --- a/packages/test-helpers/package.json +++ b/packages/test-helpers/package.json @@ -1,6 +1,6 @@ { "name": "@json2csv/test-helpers", - "version": "6.1.2", + "version": "6.1.3", "description": "Test helper to test the json2csv libraries", "homepage": "http://juanjodiaz.github.io/json2csv", "bugs": { diff --git a/packages/test-performance/package.json b/packages/test-performance/package.json index d4f3633..2de8dc8 100644 --- a/packages/test-performance/package.json +++ b/packages/test-performance/package.json @@ -1,6 +1,6 @@ { "name": "@json2csv/test-performance", - "version": "6.1.2", + "version": "6.1.3", "description": "Performance tests for json2csv", "keywords": [ "json", diff --git a/packages/transforms/package.json b/packages/transforms/package.json index 8ee850f..2b19623 100644 --- a/packages/transforms/package.json +++ b/packages/transforms/package.json @@ -1,6 +1,6 @@ { "name": "@json2csv/transforms", - "version": "6.1.2", + "version": "6.1.3", "description": "json2csv built-in transforms. A transform is a function that receives a data recod and returns a transformed record. Transforms are executed in order before converting the data record into a CSV row.", "keywords": [ "json", diff --git a/packages/whatwg/package.json b/packages/whatwg/package.json index cceed6b..ad81395 100644 --- a/packages/whatwg/package.json +++ b/packages/whatwg/package.json @@ -1,6 +1,6 @@ { "name": "@json2csv/whatwg", - "version": "6.1.2", + "version": "6.1.3", "description": "WHATWG Transform and Async interface to convert JSON into CSV.", "keywords": [ "json", @@ -45,6 +45,6 @@ "prepublishOnly": "npm run build:cjs" }, "dependencies": { - "@json2csv/plainjs": "^6.1.2" + "@json2csv/plainjs": "^6.1.3" } }