From ceaaafa513672851e3b82c55e8005e4670ae9760 Mon Sep 17 00:00:00 2001 From: Christian Bewernitz Date: Fri, 30 Aug 2024 09:55:16 +0200 Subject: [PATCH 1/2] chore: minimum tested node version is 14 - drops node versions 10 and 12 from github actions - bumps `engines.node` to >=14 https://github.com/xmldom/xmldom/discussions/495 --- .github/workflows/examples.yml | 40 +----------------------------- .github/workflows/test-node.js.yml | 8 +++--- package.json | 2 +- 3 files changed, 6 insertions(+), 44 deletions(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 1305c4792..66c3564d8 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -18,8 +18,6 @@ jobs: strategy: matrix: node-version: - - 10 - - 12 - 14 - 16 - 18 @@ -50,43 +48,7 @@ jobs: - 3 - 4 - "5.0" # requires node version 12.20 - # starting with typescript 5.1 the minimum required node version is 14.17 - # so current versions have a separate job without node v12 - node-version: - - 12 - - 14 - - 16 - - 18 - - 20 - - steps: - - name: Harden Runner - uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 - with: - egress-policy: audit - - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 - with: - node-version: ${{ matrix.node-version }} - - run: ./pretest.sh ${{ matrix.ts-version }} - working-directory: examples/typescript-node-es6 - - run: node --experimental-modules dist/index.js - if: ${{ matrix.node-version == 12 }} - working-directory: examples/typescript-node-es6 - - run: node dist/index.js - if: ${{ matrix.node-version > 12 }} - working-directory: examples/typescript-node-es6 - typescript51-node-es6: - # starting with typescript 5.1 the minimum required node version is 14.17 - - runs-on: ubuntu-latest - - strategy: - matrix: - ts-version: - - 5 + - 5 # typescript >=5.1 requires node version >=14.17 node-version: - 14 - 16 diff --git a/.github/workflows/test-node.js.yml b/.github/workflows/test-node.js.yml index a3de8d7d4..833a15134 100644 --- a/.github/workflows/test-node.js.yml +++ b/.github/workflows/test-node.js.yml @@ -38,12 +38,12 @@ jobs: node-version: ${{ matrix.node-version }} - run: npm ci --no-audit - run: npm run test - if: matrix.node-version != 16 + if: matrix.node-version != 18 - run: npm run test -- --coverage - if: matrix.node-version == 16 + if: matrix.node-version == 18 - run: npm run fuzz - if: matrix.node-version == 16 - - if: matrix.node-version == 16 + if: matrix.node-version == 18 + - if: matrix.node-version == 18 uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/package.json b/package.json index 930dcd289..e9129092c 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "release": "np --no-yarn --test-script testrelease" }, "engines": { - "node": ">=10.0.0" + "node": ">=14.0.0" }, "devDependencies": { "@homer0/prettier-plugin-jsdoc": "9.0.2", From 93799f529d8b6fd780439d8c819bf779a3bcb1dc Mon Sep 17 00:00:00 2001 From: Christian Bewernitz Date: Fri, 30 Aug 2024 09:58:29 +0200 Subject: [PATCH 2/2] ci: run checks for node v22 --- .github/workflows/examples.yml | 2 ++ .github/workflows/test-node.js.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 66c3564d8..d827b8394 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -22,6 +22,7 @@ jobs: - 16 - 18 - 20 + - 22 steps: - name: Harden Runner @@ -54,6 +55,7 @@ jobs: - 16 - 18 - 20 + - 22 steps: - name: Harden Runner diff --git a/.github/workflows/test-node.js.yml b/.github/workflows/test-node.js.yml index 833a15134..5a5f99a44 100644 --- a/.github/workflows/test-node.js.yml +++ b/.github/workflows/test-node.js.yml @@ -24,6 +24,7 @@ jobs: - 16 - 18 - 20 + - 22 steps: - name: Harden Runner