Merge pull request #34 from AurorNZ/upgrade_node24

Upgrade action to use Node 24 LTS
This commit is contained in:
Alex Miller 2025-11-26 13:24:08 +13:00 committed by GitHub
commit c9dd42e99d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 17 additions and 26 deletions

View File

@ -48,7 +48,7 @@ outputs:
changes:
description: JSON array with names of all filters matching any of changed files
runs:
using: 'node20'
using: 'node24'
main: 'dist/index.mjs'
branding:
color: blue

11
dist/index.mjs vendored
View File

@ -23940,11 +23940,11 @@ var require_utils5 = __commonJS({
}, []);
exports.flatten = (...args) => {
const result = [];
const flat2 = (arr) => {
const flat = (arr) => {
for (let i = 0; i < arr.length; i++) {
const ele = arr[i];
if (Array.isArray(ele)) {
flat2(ele);
flat(ele);
continue;
}
if (ele !== void 0) {
@ -23953,7 +23953,7 @@ var require_utils5 = __commonJS({
}
return result;
};
flat2(args);
flat(args);
return result;
};
}
@ -29261,7 +29261,7 @@ var Filter = class {
}
getPatterns(item) {
if (Array.isArray(item)) {
return flat(item.map((i) => this.getPatterns(i)));
return item.map((i) => this.getPatterns(i)).flat();
}
if (typeof item === "string") {
return [item];
@ -29272,9 +29272,6 @@ var Filter = class {
throw new Error(`Invalid filter YAML format: ${message}.`);
}
};
function flat(arr) {
return arr.reduce((acc, val) => acc.concat(val), []);
}
// src/git.ts
var core2 = __toESM(require_core(), 1);

View File

@ -15,7 +15,7 @@ import { analyzeMetafile, build } from "esbuild";
bundle: true,
format: "esm",
platform: "node",
target: ["node20"],
target: ["node24"],
treeShaking: true,
// Ensure require is properly defined: https://github.com/evanw/esbuild/issues/1921
banner: {

View File

@ -35,7 +35,7 @@
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.39.1",
"@octokit/webhooks-types": "^7.6.1",
"@tsconfig/node20": "^20.1.8",
"@tsconfig/node24": "^24.0.3",
"@types/js-yaml": "^4.0.9",
"@types/micromatch": "^4.0.10",
"@types/node": "^24.10.1",
@ -54,7 +54,7 @@
"vitest": "^4.0.14"
},
"volta": {
"node": "20.19.2",
"pnpm": "10.12.1"
"node": "24.11.1",
"pnpm": "10.23.0"
}
}

View File

@ -33,9 +33,9 @@ importers:
'@octokit/webhooks-types':
specifier: ^7.6.1
version: 7.6.1
'@tsconfig/node20':
specifier: ^20.1.8
version: 20.1.8
'@tsconfig/node24':
specifier: ^24.0.3
version: 24.0.3
'@types/js-yaml':
specifier: ^4.0.9
version: 4.0.9
@ -658,8 +658,8 @@ packages:
'@standard-schema/spec@1.0.0':
resolution: {integrity: sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==}
'@tsconfig/node20@20.1.8':
resolution: {integrity: sha512-Em+IdPfByIzWRRpqWL4Z7ArLHZGxmc36BxE3jCz9nBFSm+5aLaPMZyjwu4yetvyKXeogWcxik4L1jB5JTWfw7A==}
'@tsconfig/node24@24.0.3':
resolution: {integrity: sha512-vcERKtKQKHgzt/vfS3Gjasd8SUI2a0WZXpgJURdJsMySpS5+ctgbPfuLj2z/W+w4lAfTWxoN4upKfu2WzIRYnw==}
'@tybys/wasm-util@0.9.0':
resolution: {integrity: sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==}
@ -2500,7 +2500,7 @@ snapshots:
'@standard-schema/spec@1.0.0': {}
'@tsconfig/node20@20.1.8': {}
'@tsconfig/node24@24.0.3': {}
'@tybys/wasm-util@0.9.0':
dependencies:

View File

@ -59,7 +59,7 @@ export class Filter {
private getPatterns(item: FilterItemYaml): string[] {
if (Array.isArray(item)) {
return flat(item.map(i => this.getPatterns(i)))
return item.map(i => this.getPatterns(i)).flat()
}
if (typeof item === 'string') {
@ -73,9 +73,3 @@ export class Filter {
throw new Error(`Invalid filter YAML format: ${message}.`)
}
}
// Creates a new array with all sub-array elements concatenated
// In future could be replaced by Array.prototype.flat (supported on Node.js 11+)
function flat<T>(arr: T[][]): T[] {
return arr.reduce((acc, val) => acc.concat(val), [])
}

View File

@ -1,5 +1,5 @@
{
"extends": "@tsconfig/node20/tsconfig.json",
"extends": "@tsconfig/node24/tsconfig.json",
"compilerOptions": {
"noEmit": true,