Skip to content

Commit f027055

Browse files
committed
Target node 20
1 parent 3045703 commit f027055

File tree

6 files changed

+12
-10
lines changed

6 files changed

+12
-10
lines changed

Diff for: .github/workflows/ci.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ jobs:
4545
strategy:
4646
fail-fast: false
4747
matrix:
48-
node: [16, 17]
48+
node:
49+
- 20
50+
- 21
4951

5052
steps:
5153
- name: Checkout Repo

Diff for: CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## Unreleased
44

5+
- Updated node runtime from 16 to 20
6+
- Bumped `@actions/cor` from 1.10.0 to 1.10.1
7+
58
## 2.0.0 - 2022-10-22
69

710
- Bumped `@actions/core` from 1.2.6 to 1.10.0

Diff for: __tests__/problemMatcher.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { matchResults } from "../__helpers__/utils";
2-
import { problemMatcher as problemMatcherJson } from "../.github/problem-matcher.json";
2+
import { problemMatcher as problemMatcherJson } from "../src/problem-matcher.json";
33

44
import type { ProblemMatcher, ProblemPattern } from "github-actions-problem-matcher-typings";
55

Diff for: action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ inputs:
1515
default: add
1616

1717
runs:
18-
using: "node16"
18+
using: "node20"
1919
main: "dist/index.js"

Diff for: src/main.ts

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1-
import { readFile } from "fs";
2-
import { join } from "path";
3-
import { promisify } from "util";
1+
import { readFile } from "node:fs/promises";
2+
import { join } from "node:path";
43

54
import { getInput, setFailed } from "@actions/core";
65
import { issueCommand } from "@actions/core/lib/command"
76

87
import type { ProblemMatcherDocument } from "github-actions-problem-matcher-typings";
98

10-
const readFileAsync = promisify(readFile);
11-
129
export async function run(): Promise<void> {
1310
try {
1411
const action = getInput("action");
1512

16-
const matcherFile = join(__dirname, "..", ".github", "problem-matcher.json");
13+
const matcherFile = join(__dirname, "problem-matcher.json");
1714

1815
switch (action) {
1916
case "add":
@@ -25,7 +22,7 @@ export async function run(): Promise<void> {
2522
break;
2623

2724
case "remove":
28-
const fileContents = await readFileAsync(matcherFile, { encoding: "utf8" });
25+
const fileContents = await readFile(matcherFile, { encoding: "utf8" });
2926
const problemMatcherDocument: ProblemMatcherDocument = JSON.parse(fileContents);
3027
const problemMatcher = problemMatcherDocument.problemMatcher[0];
3128

File renamed without changes.

0 commit comments

Comments
 (0)