@adobe/acc-js-sdk 1.1.52 → 1.1.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,13 @@
2
2
  layout: page
3
3
  title: Change Log
4
4
  ---
5
+ <section class="changelog"><h1>Version 1.1.53</h1>
6
+ <h2>2024/09/06</h2>
7
+ <li>
8
+ Fixed JSON/XML serialization when there is both an attribute and an element with the same name
9
+ </li>
10
+ </section>
11
+
5
12
  <section class="changelog"><h1>Version 1.1.52</h1>
6
13
  <h2>2024/09/04</h2>
7
14
  <li>
@@ -12,7 +19,6 @@ title: Change Log
12
19
  </li>
13
20
  </section>
14
21
 
15
-
16
22
  <section class="changelog"><h1>Version 1.1.51</h1>
17
23
  <h2>2024/08/15</h2>
18
24
  <li>
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@adobe/acc-js-sdk",
3
- "version": "1.1.52",
3
+ "version": "1.1.53",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@adobe/acc-js-sdk",
9
- "version": "1.1.52",
9
+ "version": "1.1.53",
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
12
  "axios": "^1.2.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/acc-js-sdk",
3
- "version": "1.1.52",
3
+ "version": "1.1.53",
4
4
  "description": "ACC Javascript SDK",
5
5
  "main": "src/index.js",
6
6
  "homepage": "https://github.com/adobe/acc-js-sdk#readme",
package/src/domUtil.js CHANGED
@@ -314,7 +314,7 @@ class DomUtil {
314
314
  var attFirstIndex = 1;
315
315
 
316
316
  if (flavor == "SimpleJson") {
317
- if ((t == "string" || t == "number" || t == "boolean") && att[0] != '$') {
317
+ if ((t == "string" || t == "number" || t == "boolean") && att[0] != '$' && att[0] != '@') {
318
318
  isAtt = true;
319
319
  attFirstIndex = 0;
320
320
  }
@@ -156,6 +156,8 @@ describe('DomUtil', function() {
156
156
  assert.strictEqual(fromJSON({ "a": [ ] }), '<root/>');
157
157
  assert.strictEqual(fromJSON({ "a": null }), '<root/>');
158
158
  assert.strictEqual(fromJSON({ "a": undefined }), '<root/>');
159
+ assert.strictEqual(fromJSON({ "@a":2, "@b":"zz", "@c": true }), '<root a="2" b="zz" c="true"/>');
160
+ assert.strictEqual(fromJSON({ "a":{ x:3 }, "@a": 2 }), '<root a="2"><a x="3"/></root>');
159
161
  });
160
162
 
161
163
  it("Should support attributes named 'length'", () => {
@@ -192,6 +194,8 @@ describe('DomUtil', function() {
192
194
  assert.strictEqual(fromJSON({ "a": [ ] }), '<root/>');
193
195
  assert.strictEqual(fromJSON({ "a": null }), '<root/>');
194
196
  assert.strictEqual(fromJSON({ "a": undefined }), '<root/>');
197
+ assert.strictEqual(fromJSON({ "@a":2, "@b":"zz", "@c": true }), '<root a="2" b="zz" c="true"/>');
198
+ assert.strictEqual(fromJSON({ "a":{ x:3 }, "@a": 2 }), '<root a="2"><a x="3"/></root>');
195
199
  });
196
200
  });
197
201