Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '20'
node-version: '24'

- run: npm ci

Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
24
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ outputs:
jsonString:
description: 'JSON string'
runs:
using: 'node20'
using: 'node24'
main: 'dist/index.js'
8 changes: 5 additions & 3 deletions fixtures/full-example/issue.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const { resolve } = require("path");
const { readFileSync } = require("fs");
import { readFileSync } from "node:fs";
import { resolve } from "node:path";
import { fileURLToPath } from "node:url";

const __dirname = fileURLToPath(new URL(".", import.meta.url));
const issueBodyPath = resolve(__dirname, "issue-body.md");

module.exports = readFileSync(issueBodyPath, "utf-8");
export default readFileSync(issueBodyPath, "utf-8");
8 changes: 5 additions & 3 deletions fixtures/mismatched-parsing/issue.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const { resolve } = require("path");
const { readFileSync } = require("fs");
import { readFileSync } from "node:fs";
import { resolve } from "node:path";
import { fileURLToPath } from "node:url";

const __dirname = fileURLToPath(new URL(".", import.meta.url));
const issueBodyPath = resolve(__dirname, "issue-body.md");

module.exports = readFileSync(issueBodyPath, "utf-8");
export default readFileSync(issueBodyPath, "utf-8");
8 changes: 5 additions & 3 deletions fixtures/multiple-paragraphs/issue.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const { resolve } = require("path");
const { readFileSync } = require("fs");
import { readFileSync } from "node:fs";
import { resolve } from "node:path";
import { fileURLToPath } from "node:url";

const __dirname = fileURLToPath(new URL(".", import.meta.url));
const issueBodyPath = resolve(__dirname, "issue-body.md");

module.exports = readFileSync(issueBodyPath, "utf-8")
export default readFileSync(issueBodyPath, "utf-8");
8 changes: 5 additions & 3 deletions fixtures/readme-example/issue.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const { resolve } = require("path");
const { readFileSync } = require("fs");
import { readFileSync } from "node:fs";
import { resolve } from "node:path";
import { fileURLToPath } from "node:url";

const __dirname = fileURLToPath(new URL(".", import.meta.url));
const issueBodyPath = resolve(__dirname, "issue-body.md");

module.exports = readFileSync(issueBodyPath, "utf-8");
export default readFileSync(issueBodyPath, "utf-8");
10 changes: 4 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// @ts-check

const fs = require("fs");
const yaml = require("js-yaml");
const core = require("@actions/core");
import fs from "node:fs";
import yaml from "js-yaml";
import * as core from "@actions/core";

/**
* @param {NodeJS.ProcessEnv} env
* @param {string} body
* @param {fs} fs
* @param {core} core
*/
async function run(env, body, fs, core) {
export async function run(env, body, fs, core) {
body = body ?? ""
let form = {};
try {
Expand Down Expand Up @@ -180,5 +180,3 @@ if (process.env.GITHUB_ACTIONS && process.env.NODE_ENV !== "test") {

run(process.env, body, fs, core);
}

module.exports.run = run;
105 changes: 46 additions & 59 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
"version": "3.2.3",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"build": "ncc build",
"test": "jest ."
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js ."
},
"repository": {
"type": "git",
Expand All @@ -20,7 +21,7 @@
},
"homepage": "https://github.com/stefanbuck/github-issue-parser#readme",
"dependencies": {
"@actions/core": "^2.0.1",
"@actions/core": "^3.0.1",
"js-yaml": "^4.1.1"
},
"devDependencies": {
Expand Down
Loading