Skip to content

Commit 0a893fb

Browse files
chore(deps-dev): bump fast-xml-parser to 4.0.11 (#4001)
Co-authored-by: Kamat, Trivikram <[email protected]>
1 parent ed7cec2 commit 0a893fb

File tree

54 files changed

+282
-193
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+282
-193
lines changed

clients/client-auto-scaling/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@
5151
"@aws-sdk/util-utf8-browser": "*",
5252
"@aws-sdk/util-utf8-node": "*",
5353
"@aws-sdk/util-waiter": "*",
54-
"entities": "2.2.0",
55-
"fast-xml-parser": "3.19.0",
54+
"fast-xml-parser": "4.0.11",
5655
"tslib": "^2.3.1"
5756
},
5857
"devDependencies": {

clients/client-auto-scaling/src/protocols/Aws_query.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ import {
2020
ResponseMetadata as __ResponseMetadata,
2121
SerdeContext as __SerdeContext,
2222
} from "@aws-sdk/types";
23-
import { decodeHTML } from "entities";
24-
import { parse as xmlParse } from "fast-xml-parser";
23+
import { XMLParser } from "fast-xml-parser";
2524

2625
import { AttachInstancesCommandInput, AttachInstancesCommandOutput } from "../commands/AttachInstancesCommand";
2726
import {
@@ -9838,13 +9837,18 @@ const buildHttpRpcRequest = async (
98389837
const parseBody = (streamBody: any, context: __SerdeContext): any =>
98399838
collectBodyString(streamBody, context).then((encoded) => {
98409839
if (encoded.length) {
9841-
const parsedObj = xmlParse(encoded, {
9840+
const parser = new XMLParser({
98429841
attributeNamePrefix: "",
9842+
htmlEntities: true,
98439843
ignoreAttributes: false,
9844-
parseNodeValue: false,
9844+
ignoreDeclaration: true,
9845+
parseTagValue: false,
98459846
trimValues: false,
9846-
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
9847+
tagValueProcessor: (_, val) => (val.trim() === "" && val.includes("\n") ? "" : undefined),
98479848
});
9849+
parser.addEntity("#xD", "\r");
9850+
parser.addEntity("#10", "\n");
9851+
const parsedObj = parser.parse(encoded);
98489852
const textNodeName = "#text";
98499853
const key = Object.keys(parsedObj)[0];
98509854
const parsedObjToReturn = parsedObj[key];

clients/client-cloudformation/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@
5151
"@aws-sdk/util-utf8-browser": "*",
5252
"@aws-sdk/util-utf8-node": "*",
5353
"@aws-sdk/util-waiter": "*",
54-
"entities": "2.2.0",
55-
"fast-xml-parser": "3.19.0",
54+
"fast-xml-parser": "4.0.11",
5655
"tslib": "^2.3.1",
5756
"uuid": "^8.3.2"
5857
},

clients/client-cloudformation/src/protocols/Aws_query.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ import {
1818
ResponseMetadata as __ResponseMetadata,
1919
SerdeContext as __SerdeContext,
2020
} from "@aws-sdk/types";
21-
import { decodeHTML } from "entities";
22-
import { parse as xmlParse } from "fast-xml-parser";
21+
import { XMLParser } from "fast-xml-parser";
2322
import { v4 as generateIdempotencyToken } from "uuid";
2423

2524
import { ActivateTypeCommandInput, ActivateTypeCommandOutput } from "../commands/ActivateTypeCommand";
@@ -10248,13 +10247,18 @@ const buildHttpRpcRequest = async (
1024810247
const parseBody = (streamBody: any, context: __SerdeContext): any =>
1024910248
collectBodyString(streamBody, context).then((encoded) => {
1025010249
if (encoded.length) {
10251-
const parsedObj = xmlParse(encoded, {
10250+
const parser = new XMLParser({
1025210251
attributeNamePrefix: "",
10252+
htmlEntities: true,
1025310253
ignoreAttributes: false,
10254-
parseNodeValue: false,
10254+
ignoreDeclaration: true,
10255+
parseTagValue: false,
1025510256
trimValues: false,
10256-
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
10257+
tagValueProcessor: (_, val) => (val.trim() === "" && val.includes("\n") ? "" : undefined),
1025710258
});
10259+
parser.addEntity("#xD", "\r");
10260+
parser.addEntity("#10", "\n");
10261+
const parsedObj = parser.parse(encoded);
1025810262
const textNodeName = "#text";
1025910263
const key = Object.keys(parsedObj)[0];
1026010264
const parsedObjToReturn = parsedObj[key];

clients/client-cloudfront/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@
5252
"@aws-sdk/util-utf8-node": "*",
5353
"@aws-sdk/util-waiter": "*",
5454
"@aws-sdk/xml-builder": "*",
55-
"entities": "2.2.0",
56-
"fast-xml-parser": "3.19.0",
55+
"fast-xml-parser": "4.0.11",
5756
"tslib": "^2.3.1"
5857
},
5958
"devDependencies": {

clients/client-cloudfront/src/protocols/Aws_restXml.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ import {
2323
SerdeContext as __SerdeContext,
2424
} from "@aws-sdk/types";
2525
import { XmlNode as __XmlNode, XmlText as __XmlText } from "@aws-sdk/xml-builder";
26-
import { decodeHTML } from "entities";
27-
import { parse as xmlParse } from "fast-xml-parser";
26+
import { XMLParser } from "fast-xml-parser";
2827

2928
import { AssociateAliasCommandInput, AssociateAliasCommandOutput } from "../commands/AssociateAliasCommand";
3029
import { CreateCachePolicyCommandInput, CreateCachePolicyCommandOutput } from "../commands/CreateCachePolicyCommand";
@@ -17270,13 +17269,18 @@ const isSerializableHeaderValue = (value: any): boolean =>
1727017269
const parseBody = (streamBody: any, context: __SerdeContext): any =>
1727117270
collectBodyString(streamBody, context).then((encoded) => {
1727217271
if (encoded.length) {
17273-
const parsedObj = xmlParse(encoded, {
17272+
const parser = new XMLParser({
1727417273
attributeNamePrefix: "",
17274+
htmlEntities: true,
1727517275
ignoreAttributes: false,
17276-
parseNodeValue: false,
17276+
ignoreDeclaration: true,
17277+
parseTagValue: false,
1727717278
trimValues: false,
17278-
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
17279+
tagValueProcessor: (_, val) => (val.trim() === "" && val.includes("\n") ? "" : undefined),
1727917280
});
17281+
parser.addEntity("#xD", "\r");
17282+
parser.addEntity("#10", "\n");
17283+
const parsedObj = parser.parse(encoded);
1728017284
const textNodeName = "#text";
1728117285
const key = Object.keys(parsedObj)[0];
1728217286
const parsedObjToReturn = parsedObj[key];

clients/client-cloudsearch/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@
5050
"@aws-sdk/util-user-agent-node": "*",
5151
"@aws-sdk/util-utf8-browser": "*",
5252
"@aws-sdk/util-utf8-node": "*",
53-
"entities": "2.2.0",
54-
"fast-xml-parser": "3.19.0",
53+
"fast-xml-parser": "4.0.11",
5554
"tslib": "^2.3.1"
5655
},
5756
"devDependencies": {

clients/client-cloudsearch/src/protocols/Aws_query.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ import {
2121
ResponseMetadata as __ResponseMetadata,
2222
SerdeContext as __SerdeContext,
2323
} from "@aws-sdk/types";
24-
import { decodeHTML } from "entities";
25-
import { parse as xmlParse } from "fast-xml-parser";
24+
import { XMLParser } from "fast-xml-parser";
2625

2726
import { BuildSuggestersCommandInput, BuildSuggestersCommandOutput } from "../commands/BuildSuggestersCommand";
2827
import { CreateDomainCommandInput, CreateDomainCommandOutput } from "../commands/CreateDomainCommand";
@@ -4186,13 +4185,18 @@ const buildHttpRpcRequest = async (
41864185
const parseBody = (streamBody: any, context: __SerdeContext): any =>
41874186
collectBodyString(streamBody, context).then((encoded) => {
41884187
if (encoded.length) {
4189-
const parsedObj = xmlParse(encoded, {
4188+
const parser = new XMLParser({
41904189
attributeNamePrefix: "",
4190+
htmlEntities: true,
41914191
ignoreAttributes: false,
4192-
parseNodeValue: false,
4192+
ignoreDeclaration: true,
4193+
parseTagValue: false,
41934194
trimValues: false,
4194-
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
4195+
tagValueProcessor: (_, val) => (val.trim() === "" && val.includes("\n") ? "" : undefined),
41954196
});
4197+
parser.addEntity("#xD", "\r");
4198+
parser.addEntity("#10", "\n");
4199+
const parsedObj = parser.parse(encoded);
41964200
const textNodeName = "#text";
41974201
const key = Object.keys(parsedObj)[0];
41984202
const parsedObjToReturn = parsedObj[key];

clients/client-cloudwatch/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@
5151
"@aws-sdk/util-utf8-browser": "*",
5252
"@aws-sdk/util-utf8-node": "*",
5353
"@aws-sdk/util-waiter": "*",
54-
"entities": "2.2.0",
55-
"fast-xml-parser": "3.19.0",
54+
"fast-xml-parser": "4.0.11",
5655
"tslib": "^2.3.1"
5756
},
5857
"devDependencies": {

clients/client-cloudwatch/src/protocols/Aws_query.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ import {
2121
ResponseMetadata as __ResponseMetadata,
2222
SerdeContext as __SerdeContext,
2323
} from "@aws-sdk/types";
24-
import { decodeHTML } from "entities";
25-
import { parse as xmlParse } from "fast-xml-parser";
24+
import { XMLParser } from "fast-xml-parser";
2625

2726
import { DeleteAlarmsCommandInput, DeleteAlarmsCommandOutput } from "../commands/DeleteAlarmsCommand";
2827
import {
@@ -6189,13 +6188,18 @@ const buildHttpRpcRequest = async (
61896188
const parseBody = (streamBody: any, context: __SerdeContext): any =>
61906189
collectBodyString(streamBody, context).then((encoded) => {
61916190
if (encoded.length) {
6192-
const parsedObj = xmlParse(encoded, {
6191+
const parser = new XMLParser({
61936192
attributeNamePrefix: "",
6193+
htmlEntities: true,
61946194
ignoreAttributes: false,
6195-
parseNodeValue: false,
6195+
ignoreDeclaration: true,
6196+
parseTagValue: false,
61966197
trimValues: false,
6197-
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
6198+
tagValueProcessor: (_, val) => (val.trim() === "" && val.includes("\n") ? "" : undefined),
61986199
});
6200+
parser.addEntity("#xD", "\r");
6201+
parser.addEntity("#10", "\n");
6202+
const parsedObj = parser.parse(encoded);
61996203
const textNodeName = "#text";
62006204
const key = Object.keys(parsedObj)[0];
62016205
const parsedObjToReturn = parsedObj[key];

clients/client-docdb/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@
5252
"@aws-sdk/util-utf8-browser": "*",
5353
"@aws-sdk/util-utf8-node": "*",
5454
"@aws-sdk/util-waiter": "*",
55-
"entities": "2.2.0",
56-
"fast-xml-parser": "3.19.0",
55+
"fast-xml-parser": "4.0.11",
5756
"tslib": "^2.3.1"
5857
},
5958
"devDependencies": {

clients/client-docdb/src/protocols/Aws_query.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ import {
1818
ResponseMetadata as __ResponseMetadata,
1919
SerdeContext as __SerdeContext,
2020
} from "@aws-sdk/types";
21-
import { decodeHTML } from "entities";
22-
import { parse as xmlParse } from "fast-xml-parser";
21+
import { XMLParser } from "fast-xml-parser";
2322

2423
import {
2524
AddSourceIdentifierToSubscriptionCommandInput,
@@ -9082,13 +9081,18 @@ const buildHttpRpcRequest = async (
90829081
const parseBody = (streamBody: any, context: __SerdeContext): any =>
90839082
collectBodyString(streamBody, context).then((encoded) => {
90849083
if (encoded.length) {
9085-
const parsedObj = xmlParse(encoded, {
9084+
const parser = new XMLParser({
90869085
attributeNamePrefix: "",
9086+
htmlEntities: true,
90879087
ignoreAttributes: false,
9088-
parseNodeValue: false,
9088+
ignoreDeclaration: true,
9089+
parseTagValue: false,
90899090
trimValues: false,
9090-
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
9091+
tagValueProcessor: (_, val) => (val.trim() === "" && val.includes("\n") ? "" : undefined),
90919092
});
9093+
parser.addEntity("#xD", "\r");
9094+
parser.addEntity("#10", "\n");
9095+
const parsedObj = parser.parse(encoded);
90929096
const textNodeName = "#text";
90939097
const key = Object.keys(parsedObj)[0];
90949098
const parsedObjToReturn = parsedObj[key];

clients/client-ec2/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@
5252
"@aws-sdk/util-utf8-browser": "*",
5353
"@aws-sdk/util-utf8-node": "*",
5454
"@aws-sdk/util-waiter": "*",
55-
"entities": "2.2.0",
56-
"fast-xml-parser": "3.19.0",
55+
"fast-xml-parser": "4.0.11",
5756
"tslib": "^2.3.1",
5857
"uuid": "^8.3.2"
5958
},

clients/client-ec2/src/protocols/Aws_ec2.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ import {
2020
ResponseMetadata as __ResponseMetadata,
2121
SerdeContext as __SerdeContext,
2222
} from "@aws-sdk/types";
23-
import { decodeHTML } from "entities";
24-
import { parse as xmlParse } from "fast-xml-parser";
23+
import { XMLParser } from "fast-xml-parser";
2524
import { v4 as generateIdempotencyToken } from "uuid";
2625

2726
import {
@@ -80353,13 +80352,18 @@ const buildHttpRpcRequest = async (
8035380352
const parseBody = (streamBody: any, context: __SerdeContext): any =>
8035480353
collectBodyString(streamBody, context).then((encoded) => {
8035580354
if (encoded.length) {
80356-
const parsedObj = xmlParse(encoded, {
80355+
const parser = new XMLParser({
8035780356
attributeNamePrefix: "",
80357+
htmlEntities: true,
8035880358
ignoreAttributes: false,
80359-
parseNodeValue: false,
80359+
ignoreDeclaration: true,
80360+
parseTagValue: false,
8036080361
trimValues: false,
80361-
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
80362+
tagValueProcessor: (_, val) => (val.trim() === "" && val.includes("\n") ? "" : undefined),
8036280363
});
80364+
parser.addEntity("#xD", "\r");
80365+
parser.addEntity("#10", "\n");
80366+
const parsedObj = parser.parse(encoded);
8036380367
const textNodeName = "#text";
8036480368
const key = Object.keys(parsedObj)[0];
8036580369
const parsedObjToReturn = parsedObj[key];

clients/client-elastic-beanstalk/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@
5151
"@aws-sdk/util-utf8-browser": "*",
5252
"@aws-sdk/util-utf8-node": "*",
5353
"@aws-sdk/util-waiter": "*",
54-
"entities": "2.2.0",
55-
"fast-xml-parser": "3.19.0",
54+
"fast-xml-parser": "4.0.11",
5655
"tslib": "^2.3.1"
5756
},
5857
"devDependencies": {

clients/client-elastic-beanstalk/src/protocols/Aws_query.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ import {
2020
ResponseMetadata as __ResponseMetadata,
2121
SerdeContext as __SerdeContext,
2222
} from "@aws-sdk/types";
23-
import { decodeHTML } from "entities";
24-
import { parse as xmlParse } from "fast-xml-parser";
23+
import { XMLParser } from "fast-xml-parser";
2524

2625
import {
2726
AbortEnvironmentUpdateCommandInput,
@@ -7279,13 +7278,18 @@ const buildHttpRpcRequest = async (
72797278
const parseBody = (streamBody: any, context: __SerdeContext): any =>
72807279
collectBodyString(streamBody, context).then((encoded) => {
72817280
if (encoded.length) {
7282-
const parsedObj = xmlParse(encoded, {
7281+
const parser = new XMLParser({
72837282
attributeNamePrefix: "",
7283+
htmlEntities: true,
72847284
ignoreAttributes: false,
7285-
parseNodeValue: false,
7285+
ignoreDeclaration: true,
7286+
parseTagValue: false,
72867287
trimValues: false,
7287-
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
7288+
tagValueProcessor: (_, val) => (val.trim() === "" && val.includes("\n") ? "" : undefined),
72887289
});
7290+
parser.addEntity("#xD", "\r");
7291+
parser.addEntity("#10", "\n");
7292+
const parsedObj = parser.parse(encoded);
72897293
const textNodeName = "#text";
72907294
const key = Object.keys(parsedObj)[0];
72917295
const parsedObjToReturn = parsedObj[key];

clients/client-elastic-load-balancing-v2/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@
5151
"@aws-sdk/util-utf8-browser": "*",
5252
"@aws-sdk/util-utf8-node": "*",
5353
"@aws-sdk/util-waiter": "*",
54-
"entities": "2.2.0",
55-
"fast-xml-parser": "3.19.0",
54+
"fast-xml-parser": "4.0.11",
5655
"tslib": "^2.3.1"
5756
},
5857
"devDependencies": {

clients/client-elastic-load-balancing-v2/src/protocols/Aws_query.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ import {
1919
ResponseMetadata as __ResponseMetadata,
2020
SerdeContext as __SerdeContext,
2121
} from "@aws-sdk/types";
22-
import { decodeHTML } from "entities";
23-
import { parse as xmlParse } from "fast-xml-parser";
22+
import { XMLParser } from "fast-xml-parser";
2423

2524
import {
2625
AddListenerCertificatesCommandInput,
@@ -6703,13 +6702,18 @@ const buildHttpRpcRequest = async (
67036702
const parseBody = (streamBody: any, context: __SerdeContext): any =>
67046703
collectBodyString(streamBody, context).then((encoded) => {
67056704
if (encoded.length) {
6706-
const parsedObj = xmlParse(encoded, {
6705+
const parser = new XMLParser({
67076706
attributeNamePrefix: "",
6707+
htmlEntities: true,
67086708
ignoreAttributes: false,
6709-
parseNodeValue: false,
6709+
ignoreDeclaration: true,
6710+
parseTagValue: false,
67106711
trimValues: false,
6711-
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
6712+
tagValueProcessor: (_, val) => (val.trim() === "" && val.includes("\n") ? "" : undefined),
67126713
});
6714+
parser.addEntity("#xD", "\r");
6715+
parser.addEntity("#10", "\n");
6716+
const parsedObj = parser.parse(encoded);
67136717
const textNodeName = "#text";
67146718
const key = Object.keys(parsedObj)[0];
67156719
const parsedObjToReturn = parsedObj[key];

clients/client-elastic-load-balancing/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@
5151
"@aws-sdk/util-utf8-browser": "*",
5252
"@aws-sdk/util-utf8-node": "*",
5353
"@aws-sdk/util-waiter": "*",
54-
"entities": "2.2.0",
55-
"fast-xml-parser": "3.19.0",
54+
"fast-xml-parser": "4.0.11",
5655
"tslib": "^2.3.1"
5756
},
5857
"devDependencies": {

0 commit comments

Comments
 (0)