Skip to content

Commit

Permalink
Switch to Node.js 16 (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
tibdex authored Dec 5, 2021
1 parent b077f95 commit cd81e4c
Show file tree
Hide file tree
Showing 7 changed files with 377 additions and 344 deletions.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ outputs:
token:
description: An installation token for the GitHub App on the requested repository.
runs:
using: node12
using: node16
main: dist/index.js
branding:
icon: unlock
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "github-app-token",
"version": "1.5.0",
"version": "1.5.1",
"license": "MIT",
"main": "dist/index.js",
"type": "module",
"files": [
"action.yml",
"dist"
],
"scripts": {
"build": "ncc build src/index.ts --minify --target es2018 --v8-cache",
"prettier": "prettier --ignore-path .gitignore \"./**/*.{js,json,md,ts,yml}\"",
"build": "ncc build src/index.ts --minify --target es2021 --v8-cache",
"prettier": "prettier --ignore-path .gitignore \"./**/*.{cjs,js,json,md,ts,yml}\"",
"xo": "xo"
},
"devDependencies": {
Expand All @@ -18,17 +18,17 @@
"@octokit/auth-app": "^3.6.1",
"@octokit/request": "^5.6.2",
"@types/is-base64": "^1.1.1",
"@types/node": "^16.11.6",
"@vercel/ncc": "^0.31.1",
"@types/node": "^16.11.11",
"@vercel/ncc": "^0.33.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-sort-destructure-keys": "^1.4.0",
"eslint-plugin-typescript-sort-keys": "^2.0.0",
"eslint-plugin-typescript-sort-keys": "^2.1.0",
"is-base64": "^1.1.0",
"prettier": "^2.4.1",
"prettier-plugin-packagejson": "^2.2.13",
"typescript": "^4.4.4",
"xo": "^0.46.4",
"prettier": "^2.5.1",
"prettier-plugin-packagejson": "^2.2.15",
"typescript": "^4.5.2",
"xo": "^0.47.0",
"yarn-deduplicate": "^3.1.0"
}
}
2 changes: 1 addition & 1 deletion src/fetch-installation-token.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { env } from "process";
import { env } from "node:process";
import { getOctokit } from "@actions/github";
import { createAppAuth } from "@octokit/auth-app";
import { request } from "@octokit/request";
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Buffer } from "buffer";
import { Buffer } from "node:buffer";
import { getInput, info, setFailed, setOutput, setSecret } from "@actions/core";
import { context } from "@actions/github";
import isBase64 from "is-base64";
import { fetchInstallationToken } from "./fetch-installation-token";
import { fetchInstallationToken } from "./fetch-installation-token.js";

const run = async () => {
try {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"moduleResolution": "node",
"noEmitOnError": true,
"strict": true,
"target": "esnext",
"target": "es2021",
"types": ["node"]
},
"include": ["src"]
Expand Down
2 changes: 0 additions & 2 deletions xo.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,5 @@ module.exports = {
],
"typescript-sort-keys/interface": "error",
"typescript-sort-keys/string-enum": "error",
// Not supported by Node.js 12.
"unicorn/prefer-node-protocol": "off",
},
};
Loading

0 comments on commit cd81e4c

Please sign in to comment.