chore: bump gha-utils from 0.1.0 to 0.2.0

Bumps [gha-utils](https://github.com/threeal/gha-utils) from 0.1.0 to 0.2.0.
- [Release notes](https://github.com/threeal/gha-utils/releases)
- [Commits](https://github.com/threeal/gha-utils/compare/v0.1.0...v0.2.0)

---
updated-dependencies:
- dependency-name: gha-utils
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Alfi Maulana <alfi.maulana.f@gmail.com>
This commit is contained in:
dependabot[bot] 2024-08-17 18:11:38 +07:00 committed by Alfi Maulana
parent b2a028598c
commit 6361d45f3a
No known key found for this signature in database
GPG Key ID: 2242A64C2A8DF5A4
4 changed files with 12 additions and 12 deletions

8
dist/action.mjs generated vendored
View File

@ -1,7 +1,7 @@
import fs from 'node:fs'; import fs from 'node:fs';
import os from 'node:os'; import os from 'node:os';
import { execFileSync } from 'node:child_process';
import path from 'node:path'; import path from 'node:path';
import { execFileSync } from 'node:child_process';
/** /**
* Retrieves the value of a GitHub Actions input. * Retrieves the value of a GitHub Actions input.
@ -23,11 +23,11 @@ function setOutput(name, value) {
fs.appendFileSync(process.env["GITHUB_OUTPUT"], `${name}=${value}${os.EOL}`); fs.appendFileSync(process.env["GITHUB_OUTPUT"], `${name}=${value}${os.EOL}`);
} }
/** /**
* Logs an error message on GitHub Actions. * Logs an error message in GitHub Actions.
* *
* @param err - The error, which can be of any type. * @param err - The error, which can be of any type.
*/ */
function error(err) { function logError(err) {
const message = err instanceof Error ? err.message : String(err); const message = err instanceof Error ? err.message : String(err);
process.stdout.write(`::error::${message}${os.EOL}`); process.stdout.write(`::error::${message}${os.EOL}`);
} }
@ -115,6 +115,6 @@ try {
} }
} }
catch (err) { catch (err) {
error(err); logError(err);
process.exit(1); process.exit(1);
} }

View File

@ -9,7 +9,7 @@
"test": "jest" "test": "jest"
}, },
"dependencies": { "dependencies": {
"gha-utils": "^0.1.0" "gha-utils": "^0.2.0"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.9.0", "@eslint/js": "^9.9.0",

View File

@ -1,4 +1,4 @@
import { error, setOutput } from "gha-utils"; import { logError, setOutput } from "gha-utils";
import { buildProject, configureProject } from "./cmake.js"; import { buildProject, configureProject } from "./cmake.js";
import { getContext } from "./context.js"; import { getContext } from "./context.js";
@ -13,6 +13,6 @@ try {
buildProject(context); buildProject(context);
} }
} catch (err) { } catch (err) {
error(err); logError(err);
process.exit(1); process.exit(1);
} }

10
yarn.lock generated
View File

@ -2385,10 +2385,10 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"gha-utils@npm:^0.1.0": "gha-utils@npm:^0.2.0":
version: 0.1.0 version: 0.2.0
resolution: "gha-utils@npm:0.1.0" resolution: "gha-utils@npm:0.2.0"
checksum: 10c0/8c1cc68e89434a8af8a64d71a2dae9a9248ce581b522718ba51f78b5447cad9c16b8d70097a885f797d547bbafdb7bc481d9d41ac1ce0b2db084d500ebfbc838 checksum: 10c0/34e597b9011518c36abbb4bbbfb0ecaf16171e2bafad3a9ddbbdd3c3b2c1234eb8afc06fc84837565afca5e9ca9d48eb62a7238613ab808d8e1c7e0b6651e2c6
languageName: node languageName: node
linkType: hard linkType: hard
@ -4138,7 +4138,7 @@ __metadata:
"@types/jest": "npm:^29.5.12" "@types/jest": "npm:^29.5.12"
"@types/node": "npm:^22.3.0" "@types/node": "npm:^22.3.0"
eslint: "npm:^9.9.0" eslint: "npm:^9.9.0"
gha-utils: "npm:^0.1.0" gha-utils: "npm:^0.2.0"
jest: "npm:^29.7.0" jest: "npm:^29.7.0"
prettier: "npm:^3.3.3" prettier: "npm:^3.3.3"
rollup: "npm:^4.20.0" rollup: "npm:^4.20.0"