Skip to content

Commit af2bb26

Browse files
committed
Update to Node 24
1 parent 358ae57 commit af2bb26

File tree

9 files changed

+30
-99
lines changed

9 files changed

+30
-99
lines changed

.github/actions/generate-action-code/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ runs:
66
steps:
77
- uses: actions/setup-node@v6
88
with:
9-
node-version: 20
9+
node-version: 24
1010
check-latest: true
1111
cache: npm
1212
- name: Generate action code

.github/dependabot.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ updates:
88
interval: daily
99
time: '07:00'
1010
timezone: Europe/Berlin
11-
assignees:
12-
- ffried
13-
reviewers:
14-
- ffried
1511

1612
- package-ecosystem: github-actions
1713
directory: .github/actions/generate-action-code
@@ -20,10 +16,6 @@ updates:
2016
interval: daily
2117
time: '07:00'
2218
timezone: Europe/Berlin
23-
assignees:
24-
- ffried
25-
reviewers:
26-
- ffried
2719

2820
- package-ecosystem: npm
2921
directory: /
@@ -32,7 +24,3 @@ updates:
3224
interval: daily
3325
time: '07:00'
3426
timezone: Europe/Berlin
35-
assignees:
36-
- ffried
37-
reviewers:
38-
- ffried

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- uses: actions/checkout@v5
2121
- uses: actions/setup-dotnet@v5
2222
with:
23-
dotnet-version: '8.0'
23+
dotnet-version: '9.0'
2424
- name: Generate action code
2525
if: ${{ github.event_name == 'pull_request' }}
2626
uses: ./.github/actions/generate-action-code

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ inputs:
2222
description: The path to the NuGet configuration file. Uses the default config file by default.
2323
required: false
2424
runs:
25-
using: node20
25+
using: node24
2626
main: dist/index.js
2727
post: dist/index.js
2828
branding:

package-lock.json

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
"version": "1.0.0",
44
"description": "Logs into a Nuget server.",
55
"engines": {
6-
"node": ">=20"
6+
"node": ">=24"
77
},
88
"exports": {
99
".": "./dist/index.js"
1010
},
1111
"scripts": {
1212
"test": "echo \"Error: no test specified\" && exit 1",
1313
"build": "tsc",
14-
"pack": "rm -rf dist && ncc build lib/main.js -o dist --license license.txt --target es2022"
14+
"pack": "rm -rf dist && ncc build lib/main.js -o dist --license license.txt --target es2024"
1515
},
1616
"repository": {
1717
"type": "git",
@@ -33,8 +33,8 @@
3333
"@actions/tool-cache": "^2.0.2"
3434
},
3535
"devDependencies": {
36-
"@tsconfig/node20": "^20.1.6",
37-
"@types/node": "^20.19.24",
36+
"@tsconfig/node24": "^24.0.1",
37+
"@types/node": "^24.10.0",
3838
"@vercel/ncc": "^0.38.4",
3939
"typescript": "^5.9.3"
4040
}

src/main.ts

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
import * as core from '@actions/core';
2-
import {getExecOutput} from '@actions/exec';
1+
import * as core from "@actions/core";
2+
import {exec} from "@actions/exec";
33

4-
async function runCmd(cmd: string, ...args: string[]): Promise<string> {
5-
const output = await getExecOutput(cmd, args.length <= 0 ? undefined : args, {
6-
silent: !core.isDebug(),
7-
});
8-
return output.stdout;
4+
async function runCmd(cmd: string, ...args: string[]): Promise<void> {
5+
await exec(cmd, args.length <= 0 ? undefined : args, {silent: !core.isDebug()});
96
}
107

118
async function main() {
@@ -35,7 +32,8 @@ async function main() {
3532
args.push('--password', password);
3633
if (storePasswordInCleartext) args.push('--store-password-in-clear-text');
3734
}
38-
if (configFilePath) args.push('--configfile', configFilePath);
35+
if (configFilePath) // noinspection SpellCheckingInspection
36+
args.push('--configfile', configFilePath);
3937
await runCmd('dotnet', ...args);
4038
});
4139
}
@@ -51,9 +49,8 @@ async function post() {
5149
try {
5250
const isPost = !!core.getState('isPost');
5351
// Mark the next run as post
54-
if (!isPost) core.saveState('isPost', 'true')
55-
if (isPost) post().catch((error) => core.setFailed(error.message));
56-
else main().catch((error) => core.setFailed(error.message));
52+
if (!isPost) core.saveState('isPost', 'true');
53+
(isPost ? post() : main()).catch((error) => core.setFailed(error.message));
5754
} catch (error: any) {
5855
core.setFailed(error.message);
5956
}

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "@tsconfig/node20/tsconfig.json",
2+
"extends": "@tsconfig/node24/tsconfig.json",
33
"compilerOptions": {
44
"outDir": "lib",
55
"rootDir": "src",

0 commit comments

Comments
 (0)