Skip to content

Commit

Permalink
Run on Node 20.x (#16)
Browse files Browse the repository at this point in the history
Also move to @clechasseur/rs-actions-core for more up-to-date dependencies
  • Loading branch information
clechasseur authored Apr 23, 2024
1 parent 4da312d commit fe0359b
Show file tree
Hide file tree
Showing 10 changed files with 8,494 additions and 17,998 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Create npm configuration
run: echo "//npm.pkg.github.com/:_authToken=${token}" >> ~/.npmrc
env:
token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm ci
# octokit types problem ?
# - run: npm run lint
Expand Down
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@actions-rs:registry=https://npm.pkg.github.com
@clechasseur:registry=https://npm.pkg.github.com
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16
v20
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ inputs:
required: false

runs:
using: 'node16'
using: 'node20'
main: 'dist/index.js'
68 changes: 67 additions & 1 deletion dist/index.js

Large diffs are not rendered by default.

26,361 changes: 8,395 additions & 17,966 deletions package-lock.json

Large diffs are not rendered by default.

34 changes: 15 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,22 @@
"url": "https://github.com/actions-rs/audit-check/issues"
},
"dependencies": {
"@rinse-repeat/actions-rs-core": "0.1.8",
"@actions/core": "^1.2.6",
"@actions/github": "^5.1.0",
"npm-check-updates": "^16.8.0",
"nunjucks": "^3.2.3"
"@clechasseur/rs-actions-core": "^3.0.1",
"nunjucks": "^3.2.4"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.56.0",
"ts-node": "^10.9.1",
"@typescript-eslint/parser": "^5.56.0",
"eslint": "^8.36.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.3",
"@types/jest": "^26.0.1",
"@types/node": "^16.11.7",
"@vincentriemer/ncc": "^0.20.5",
"jest": "^26.0.1",
"jest-circus": "^26.0.1",
"ts-jest": "^26.0.1",
"typescript": "^3.8.3",
"prettier": "^2.0.5"
"@typescript-eslint/parser": "^6.21.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"ts-node": "^10.9.2",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.17",
"@vercel/ncc": "0.38.1",
"jest": "^29.7.0",
"ts-jest": "^29.1.2",
"typescript": "^5.3.3",
"prettier": "^3.2.5"
}
}
5 changes: 2 additions & 3 deletions src/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
* Parse action input into a some proper thing.
*/

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

// Parsed action input
export interface Input {
Expand All @@ -14,6 +13,6 @@ export interface Input {
export function get(): Input {
return {
token: input.getInput('token', { required: true }),
ignore: getInputList('ignore', { required: false }),
ignore: input.getInputList('ignore', { required: false }),
};
}
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as os from 'os';
import * as core from '@actions/core';
import * as github from '@actions/github';

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

import * as input from './input';
import * as interfaces from './interfaces';
Expand Down Expand Up @@ -100,7 +100,7 @@ async function main(): Promise<void> {
const actionInput = input.get();
await run(actionInput);
} catch (error) {
core.setFailed(error.message);
core.setFailed((error as Error).message);
}

return;
Expand Down
2 changes: 1 addition & 1 deletion src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as core from '@actions/core';
import * as github from '@actions/github';
import * as nunjucks from 'nunjucks';

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

Expand Down

0 comments on commit fe0359b

Please sign in to comment.