@depup/js-yaml 5.2.1-depup.9 → 5.2.2-depup.0
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.
- package/README.md +2 -2
- package/changes.json +1 -1
- package/dist/browser/js-yaml.esm.min.mjs +357 -346
- package/dist/browser/js-yaml.esm.min.mjs.map +1 -1
- package/dist/browser/js-yaml.umd.min.js +13 -13
- package/dist/browser/js-yaml.umd.min.js.map +1 -1
- package/dist/js-yaml.cjs.js +17 -11
- package/dist/js-yaml.cjs.js.map +1 -1
- package/dist/js-yaml.mjs +17 -11
- package/dist/js-yaml.mjs.map +1 -1
- package/package.json +3 -3
package/dist/js-yaml.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! js-yaml 5.2.
|
|
1
|
+
/*! js-yaml 5.2.2 https://github.com/nodeca/js-yaml @license MIT */
|
|
2
2
|
//#region src/tag.ts
|
|
3
3
|
var NOT_RESOLVED = Symbol("NOT_RESOLVED");
|
|
4
4
|
var MERGE_KEY = Symbol("MERGE_KEY");
|
|
@@ -1439,6 +1439,17 @@ function addMappingEvent(state, start, anchorStart, anchorEnd, tagStart, tagEnd,
|
|
|
1439
1439
|
style
|
|
1440
1440
|
});
|
|
1441
1441
|
}
|
|
1442
|
+
function insertFlowPairMappingEvent(state, snapshot) {
|
|
1443
|
+
state.events.splice(snapshot.eventsLength, 0, {
|
|
1444
|
+
type: 3,
|
|
1445
|
+
start: snapshot.position,
|
|
1446
|
+
anchorStart: NO_RANGE$1,
|
|
1447
|
+
anchorEnd: NO_RANGE$1,
|
|
1448
|
+
tagStart: NO_RANGE$1,
|
|
1449
|
+
tagEnd: NO_RANGE$1,
|
|
1450
|
+
style: 2
|
|
1451
|
+
});
|
|
1452
|
+
}
|
|
1442
1453
|
function addScalarEvent(state, valueStart, valueEnd, anchorStart, anchorEnd, tagStart, tagEnd, style, chomping = 1, indent = -1, fast = false) {
|
|
1443
1454
|
state.events.push({
|
|
1444
1455
|
type: 4,
|
|
@@ -1882,12 +1893,8 @@ function readFlowCollection(state, nodeIndent, props) {
|
|
|
1882
1893
|
state.position++;
|
|
1883
1894
|
skipFlowSeparationSpace(state, nodeIndent);
|
|
1884
1895
|
if (!isMapping) {
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
if (!parseNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true)) addEmptyScalarEvent(state);
|
|
1888
|
-
skipFlowSeparationSpace(state, nodeIndent);
|
|
1889
|
-
state.position++;
|
|
1890
|
-
skipFlowSeparationSpace(state, nodeIndent);
|
|
1896
|
+
insertFlowPairMappingEvent(state, entryStart);
|
|
1897
|
+
if (!keyWasRead) addEmptyScalarEvent(state);
|
|
1891
1898
|
} else if (!keyWasRead) addEmptyScalarEvent(state);
|
|
1892
1899
|
if (!parseNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true)) addEmptyScalarEvent(state);
|
|
1893
1900
|
skipFlowSeparationSpace(state, nodeIndent);
|
|
@@ -1897,9 +1904,8 @@ function readFlowCollection(state, nodeIndent, props) {
|
|
|
1897
1904
|
addEmptyScalarEvent(state);
|
|
1898
1905
|
} else if (isMapping) addEmptyScalarEvent(state);
|
|
1899
1906
|
else if (isPair) {
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
parseNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
|
|
1907
|
+
insertFlowPairMappingEvent(state, entryStart);
|
|
1908
|
+
if (!keyWasRead) addEmptyScalarEvent(state);
|
|
1903
1909
|
addEmptyScalarEvent(state);
|
|
1904
1910
|
addPopEvent(state);
|
|
1905
1911
|
}
|
|
@@ -2554,7 +2560,7 @@ function isNsCharOrWhitespace(c) {
|
|
|
2554
2560
|
function isPlainSafe(c, prev, inblock) {
|
|
2555
2561
|
const cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);
|
|
2556
2562
|
const cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);
|
|
2557
|
-
return (inblock ? cIsNsCharOrWhitespace : cIsNsCharOrWhitespace && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET) && c !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar;
|
|
2563
|
+
return (inblock ? cIsNsCharOrWhitespace : cIsNsCharOrWhitespace && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET) && c !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar && (inblock || c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET);
|
|
2558
2564
|
}
|
|
2559
2565
|
function isPlainSafeFirst(c) {
|
|
2560
2566
|
return isPrintable(c) && c !== CHAR_BOM && !isWhitespace(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT;
|