From 324987ade81d60deaabf4db02bef9a0b42bd0c08 Mon Sep 17 00:00:00 2001 From: azu Date: Mon, 15 Jul 2024 13:23:17 +0900 Subject: [PATCH 01/14] =?UTF-8?q?feat(array):=20Object.groupBy=E9=9D=99?= =?UTF-8?q?=E7=9A=84=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/basic/array/README.md | 51 ++++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/source/basic/array/README.md b/source/basic/array/README.md index ab9051d250..d69e84a3da 100644 --- a/source/basic/array/README.md +++ b/source/basic/array/README.md @@ -978,7 +978,7 @@ console.log(totalValue); // => 6 そのため、できる限り変数を`const`で宣言したい場合には`reduce`メソッドは有用です。 一方で、`reduce`メソッドは可読性があまりよくないため、コードの意図が伝わりにくいというデメリットもあります。 -`reduce`メソッドには利点と可読性のトレードオフがありますが、利用する場合は`reduce`メソッドを扱う処理を関数で囲むなど処理の意図がわかるように工夫をする必要があります。 +`reduce`メソッドには利点と可読性のトレードオフがありますが、利用する場合は`reduce`メソッドを扱う処理を関数にするといった処理の意図がわかるように工夫をする必要があります。 {{book.console}} ```js @@ -991,6 +991,51 @@ function sum(array) { console.log(sum(array)); // => 6 ``` +### `Object.groupBy`メソッド [ES2024] {#array-group-by} + +`Array.prototype.reduce`メソッドを使うことで、配列から数値やオブジェクトなど任意の値を作成できます。 + +先ほどは配列の合計の数値を計算する例でしたが、配列からオブジェクトを作成することもできます。 +配列からオブジェクトを作成したいユースケースとして、配列の要素を条件によってグループ分けしたいケースがあります。 +たとえば、数値からなる配列の要素を奇数と偶数の配列に分けたい場合などです。 + +`Array.prototype.reduce`メソッドを使って、数値からなる配列を奇数と偶数に分けるコードは次のようになります。 + +{{book.console}} +```js +const array = [1, 2, 3, 4, 5]; +const grouped = array.reduce((accumulator, currentValue) => { + // 2で割った余りが0なら偶数(even)、そうでないなら奇数(odd) + const key = currentValue % 2 === 0 ? "even" : "odd"; + if (!accumulator[key]) { + accumulator[key] = []; + } + // グループ分けしたキーの配列に要素を追加 + accumulator[key].push(currentValue); + return accumulator; +}, {}); +console.log(grouped); // => { odd: [1, 3, 5], even: [2, 4] } +``` + +しかし、`reduce`メソッドは使い方がやや複雜であるため、別の方法があるなら可能なら避けたほうが読みやすいコードになります。 +ES2024では、`Object.groupBy`静的メソッドが追加され、配列からグループ分けしたオブジェクトを作成できるようになっています。 + +`Object.groupBy`静的メソッド[^1]は、第1引数に配列を、第2引数にグループ分けの条件を返すコールバック関数を渡します。 +第2引数のコールバック関数が返す値をキーとして、配列の要素をグループ分けしたオブジェクトが作成されます。 + +先ほどのコードを`Object.groupBy`静的メソッドを使って書き換えると次のようになります。 + +{{book.console}} +```js +const array = [1, 2, 3, 4, 5]; +const grouped = Object.groupBy(array, (currentValue) => { + return currentValue % 2 === 0 ? "even" : "odd"; +}); +console.log(grouped); // => { odd: [1, 3, 5], even: [2, 4] } +``` + +`Object.groupBy`メソッドを使うことで、配列からグループ分けしたオブジェクトを簡潔に作成できます。 + ## [コラム] Array-likeオブジェクト {#array-like} 配列のように扱えるが配列ではないオブジェクトのことを、**Array-likeオブジェクト**と呼びます。 @@ -1030,7 +1075,7 @@ function myFunc() { myFunc("a", "b", "c"); ``` -Array-likeオブジェクトは配列のようで配列ではないというもどかしさを持つオブジェクトです。`Array.from`メソッド[ES2015]を使うことでArray-likeオブジェクトを配列に変換して扱うことができます。一度配列に変換してしまえばArrayメソッドも利用できます。 +Array-likeオブジェクトは配列のようで配列ではないというもどかしさを持つオブジェクトです。`Array.from`静的メソッド[ES2015]を使うことでArray-likeオブジェクトを配列に変換して扱うことができます。一度配列に変換してしまえばArrayメソッドも利用できます。 {{book.console}} ```js @@ -1123,3 +1168,5 @@ console.log(versionNames); // => ["ECMAScript 1", "ECMAScript 2", "ECMAScript 3" [Lodash]: https://lodash.com/ "Lodash" [Immutable.js]: https://immutable-js.com/ "Immutable.js" [Arrayについてのドキュメント]: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Array + +[^1]: `Array.prototype.group`メソッドのようなArrayのメソッドではないのは、同じメソッド名を実装するウェブサイトが多く存在しており後方互換性がなかったためです。 From 93b3315b435e19c9e88623ae2f670e0cdb8f47f1 Mon Sep 17 00:00:00 2001 From: azu Date: Mon, 15 Jul 2024 13:24:17 +0900 Subject: [PATCH 02/14] fix --- source/basic/array/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/basic/array/README.md b/source/basic/array/README.md index d69e84a3da..e08fbf2862 100644 --- a/source/basic/array/README.md +++ b/source/basic/array/README.md @@ -1017,7 +1017,7 @@ const grouped = array.reduce((accumulator, currentValue) => { console.log(grouped); // => { odd: [1, 3, 5], even: [2, 4] } ``` -しかし、`reduce`メソッドは使い方がやや複雜であるため、別の方法があるなら可能なら避けたほうが読みやすいコードになります。 +しかし、`reduce`メソッドは使い方がやや複雜であるため、可能なら避けたほうが読みやすいコードとなりやすいです。 ES2024では、`Object.groupBy`静的メソッドが追加され、配列からグループ分けしたオブジェクトを作成できるようになっています。 `Object.groupBy`静的メソッド[^1]は、第1引数に配列を、第2引数にグループ分けの条件を返すコールバック関数を渡します。 From 84b8c2e76478a35cbdf8671f37ef25839b1cde0b Mon Sep 17 00:00:00 2001 From: azu Date: Mon, 15 Jul 2024 13:26:19 +0900 Subject: [PATCH 03/14] fix --- source/basic/array/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/basic/array/README.md b/source/basic/array/README.md index e08fbf2862..23b384e99d 100644 --- a/source/basic/array/README.md +++ b/source/basic/array/README.md @@ -991,7 +991,7 @@ function sum(array) { console.log(sum(array)); // => 6 ``` -### `Object.groupBy`メソッド [ES2024] {#array-group-by} +### [ES2024] `Object.groupBy`静的メソッド {#array-group-by} `Array.prototype.reduce`メソッドを使うことで、配列から数値やオブジェクトなど任意の値を作成できます。 From 47f5223c4b738f0e1ba56c141ad951ee8c92e847 Mon Sep 17 00:00:00 2001 From: azu Date: Mon, 15 Jul 2024 13:26:26 +0900 Subject: [PATCH 04/14] fix --- source/basic/array/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/basic/array/README.md b/source/basic/array/README.md index 23b384e99d..de37283399 100644 --- a/source/basic/array/README.md +++ b/source/basic/array/README.md @@ -991,7 +991,7 @@ function sum(array) { console.log(sum(array)); // => 6 ``` -### [ES2024] `Object.groupBy`静的メソッド {#array-group-by} +### [ES2024] `Object.groupBy`静的メソッド {#object-group-by} `Array.prototype.reduce`メソッドを使うことで、配列から数値やオブジェクトなど任意の値を作成できます。 From 7696d24caebc6b1159291ff31afa4cbf9542e38f Mon Sep 17 00:00:00 2001 From: azu Date: Mon, 15 Jul 2024 13:28:01 +0900 Subject: [PATCH 05/14] fix --- source/basic/array/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/source/basic/array/README.md b/source/basic/array/README.md index de37283399..f4d19d79c3 100644 --- a/source/basic/array/README.md +++ b/source/basic/array/README.md @@ -1029,6 +1029,7 @@ ES2024では、`Object.groupBy`静的メソッドが追加され、配列から ```js const array = [1, 2, 3, 4, 5]; const grouped = Object.groupBy(array, (currentValue) => { + // currentValueが偶数なら"even"、そうでないなら"odd"の配列に追加される return currentValue % 2 === 0 ? "even" : "odd"; }); console.log(grouped); // => { odd: [1, 3, 5], even: [2, 4] } From ff644040b57b47211bcc707ad36225f24e123193 Mon Sep 17 00:00:00 2001 From: azu Date: Mon, 15 Jul 2024 13:34:12 +0900 Subject: [PATCH 06/14] =?UTF-8?q?CI:=20ES2024=E3=81=AE=E3=82=B5=E3=83=9D?= =?UTF-8?q?=E3=83=BC=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 6 +++--- .github/workflows/test.yml | 18 +++++++++--------- source/basic/array/README.md | 1 + test/markdown-doc-test.js | 13 ++++++++----- 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f96341fe05..fc345d9856 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,11 +11,11 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 - run: npm install - run: npm run build - name: Deploy diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 504a72a34e..accc9dac43 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,13 +14,13 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [18] + node-version: [20] os: [macOS-latest, windows-latest, ubuntu-latest] name: "Build on Node.js: ${{ matrix.node-version }} OS: ${{ matrix.os }}" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "Node.js ${{ matrix.node-version }}" - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - run: npm ci @@ -29,12 +29,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [18, 20] + node-version: [20, 22] name: "Test on Node.js ${{ matrix.node-version }}" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "Node.js ${{ matrix.node-version }}" - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - run: npm ci @@ -43,10 +43,10 @@ jobs: runs-on: ubuntu-latest name: E2E steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 - run: npm ci - run: npm run e2e diff --git a/source/basic/array/README.md b/source/basic/array/README.md index f4d19d79c3..a76ac52a15 100644 --- a/source/basic/array/README.md +++ b/source/basic/array/README.md @@ -1026,6 +1026,7 @@ ES2024では、`Object.groupBy`静的メソッドが追加され、配列から 先ほどのコードを`Object.groupBy`静的メソッドを使って書き換えると次のようになります。 {{book.console}} + ```js const array = [1, 2, 3, 4, 5]; const grouped = Object.groupBy(array, (currentValue) => { diff --git a/test/markdown-doc-test.js b/test/markdown-doc-test.js index 10843d8595..5a89b8341c 100644 --- a/test/markdown-doc-test.js +++ b/test/markdown-doc-test.js @@ -17,12 +17,15 @@ const sourceDir = path.join(__dirname, "..", "source"); /** * 指定したECMAScriptバージョンをmetaにもつコードは実行環境によってはサポートされてないので無視する * 最新版のNodeでは無視しない - * @type {string[]} + * @type {string[]} サポートしてないECMAScriptバージョン */ const IgnoredECMAScriptVersions = (() => { - if (semver.cmp(process.version, ">=", "20.0.0")) { + if (semver.cmp(process.version, ">=", "22.0.0")) { return []; // すべて通る前提 } + if (semver.cmp(process.version, ">=", "20.0.0")) { + return ["2024"]; // Object.groupByがサポートされていない + } if (semver.cmp(process.version, ">=", "18.0.0")) { return ["2023"]; // Array.prototype.withがサポートされていない } @@ -35,7 +38,7 @@ const IgnoredECMAScriptVersions = (() => { // Top-Level await をサポートしていない return ["2021", "2022"]; } - return ["2017", "2018", "2019", "2020", "2021", "2022"]; + return ["2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024"]; })(); /** * Markdownファイルの CodeBlock に対してdoctestを行う @@ -55,7 +58,7 @@ describe("doctest:md", function() { ]); files.forEach(filePath => { const normalizeFilePath = filePath.replace(sourceDir, ""); - describe(`${normalizeFilePath}`, function () { + describe(`${normalizeFilePath}`, function() { const content = fs.readFileSync(filePath, "utf-8"); const parsedCodes = parse({ filePath, @@ -66,7 +69,7 @@ describe("doctest:md", function() { parsedCodes.forEach((parsedCode, index) => { const codeValue = parsedCode.code; const testCaseName = codeValue.slice(0, 32).replace(/[\r\n]/g, "_"); - it(dirName + ": " + testCaseName, function () { + it(dirName + ": " + testCaseName, function() { return test({ ...parsedCode, code: toTestCode(parsedCode.code) From c8c0a04025a25082f3777fa2be817fafdfb38be5 Mon Sep 17 00:00:00 2001 From: azu Date: Mon, 15 Jul 2024 13:35:54 +0900 Subject: [PATCH 07/14] =?UTF-8?q?chore:=20=E5=BF=85=E8=A6=81=E3=81=AANode.?= =?UTF-8?q?js=E3=81=AE=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3?= =?UTF-8?q?=E3=82=92v22.4.1=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .node-version | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.node-version b/.node-version index ee09fac75c..adb0705181 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -v20.11.1 +v22.4.1 diff --git a/README.md b/README.md index dd2f6117c2..561bdc797a 100644 --- a/README.md +++ b/README.md @@ -79,11 +79,11 @@ IssueやPull Requestについては、次のページを参照してください npm install -Node.js v20.11.1以上とnpm 10.2.4以上が必要です。 +Node.js v22.4.1以上とnpm 10.2.4以上が必要です。 ``` $ node -v -v20.11.1 +v22.4.1 $ npm -v 10.2.4 ``` From e41c19238b40636d70e5032d46a6e95540f32ab2 Mon Sep 17 00:00:00 2001 From: azu Date: Mon, 15 Jul 2024 13:36:26 +0900 Subject: [PATCH 08/14] =?UTF-8?q?chore:=20npm=E3=82=82=E3=82=A2=E3=83=83?= =?UTF-8?q?=E3=83=97=E3=83=87=E3=83=BC=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 561bdc797a..70bb2ba164 100644 --- a/README.md +++ b/README.md @@ -79,13 +79,13 @@ IssueやPull Requestについては、次のページを参照してください npm install -Node.js v22.4.1以上とnpm 10.2.4以上が必要です。 +Node.js v22.4.1以上とnpm 10.8.2以上が必要です。 ``` $ node -v v22.4.1 $ npm -v -10.2.4 +10.8.2 ``` ## Usage diff --git a/package.json b/package.json index 7cb32a93b1..3e7e007288 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "license": "MIT", "version": "4.0.0", "description": "📖 JavaScript Primer - 迷わないための入門書", - "packageManager": "npm@10.2.4", + "packageManager": "npm@10.8.2+sha512.c7f0088c520a46596b85c6f8f1da943400199748a0f7ea8cb8df75469668dc26f6fb3ba26df87e2884a5ebe91557292d0f3db7d0929cdb4f14910c3032ac81fb", "type": "module", "directories": { "test": "test" From 731d9d4afb9c450f53f770cde32d0fd6808e3f2c Mon Sep 17 00:00:00 2001 From: azu Date: Mon, 15 Jul 2024 13:44:07 +0900 Subject: [PATCH 09/14] fix test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Object.groupByはObject.create(null)なので一致しない --- source/basic/array/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/basic/array/README.md b/source/basic/array/README.md index a76ac52a15..d5fda0e9f3 100644 --- a/source/basic/array/README.md +++ b/source/basic/array/README.md @@ -1014,7 +1014,8 @@ const grouped = array.reduce((accumulator, currentValue) => { accumulator[key].push(currentValue); return accumulator; }, {}); -console.log(grouped); // => { odd: [1, 3, 5], even: [2, 4] } +console.log(grouped.even); // => [2, 4] +console.log(grouped.odd); // => [1, 3, 5] ``` しかし、`reduce`メソッドは使い方がやや複雜であるため、可能なら避けたほうが読みやすいコードとなりやすいです。 @@ -1033,7 +1034,9 @@ const grouped = Object.groupBy(array, (currentValue) => { // currentValueが偶数なら"even"、そうでないなら"odd"の配列に追加される return currentValue % 2 === 0 ? "even" : "odd"; }); -console.log(grouped); // => { odd: [1, 3, 5], even: [2, 4] } +console.log(grouped.even); // => [2, 4] +console.log(grouped.odd); // => [1, 3, 5] + ``` `Object.groupBy`メソッドを使うことで、配列からグループ分けしたオブジェクトを簡潔に作成できます。 From 7c9007b95f1f1470d5db00d9f5179032b7be33ce Mon Sep 17 00:00:00 2001 From: azu Date: Mon, 15 Jul 2024 13:46:13 +0900 Subject: [PATCH 10/14] fix empty line --- source/basic/array/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/source/basic/array/README.md b/source/basic/array/README.md index d5fda0e9f3..4d8440a2b9 100644 --- a/source/basic/array/README.md +++ b/source/basic/array/README.md @@ -1036,7 +1036,6 @@ const grouped = Object.groupBy(array, (currentValue) => { }); console.log(grouped.even); // => [2, 4] console.log(grouped.odd); // => [1, 3, 5] - ``` `Object.groupBy`メソッドを使うことで、配列からグループ分けしたオブジェクトを簡潔に作成できます。 From 7835c3377c089a8482e62eb03e0e28cf8608f856 Mon Sep 17 00:00:00 2001 From: azu Date: Mon, 15 Jul 2024 13:54:04 +0900 Subject: [PATCH 11/14] fix --- source/basic/array/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/basic/array/README.md b/source/basic/array/README.md index 4d8440a2b9..fa0675dd04 100644 --- a/source/basic/array/README.md +++ b/source/basic/array/README.md @@ -1173,4 +1173,4 @@ console.log(versionNames); // => ["ECMAScript 1", "ECMAScript 2", "ECMAScript 3" [Immutable.js]: https://immutable-js.com/ "Immutable.js" [Arrayについてのドキュメント]: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Array -[^1]: `Array.prototype.group`メソッドのようなArrayのメソッドではないのは、同じメソッド名を実装するウェブサイトが多く存在しており後方互換性がなかったためです。 +[^1]: `Array.prototype.groupBy`メソッドのようなArrayのメソッドではないのは、同じメソッド名を実装するウェブサイトが多く存在しており後方互換性がなかったためです。 From a824828d7a5502f5e2d9a1175d181d274517d6a5 Mon Sep 17 00:00:00 2001 From: azu Date: Sat, 20 Jul 2024 15:45:53 +0900 Subject: [PATCH 12/14] fix --- source/basic/array/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/basic/array/README.md b/source/basic/array/README.md index fa0675dd04..76dc9f0320 100644 --- a/source/basic/array/README.md +++ b/source/basic/array/README.md @@ -1022,7 +1022,7 @@ console.log(grouped.odd); // => [1, 3, 5] ES2024では、`Object.groupBy`静的メソッドが追加され、配列からグループ分けしたオブジェクトを作成できるようになっています。 `Object.groupBy`静的メソッド[^1]は、第1引数に配列を、第2引数にグループ分けの条件を返すコールバック関数を渡します。 -第2引数のコールバック関数が返す値をキーとして、配列の要素をグループ分けしたオブジェクトが作成されます。 +第2引数のコールバック関数が返した値をキーとして、配列の要素をグループ分けしたオブジェクトが作成されます。 先ほどのコードを`Object.groupBy`静的メソッドを使って書き換えると次のようになります。 @@ -1038,7 +1038,7 @@ console.log(grouped.even); // => [2, 4] console.log(grouped.odd); // => [1, 3, 5] ``` -`Object.groupBy`メソッドを使うことで、配列からグループ分けしたオブジェクトを簡潔に作成できます。 +`Object.groupBy`静的メソッドを使うことで、配列からグループ分けしたオブジェクトを簡潔に作成できます。 ## [コラム] Array-likeオブジェクト {#array-like} From 57be1234bcf2be40679656d0066573d457d1ef28 Mon Sep 17 00:00:00 2001 From: azu Date: Sat, 20 Jul 2024 15:48:59 +0900 Subject: [PATCH 13/14] fix --- source/basic/array/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/basic/array/README.md b/source/basic/array/README.md index 76dc9f0320..f60c1b65b2 100644 --- a/source/basic/array/README.md +++ b/source/basic/array/README.md @@ -1024,7 +1024,7 @@ ES2024では、`Object.groupBy`静的メソッドが追加され、配列から `Object.groupBy`静的メソッド[^1]は、第1引数に配列を、第2引数にグループ分けの条件を返すコールバック関数を渡します。 第2引数のコールバック関数が返した値をキーとして、配列の要素をグループ分けしたオブジェクトが作成されます。 -先ほどのコードを`Object.groupBy`静的メソッドを使って書き換えると次のようになります。 +先ほどのコードを`Object.groupBy`静的メソッドを使って書き換えると、次のようになります。 {{book.console}} From baa5f429b8fca74f8fda9a47b0c108191ffff381 Mon Sep 17 00:00:00 2001 From: azu Date: Sat, 20 Jul 2024 15:52:46 +0900 Subject: [PATCH 14/14] CI: use 22.5.1 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index accc9dac43..e930409493 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [20, 22] + node-version: [20, 22.5.1] name: "Test on Node.js ${{ matrix.node-version }}" steps: - uses: actions/checkout@v4