diff --git a/.github/actions/validate-issue/lib/index.js b/.github/actions/validate-issue/lib/index.js index 1db34c0e5..dc2d65dfb 100644 --- a/.github/actions/validate-issue/lib/index.js +++ b/.github/actions/validate-issue/lib/index.js @@ -112,7 +112,7 @@ async function run() { valid = false; } if (nodeVersions.length > 0) { - if (!nodeVersions.some(await (0, nodeVersions_1.isValidVersion)(new Date()))) { + if (!(await (0, nodeVersions_1.isAnyVersionValid)(new Date())(nodeVersions))) { const nodeVersionMessage = getFile("../messages/unsupported-node.md", { THE_AUTHOR: author, NODE_VERSION: nodeVersions.join("`, `"), diff --git a/.github/actions/validate-issue/lib/index.js.map b/.github/actions/validate-issue/lib/index.js.map index 06ec7bc4b..7bd3f1682 100644 --- a/.github/actions/validate-issue/lib/index.js.map +++ b/.github/actions/validate-issue/lib/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,wCAAoD;AACpD,4CAAsD;AACtD,iDAAyC;AACzC,iCAAiC;AACjC,2BAAkC;AAClC,6BAA6B;AAC7B,iDAAgD;AAEhD,KAAK,UAAU,GAAG;IAChB,IAAI;QACF,8BAA8B;QAC9B,oEAAoE;QACpE,MAAM,KAAK,GAAG,gBAAO,CAAC,OAAO,CAAC,KAAK,CAAC;QAEpC,IAAI,CAAC,KAAK,EAAE;YACV,IAAA,gBAAS,EAAC,6CAA6C,CAAC,CAAC;YACzD,OAAO;SACR;QAED,oEAAoE;QACpE,gEAAgE;QAChE,mEAAmE;QACnE,MAAM,YAAY,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAChD,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,sBAAsB,CAAC,CAAC;QACpD,IAAI,YAAY,GAAG,UAAU,EAAE;YAC7B,OAAO,CAAC,GAAG,CAAC,8CAA8C,CAAC,CAAC;YAC5D,OAAO;SACR;QAED,yBAAyB;QACzB,MAAM,KAAK,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C;YAC7C,CAAC,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC;QAClB,CAAC;KACF;IAAC,OAAO,GAAG,EAAE;QACZ,MAAM,KAAK,GAAG,GAAY,CAAC;QAC3B,IAAA,gBAAS,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC;KAC1B;AACH,CAAC;AAED,GAAG,EAAE,CAAC"} \ No newline at end of file diff --git a/.github/actions/validate-issue/lib/nodeVersions.d.ts b/.github/actions/validate-issue/lib/nodeVersions.d.ts index dbf7fbdf4..b46d54ade 100644 --- a/.github/actions/validate-issue/lib/nodeVersions.d.ts +++ b/.github/actions/validate-issue/lib/nodeVersions.d.ts @@ -1 +1 @@ -export declare const isValidVersion: (currentDate: Date) => (version: string) => Promise; +export declare const isAnyVersionValid: (currentDate: Date) => (versions: string[]) => Promise; diff --git a/.github/actions/validate-issue/lib/nodeVersions.js b/.github/actions/validate-issue/lib/nodeVersions.js index 276600f33..ee201e722 100644 --- a/.github/actions/validate-issue/lib/nodeVersions.js +++ b/.github/actions/validate-issue/lib/nodeVersions.js @@ -1,12 +1,13 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.isValidVersion = void 0; -const isValidVersion = (currentDate) => async (version) => { - const formattedVersion = `v${version}`; +exports.isAnyVersionValid = void 0; +const isAnyVersionValid = (currentDate) => async (versions) => { const resp = (await (await fetch("https://raw.githubusercontent.com/nodejs/Release/main/schedule.json")).json()); - return (formattedVersion in resp && + return versions + .map((version) => `v${version}`) + .some((formattedVersion) => formattedVersion in resp && currentDate >= new Date(resp[formattedVersion].start) && currentDate <= new Date(resp[formattedVersion].end)); }; -exports.isValidVersion = isValidVersion; +exports.isAnyVersionValid = isAnyVersionValid; //# sourceMappingURL=nodeVersions.js.map \ No newline at end of file diff --git a/.github/actions/validate-issue/lib/nodeVersions.js.map b/.github/actions/validate-issue/lib/nodeVersions.js.map index 79886b510..d96e4f36b 100644 --- a/.github/actions/validate-issue/lib/nodeVersions.js.map +++ b/.github/actions/validate-issue/lib/nodeVersions.js.map @@ -1 +1 @@ -{"version":3,"file":"nodeVersions.js","sourceRoot":"","sources":["../src/nodeVersions.ts"],"names":[],"mappings":";;;AAKO,MAAM,cAAc,GAAG,CAAC,WAAiB,EAAE,EAAE,CAAC,KAAK,EACxD,OAAe,EACG,EAAE;IACpB,MAAM,gBAAgB,GAAG,IAAI,OAAO,EAAE,CAAC;IACvC,MAAM,IAAI,GAAG,CAAC,MAAO,CACnB,MAAM,KAAK,CACT,qEAAqE,CACtE,CACF,CAAC,IAAI,EAAc,CAAgC,CAAC;IACrD,OAAO,CACL,gBAAgB,IAAI,IAAI;QACxB,WAAW,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,KAAK,CAAC;QACrD,WAAW,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,GAAG,CAAC,CACpD,CAAC;AACJ,CAAC,CAAC;AAdW,QAAA,cAAc,kBAczB"} \ No newline at end of file +{"version":3,"file":"nodeVersions.js","sourceRoot":"","sources":["../src/nodeVersions.ts"],"names":[],"mappings":";;;AAKO,MAAM,iBAAiB,GAAG,CAAC,WAAiB,EAAE,EAAE,CAAC,KAAK,EAC3D,QAAkB,EACA,EAAE;IACpB,MAAM,IAAI,GAAG,CAAC,MAAO,CACnB,MAAM,KAAK,CACT,qEAAqE,CACtE,CACF,CAAC,IAAI,EAAc,CAAgC,CAAC;IAErD,OAAO,QAAQ;SACZ,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,OAAO,EAAE,CAAC;SAC/B,IAAI,CACH,CAAC,gBAAgB,EAAE,EAAE,CACnB,gBAAgB,IAAI,IAAI;QACxB,WAAW,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,KAAK,CAAC;QACrD,WAAW,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,GAAG,CAAC,CACtD,CAAC;AACN,CAAC,CAAC;AAjBW,QAAA,iBAAiB,qBAiB5B"} \ No newline at end of file diff --git a/.github/actions/validate-issue/src/index.ts b/.github/actions/validate-issue/src/index.ts index 30752d570..95f0858af 100644 --- a/.github/actions/validate-issue/src/index.ts +++ b/.github/actions/validate-issue/src/index.ts @@ -11,7 +11,7 @@ import { execSync } from "child_process"; import * as semver from "semver"; import { readFileSync } from "fs"; import * as path from "path"; -import { isValidVersion } from "./nodeVersions"; +import { isAnyVersionValid } from "./nodeVersions"; async function run() { try { @@ -138,7 +138,7 @@ async function run() { valid = false; } if (nodeVersions.length > 0) { - if (!nodeVersions.some(await isValidVersion(new Date()))) { + if (!(await isAnyVersionValid(new Date())(nodeVersions))) { const nodeVersionMessage = getFile( "../messages/unsupported-node.md", { diff --git a/.github/actions/validate-issue/src/nodeVersions.ts b/.github/actions/validate-issue/src/nodeVersions.ts index 5042899b5..70a597a15 100644 --- a/.github/actions/validate-issue/src/nodeVersions.ts +++ b/.github/actions/validate-issue/src/nodeVersions.ts @@ -3,18 +3,21 @@ type VersionInfo = { end: Date; }; -export const isValidVersion = (currentDate: Date) => async ( - version: string +export const isAnyVersionValid = (currentDate: Date) => async ( + versions: string[] ): Promise => { - const formattedVersion = `v${version}`; const resp = (await (( await fetch( "https://raw.githubusercontent.com/nodejs/Release/main/schedule.json" ) ).json() as unknown)) as Record; - return ( - formattedVersion in resp && - currentDate >= new Date(resp[formattedVersion].start) && - currentDate <= new Date(resp[formattedVersion].end) - ); + + return versions + .map((version) => `v${version}`) + .some( + (formattedVersion) => + formattedVersion in resp && + currentDate >= new Date(resp[formattedVersion].start) && + currentDate <= new Date(resp[formattedVersion].end) + ); };