Visitar URL original
chore(deps): combine open Dependabot npm updates (#1252) · actions/setup-java@59b3450 · GitHub
Skip to content

Commit 59b3450

Browse files
brunoborgesCopilot
andauthored
chore(deps): combine open Dependabot npm updates (#1252)
* Combine Dependabot npm updates Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Rebuild action bundles Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a5d254ad-e29c-4477-ae66-cba6e36d7e03 * Update Licensed cache for XML dependencies Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a5d254ad-e29c-4477-ae66-cba6e36d7e03 --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a5d254ad-e29c-4477-ae66-cba6e36d7e03
1 parent b96213d commit 59b3450

8 files changed

Lines changed: 153 additions & 45 deletions

File tree

‎.licenses/npm/fast-xml-parser.dep.yml‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.licenses/npm/strnum.dep.yml‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/cleanup/767.index.js‎

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18680,12 +18680,26 @@ class XmlNode {
1868018680
this.child.push({ [node.tagname]: node.child });
1868118681
}
1868218682
// if requested, add the startIndex
18683+
this.addStartIndex(startIndex);
18684+
}
18685+
18686+
addStartIndex(startIndex) {
1868318687
if (startIndex !== undefined) {
1868418688
// Note: for now we just overwrite the metadata. If we had more complex metadata,
1868518689
// we might need to do an object append here: metadata = { ...metadata, startIndex }
1868618690
this.child[this.child.length - 1][METADATA_SYMBOL] = { startIndex };
1868718691
}
1868818692
}
18693+
18694+
addEndIndex(endIndex) {
18695+
const lastChild = this.child[this.child.length - 1];
18696+
// endIndex is write-once: when updateTag drops a node, the last child is a
18697+
// previously completed sibling whose endIndex must not be overwritten
18698+
if (lastChild !== undefined && lastChild[METADATA_SYMBOL] !== undefined
18699+
&& lastChild[METADATA_SYMBOL].endIndex === undefined) {
18700+
lastChild[METADATA_SYMBOL].endIndex = endIndex;
18701+
}
18702+
}
1868918703
/** symbol used for metadata */
1869018704
static getMetaDataSymbol() {
1869118705
return METADATA_SYMBOL;
@@ -18718,8 +18732,23 @@ class DocTypeReader {
1871818732
i = i + 9;
1871918733
let angleBracketsCount = 1;
1872018734
let hasBody = false, comment = false;
18735+
let quoteChar = null; // tracks an open SYSTEM/PUBLIC literal before the '[' body
1872118736
let exp = "";
1872218737
for (; i < xmlData.length; i++) {
18738+
// Inside a quoted external-identifier literal — XML allows '<'
18739+
// and '>' as plain data here, so they must not be interpreted
18740+
// as DOCTYPE structure until the matching quote closes.
18741+
if (quoteChar !== null) {
18742+
if (xmlData[i] === quoteChar) quoteChar = null;
18743+
exp += xmlData[i];
18744+
continue;
18745+
}
18746+
if (!hasBody && !comment && (xmlData[i] === '"' || xmlData[i] === "'")) {
18747+
quoteChar = xmlData[i];
18748+
exp += xmlData[i];
18749+
continue;
18750+
}
18751+
1872318752
if (xmlData[i] === '<' && !comment) { //Determine the tag type
1872418753
if (hasBody && hasSeq(xmlData, "!ENTITY", i)) {
1872518754
i += 7;
@@ -18774,7 +18803,7 @@ class DocTypeReader {
1877418803
exp += xmlData[i];
1877518804
}
1877618805
}
18777-
if (angleBracketsCount !== 0) {
18806+
if (quoteChar !== null || angleBracketsCount !== 0) {
1877818807
throw new Error(`Unclosed DOCTYPE`);
1877918808
}
1878018809
} else {
@@ -19489,7 +19518,11 @@ function resolveEnotation(str, trimmedStr, options) {
1948919518
*/
1949019519
function trimZeros(numStr) {
1949119520
if (numStr && numStr.indexOf(".") !== -1) {//float
19492-
numStr = numStr.replace(/0+$/, ""); //remove ending zeros
19521+
//remove ending zeros without the O(n^2) backtracking that /0+$/ hits
19522+
//when the string doesn't end in 0 but has a long internal zero-run
19523+
let end = numStr.length;
19524+
while (end > 0 && numStr.charCodeAt(end - 1) === 48 /* '0' */) end--;
19525+
numStr = numStr.slice(0, end);
1949319526
if (numStr === ".") numStr = "0";
1949419527
else if (numStr[0] === ".") numStr = "0" + numStr;
1949519528
else if (numStr[numStr.length - 1] === ".") numStr = numStr.substring(0, numStr.length - 1);
@@ -22965,7 +22998,12 @@ const parseXml = function (xmlData) {
2296522998
this.matcher.pop();
2296622999
this.isCurrentNodeStopNode = false; // Reset flag when closing tag
2296723000

22968-
currentNode = this.tagsNodeStack.pop();//avoid recursion, set the parent tag scope
23001+
//a closing tag with no matching opening tag leaves the stack empty
23002+
currentNode = this.tagsNodeStack.pop() || xmlObj;//avoid recursion, set the parent tag scope
23003+
23004+
if (options.captureMetaData && currentNode) {
23005+
currentNode.addEndIndex(closeIndex + 1);
23006+
}
2296923007
textData = "";
2297023008
i = closeIndex;
2297123009
} else if (c1 === 63) { //'?'
@@ -22991,6 +23029,11 @@ const parseXml = function (xmlData) {
2299123029
childNode[":@"] = attsMap
2299223030
}
2299323031
this.addChild(currentNode, childNode, this.readonlyMatcher, i);
23032+
23033+
if (options.captureMetaData) {
23034+
// closeIndex points at '?' of the closing '?>'
23035+
currentNode.addEndIndex(tagData.closeIndex + 2);
23036+
}
2299423037
}
2299523038

2299623039

@@ -23155,6 +23198,10 @@ const parseXml = function (xmlData) {
2315523198
this.isCurrentNodeStopNode = false; // Reset flag
2315623199

2315723200
this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);
23201+
23202+
if (options.captureMetaData) {
23203+
currentNode.addEndIndex(i + 1);
23204+
}
2315823205
} else {
2315923206
//selfClosing tag
2316023207
if (isSelfClosing) {
@@ -23165,6 +23212,10 @@ const parseXml = function (xmlData) {
2316523212
childNode[":@"] = prefixedAttrs;
2316623213
}
2316723214
this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);
23215+
23216+
if (options.captureMetaData) {
23217+
currentNode.addEndIndex(closeIndex + 1);
23218+
}
2316823219
this.matcher.pop(); // Pop self-closing tag
2316923220
this.isCurrentNodeStopNode = false; // Reset flag
2317023221
}
@@ -23174,6 +23225,10 @@ const parseXml = function (xmlData) {
2317423225
childNode[":@"] = prefixedAttrs;
2317523226
}
2317623227
this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);
23228+
23229+
if (options.captureMetaData) {
23230+
currentNode.addEndIndex(result.closeIndex + 1);
23231+
}
2317723232
this.matcher.pop(); // Pop unpaired tag
2317823233
this.isCurrentNodeStopNode = false; // Reset flag
2317923234
i = result.closeIndex;

‎dist/cleanup/index.js‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35575,6 +35575,9 @@ function _unique(values) {
3557535575
/******/ __nccwpck_require__.m = __webpack_modules__;
3557635576
/******/
3557735577
/************************************************************************/
35578+
/******/ /* webpack/runtime/asset-relocator-loader */
35579+
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = decodeURIComponent(new URL('.', import.meta.url).pathname).slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/";
35580+
/******/
3557835581
/******/ /* webpack/runtime/compat get default export */
3557935582
/******/ (() => {
3558035583
/******/ // getDefaultExport function for compatibility with non-harmony modules
@@ -35667,10 +35670,6 @@ function _unique(values) {
3566735670
/******/ };
3566835671
/******/ })();
3566935672
/******/
35670-
/******/ /* webpack/runtime/compat */
35671-
/******/
35672-
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/";
35673-
/******/
3567435673
/******/ /* webpack/runtime/import chunk loading */
3567535674
/******/ (() => {
3567635675
/******/ // no baseURI

‎dist/setup/824.index.js‎

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -741,12 +741,26 @@ class XmlNode {
741741
this.child.push({ [node.tagname]: node.child });
742742
}
743743
// if requested, add the startIndex
744+
this.addStartIndex(startIndex);
745+
}
746+
747+
addStartIndex(startIndex) {
744748
if (startIndex !== undefined) {
745749
// Note: for now we just overwrite the metadata. If we had more complex metadata,
746750
// we might need to do an object append here: metadata = { ...metadata, startIndex }
747751
this.child[this.child.length - 1][METADATA_SYMBOL] = { startIndex };
748752
}
749753
}
754+
755+
addEndIndex(endIndex) {
756+
const lastChild = this.child[this.child.length - 1];
757+
// endIndex is write-once: when updateTag drops a node, the last child is a
758+
// previously completed sibling whose endIndex must not be overwritten
759+
if (lastChild !== undefined && lastChild[METADATA_SYMBOL] !== undefined
760+
&& lastChild[METADATA_SYMBOL].endIndex === undefined) {
761+
lastChild[METADATA_SYMBOL].endIndex = endIndex;
762+
}
763+
}
750764
/** symbol used for metadata */
751765
static getMetaDataSymbol() {
752766
return METADATA_SYMBOL;
@@ -781,8 +795,23 @@ class DocTypeReader {
781795
i = i + 9;
782796
let angleBracketsCount = 1;
783797
let hasBody = false, comment = false;
798+
let quoteChar = null; // tracks an open SYSTEM/PUBLIC literal before the '[' body
784799
let exp = "";
785800
for (; i < xmlData.length; i++) {
801+
// Inside a quoted external-identifier literal — XML allows '<'
802+
// and '>' as plain data here, so they must not be interpreted
803+
// as DOCTYPE structure until the matching quote closes.
804+
if (quoteChar !== null) {
805+
if (xmlData[i] === quoteChar) quoteChar = null;
806+
exp += xmlData[i];
807+
continue;
808+
}
809+
if (!hasBody && !comment && (xmlData[i] === '"' || xmlData[i] === "'")) {
810+
quoteChar = xmlData[i];
811+
exp += xmlData[i];
812+
continue;
813+
}
814+
786815
if (xmlData[i] === '<' && !comment) { //Determine the tag type
787816
if (hasBody && hasSeq(xmlData, "!ENTITY", i)) {
788817
i += 7;
@@ -837,7 +866,7 @@ class DocTypeReader {
837866
exp += xmlData[i];
838867
}
839868
}
840-
if (angleBracketsCount !== 0) {
869+
if (quoteChar !== null || angleBracketsCount !== 0) {
841870
throw new Error(`Unclosed DOCTYPE`);
842871
}
843872
} else {
@@ -1552,7 +1581,11 @@ function resolveEnotation(str, trimmedStr, options) {
15521581
*/
15531582
function trimZeros(numStr) {
15541583
if (numStr && numStr.indexOf(".") !== -1) {//float
1555-
numStr = numStr.replace(/0+$/, ""); //remove ending zeros
1584+
//remove ending zeros without the O(n^2) backtracking that /0+$/ hits
1585+
//when the string doesn't end in 0 but has a long internal zero-run
1586+
let end = numStr.length;
1587+
while (end > 0 && numStr.charCodeAt(end - 1) === 48 /* '0' */) end--;
1588+
numStr = numStr.slice(0, end);
15561589
if (numStr === ".") numStr = "0";
15571590
else if (numStr[0] === ".") numStr = "0" + numStr;
15581591
else if (numStr[numStr.length - 1] === ".") numStr = numStr.substring(0, numStr.length - 1);
@@ -5032,7 +5065,12 @@ const parseXml = function (xmlData) {
50325065
this.matcher.pop();
50335066
this.isCurrentNodeStopNode = false; // Reset flag when closing tag
50345067

5035-
currentNode = this.tagsNodeStack.pop();//avoid recursion, set the parent tag scope
5068+
//a closing tag with no matching opening tag leaves the stack empty
5069+
currentNode = this.tagsNodeStack.pop() || xmlObj;//avoid recursion, set the parent tag scope
5070+
5071+
if (options.captureMetaData && currentNode) {
5072+
currentNode.addEndIndex(closeIndex + 1);
5073+
}
50365074
textData = "";
50375075
i = closeIndex;
50385076
} else if (c1 === 63) { //'?'
@@ -5058,6 +5096,11 @@ const parseXml = function (xmlData) {
50585096
childNode[":@"] = attsMap
50595097
}
50605098
this.addChild(currentNode, childNode, this.readonlyMatcher, i);
5099+
5100+
if (options.captureMetaData) {
5101+
// closeIndex points at '?' of the closing '?>'
5102+
currentNode.addEndIndex(tagData.closeIndex + 2);
5103+
}
50615104
}
50625105

50635106

@@ -5222,6 +5265,10 @@ const parseXml = function (xmlData) {
52225265
this.isCurrentNodeStopNode = false; // Reset flag
52235266

52245267
this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);
5268+
5269+
if (options.captureMetaData) {
5270+
currentNode.addEndIndex(i + 1);
5271+
}
52255272
} else {
52265273
//selfClosing tag
52275274
if (isSelfClosing) {
@@ -5232,6 +5279,10 @@ const parseXml = function (xmlData) {
52325279
childNode[":@"] = prefixedAttrs;
52335280
}
52345281
this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);
5282+
5283+
if (options.captureMetaData) {
5284+
currentNode.addEndIndex(closeIndex + 1);
5285+
}
52355286
this.matcher.pop(); // Pop self-closing tag
52365287
this.isCurrentNodeStopNode = false; // Reset flag
52375288
}
@@ -5241,6 +5292,10 @@ const parseXml = function (xmlData) {
52415292
childNode[":@"] = prefixedAttrs;
52425293
}
52435294
this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);
5295+
5296+
if (options.captureMetaData) {
5297+
currentNode.addEndIndex(result.closeIndex + 1);
5298+
}
52445299
this.matcher.pop(); // Pop unpaired tag
52455300
this.isCurrentNodeStopNode = false; // Reset flag
52465301
i = result.closeIndex;

‎dist/setup/index.js‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36065,6 +36065,9 @@ function _unique(values) {
3606536065
/******/ __nccwpck_require__.m = __webpack_modules__;
3606636066
/******/
3606736067
/************************************************************************/
36068+
/******/ /* webpack/runtime/asset-relocator-loader */
36069+
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = decodeURIComponent(new URL('.', import.meta.url).pathname).slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/";
36070+
/******/
3606836071
/******/ /* webpack/runtime/compat get default export */
3606936072
/******/ (() => {
3607036073
/******/ // getDefaultExport function for compatibility with non-harmony modules
@@ -36157,10 +36160,6 @@ function _unique(values) {
3615736160
/******/ };
3615836161
/******/ })();
3615936162
/******/
36160-
/******/ /* webpack/runtime/compat */
36161-
/******/
36162-
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/";
36163-
/******/
3616436163
/******/ /* webpack/runtime/import chunk loading */
3616536164
/******/ (() => {
3616636165
/******/ // no baseURI

0 commit comments

Comments
 (0)