Skip to content

Commit cd81e4c

Browse files
authored
Switch to Node.js 16 (#30)
1 parent b077f95 commit cd81e4c

File tree

7 files changed

+377
-344
lines changed

7 files changed

+377
-344
lines changed

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ outputs:
1616
token:
1717
description: An installation token for the GitHub App on the requested repository.
1818
runs:
19-
using: node12
19+
using: node16
2020
main: dist/index.js
2121
branding:
2222
icon: unlock

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "github-app-token",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"license": "MIT",
5-
"main": "dist/index.js",
5+
"type": "module",
66
"files": [
77
"action.yml",
88
"dist"
99
],
1010
"scripts": {
11-
"build": "ncc build src/index.ts --minify --target es2018 --v8-cache",
12-
"prettier": "prettier --ignore-path .gitignore \"./**/*.{js,json,md,ts,yml}\"",
11+
"build": "ncc build src/index.ts --minify --target es2021 --v8-cache",
12+
"prettier": "prettier --ignore-path .gitignore \"./**/*.{cjs,js,json,md,ts,yml}\"",
1313
"xo": "xo"
1414
},
1515
"devDependencies": {
@@ -18,17 +18,17 @@
1818
"@octokit/auth-app": "^3.6.1",
1919
"@octokit/request": "^5.6.2",
2020
"@types/is-base64": "^1.1.1",
21-
"@types/node": "^16.11.6",
22-
"@vercel/ncc": "^0.31.1",
21+
"@types/node": "^16.11.11",
22+
"@vercel/ncc": "^0.33.0",
2323
"eslint-config-prettier": "^8.3.0",
24-
"eslint-plugin-import": "^2.25.2",
24+
"eslint-plugin-import": "^2.25.3",
2525
"eslint-plugin-sort-destructure-keys": "^1.4.0",
26-
"eslint-plugin-typescript-sort-keys": "^2.0.0",
26+
"eslint-plugin-typescript-sort-keys": "^2.1.0",
2727
"is-base64": "^1.1.0",
28-
"prettier": "^2.4.1",
29-
"prettier-plugin-packagejson": "^2.2.13",
30-
"typescript": "^4.4.4",
31-
"xo": "^0.46.4",
28+
"prettier": "^2.5.1",
29+
"prettier-plugin-packagejson": "^2.2.15",
30+
"typescript": "^4.5.2",
31+
"xo": "^0.47.0",
3232
"yarn-deduplicate": "^3.1.0"
3333
}
3434
}

src/fetch-installation-token.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { env } from "process";
1+
import { env } from "node:process";
22
import { getOctokit } from "@actions/github";
33
import { createAppAuth } from "@octokit/auth-app";
44
import { request } from "@octokit/request";

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { Buffer } from "buffer";
1+
import { Buffer } from "node:buffer";
22
import { getInput, info, setFailed, setOutput, setSecret } from "@actions/core";
33
import { context } from "@actions/github";
44
import isBase64 from "is-base64";
5-
import { fetchInstallationToken } from "./fetch-installation-token";
5+
import { fetchInstallationToken } from "./fetch-installation-token.js";
66

77
const run = async () => {
88
try {

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"moduleResolution": "node",
77
"noEmitOnError": true,
88
"strict": true,
9-
"target": "esnext",
9+
"target": "es2021",
1010
"types": ["node"]
1111
},
1212
"include": ["src"]

xo.config.cjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,5 @@ module.exports = {
5555
],
5656
"typescript-sort-keys/interface": "error",
5757
"typescript-sort-keys/string-enum": "error",
58-
// Not supported by Node.js 12.
59-
"unicorn/prefer-node-protocol": "off",
6058
},
6159
};

0 commit comments

Comments
 (0)