chore: update build job to fail when there are uncommited changes (#2571)
This commit is contained in:
1
.github/workflows/test.yml
vendored
1
.github/workflows/test.yml
vendored
@@ -85,6 +85,7 @@ jobs:
|
||||
if: steps.verify_changed_files.outputs.files_changed == 'true' && github.event_name == 'pull_request'
|
||||
run: |
|
||||
echo "Uncommitted build/lint changes detected. Please run 'yarn all' locally and push the changes for review."
|
||||
exit 1
|
||||
|
||||
- name: Upload build assets
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
|
||||
159
dist/index.js
generated
vendored
159
dist/index.js
generated
vendored
@@ -4873,6 +4873,7 @@ class Context {
|
||||
this.action = process.env.GITHUB_ACTION;
|
||||
this.actor = process.env.GITHUB_ACTOR;
|
||||
this.job = process.env.GITHUB_JOB;
|
||||
this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10);
|
||||
this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);
|
||||
this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);
|
||||
this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;
|
||||
@@ -43642,7 +43643,7 @@ module.exports = {
|
||||
|
||||
|
||||
const { parseSetCookie } = __nccwpck_require__(8915)
|
||||
const { stringify, getHeadersList } = __nccwpck_require__(3834)
|
||||
const { stringify } = __nccwpck_require__(3834)
|
||||
const { webidl } = __nccwpck_require__(4222)
|
||||
const { Headers } = __nccwpck_require__(6349)
|
||||
|
||||
@@ -43718,14 +43719,13 @@ function getSetCookies (headers) {
|
||||
|
||||
webidl.brandCheck(headers, Headers, { strict: false })
|
||||
|
||||
const cookies = getHeadersList(headers).cookies
|
||||
const cookies = headers.getSetCookie()
|
||||
|
||||
if (!cookies) {
|
||||
return []
|
||||
}
|
||||
|
||||
// In older versions of undici, cookies is a list of name:value.
|
||||
return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
|
||||
return cookies.map((pair) => parseSetCookie(pair))
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -44153,14 +44153,15 @@ module.exports = {
|
||||
/***/ }),
|
||||
|
||||
/***/ 3834:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const assert = __nccwpck_require__(2613)
|
||||
const { kHeadersList } = __nccwpck_require__(6443)
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function isCTLExcludingHtab (value) {
|
||||
if (value.length === 0) {
|
||||
return false
|
||||
@@ -44421,31 +44422,13 @@ function stringify (cookie) {
|
||||
return out.join('; ')
|
||||
}
|
||||
|
||||
let kHeadersListNode
|
||||
|
||||
function getHeadersList (headers) {
|
||||
if (headers[kHeadersList]) {
|
||||
return headers[kHeadersList]
|
||||
}
|
||||
|
||||
if (!kHeadersListNode) {
|
||||
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
|
||||
(symbol) => symbol.description === 'headers list'
|
||||
)
|
||||
|
||||
assert(kHeadersListNode, 'Headers cannot be parsed')
|
||||
}
|
||||
|
||||
const headersList = headers[kHeadersListNode]
|
||||
assert(headersList)
|
||||
|
||||
return headersList
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
isCTLExcludingHtab,
|
||||
stringify,
|
||||
getHeadersList
|
||||
validateCookieName,
|
||||
validateCookiePath,
|
||||
validateCookieValue,
|
||||
toIMFDate,
|
||||
stringify
|
||||
}
|
||||
|
||||
|
||||
@@ -48449,6 +48432,7 @@ const {
|
||||
isValidHeaderName,
|
||||
isValidHeaderValue
|
||||
} = __nccwpck_require__(5523)
|
||||
const util = __nccwpck_require__(9023)
|
||||
const { webidl } = __nccwpck_require__(4222)
|
||||
const assert = __nccwpck_require__(2613)
|
||||
|
||||
@@ -49002,6 +48986,9 @@ Object.defineProperties(Headers.prototype, {
|
||||
[Symbol.toStringTag]: {
|
||||
value: 'Headers',
|
||||
configurable: true
|
||||
},
|
||||
[util.inspect.custom]: {
|
||||
enumerable: false
|
||||
}
|
||||
})
|
||||
|
||||
@@ -58178,6 +58165,20 @@ class Pool extends PoolBase {
|
||||
? { ...options.interceptors }
|
||||
: undefined
|
||||
this[kFactory] = factory
|
||||
|
||||
this.on('connectionError', (origin, targets, error) => {
|
||||
// If a connection error occurs, we remove the client from the pool,
|
||||
// and emit a connectionError event. They will not be re-used.
|
||||
// Fixes https://github.com/nodejs/undici/issues/3895
|
||||
for (const target of targets) {
|
||||
// Do not use kRemoveClient here, as it will close the client,
|
||||
// but the client cannot be closed in this state.
|
||||
const idx = this[kClients].indexOf(target)
|
||||
if (idx !== -1) {
|
||||
this[kClients].splice(idx, 1)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
[kGetDispatcher] () {
|
||||
@@ -60652,14 +60653,6 @@ module.exports = require("net");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 4573:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = require("node:buffer");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 7598:
|
||||
/***/ ((module) => {
|
||||
|
||||
@@ -60676,14 +60669,6 @@ module.exports = require("node:events");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 1708:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = require("node:process");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 7075:
|
||||
/***/ ((module) => {
|
||||
|
||||
@@ -60724,6 +60709,14 @@ module.exports = require("perf_hooks");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 932:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = require("process");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 3480:
|
||||
/***/ ((module) => {
|
||||
|
||||
@@ -62811,7 +62804,7 @@ exports.composeScalar = composeScalar;
|
||||
"use strict";
|
||||
|
||||
|
||||
var node_process = __nccwpck_require__(1708);
|
||||
var node_process = __nccwpck_require__(932);
|
||||
var directives = __nccwpck_require__(1342);
|
||||
var Document = __nccwpck_require__(3021);
|
||||
var errors = __nccwpck_require__(1464);
|
||||
@@ -64004,8 +63997,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;
|
||||
@@ -64014,8 +64006,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;
|
||||
@@ -64134,8 +64125,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) {
|
||||
@@ -64603,8 +64593,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;
|
||||
@@ -64752,8 +64741,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 {
|
||||
@@ -65125,7 +65113,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')
|
||||
@@ -65172,23 +65160,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);
|
||||
@@ -65869,6 +65870,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) {
|
||||
@@ -67310,7 +67312,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__(361);
|
||||
|
||||
@@ -68901,7 +68903,7 @@ exports.getTags = getTags;
|
||||
"use strict";
|
||||
|
||||
|
||||
var node_buffer = __nccwpck_require__(4573);
|
||||
var node_buffer = __nccwpck_require__(181);
|
||||
var Scalar = __nccwpck_require__(3301);
|
||||
var stringifyString = __nccwpck_require__(3069);
|
||||
|
||||
@@ -68954,8 +68956,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);
|
||||
@@ -69905,7 +69906,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;
|
||||
@@ -69920,7 +69921,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(' ');
|
||||
@@ -69946,8 +69947,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;
|
||||
@@ -70704,10 +70704,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
|
||||
|
||||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user