Skip to content
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

Updating to node v20 and fixing tests #186

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
cache: 'npm'
cache-dependency-path: admin-support-cli/package-lock.json

Expand Down
2 changes: 1 addition & 1 deletion admin-support-cli/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ outputs:
output:
description: 'The output of the command executed'
runs:
using: 'node16'
using: 'node20'
main: 'dist/index.js'
43 changes: 25 additions & 18 deletions admin-support-cli/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1075,8 +1075,9 @@ exports.context = new Context.Context();
* @param token the repo PAT or GITHUB_TOKEN
* @param options other options to set
*/
function getOctokit(token, options) {
return new utils_1.GitHub(utils_1.getOctokitOptions(token, options));
function getOctokit(token, options, ...additionalPlugins) {
const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins);
return new GitHubWithPlugins(utils_1.getOctokitOptions(token, options));
}
exports.getOctokit = getOctokit;
//# sourceMappingURL=github.js.map
Expand Down Expand Up @@ -1158,7 +1159,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getOctokitOptions = exports.GitHub = exports.context = void 0;
exports.getOctokitOptions = exports.GitHub = exports.defaults = exports.context = void 0;
const Context = __importStar(__nccwpck_require__(4087));
const Utils = __importStar(__nccwpck_require__(7914));
// octokit + plugins
Expand All @@ -1167,13 +1168,13 @@ const plugin_rest_endpoint_methods_1 = __nccwpck_require__(3044);
const plugin_paginate_rest_1 = __nccwpck_require__(4193);
exports.context = new Context.Context();
const baseUrl = Utils.getApiBaseUrl();
const defaults = {
exports.defaults = {
baseUrl,
request: {
agent: Utils.getProxyAgent(baseUrl)
}
};
exports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(defaults);
exports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(exports.defaults);
/**
* Convience function to correctly format Octokit Options to pass into the constructor.
*
Expand Down Expand Up @@ -5794,7 +5795,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau

var BottleneckLight = _interopDefault(__nccwpck_require__(1174));

const VERSION = "4.2.0";
const VERSION = "4.3.0";

const noop = () => Promise.resolve(); // @ts-expect-error

Expand Down Expand Up @@ -15630,7 +15631,7 @@ class DemotionReportAction extends Command {
org: this.params.targetOrg,
include: 'all',
per_page: 100,
phrase: `created:>=${report.promotionDate} created:<=${report.demotionDate} `
phrase: `created:${report.promotionDate}..${report.demotionDate}`
})) {
// Filter only the events that happened from the moment the issue was opened to the present
const data = request.data
Expand Down Expand Up @@ -16369,7 +16370,7 @@ function composeNode(ctx, token, props, onError) {
node.srcToken = token;
return node;
}
function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag }, onError) {
function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) {
const token = {
type: 'scalar',
offset: utilEmptyScalarPosition.emptyScalarPosition(offset, before, pos),
Expand All @@ -16384,8 +16385,10 @@ function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anch
}
if (spaceBefore)
node.spaceBefore = true;
if (comment)
if (comment) {
node.comment = comment;
node.range[2] = end;
}
return node;
}
function composeAlias({ options }, { offset, source, end }, onError) {
Expand Down Expand Up @@ -16746,6 +16749,7 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError) {
if (ctx.atRoot)
ctx.atRoot = false;
let offset = bm.offset;
let commentEnd = null;
for (const collItem of bm.items) {
const { start, key, sep, value } = collItem;
// key properties
Expand All @@ -16765,7 +16769,7 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError) {
onError(offset, 'BAD_INDENT', startColMsg);
}
if (!keyProps.anchor && !keyProps.tag && !sep) {
// TODO: assert being at last item?
commentEnd = keyProps.end;
if (keyProps.comment) {
if (map.comment)
map.comment += '\n' + keyProps.comment;
Expand Down Expand Up @@ -16835,7 +16839,9 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError) {
map.items.push(pair);
}
}
map.range = [bm.offset, offset, offset];
if (commentEnd && commentEnd < offset)
onError(commentEnd, 'IMPOSSIBLE', 'Map comment with trailing content');
map.range = [bm.offset, offset, commentEnd ?? offset];
return map;
}

Expand Down Expand Up @@ -17063,6 +17069,7 @@ function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError) {
if (ctx.atRoot)
ctx.atRoot = false;
let offset = bs.offset;
let commentEnd = null;
for (const { start, value } of bs.items) {
const props = resolveProps.resolveProps(start, {
indicator: 'seq-item-ind',
Expand All @@ -17071,30 +17078,29 @@ function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError) {
onError,
startOnNewline: true
});
offset = props.end;
if (!props.found) {
if (props.anchor || props.tag || value) {
if (value && value.type === 'block-seq')
onError(offset, 'BAD_INDENT', 'All sequence items must start at the same column');
onError(props.end, 'BAD_INDENT', 'All sequence items must start at the same column');
else
onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator');
}
else {
// TODO: assert being at last item?
commentEnd = props.end;
if (props.comment)
seq.comment = props.comment;
continue;
}
}
const node = value
? composeNode(ctx, value, props, onError)
: composeEmptyNode(ctx, offset, start, null, props, onError);
: composeEmptyNode(ctx, props.end, start, null, props, onError);
if (ctx.schema.compat)
utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError);
offset = node.range[2];
seq.items.push(node);
}
seq.range = [bs.offset, offset, offset];
seq.range = [bs.offset, offset, commentEnd ?? offset];
return seq;
}

Expand Down Expand Up @@ -18395,7 +18401,7 @@ function createNode(value, tagName, ctx) {
if (value instanceof String ||
value instanceof Number ||
value instanceof Boolean ||
(typeof BigInt === 'function' && value instanceof BigInt) // not supported everywhere
(typeof BigInt !== 'undefined' && value instanceof BigInt) // not supported everywhere
) {
// https://tc39.es/ecma262/#sec-serializejsonproperty
value = value.valueOf();
Expand Down Expand Up @@ -22978,7 +22984,8 @@ class YAMLSet extends YAMLMap.YAMLMap {
let pair;
if (Node.isPair(key))
pair = key;
else if (typeof key === 'object' &&
else if (key &&
typeof key === 'object' &&
'key' in key &&
'value' in key &&
key.value === null)
Expand Down
Loading
Loading