From 76752c74404b420ab9c06b8d9d78b06ddc56e5f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 9 Sep 2025 16:43:53 +0200 Subject: [PATCH 1/3] chore: update GitHub action versions --- .github/workflows/close-stalled.yml | 2 +- .github/workflows/nodejs.yml | 6 +++--- .github/workflows/test-module.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/close-stalled.yml b/.github/workflows/close-stalled.yml index 2ed1dd46..33511f96 100644 --- a/.github/workflows/close-stalled.yml +++ b/.github/workflows/close-stalled.yml @@ -20,7 +20,7 @@ jobs: if: github.repository == 'nodejs/citgm' runs-on: ubuntu-latest steps: - - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0 + - uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} days-before-close: 30 diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index d0d886f2..ed356905 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -14,12 +14,12 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: show-progress: false - name: Use LTS Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v5 with: node-version: lts/* @@ -38,4 +38,4 @@ jobs: test-command: npm run tap -- --coverage-report=lcov post-test-steps: | - name: Coverage Report - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # v5.5.0 diff --git a/.github/workflows/test-module.yml b/.github/workflows/test-module.yml index 36338a1e..089b0fd0 100644 --- a/.github/workflows/test-module.yml +++ b/.github/workflows/test-module.yml @@ -45,14 +45,14 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: repository: ${{ github.event.inputs.repository }} ref: ${{ github.event.inputs.ref }} show-progress: false - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + uses: actions/setup-node@v5 with: node-version: ${{ matrix.node-version }} From 507ec8b5d3123166ac752bc40babd235e8c6c3eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 9 Sep 2025 16:45:00 +0200 Subject: [PATCH 2/3] chore: update supported Node.js versions - Remove 18.x and 23.x - Add 24.x --- .github/workflows/test-module.yml | 3 +-- package.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-module.yml b/.github/workflows/test-module.yml index 089b0fd0..d188efb7 100644 --- a/.github/workflows/test-module.yml +++ b/.github/workflows/test-module.yml @@ -36,10 +36,9 @@ jobs: - ubuntu-latest - windows-latest node-version: - - 18.x - 20.x - 22.x - - 23.x + - 24.x runs-on: ${{ matrix.os }} diff --git a/package.json b/package.json index 47d9a7f0..cfb489da 100644 --- a/package.json +++ b/package.json @@ -89,6 +89,6 @@ "allow-incomplete-coverage": true }, "engines": { - "node": "18.x || 20.x || 22.x || 23.x" + "node": "20.x || 22.x || 24.x" } } From 183c52ee9ca66aa37daa1471797161500ec8e67c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 9 Sep 2025 16:54:58 +0200 Subject: [PATCH 3/3] test: remove custom assertion messages in reporter tests Some we wrongly placed (detected by Prettier) They do not add information in case of failure. --- test/reporter/test-reporter-junit.js | 25 +++++++------------------ test/reporter/test-reporter-tap.js | 21 ++++++--------------- 2 files changed, 13 insertions(+), 33 deletions(-) diff --git a/test/reporter/test-reporter-junit.js b/test/reporter/test-reporter-junit.js index af27e456..bb57f4e3 100644 --- a/test/reporter/test-reporter-junit.js +++ b/test/reporter/test-reporter-junit.js @@ -71,11 +71,7 @@ test('reporter.junit(): passing', (t) => { } junitReporter(logger, passingInput); - t.equal( - output, - passingExpected, - 'we should get expected output when all' + ' modules pass' - ); + t.equal(output, passingExpected); t.end(); }); @@ -94,11 +90,11 @@ test('reporter.junit(): bad output', (t) => { t.doesNotThrow(() => { junitReporter(logger, corruptXml); - }, 'parsing bad data should not throw'); + }); t.doesNotThrow(() => { junitReporter(logger, corruptXmlToo); - }, 'parsing bad data should not throw'); + }); t.ok(output); }); @@ -112,8 +108,7 @@ test('reporter.junit(): failing', (t) => { } junitReporter(logger, failingInput); - (t.equal(output, failingExpected), - 'we should get the expected output when a' + ' module fails'); + t.equal(output, failingExpected); t.end(); }); @@ -127,19 +122,14 @@ test('reporter.junit(): parser', async (t) => { junitReporter(logger, failingInput); const result = await parseString(output); - t.same( - result, - junitParserExpected, - 'we should get the expected output when a module fails' - ); + t.same(result, junitParserExpected); }); test('reporter.junit(): write to disk', (t) => { t.plan(1); junitReporter(outputFile, passingInput); const expected = readFileSync(outputFile, 'utf8'); - (t.equal(expected, passingExpected), - 'the file on disk should match the' + ' expected output'); + t.equal(expected, passingExpected); t.end(); }); @@ -149,8 +139,7 @@ test('reporter.junit(): append to disk', (t) => { writeFileSync(outputFileAppend, appendStartFile); junitReporter(outputFileAppend, passingInput, true); const expected = readFileSync(outputFileAppend, 'utf-8'); - (t.equal(expected, passingExpectedAppend), - 'the file on disk should match the' + ' expected output'); + t.equal(expected, passingExpectedAppend); t.end(); }); diff --git a/test/reporter/test-reporter-tap.js b/test/reporter/test-reporter-tap.js index faad0e8f..e07f547e 100644 --- a/test/reporter/test-reporter-tap.js +++ b/test/reporter/test-reporter-tap.js @@ -62,11 +62,7 @@ test('reporter.tap(): passing', (t) => { } tapReporter(logger, passingInput); - t.equal( - output, - passingExpected, - 'we should get expected output when all' + ' modules pass' - ); + t.equal(output, passingExpected); t.end(); }); @@ -79,8 +75,7 @@ test('reporter.tap(): failing', (t) => { } tapReporter(logger, failingInput); - (t.equal(output, failingExpected), - 'we should get the expected output when a' + ' module fails'); + t.equal(output, failingExpected); t.end(); }); @@ -96,8 +91,7 @@ test('reporter.tap(): parser', (t) => { // `results` contains JS classes that are not considered same as the // plain objects loaded from the JSON file. const plainResults = JSON.parse(JSON.stringify(results)); - (t.same(plainResults, tapParserExpected), - 'the tap parser should correctly' + ' parse the tap file'); + t.same(plainResults, tapParserExpected); t.end(); }); str(output).pipe(p); @@ -107,8 +101,7 @@ test('reporter.tap(): write to disk', (t) => { t.plan(1); tapReporter(outputFile, passingInput); const expected = readFileSync(outputFile, 'utf8'); - (t.equal(expected, passingExpected), - 'the file on disk should match the' + ' expected output'); + t.equal(expected, passingExpected); t.end(); }); @@ -118,8 +111,7 @@ test('reporter.tap(): append to disk', (t) => { writeFileSync(outputFileAppend, appendStartFile); tapReporter(outputFileAppend, passingInput, true); const expected = readFileSync(outputFileAppend, 'utf8'); - (t.equal(expected, passingExpectedAppend), - 'the file on disk should match the' + ' expected output'); + t.equal(expected, passingExpectedAppend); t.end(); }); @@ -127,8 +119,7 @@ test('reporter.tap(): append to disk when file does not exist', (t) => { t.plan(1); tapReporter(outputFileAppendBlank, passingInput, true); const expected = readFileSync(outputFileAppendBlank, 'utf8'); - (t.equal(expected, passingExpected), - 'the file on disk should match the' + ' expected output'); + t.equal(expected, passingExpected); t.end(); });