Skip to content

chore: Bump yaml from 2.7.1 to 2.8.0 #755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 39 additions & 49 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110627,14 +110627,6 @@ module.exports = require("net");

/***/ }),

/***/ 4573:
/***/ ((module) => {

"use strict";
module.exports = require("node:buffer");

/***/ }),

/***/ 77598:
/***/ ((module) => {

Expand All @@ -110651,14 +110643,6 @@ module.exports = require("node:events");

/***/ }),

/***/ 1708:
/***/ ((module) => {

"use strict";
module.exports = require("node:process");

/***/ }),

/***/ 57075:
/***/ ((module) => {

Expand Down Expand Up @@ -112786,7 +112770,7 @@ exports.composeScalar = composeScalar;
"use strict";


var node_process = __nccwpck_require__(1708);
var node_process = __nccwpck_require__(932);
var directives = __nccwpck_require__(61342);
var Document = __nccwpck_require__(3021);
var errors = __nccwpck_require__(91464);
Expand Down Expand Up @@ -113979,8 +113963,7 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIn
if (token.source.endsWith(':'))
onError(token.offset + token.source.length - 1, 'BAD_ALIAS', 'Anchor ending in : is ambiguous', true);
anchor = token;
if (start === null)
start = token.offset;
start ?? (start = token.offset);
atNewline = false;
hasSpace = false;
reqSpace = true;
Expand All @@ -113989,8 +113972,7 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIn
if (tag)
onError(token, 'MULTIPLE_TAGS', 'A node can have at most one tag');
tag = token;
if (start === null)
start = token.offset;
start ?? (start = token.offset);
atNewline = false;
hasSpace = false;
reqSpace = true;
Expand Down Expand Up @@ -114109,8 +114091,7 @@ exports.containsNewline = containsNewline;

function emptyScalarPosition(offset, before, pos) {
if (before) {
if (pos === null)
pos = before.length;
pos ?? (pos = before.length);
for (let i = pos - 1; i >= 0; --i) {
let st = before[i];
switch (st.type) {
Expand Down Expand Up @@ -114578,8 +114559,7 @@ function createNodeAnchors(doc, prefix) {
return {
onAnchor: (source) => {
aliasObjects.push(source);
if (!prevAnchors)
prevAnchors = anchorNames(doc);
prevAnchors ?? (prevAnchors = anchorNames(doc));
const anchor = findNewAnchor(prefix, prevAnchors);
prevAnchors.add(anchor);
return anchor;
Expand Down Expand Up @@ -114727,8 +114707,7 @@ function createNode(value, tagName, ctx) {
if (aliasDuplicateObjects && value && typeof value === 'object') {
ref = sourceObjects.get(value);
if (ref) {
if (!ref.anchor)
ref.anchor = onAnchor(value);
ref.anchor ?? (ref.anchor = onAnchor(value));
return new Alias.Alias(ref.anchor);
}
else {
Expand Down Expand Up @@ -115100,7 +115079,7 @@ exports.visitAsync = visit.visitAsync;
"use strict";


var node_process = __nccwpck_require__(1708);
var node_process = __nccwpck_require__(932);

function debug(logLevel, ...messages) {
if (logLevel === 'debug')
Expand Down Expand Up @@ -115147,23 +115126,36 @@ class Alias extends Node.NodeBase {
* Resolve the value of this alias within `doc`, finding the last
* instance of the `source` anchor before this node.
*/
resolve(doc) {
resolve(doc, ctx) {
let nodes;
if (ctx?.aliasResolveCache) {
nodes = ctx.aliasResolveCache;
}
else {
nodes = [];
visit.visit(doc, {
Node: (_key, node) => {
if (identity.isAlias(node) || identity.hasAnchor(node))
nodes.push(node);
}
});
if (ctx)
ctx.aliasResolveCache = nodes;
}
let found = undefined;
visit.visit(doc, {
Node: (_key, node) => {
if (node === this)
return visit.visit.BREAK;
if (node.anchor === this.source)
found = node;
}
});
for (const node of nodes) {
if (node === this)
break;
if (node.anchor === this.source)
found = node;
}
return found;
}
toJSON(_arg, ctx) {
if (!ctx)
return { source: this.source };
const { anchors, doc, maxAliasCount } = ctx;
const source = this.resolve(doc);
const source = this.resolve(doc, ctx);
if (!source) {
const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
throw new ReferenceError(msg);
Expand Down Expand Up @@ -115844,6 +115836,7 @@ function addPairToJSMap(ctx, map, { key, value }) {
function stringifyKey(key, jsKey, ctx) {
if (jsKey === null)
return '';
// eslint-disable-next-line @typescript-eslint/no-base-to-string
if (typeof jsKey !== 'object')
return String(jsKey);
if (identity.isNode(key) && ctx?.doc) {
Expand Down Expand Up @@ -117285,7 +117278,7 @@ exports.LineCounter = LineCounter;
"use strict";


var node_process = __nccwpck_require__(1708);
var node_process = __nccwpck_require__(932);
var cst = __nccwpck_require__(3461);
var lexer = __nccwpck_require__(40361);

Expand Down Expand Up @@ -118876,7 +118869,7 @@ exports.getTags = getTags;
"use strict";


var node_buffer = __nccwpck_require__(4573);
var node_buffer = __nccwpck_require__(20181);
var Scalar = __nccwpck_require__(63301);
var stringifyString = __nccwpck_require__(83069);

Expand Down Expand Up @@ -118929,8 +118922,7 @@ const binary = {
else {
throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required');
}
if (!type)
type = Scalar.Scalar.BLOCK_LITERAL;
type ?? (type = Scalar.Scalar.BLOCK_LITERAL);
if (type !== Scalar.Scalar.QUOTE_DOUBLE) {
const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);
const n = Math.ceil(str.length / lineWidth);
Expand Down Expand Up @@ -119880,7 +119872,7 @@ function getTagObject(tags, item) {
tagObj = tags.find(t => t.nodeClass && obj instanceof t.nodeClass);
}
if (!tagObj) {
const name = obj?.constructor?.name ?? typeof obj;
const name = obj?.constructor?.name ?? (obj === null ? 'null' : typeof obj);
throw new Error(`Tag not resolved for ${name} value`);
}
return tagObj;
Expand All @@ -119895,7 +119887,7 @@ function stringifyProps(node, tagObj, { anchors: anchors$1, doc }) {
anchors$1.add(anchor);
props.push(`&${anchor}`);
}
const tag = node.tag ? node.tag : tagObj.default ? null : tagObj.tag;
const tag = node.tag ?? (tagObj.default ? null : tagObj.tag);
if (tag)
props.push(doc.directives.tagString(tag));
return props.join(' ');
Expand All @@ -119921,8 +119913,7 @@ function stringify(item, ctx, onComment, onChompKeep) {
const node = identity.isNode(item)
? item
: ctx.doc.createNode(item, { onTagObj: o => (tagObj = o) });
if (!tagObj)
tagObj = getTagObject(ctx.doc.schema.tags, node);
tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));
const props = stringifyProps(node, tagObj, ctx);
if (props.length > 0)
ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
Expand Down Expand Up @@ -120679,10 +120670,9 @@ function plainString(item, ctx, onComment, onChompKeep) {
(inFlow && /[[\]{},]/.test(value))) {
return quotedString(value, ctx);
}
if (!value ||
/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) {
if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) {
// not allowed:
// - empty string, '-' or '?'
// - '-' or '?'
// - start with an indicator character (except [?:-]) or /[?-] /
// - '\n ', ': ' or ' \n' anywhere
// - '#' not preceded by a non-space char
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@actions/core": "^1.10.1",
"@aws-sdk/client-codedeploy": "^3.798.0",
"@aws-sdk/client-ecs": "^3.741.0",
"yaml": "^2.7.1"
"yaml": "^2.8.0"
},
"devDependencies": {
"@eslint/js": "^9.27.0",
Expand Down