From edc844e8c8a7626a0d2fcdbf9595c2bba8a83c56 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 01:25:41 +0000 Subject: [PATCH 1/2] Bump fast-xml-parser from 4.4.0 to 4.4.1 Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 4.4.0 to 4.4.1. - [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases) - [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md) - [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v4.4.0...v4.4.1) --- updated-dependencies: - dependency-name: fast-xml-parser dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 81a9d47..9cf6169 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@actions/core": "^1.10.1", "@actions/exec": "^1.1.1", - "fast-xml-parser": "^4.4.0" + "fast-xml-parser": "^4.4.1" }, "devDependencies": { "@types/jest": "^29.5.12", @@ -1769,9 +1769,9 @@ "dev": true }, "node_modules/fast-xml-parser": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.0.tgz", - "integrity": "sha512-kLY3jFlwIYwBNDojclKsNAC12sfD6NwW74QB2CoNGPvtVxjliYehVunB3HYyNi+n4Tt1dAcgwYvmKF/Z18flqg==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz", + "integrity": "sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==", "funding": [ { "type": "github", @@ -5139,9 +5139,9 @@ "dev": true }, "fast-xml-parser": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.0.tgz", - "integrity": "sha512-kLY3jFlwIYwBNDojclKsNAC12sfD6NwW74QB2CoNGPvtVxjliYehVunB3HYyNi+n4Tt1dAcgwYvmKF/Z18flqg==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz", + "integrity": "sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==", "requires": { "strnum": "^1.0.5" } diff --git a/package.json b/package.json index 5487c60..5d685a4 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "dependencies": { "@actions/core": "^1.10.1", "@actions/exec": "^1.1.1", - "fast-xml-parser": "^4.4.0" + "fast-xml-parser": "^4.4.1" }, "devDependencies": { "@types/jest": "^29.5.12", From 5e809007fc6ca393acd9893daf530d5b4329f606 Mon Sep 17 00:00:00 2001 From: Brandon Croft Date: Mon, 26 Aug 2024 13:33:16 -0600 Subject: [PATCH 2/2] rebuild after dependency bump --- dist/index.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 62b7690..99a5180 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2946,6 +2946,7 @@ Builder.prototype.j2x = function(jObj, level) { //repeated nodes const arrLen = jObj[key].length; let listTagVal = ""; + let listTagAttr = ""; for (let j = 0; j < arrLen; j++) { const item = jObj[key][j]; if (typeof item === 'undefined') { @@ -2955,17 +2956,27 @@ Builder.prototype.j2x = function(jObj, level) { else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; } else if (typeof item === 'object') { - if(this.options.oneListGroup ){ - listTagVal += this.j2x(item, level + 1).val; + if(this.options.oneListGroup){ + const result = this.j2x(item, level + 1); + listTagVal += result.val; + if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) { + listTagAttr += result.attrStr + } }else{ listTagVal += this.processTextOrObjNode(item, key, level) } } else { - listTagVal += this.buildTextValNode(item, key, '', level); + if (this.options.oneListGroup) { + let textValue = this.options.tagValueProcessor(key, item); + textValue = this.replaceEntitiesValue(textValue); + listTagVal += textValue; + } else { + listTagVal += this.buildTextValNode(item, key, '', level); + } } } if(this.options.oneListGroup){ - listTagVal = this.buildObjectNode(listTagVal, key, '', level); + listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level); } val += listTagVal; } else {