From cf0901d753db0bf4d15baf625a6fa537978b03a9 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 28 Feb 2026 22:23:19 +0100 Subject: upgrade actions/core to version 3 The relevant changes are in clean.js/restore.js. I'm very, very far away from the entire Javascript infrastructure, and absolutely don't understand why this changes were necessary. Thanks, ChatGPT! Supposedly, this has something to do with the actions/core's transition to ESM or whatever. --- node_modules/@actions/io/lib/io.js | 61 +++++++------------------------------- 1 file changed, 10 insertions(+), 51 deletions(-) (limited to 'node_modules/@actions/io/lib/io.js') diff --git a/node_modules/@actions/io/lib/io.js b/node_modules/@actions/io/lib/io.js index 8e50a68..67e4304 100644 --- a/node_modules/@actions/io/lib/io.js +++ b/node_modules/@actions/io/lib/io.js @@ -1,37 +1,3 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -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; - var result = {}; - 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); - return result; - }; -})(); var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -41,16 +7,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.cp = cp; -exports.mv = mv; -exports.rmRF = rmRF; -exports.mkdirP = mkdirP; -exports.which = which; -exports.findInPath = findInPath; -const assert_1 = require("assert"); -const path = __importStar(require("path")); -const ioUtil = __importStar(require("./io-util")); +import { ok } from 'assert'; +import * as path from 'path'; +import * as ioUtil from './io-util.js'; /** * Copies a file or folder. * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js @@ -59,7 +18,7 @@ const ioUtil = __importStar(require("./io-util")); * @param dest destination path * @param options optional. See CopyOptions. */ -function cp(source_1, dest_1) { +export function cp(source_1, dest_1) { return __awaiter(this, arguments, void 0, function* (source, dest, options = {}) { const { force, recursive, copySourceDirectory } = readCopyOptions(options); const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; @@ -99,7 +58,7 @@ function cp(source_1, dest_1) { * @param dest destination path * @param options optional. See MoveOptions. */ -function mv(source_1, dest_1) { +export function mv(source_1, dest_1) { return __awaiter(this, arguments, void 0, function* (source, dest, options = {}) { if (yield ioUtil.exists(dest)) { let destExists = true; @@ -126,7 +85,7 @@ function mv(source_1, dest_1) { * * @param inputPath path to remove */ -function rmRF(inputPath) { +export function rmRF(inputPath) { return __awaiter(this, void 0, void 0, function* () { if (ioUtil.IS_WINDOWS) { // Check for invalid characters @@ -156,9 +115,9 @@ function rmRF(inputPath) { * @param fsPath path to create * @returns Promise */ -function mkdirP(fsPath) { +export function mkdirP(fsPath) { return __awaiter(this, void 0, void 0, function* () { - (0, assert_1.ok)(fsPath, 'a path argument must be provided'); + ok(fsPath, 'a path argument must be provided'); yield ioUtil.mkdir(fsPath, { recursive: true }); }); } @@ -170,7 +129,7 @@ function mkdirP(fsPath) { * @param check whether to check if tool exists * @returns Promise path to tool */ -function which(tool, check) { +export function which(tool, check) { return __awaiter(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); @@ -200,7 +159,7 @@ function which(tool, check) { * * @returns Promise the paths of the tool */ -function findInPath(tool) { +export function findInPath(tool) { return __awaiter(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); -- cgit v1.3