diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6983ed9..e79ff20 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [14, 16, 18, 20] + node: [20, 21] name: Node ${{ matrix.node }} steps: - uses: actions/checkout@v4 diff --git a/benchmarks/measure.js b/benchmarks/measure.js index 06a7e49..f89be7d 100644 --- a/benchmarks/measure.js +++ b/benchmarks/measure.js @@ -3,20 +3,9 @@ const os = require('os'); const { performance: performanceHooks } = require('perf_hooks'); const { times, median, map, prop } = require('rambda'); -const semver = require('semver'); const [ { speed: cpuSpeed } ] = os.cpus(); -function getNodeVersionMultiplier() { - const currentNodeVersion = process.version; - - if (semver.lt(currentNodeVersion, '14.0.0')) { - return 1.5; - } - - return 1; -} - function clearRequireCache() { Object.keys(require.cache).forEach(function (key) { delete require.cache[key]; @@ -47,6 +36,5 @@ function runBenchmark(fn, count) { module.exports = { runBenchmark, clearRequireCache, - cpuSpeed, - getNodeVersionMultiplier + cpuSpeed }; diff --git a/benchmarks/runtime.bench.js b/benchmarks/runtime.bench.js index 5290ff8..6cc9428 100644 --- a/benchmarks/runtime.bench.js +++ b/benchmarks/runtime.bench.js @@ -5,8 +5,7 @@ const { Linter } = require('eslint'); const { times, toPairs, fromPairs } = require('rambda'); const { runBenchmark, - cpuSpeed, - getNodeVersionMultiplier + cpuSpeed } = require('./measure'); const mochaPlugin = require('../'); @@ -89,8 +88,7 @@ function lintManyFilesWithAllRecommendedRules({ numberOfFiles }) { describe('runtime', () => { it('should not take longer as the defined budget to lint many files with the recommended config', () => { - const nodeVersionMultiplier = getNodeVersionMultiplier(); - const budget = 3750000 / cpuSpeed * nodeVersionMultiplier; + const budget = 3750000 / cpuSpeed; const { medianDuration } = runBenchmark(() => { lintManyFilesWithAllRecommendedRules({ numberOfFiles: 350 }); diff --git a/package.json b/package.json index bb03283..d6d0bf3 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "10.3.0", "description": "Eslint rules for mocha.", "engines": { - "node": ">=14.0.0" + "node": ">=20.0.0" }, "main": "index.js", "files": [