From bb1a0206839dee70fc967091d239041fd3c8a008 Mon Sep 17 00:00:00 2001 From: Michael Kriese Date: Mon, 12 Feb 2024 14:10:06 +0100 Subject: [PATCH] ci: use node v20 (#513) --- .github/workflows/build.yml | 6 +++--- jest.config.js | 2 +- test/specifier.test.js | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e051062..0135285 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,12 +20,12 @@ concurrency: env: GIT_EMAIL: bot+pep440@renovateapp.com DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} - NODE_VERSION: 18 # needs to be in sync with other v18 below + NODE_VERSION: 20 # needs to be in sync with other versions below DRY_RUN: true jobs: test: - name: ${{ matrix.node-version == 18 && format('test ({0})', matrix.os) || format('test ({0}, node-{1})', matrix.os, matrix.node-version) }} + name: ${{ matrix.node-version == 20 && format('test ({0})', matrix.os) || format('test ({0}, node-{1})', matrix.os, matrix.node-version) }} runs-on: ubuntu-latest # tests shouldn't need more time @@ -40,7 +40,7 @@ jobs: # node-version: 12 env: - coverage: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == 18 }} + coverage: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == 20 }} NODE_VERSION: ${{ matrix.node-version }} steps: diff --git a/jest.config.js b/jest.config.js index f135fc1..93053fa 100644 --- a/jest.config.js +++ b/jest.config.js @@ -6,7 +6,7 @@ module.exports = { testEnvironment: 'node', collectCoverage: true, collectCoverageFrom: ['lib/**/*.js'], - coverageProvider: 'v8', + // coverageProvider: 'v8', bugy on node v20.11.0 :-/ coverageReporters: ci ? ['html', 'json', 'text'] : ['html', 'text'], coverageThreshold: { global: { diff --git a/test/specifier.test.js b/test/specifier.test.js index d7ea2c3..eb6321a 100644 --- a/test/specifier.test.js +++ b/test/specifier.test.js @@ -510,3 +510,7 @@ describe('filter([versions], specifier, {prereleases})', () => { }); }); }); + +it('filter works without options', () => { + expect(filter([], '')).toEqual([]); +});