diff options
| author | Egor Tensin <egor@tensin.name> | 2026-02-28 22:23:19 +0100 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-02-28 22:28:23 +0100 |
| commit | cf0901d753db0bf4d15baf625a6fa537978b03a9 (patch) | |
| tree | 41ae5e7f9eacdc67b9fa980596c803b9c50ca188 /node_modules/@actions/core/lib/command.js | |
| parent | upgrade actions/core to version 2 (diff) | |
| download | cleanup-path-cf0901d753db0bf4d15baf625a6fa537978b03a9.tar.gz cleanup-path-cf0901d753db0bf4d15baf625a6fa537978b03a9.zip | |
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.
Diffstat (limited to 'node_modules/@actions/core/lib/command.js')
| -rw-r--r-- | node_modules/@actions/core/lib/command.js | 49 |
1 files changed, 6 insertions, 43 deletions
diff --git a/node_modules/@actions/core/lib/command.js b/node_modules/@actions/core/lib/command.js index b2a8c69..3d314fe 100644 --- a/node_modules/@actions/core/lib/command.js +++ b/node_modules/@actions/core/lib/command.js @@ -1,42 +1,5 @@ -"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; - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.issueCommand = issueCommand; -exports.issue = issue; -const os = __importStar(require("os")); -const utils_1 = require("./utils"); +import * as os from 'os'; +import { toCommandValue } from './utils.js'; /** * Issues a command to the GitHub Actions runner * @@ -70,11 +33,11 @@ const utils_1 = require("./utils"); * This is an internal utility function that powers the public API functions * such as setSecret, warning, error, and exportVariable. */ -function issueCommand(command, properties, message) { +export function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); process.stdout.write(cmd.toString() + os.EOL); } -function issue(name, message = '') { +export function issue(name, message = '') { issueCommand(name, {}, message); } const CMD_STRING = '::'; @@ -112,13 +75,13 @@ class Command { } } function escapeData(s) { - return (0, utils_1.toCommandValue)(s) + return toCommandValue(s) .replace(/%/g, '%25') .replace(/\r/g, '%0D') .replace(/\n/g, '%0A'); } function escapeProperty(s) { - return (0, utils_1.toCommandValue)(s) + return toCommandValue(s) .replace(/%/g, '%25') .replace(/\r/g, '%0D') .replace(/\n/g, '%0A') |
