Skip to content

Commit

Permalink
update node support
Browse files Browse the repository at this point in the history
  • Loading branch information
cenfun committed Jan 13, 2025
1 parent 6ba9e77 commit 4a8b3f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 40 deletions.
23 changes: 1 addition & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [18, 20]
node-version: [18, 20, 22]

runs-on: ubuntu-latest
name: Test Node ${{ matrix.node-version }}
Expand All @@ -51,27 +51,6 @@ jobs:
name: artifact-${{ matrix.node-version }}
path: ./docs

test-experimental:
runs-on: ubuntu-latest
name: Test Node 22

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js version
uses: actions/setup-node@v4
with:
node-version: 22
cache: ''
- run: npm install
- run: npx playwright install --with-deps
- run: npm run build
- run: npm run test
continue-on-error: true
env:
FORCE_COLOR: true

deploy:
if: github.ref == 'refs/heads/main'
needs: test
Expand Down
19 changes: 1 addition & 18 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,10 @@ const EC = require('eight-colors');
const { spawn } = require('node:child_process');
const Util = require('../lib/utils/util.js');

// eslint-disable-next-line complexity

const executeNpmRun = (item) => {
const nv = process.versions.node;

if (Util.cmpVersion(nv, '18') < 0) {

// puppeteer drop support for node16
// client includes puppeteer
if (item.includes('puppeteer') || item.includes('client')) {
EC.logYellow(`Ignore test puppeteer - node ${nv} < 18`);
return 0;
}

// The minimal required Node version is now 18.0.0
if (item.includes('rollup')) {
EC.logYellow(`Ignore test rollup - node ${nv} < 18`);
return 0;
}

}

if (Util.cmpVersion(nv, '20.6.0') < 0) {

// module register added in Node.js: v20.6.0
Expand Down

0 comments on commit 4a8b3f6

Please sign in to comment.