Skip to content

Commit c215341

Browse files
authored
Merge pull request #264 from crazy-max/update-node20
chore: node 20 as default runtime
2 parents a52126d + 02e9319 commit c215341

File tree

8 files changed

+838
-598
lines changed

8 files changed

+838
-598
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/dist/**
2+
/coverage/**
3+
/node_modules/**

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"env": {
33
"node": true,
4-
"es2021": true,
4+
"es6": true,
55
"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"

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@ outputs:
6666
description: 'Builder node flags (deprecated, use nodes output instead)'
6767

6868
runs:
69-
using: 'node16'
69+
using: 'node20'
7070
main: 'dist/index.js'
7171
post: 'dist/index.js'

dev.Dockerfile

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# syntax=docker/dockerfile:1
22

3-
ARG NODE_VERSION=16
4-
ARG DOCKER_VERSION=20.10.13
5-
ARG BUILDX_VERSION=0.8.1
3+
ARG NODE_VERSION=20
64

75
FROM node:${NODE_VERSION}-alpine AS base
86
RUN apk add --no-cache cpio findutils git
@@ -62,18 +60,12 @@ RUN --mount=type=bind,target=.,rw \
6260
--mount=type=cache,target=/src/node_modules \
6361
yarn run lint
6462

65-
FROM docker:${DOCKER_VERSION} as docker
66-
FROM docker/buildx-bin:${BUILDX_VERSION} as buildx
67-
6863
FROM deps AS test
6964
ENV RUNNER_TEMP=/tmp/github_runner
7065
ENV RUNNER_TOOL_CACHE=/tmp/github_tool_cache
7166
RUN --mount=type=bind,target=.,rw \
7267
--mount=type=cache,target=/src/node_modules \
73-
--mount=type=bind,from=docker,source=/usr/local/bin/docker,target=/usr/bin/docker \
74-
--mount=type=bind,from=buildx,source=/buildx,target=/usr/bin/buildx \
75-
--mount=type=bind,from=buildx,source=/buildx,target=/usr/libexec/docker/cli-plugins/docker-buildx \
76-
yarn run test --coverageDirectory=/tmp/coverage
68+
yarn run test --coverage --coverageDirectory=/tmp/coverage
7769

7870
FROM scratch AS test-coverage
7971
COPY --from=test /tmp/coverage /

dist/index.js

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

dist/index.js.map

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

package.json

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@
44
"main": "lib/main.js",
55
"scripts": {
66
"build": "ncc build src/main.ts --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",
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",
1014
"all": "yarn run build && yarn run format && yarn test"
1115
},
1216
"repository": {
@@ -18,34 +22,28 @@
1822
"docker",
1923
"buildx"
2024
],
21-
"author": "Docker",
22-
"contributors": [
23-
{
24-
"name": "CrazyMax",
25-
"url": "https://crazymax.dev"
26-
}
27-
],
25+
"author": "Docker Inc.",
2826
"license": "Apache-2.0",
2927
"dependencies": {
3028
"@actions/core": "^1.10.0",
3129
"@actions/exec": "^1.1.1",
32-
"@docker/actions-toolkit": "^0.10.0",
30+
"@docker/actions-toolkit": "^0.12.0",
3331
"js-yaml": "^4.1.0",
3432
"uuid": "^9.0.0"
3533
},
3634
"devDependencies": {
37-
"@types/node": "^16.18.21",
38-
"@typescript-eslint/eslint-plugin": "^5.56.0",
39-
"@typescript-eslint/parser": "^5.56.0",
40-
"@vercel/ncc": "^0.36.1",
41-
"eslint": "^8.36.0",
42-
"eslint-config-prettier": "^8.8.0",
43-
"eslint-plugin-jest": "^27.2.1",
44-
"eslint-plugin-prettier": "^4.2.1",
45-
"jest": "^29.5.0",
46-
"prettier": "^2.8.7",
47-
"ts-jest": "^29.0.5",
35+
"@types/node": "^20.5.9",
36+
"@typescript-eslint/eslint-plugin": "^6.6.0",
37+
"@typescript-eslint/parser": "^6.6.0",
38+
"@vercel/ncc": "^0.38.0",
39+
"eslint": "^8.48.0",
40+
"eslint-config-prettier": "^9.0.0",
41+
"eslint-plugin-jest": "^27.2.3",
42+
"eslint-plugin-prettier": "^5.0.0",
43+
"jest": "^29.6.4",
44+
"prettier": "^3.0.3",
45+
"ts-jest": "^29.1.1",
4846
"ts-node": "^10.9.1",
49-
"typescript": "^4.9.5"
47+
"typescript": "^5.2.2"
5048
}
5149
}

0 commit comments

Comments
 (0)