Skip to content

Commit

Permalink
Remove support for node v14, v16 and v18
Browse files Browse the repository at this point in the history
  • Loading branch information
lo1tuma committed Feb 16, 2024
1 parent e3e51b3 commit e987841
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -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@v2
Expand Down
14 changes: 1 addition & 13 deletions benchmarks/measure.js
Expand Up @@ -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];
Expand Down Expand Up @@ -47,6 +36,5 @@ function runBenchmark(fn, count) {
module.exports = {
runBenchmark,
clearRequireCache,
cpuSpeed,
getNodeVersionMultiplier
cpuSpeed
};
6 changes: 2 additions & 4 deletions benchmarks/runtime.bench.js
Expand Up @@ -5,8 +5,7 @@ const { Linter } = require('eslint');
const { times, toPairs, fromPairs } = require('rambda');
const {
runBenchmark,
cpuSpeed,
getNodeVersionMultiplier
cpuSpeed
} = require('./measure');
const mochaPlugin = require('../');

Expand Down Expand Up @@ -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 });
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -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": [
Expand Down

0 comments on commit e987841

Please sign in to comment.