Skip to content

Commit

Permalink
ci: use node v20 (#513)
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice authored Feb 12, 2024
1 parent d8c1313 commit bb1a020
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
4 changes: 4 additions & 0 deletions test/specifier.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -510,3 +510,7 @@ describe('filter([versions], specifier, {prereleases})', () => {
});
});
});

it('filter works without options', () => {
expect(filter([], '')).toEqual([]);
});

0 comments on commit bb1a020

Please sign in to comment.