@@ -1075,8 +1075,9 @@ exports.context = new Context.Context();
10751075 * @param token the repo PAT or GITHUB_TOKEN
10761076 * @param options other options to set
10771077 */
1078- function getOctokit(token, options) {
1079- return new utils_1.GitHub(utils_1.getOctokitOptions(token, options));
1078+ function getOctokit(token, options, ...additionalPlugins) {
1079+ const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins);
1080+ return new GitHubWithPlugins(utils_1.getOctokitOptions(token, options));
10801081}
10811082exports.getOctokit = getOctokit;
10821083//# sourceMappingURL=github.js.map
@@ -1158,7 +1159,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
11581159 return result;
11591160};
11601161Object.defineProperty(exports, "__esModule", ({ value: true }));
1161- exports.getOctokitOptions = exports.GitHub = exports.context = void 0;
1162+ exports.getOctokitOptions = exports.GitHub = exports.defaults = exports. context = void 0;
11621163const Context = __importStar(__nccwpck_require__(4087));
11631164const Utils = __importStar(__nccwpck_require__(7914));
11641165// octokit + plugins
@@ -1167,13 +1168,13 @@ const plugin_rest_endpoint_methods_1 = __nccwpck_require__(3044);
11671168const plugin_paginate_rest_1 = __nccwpck_require__(4193);
11681169exports.context = new Context.Context();
11691170const baseUrl = Utils.getApiBaseUrl();
1170- const defaults = {
1171+ exports. defaults = {
11711172 baseUrl,
11721173 request: {
11731174 agent: Utils.getProxyAgent(baseUrl)
11741175 }
11751176};
1176- exports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(defaults);
1177+ exports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(exports. defaults);
11771178/**
11781179 * Convience function to correctly format Octokit Options to pass into the constructor.
11791180 *
@@ -5794,7 +5795,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
57945795
57955796var BottleneckLight = _interopDefault(__nccwpck_require__(1174));
57965797
5797- const VERSION = "4.2 .0";
5798+ const VERSION = "4.3 .0";
57985799
57995800const noop = () => Promise.resolve(); // @ts-expect-error
58005801
@@ -16369,7 +16370,7 @@ function composeNode(ctx, token, props, onError) {
1636916370 node.srcToken = token;
1637016371 return node;
1637116372}
16372- function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag }, onError) {
16373+ function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) {
1637316374 const token = {
1637416375 type: 'scalar',
1637516376 offset: utilEmptyScalarPosition.emptyScalarPosition(offset, before, pos),
@@ -16384,8 +16385,10 @@ function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anch
1638416385 }
1638516386 if (spaceBefore)
1638616387 node.spaceBefore = true;
16387- if (comment)
16388+ if (comment) {
1638816389 node.comment = comment;
16390+ node.range[2] = end;
16391+ }
1638916392 return node;
1639016393}
1639116394function composeAlias({ options }, { offset, source, end }, onError) {
@@ -16746,6 +16749,7 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError) {
1674616749 if (ctx.atRoot)
1674716750 ctx.atRoot = false;
1674816751 let offset = bm.offset;
16752+ let commentEnd = null;
1674916753 for (const collItem of bm.items) {
1675016754 const { start, key, sep, value } = collItem;
1675116755 // key properties
@@ -16765,7 +16769,7 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError) {
1676516769 onError(offset, 'BAD_INDENT', startColMsg);
1676616770 }
1676716771 if (!keyProps.anchor && !keyProps.tag && !sep) {
16768- // TODO: assert being at last item?
16772+ commentEnd = keyProps.end;
1676916773 if (keyProps.comment) {
1677016774 if (map.comment)
1677116775 map.comment += '\n' + keyProps.comment;
@@ -16835,7 +16839,9 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError) {
1683516839 map.items.push(pair);
1683616840 }
1683716841 }
16838- map.range = [bm.offset, offset, offset];
16842+ if (commentEnd && commentEnd < offset)
16843+ onError(commentEnd, 'IMPOSSIBLE', 'Map comment with trailing content');
16844+ map.range = [bm.offset, offset, commentEnd ?? offset];
1683916845 return map;
1684016846}
1684116847
@@ -17063,6 +17069,7 @@ function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError) {
1706317069 if (ctx.atRoot)
1706417070 ctx.atRoot = false;
1706517071 let offset = bs.offset;
17072+ let commentEnd = null;
1706617073 for (const { start, value } of bs.items) {
1706717074 const props = resolveProps.resolveProps(start, {
1706817075 indicator: 'seq-item-ind',
@@ -17071,30 +17078,29 @@ function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError) {
1707117078 onError,
1707217079 startOnNewline: true
1707317080 });
17074- offset = props.end;
1707517081 if (!props.found) {
1707617082 if (props.anchor || props.tag || value) {
1707717083 if (value && value.type === 'block-seq')
17078- onError(offset , 'BAD_INDENT', 'All sequence items must start at the same column');
17084+ onError(props.end , 'BAD_INDENT', 'All sequence items must start at the same column');
1707917085 else
1708017086 onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator');
1708117087 }
1708217088 else {
17083- // TODO: assert being at last item?
17089+ commentEnd = props.end;
1708417090 if (props.comment)
1708517091 seq.comment = props.comment;
1708617092 continue;
1708717093 }
1708817094 }
1708917095 const node = value
1709017096 ? composeNode(ctx, value, props, onError)
17091- : composeEmptyNode(ctx, offset , start, null, props, onError);
17097+ : composeEmptyNode(ctx, props.end , start, null, props, onError);
1709217098 if (ctx.schema.compat)
1709317099 utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError);
1709417100 offset = node.range[2];
1709517101 seq.items.push(node);
1709617102 }
17097- seq.range = [bs.offset, offset, offset];
17103+ seq.range = [bs.offset, offset, commentEnd ?? offset];
1709817104 return seq;
1709917105}
1710017106
@@ -18395,7 +18401,7 @@ function createNode(value, tagName, ctx) {
1839518401 if (value instanceof String ||
1839618402 value instanceof Number ||
1839718403 value instanceof Boolean ||
18398- (typeof BigInt === 'function ' && value instanceof BigInt) // not supported everywhere
18404+ (typeof BigInt !== 'undefined ' && value instanceof BigInt) // not supported everywhere
1839918405 ) {
1840018406 // https://tc39.es/ecma262/#sec-serializejsonproperty
1840118407 value = value.valueOf();
@@ -22978,7 +22984,8 @@ class YAMLSet extends YAMLMap.YAMLMap {
2297822984 let pair;
2297922985 if (Node.isPair(key))
2298022986 pair = key;
22981- else if (typeof key === 'object' &&
22987+ else if (key &&
22988+ typeof key === 'object' &&
2298222989 'key' in key &&
2298322990 'value' in key &&
2298422991 key.value === null)
0 commit comments