Skip to content

Commit dcdb11a

Browse files
CopilotHiGarfield
andcommitted
Update to Node.js 24
Co-authored-by: HiGarfield <32226909+HiGarfield@users.noreply.github.com>
1 parent 3216a85 commit dcdb11a

5,629 files changed

Lines changed: 240966 additions & 1083528 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/licensed.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ jobs:
99
runs-on: ubuntu-latest
1010
name: Check licenses
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: '24'
1316
- run: npm ci
1417
- name: Install licensed
1518
run: |

.licenses/npm/@actions/cache.dep.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.licenses/npm/@actions/core.dep.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ outputs:
3333
hit:
3434
description: 'indicate cache found'
3535
runs:
36-
using: 'node20'
36+
using: 'node24'
3737
main: 'fetch.js'
3838
post: 'save.js'
3939
post-if: 'success()'

fetch.js

Lines changed: 29 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,46 @@
1-
const core = require("@actions/core");
2-
const { execSync } = require("child_process");
3-
const cache = require("@actions/cache");
4-
const { parseBooleanInput, buildBaseConfig } = require("./utils");
5-
6-
async function fetchCache() {
7-
try {
8-
const cleanUpCache = parseBooleanInput(core.getInput("clean"));
9-
if (cleanUpCache) return;
10-
1+
import * as core from "@actions/core";
2+
import { execSync } from "node:child_process";
3+
import * as cache from "@actions/cache";
4+
import { buildBaseConfig } from "./utils.js";
5+
6+
try {
7+
const cleanUpCache = core.getBooleanInput("clean");
8+
if (!cleanUpCache) {
119
const { keyString: baseKey, paths, cacheToolchain, cacheCcache } = buildBaseConfig();
12-
const skipBuildingToolchain = parseBooleanInput(core.getInput("skip"), true);
10+
const skipBuildingToolchain = core.getBooleanInput("skip");
1311

1412
let keyString = baseKey;
1513
const restoreKeys = [];
1614

1715
if (cacheCcache) {
18-
const timestamp = execSync("date +%s").toString().trim();
16+
const timestamp = Math.floor(Date.now() / 1000).toString();
1917
restoreKeys.unshift(keyString);
2018
keyString += `-${timestamp}`;
2119
paths.push(".ccache");
2220
}
2321

24-
if (paths.length === 0) {
25-
core.debug("No paths configured for caching, skipping");
26-
return;
27-
}
22+
if (paths.length > 0) {
23+
core.debug(`Cache key: ${keyString}`);
24+
core.debug(`Cache restore keys: ${restoreKeys.join(", ")}`);
25+
core.debug(`Cache paths: ${paths.join(", ")}`);
2826

29-
core.debug(`Cache key: ${keyString}`);
30-
core.debug(`Cache restore keys: ${restoreKeys.join(", ")}`);
31-
core.debug(`Cache paths: ${paths.join(", ")}`);
27+
const cacheFetchingResult = await cache.restoreCache(paths, keyString, restoreKeys);
3228

33-
const cacheFetchingResult = await cache.restoreCache(paths, keyString, restoreKeys);
29+
if (cacheFetchingResult) {
30+
core.info(`${cacheFetchingResult} cache fetched!`);
31+
core.setOutput("hit", "1");
32+
core.saveState("CACHE_STATE", "hit");
3433

35-
if (cacheFetchingResult) {
36-
core.info(`${cacheFetchingResult} cache fetched!`);
37-
core.setOutput("hit", "1");
38-
core.saveState("CACHE_STATE", "hit");
39-
40-
if (cacheToolchain && skipBuildingToolchain) {
41-
execSync("sed -i 's/ $(tool.*\\/stamp-compile)//;' Makefile");
42-
execSync("sed -i 's/ $(tool.*\\/stamp-install)//;' Makefile");
43-
core.info("Toolchain building skipped");
34+
if (cacheToolchain && skipBuildingToolchain) {
35+
execSync("sed -i 's/ $(tool.*\\/stamp-compile)//;' Makefile");
36+
execSync("sed -i 's/ $(tool.*\\/stamp-install)//;' Makefile");
37+
core.info("Toolchain building skipped");
38+
}
4439
}
40+
} else {
41+
core.debug("No paths configured for caching, skipping");
4542
}
46-
} catch (error) {
47-
core.setFailed(error.message);
4843
}
49-
}
50-
51-
fetchCache();
44+
} catch (error) {
45+
core.setFailed(error.message);
46+
}

node_modules/.bin/protoc

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/protoc-gen-dump

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/protoc-gen-ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/tsc

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/tsserver

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)