fix: update ts-jest, @types/jest, jest-circus and typescript for jest@30 compatibility

Co-authored-by: peter-evans <[email protected]>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-06 07:55:52 +00:00
co-authored by peter-evans
parent c529de09cf
commit 05d9f66f89
3 changed files with 2356 additions and 5509 deletions
+70 -41
View File
@@ -22,13 +22,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) { }) : function(o, v) {
o["default"] = v; o["default"] = v;
}); });
var __importStar = (this && this.__importStar) || function (mod) { var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod; if (mod && mod.__esModule) return mod;
var result = {}; var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod); __setModuleDefault(result, mod);
return result; return result;
}; };
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) { return new (P || (P = Promise))(function (resolve, reject) {
@@ -46,7 +56,7 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
}; };
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.createOrUpdateComment = void 0; exports.createOrUpdateComment = createOrUpdateComment;
const core = __importStar(__nccwpck_require__(7484)); const core = __importStar(__nccwpck_require__(7484));
const github = __importStar(__nccwpck_require__(3228)); const github = __importStar(__nccwpck_require__(3228));
const utils = __importStar(__nccwpck_require__(9277)); const utils = __importStar(__nccwpck_require__(9277));
@@ -197,8 +207,8 @@ function getAuthenticatedUser(octokit) {
}); });
} }
function getCommentReactionsForUser(octokit, owner, repo, commentId, user) { function getCommentReactionsForUser(octokit, owner, repo, commentId, user) {
var _a, e_1, _b, _c;
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
var _a, e_1, _b, _c;
const userReactions = []; const userReactions = [];
try { try {
for (var _d = true, _e = __asyncValues(octokit.paginate.iterator(octokit.rest.reactions.listForIssueComment, { for (var _d = true, _e = __asyncValues(octokit.paginate.iterator(octokit.rest.reactions.listForIssueComment, {
@@ -206,10 +216,9 @@ function getCommentReactionsForUser(octokit, owner, repo, commentId, user) {
repo, repo,
comment_id: commentId, comment_id: commentId,
per_page: 100 per_page: 100
})), _f; _f = yield _e.next(), _a = _f.done, !_a;) { })), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
_c = _f.value; _c = _f.value;
_d = false; _d = false;
try {
const { data: reactions } = _c; const { data: reactions } = _c;
const filteredReactions = reactions const filteredReactions = reactions
.filter(reaction => reaction.user.login === user) .filter(reaction => reaction.user.login === user)
@@ -218,10 +227,6 @@ function getCommentReactionsForUser(octokit, owner, repo, commentId, user) {
}); });
userReactions.push(...filteredReactions); userReactions.push(...filteredReactions);
} }
finally {
_d = true;
}
}
} }
catch (e_1_1) { e_1 = { error: e_1_1 }; } catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally { finally {
@@ -255,7 +260,6 @@ function createOrUpdateComment(inputs, body) {
} }
}); });
} }
exports.createOrUpdateComment = createOrUpdateComment;
/***/ }), /***/ }),
@@ -281,13 +285,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) { }) : function(o, v) {
o["default"] = v; o["default"] = v;
}); });
var __importStar = (this && this.__importStar) || function (mod) { var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod; if (mod && mod.__esModule) return mod;
var result = {}; var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod); __setModuleDefault(result, mod);
return result; return result;
}; };
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) { return new (P || (P = Promise))(function (resolve, reject) {
@@ -399,33 +413,42 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) { }) : function(o, v) {
o["default"] = v; o["default"] = v;
}); });
var __importStar = (this && this.__importStar) || function (mod) { var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod; if (mod && mod.__esModule) return mod;
var result = {}; var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod); __setModuleDefault(result, mod);
return result; return result;
}; };
})();
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getErrorMessage = exports.getStringAsArray = exports.getInputAsArray = void 0; exports.getInputAsArray = getInputAsArray;
exports.getStringAsArray = getStringAsArray;
exports.getErrorMessage = getErrorMessage;
const core = __importStar(__nccwpck_require__(7484)); const core = __importStar(__nccwpck_require__(7484));
function getInputAsArray(name, options) { function getInputAsArray(name, options) {
return getStringAsArray(core.getInput(name, options)); return getStringAsArray(core.getInput(name, options));
} }
exports.getInputAsArray = getInputAsArray;
function getStringAsArray(str) { function getStringAsArray(str) {
return str return str
.split(/[\n,]+/) .split(/[\n,]+/)
.map(s => s.trim()) .map(s => s.trim())
.filter(x => x !== ''); .filter(x => x !== '');
} }
exports.getStringAsArray = getStringAsArray;
function getErrorMessage(error) { function getErrorMessage(error) {
if (error instanceof Error) if (error instanceof Error)
return error.message; return error.message;
return String(error); return String(error);
} }
exports.getErrorMessage = getErrorMessage;
/***/ }), /***/ }),
@@ -3987,11 +4010,11 @@ var __copyProps = (to, from, except, desc) => {
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// pkg/dist-src/index.js // pkg/dist-src/index.js
var dist_src_exports = {}; var index_exports = {};
__export(dist_src_exports, { __export(index_exports, {
Octokit: () => Octokit Octokit: () => Octokit
}); });
module.exports = __toCommonJS(dist_src_exports); module.exports = __toCommonJS(index_exports);
var import_universal_user_agent = __nccwpck_require__(3843); var import_universal_user_agent = __nccwpck_require__(3843);
var import_before_after_hook = __nccwpck_require__(2732); var import_before_after_hook = __nccwpck_require__(2732);
var import_request = __nccwpck_require__(8636); var import_request = __nccwpck_require__(8636);
@@ -3999,13 +4022,28 @@ var import_graphql = __nccwpck_require__(7);
var import_auth_token = __nccwpck_require__(7864); var import_auth_token = __nccwpck_require__(7864);
// pkg/dist-src/version.js // pkg/dist-src/version.js
var VERSION = "5.2.0"; var VERSION = "5.2.2";
// pkg/dist-src/index.js // pkg/dist-src/index.js
var noop = () => { var noop = () => {
}; };
var consoleWarn = console.warn.bind(console); var consoleWarn = console.warn.bind(console);
var consoleError = console.error.bind(console); var consoleError = console.error.bind(console);
function createLogger(logger = {}) {
if (typeof logger.debug !== "function") {
logger.debug = noop;
}
if (typeof logger.info !== "function") {
logger.info = noop;
}
if (typeof logger.warn !== "function") {
logger.warn = consoleWarn;
}
if (typeof logger.error !== "function") {
logger.error = consoleError;
}
return logger;
}
var userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; var userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
var Octokit = class { var Octokit = class {
static { static {
@@ -4079,15 +4117,7 @@ var Octokit = class {
} }
this.request = import_request.request.defaults(requestDefaults); this.request = import_request.request.defaults(requestDefaults);
this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults); this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults);
this.log = Object.assign( this.log = createLogger(options.log);
{
debug: noop,
info: noop,
warn: consoleWarn,
error: consoleError
},
options.log
);
this.hook = hook; this.hook = hook;
if (!options.authStrategy) { if (!options.authStrategy) {
if (!options.auth) { if (!options.auth) {
@@ -4540,18 +4570,18 @@ var __copyProps = (to, from, except, desc) => {
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// pkg/dist-src/index.js // pkg/dist-src/index.js
var dist_src_exports = {}; var index_exports = {};
__export(dist_src_exports, { __export(index_exports, {
GraphqlResponseError: () => GraphqlResponseError, GraphqlResponseError: () => GraphqlResponseError,
graphql: () => graphql2, graphql: () => graphql2,
withCustomRequest: () => withCustomRequest withCustomRequest: () => withCustomRequest
}); });
module.exports = __toCommonJS(dist_src_exports); module.exports = __toCommonJS(index_exports);
var import_request3 = __nccwpck_require__(8636); var import_request3 = __nccwpck_require__(8636);
var import_universal_user_agent = __nccwpck_require__(3843); var import_universal_user_agent = __nccwpck_require__(3843);
// pkg/dist-src/version.js // pkg/dist-src/version.js
var VERSION = "7.1.0"; var VERSION = "7.1.1";
// pkg/dist-src/with-defaults.js // pkg/dist-src/with-defaults.js
var import_request2 = __nccwpck_require__(8636); var import_request2 = __nccwpck_require__(8636);
@@ -4599,8 +4629,7 @@ function graphql(request2, query, options) {
); );
} }
for (const key in options) { for (const key in options) {
if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;
continue;
return Promise.reject( return Promise.reject(
new Error( new Error(
`[@octokit/graphql] "${key}" cannot be used as variable name` `[@octokit/graphql] "${key}" cannot be used as variable name`
+2263 -5445
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -34,7 +34,7 @@
"@actions/github": "^6.0.1" "@actions/github": "^6.0.1"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^27.0.3", "@types/jest": "^30.0.0",
"@types/node": "^18.19.130", "@types/node": "^18.19.130",
"@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0", "@typescript-eslint/parser": "^5.62.0",
@@ -44,10 +44,10 @@
"eslint-plugin-jest": "^27.9.0", "eslint-plugin-jest": "^27.9.0",
"eslint-plugin-prettier": "^5.5.5", "eslint-plugin-prettier": "^5.5.5",
"jest": "^30.2.0", "jest": "^30.2.0",
"jest-circus": "^27.5.1", "jest-circus": "^30.2.0",
"js-yaml": "^4.1.1", "js-yaml": "^4.1.1",
"prettier": "^3.8.1", "prettier": "^3.8.1",
"ts-jest": "^27.1.5", "ts-jest": "^29.4.6",
"typescript": "^4.9.5" "typescript": "^5.8.3"
} }
} }