node_modules: upgrade

This commit is contained in:
Dawid Dziurla
2025-06-13 19:44:16 +02:00
parent 7d23b91650
commit 21abe22bd8
320 changed files with 34046 additions and 3537 deletions

View File

@ -42,24 +42,27 @@ const fs = __importStar(require("fs"));
const stream = __importStar(require("stream"));
const util = __importStar(require("util"));
const path = __importStar(require("path"));
function hashFiles(globber) {
function hashFiles(globber, currentWorkspace, verbose = false) {
var e_1, _a;
var _b;
return __awaiter(this, void 0, void 0, function* () {
const writeDelegate = verbose ? core.info : core.debug;
let hasMatch = false;
const githubWorkspace = (_b = process.env['GITHUB_WORKSPACE']) !== null && _b !== void 0 ? _b : process.cwd();
const githubWorkspace = currentWorkspace
? currentWorkspace
: (_b = process.env['GITHUB_WORKSPACE']) !== null && _b !== void 0 ? _b : process.cwd();
const result = crypto.createHash('sha256');
let count = 0;
try {
for (var _c = __asyncValues(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done;) {
const file = _d.value;
core.debug(file);
writeDelegate(file);
if (!file.startsWith(`${githubWorkspace}${path.sep}`)) {
core.debug(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`);
writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`);
continue;
}
if (fs.statSync(file).isDirectory()) {
core.debug(`Skip directory '${file}'.`);
writeDelegate(`Skip directory '${file}'.`);
continue;
}
const hash = crypto.createHash('sha256');
@ -81,11 +84,11 @@ function hashFiles(globber) {
}
result.end();
if (hasMatch) {
core.debug(`Found ${count} files to hash.`);
writeDelegate(`Found ${count} files to hash.`);
return result.digest('hex');
}
else {
core.debug(`No matches found for glob`);
writeDelegate(`No matches found for glob`);
return '';
}
});