Skip to content

Commit 3529a65

Browse files
authored
chore: node 20 as default runtime (#432)
* chore: update yarn to 3.6.3 * chore: update to node 20 * chore: update dev dependencies * chore: update generated content * chore: node 20 as default runtime --------- Co-authored-by: CrazyMax <[email protected]>
1 parent d2f6e33 commit 3529a65

13 files changed

+1306
-972
lines changed

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/dist/**
2+
/coverage/**
3+
/node_modules/**

.eslintrc.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"env": {
33
"node": true,
4-
"es2021": true,
5-
"jest/globals": true
4+
"es6": true,
5+
"jest": true
66
},
77
"extends": [
88
"eslint:recommended",
9+
"plugin:@typescript-eslint/eslint-recommended",
910
"plugin:@typescript-eslint/recommended",
1011
"plugin:jest/recommended",
1112
"plugin:prettier/recommended"

.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

+111-111
Large diffs are not rendered by default.

.yarn/releases/yarn-3.5.1.cjs renamed to .yarn/releases/yarn-3.6.3.cjs

+241-240
Large diffs are not rendered by default.

.yarnrc.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
logFilters:
22
- code: YN0013
33
level: discard
4+
- code: YN0019
5+
level: discard
46
- code: YN0076
57
level: discard
68

@@ -10,4 +12,4 @@ plugins:
1012
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
1113
spec: "@yarnpkg/plugin-interactive-tools"
1214

13-
yarnPath: .yarn/releases/yarn-3.5.1.cjs
15+
yarnPath: .yarn/releases/yarn-3.6.3.cjs

action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ outputs:
3434
description: 'Build result metadata'
3535

3636
runs:
37-
using: 'node16'
37+
using: 'node20'
3838
main: 'dist/index.js'

dev.Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22

3-
ARG NODE_VERSION=16
3+
ARG NODE_VERSION=20
44

55
FROM node:${NODE_VERSION}-alpine AS base
66
RUN apk add --no-cache cpio findutils git
@@ -71,7 +71,7 @@ ENV RUNNER_TOOL_CACHE=/tmp/github_tool_cache
7171
RUN --mount=type=bind,target=.,rw \
7272
--mount=type=cache,target=/src/.yarn/cache \
7373
--mount=type=cache,target=/src/node_modules \
74-
yarn run test --coverageDirectory=/tmp/coverage
74+
yarn run test --coverage --coverageDirectory=/tmp/coverage
7575

7676
FROM scratch AS test-coverage
7777
COPY --from=test /tmp/coverage /

dist/index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jest.config.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
module.exports = {
22
clearMocks: true,
33
moduleFileExtensions: ['js', 'ts'],
4-
setupFiles: [
5-
'dotenv/config',
6-
'<rootDir>/src/test_setup.ts'
7-
],
4+
setupFiles: ['dotenv/config', '<rootDir>/src/test_setup.ts'],
85
testMatch: ['**/*.test.ts'],
96
testTimeout: 30000,
107
transform: {

package.json

+23-18
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@
33
"description": "GitHub Action for GoReleaser, a release automation tool for Go projects",
44
"main": "src/main.ts",
55
"scripts": {
6-
"build": "ncc build --source-map --minify --license licenses.txt",
7-
"lint": "eslint src/**/*.ts __tests__/**/*.ts",
8-
"format": "eslint --fix src/**/*.ts __tests__/**/*.ts",
9-
"test": "jest --coverage"
6+
"build": "ncc build src/main.ts --source-map --minify --license licenses.txt",
7+
"lint": "yarn run prettier && yarn run eslint",
8+
"format": "yarn run prettier:fix && yarn run eslint:fix",
9+
"eslint": "eslint --max-warnings=0 .",
10+
"eslint:fix": "eslint --fix .",
11+
"prettier": "prettier --check \"./**/*.ts\"",
12+
"prettier:fix": "prettier --write \"./**/*.ts\"",
13+
"test": "jest",
14+
"all": "yarn run build && yarn run format && yarn test"
1015
},
1116
"repository": {
1217
"type": "git",
@@ -19,7 +24,7 @@
1924
],
2025
"author": "CrazyMax",
2126
"license": "MIT",
22-
"packageManager": "yarn@3.5.1",
27+
"packageManager": "yarn@3.6.3",
2328
"dependencies": {
2429
"@actions/core": "^1.10.0",
2530
"@actions/exec": "^1.1.1",
@@ -30,20 +35,20 @@
3035
"yargs": "^17.7.2"
3136
},
3237
"devDependencies": {
33-
"@types/node": "^16.18.26",
34-
"@typescript-eslint/eslint-plugin": "^5.59.2",
35-
"@typescript-eslint/parser": "^5.59.2",
36-
"@vercel/ncc": "^0.36.1",
37-
"dotenv": "^16.0.3",
38-
"eslint": "^8.40.0",
39-
"eslint-config-prettier": "^8.8.0",
40-
"eslint-plugin-jest": "^27.2.1",
41-
"eslint-plugin-prettier": "^4.2.1",
42-
"jest": "^29.5.0",
43-
"prettier": "^2.8.8",
38+
"@types/node": "^20.6.0",
39+
"@typescript-eslint/eslint-plugin": "^6.6.0",
40+
"@typescript-eslint/parser": "^6.6.0",
41+
"@vercel/ncc": "^0.38.0",
42+
"dotenv": "^16.3.1",
43+
"eslint": "^8.49.0",
44+
"eslint-config-prettier": "^9.0.0",
45+
"eslint-plugin-jest": "^27.2.3",
46+
"eslint-plugin-prettier": "^5.0.0",
47+
"jest": "^29.6.4",
48+
"prettier": "^3.0.3",
4449
"tmp": "^0.2.1",
45-
"ts-jest": "^29.1.0",
50+
"ts-jest": "^29.1.1",
4651
"ts-node": "^10.9.1",
47-
"typescript": "^4.9.5"
52+
"typescript": "^5.2.2"
4853
}
4954
}

tsconfig.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
{
22
"compilerOptions": {
3+
"esModuleInterop": true,
34
"target": "es6",
45
"module": "commonjs",
56
"newLine": "lf",
67
"outDir": "./lib",
78
"rootDir": "./src",
8-
"esModuleInterop": true,
99
"forceConsistentCasingInFileNames": true,
10-
"strict": true,
1110
"noImplicitAny": false,
1211
"resolveJsonModule": true,
1312
"useUnknownInCatchVariables": false,

0 commit comments

Comments
 (0)