Skip to content

Commit fe0359b

Browse files
authored
Run on Node 20.x (#16)
Also move to @clechasseur/rs-actions-core for more up-to-date dependencies
1 parent 4da312d commit fe0359b

File tree

10 files changed

+8494
-17998
lines changed

10 files changed

+8494
-17998
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@ jobs:
66
main:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v3
10-
- uses: actions/setup-node@v3
9+
- name: Create npm configuration
10+
run: echo "//npm.pkg.github.com/:_authToken=${token}" >> ~/.npmrc
11+
env:
12+
token: ${{ secrets.GITHUB_TOKEN }}
13+
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
1116
with:
12-
node-version: 16
17+
node-version-file: '.nvmrc'
18+
cache: 'npm'
1319
- run: npm ci
1420
# octokit types problem ?
1521
# - run: npm run lint

.npmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@actions-rs:registry=https://npm.pkg.github.com
1+
@clechasseur:registry=https://npm.pkg.github.com

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v16
1+
v20

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ inputs:
1313
required: false
1414

1515
runs:
16-
using: 'node16'
16+
using: 'node20'
1717
main: 'dist/index.js'

dist/index.js

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

package-lock.json

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

package.json

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,26 +34,22 @@
3434
"url": "https://github.com/actions-rs/audit-check/issues"
3535
},
3636
"dependencies": {
37-
"@rinse-repeat/actions-rs-core": "0.1.8",
38-
"@actions/core": "^1.2.6",
39-
"@actions/github": "^5.1.0",
40-
"npm-check-updates": "^16.8.0",
41-
"nunjucks": "^3.2.3"
37+
"@clechasseur/rs-actions-core": "^3.0.1",
38+
"nunjucks": "^3.2.4"
4239
},
4340
"devDependencies": {
44-
"@typescript-eslint/eslint-plugin": "^5.56.0",
45-
"ts-node": "^10.9.1",
46-
"@typescript-eslint/parser": "^5.56.0",
47-
"eslint": "^8.36.0",
48-
"eslint-config-prettier": "^6.11.0",
49-
"eslint-plugin-prettier": "^3.1.3",
50-
"@types/jest": "^26.0.1",
51-
"@types/node": "^16.11.7",
52-
"@vincentriemer/ncc": "^0.20.5",
53-
"jest": "^26.0.1",
54-
"jest-circus": "^26.0.1",
55-
"ts-jest": "^26.0.1",
56-
"typescript": "^3.8.3",
57-
"prettier": "^2.0.5"
41+
"@typescript-eslint/parser": "^6.21.0",
42+
"@typescript-eslint/eslint-plugin": "^6.21.0",
43+
"ts-node": "^10.9.2",
44+
"eslint": "^8.56.0",
45+
"eslint-config-prettier": "^9.1.0",
46+
"eslint-plugin-prettier": "^5.1.3",
47+
"@types/jest": "^29.5.12",
48+
"@types/node": "^20.11.17",
49+
"@vercel/ncc": "0.38.1",
50+
"jest": "^29.7.0",
51+
"ts-jest": "^29.1.2",
52+
"typescript": "^5.3.3",
53+
"prettier": "^3.2.5"
5854
}
5955
}

src/input.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
* Parse action input into a some proper thing.
33
*/
44

5-
import { input } from '@rinse-repeat/actions-rs-core';
6-
import { getInputList } from '@rinse-repeat/actions-rs-core/dist/input';
5+
import { input } from '@clechasseur/rs-actions-core';
76

87
// Parsed action input
98
export interface Input {
@@ -14,6 +13,6 @@ export interface Input {
1413
export function get(): Input {
1514
return {
1615
token: input.getInput('token', { required: true }),
17-
ignore: getInputList('ignore', { required: false }),
16+
ignore: input.getInputList('ignore', { required: false }),
1817
};
1918
}

src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as os from 'os';
44
import * as core from '@actions/core';
55
import * as github from '@actions/github';
66

7-
import { Cargo } from '@rinse-repeat/actions-rs-core';
7+
import { Cargo } from '@clechasseur/rs-actions-core';
88

99
import * as input from './input';
1010
import * as interfaces from './interfaces';
@@ -100,7 +100,7 @@ async function main(): Promise<void> {
100100
const actionInput = input.get();
101101
await run(actionInput);
102102
} catch (error) {
103-
core.setFailed(error.message);
103+
core.setFailed((error as Error).message);
104104
}
105105

106106
return;

src/reporter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as core from '@actions/core';
44
import * as github from '@actions/github';
55
import * as nunjucks from 'nunjucks';
66

7-
import { checks } from '@rinse-repeat/actions-rs-core';
7+
import { checks } from '@clechasseur/rs-actions-core';
88
import * as interfaces from './interfaces';
99
import * as templates from './templates';
1010

0 commit comments

Comments
 (0)