aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node_modules/@actions/core/lib/summary.js
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-02-28 22:23:19 +0100
committerEgor Tensin <egor@tensin.name>2026-02-28 22:28:23 +0100
commitcf0901d753db0bf4d15baf625a6fa537978b03a9 (patch)
tree41ae5e7f9eacdc67b9fa980596c803b9c50ca188 /node_modules/@actions/core/lib/summary.js
parentupgrade actions/core to version 2 (diff)
downloadcleanup-path-cf0901d753db0bf4d15baf625a6fa537978b03a9.tar.gz
cleanup-path-cf0901d753db0bf4d15baf625a6fa537978b03a9.zip
upgrade actions/core to version 3v4.0.3v4
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/summary.js')
-rw-r--r--node_modules/@actions/core/lib/summary.js25
1 files changed, 11 insertions, 14 deletions
diff --git a/node_modules/@actions/core/lib/summary.js b/node_modules/@actions/core/lib/summary.js
index 04a335b..87a8e28 100644
--- a/node_modules/@actions/core/lib/summary.js
+++ b/node_modules/@actions/core/lib/summary.js
@@ -1,4 +1,3 @@
-"use strict";
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) {
@@ -8,13 +7,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;
-const os_1 = require("os");
-const fs_1 = require("fs");
-const { access, appendFile, writeFile } = fs_1.promises;
-exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';
-exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';
+import { EOL } from 'os';
+import { constants, promises } from 'fs';
+const { access, appendFile, writeFile } = promises;
+export const SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';
+export const SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';
class Summary {
constructor() {
this._buffer = '';
@@ -30,12 +27,12 @@ class Summary {
if (this._filePath) {
return this._filePath;
}
- const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];
+ const pathFromEnv = process.env[SUMMARY_ENV_VAR];
if (!pathFromEnv) {
- throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);
+ throw new Error(`Unable to find environment variable for $${SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);
}
try {
- yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);
+ yield access(pathFromEnv, constants.R_OK | constants.W_OK);
}
catch (_a) {
throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);
@@ -131,7 +128,7 @@ class Summary {
* @returns {Summary} summary instance
*/
addEOL() {
- return this.addRaw(os_1.EOL);
+ return this.addRaw(EOL);
}
/**
* Adds an HTML codeblock to the summary buffer
@@ -278,6 +275,6 @@ const _summary = new Summary();
/**
* @deprecated use `core.summary`
*/
-exports.markdownSummary = _summary;
-exports.summary = _summary;
+export const markdownSummary = _summary;
+export const summary = _summary;
//# sourceMappingURL=summary.js.map \ No newline at end of file