diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 306108c..22a1756 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] + node: [14, 16, 18] name: Node ${{ matrix.node }} steps: - uses: actions/checkout@v2 diff --git a/benchmarks/measure.js b/benchmarks/measure.js index d3717c4..3cf91f2 100644 --- a/benchmarks/measure.js +++ b/benchmarks/measure.js @@ -2,10 +2,7 @@ const os = require('os'); const { performance: performanceHooks } = require('perf_hooks'); -const times = require('ramda/src/times'); -const median = require('ramda/src/median'); -const map = require('ramda/src/map'); -const prop = require('ramda/src/prop'); +const { times, median, map, prop } = require('ramda'); const semver = require('semver'); const [ { speed: cpuSpeed } ] = os.cpus(); diff --git a/benchmarks/runtime.bench.js b/benchmarks/runtime.bench.js index 41d1929..4739333 100644 --- a/benchmarks/runtime.bench.js +++ b/benchmarks/runtime.bench.js @@ -2,9 +2,7 @@ const { expect } = require('chai'); const { Linter } = require('eslint'); -const times = require('ramda/src/times'); -const toPairs = require('ramda/src/toPairs'); -const fromPairs = require('ramda/src/fromPairs'); +const { times, toPairs, fromPairs } = require('ramda'); const { runBenchmark, cpuSpeed, diff --git a/lib/rules/handle-done-callback.js b/lib/rules/handle-done-callback.js index 29a7d6b..d647af2 100644 --- a/lib/rules/handle-done-callback.js +++ b/lib/rules/handle-done-callback.js @@ -1,6 +1,6 @@ 'use strict'; -const find = require('ramda/src/find'); +const { find } = require('ramda'); const createAstUtils = require('../util/ast'); module.exports = { diff --git a/lib/rules/max-top-level-suites.js b/lib/rules/max-top-level-suites.js index c86cd8f..1a4248d 100644 --- a/lib/rules/max-top-level-suites.js +++ b/lib/rules/max-top-level-suites.js @@ -5,7 +5,7 @@ * @author Alexander Afanasyev */ -const isNil = require('ramda/src/isNil'); +const { isNil } = require('ramda'); const createAstUtils = require('../util/ast'); const defaultSuiteLimit = 1; diff --git a/lib/rules/no-synchronous-tests.js b/lib/rules/no-synchronous-tests.js index 77e9c71..ab39b4c 100644 --- a/lib/rules/no-synchronous-tests.js +++ b/lib/rules/no-synchronous-tests.js @@ -1,7 +1,6 @@ 'use strict'; -const isNil = require('ramda/src/isNil'); -const find = require('ramda/src/find'); +const { isNil, find } = require('ramda'); const createAstUtils = require('../util/ast'); const asyncMethods = [ 'async', 'callback', 'promise' ]; diff --git a/lib/util/ast.js b/lib/util/ast.js index 3552d03..87827dc 100644 --- a/lib/util/ast.js +++ b/lib/util/ast.js @@ -1,11 +1,6 @@ 'use strict'; -const complement = require('ramda/src/complement'); -const both = require('ramda/src/both'); -const isNil = require('ramda/src/isNil'); -const propEq = require('ramda/src/propEq'); -const pathEq = require('ramda/src/pathEq'); -const find = require('ramda/src/find'); +const { complement, both, isNil, propEq, pathEq, find } = require('ramda'); const { getTestCaseNames, getSuiteNames } = require('./names'); const { getAddtionalNames } = require('./settings'); diff --git a/lib/util/names.js b/lib/util/names.js index 229676b..e3fe800 100644 --- a/lib/util/names.js +++ b/lib/util/names.js @@ -1,20 +1,22 @@ 'use strict'; -const where = require('ramda/src/where'); -const includes = require('ramda/src/includes'); -const intersection = require('ramda/src/intersection'); -const pipe = require('ramda/src/pipe'); -const isEmpty = require('ramda/src/isEmpty'); -const complement = require('ramda/src/complement'); -const flip = require('ramda/src/flip'); -const filter = require('ramda/src/filter'); -const over = require('ramda/src/over'); -const lensProp = require('ramda/src/lensProp'); -const map = require('ramda/src/map'); -const view = require('ramda/src/view'); -const assoc = require('ramda/src/assoc'); -const allPass = require('ramda/src/allPass'); -const memoizeWith = require('ramda/src/memoizeWith'); +const { + where, + includes, + intersection, + pipe, + isEmpty, + complement, + flip, + filter, + over, + lensProp, + map, + view, + assoc, + allPass, + memoizeWith +} = require('ramda'); const INTERFACES = { BDD: 'BDD', diff --git a/package-lock.json b/package-lock.json index 9f87938..98c38f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "eslint-plugin-mocha", - "version": "10.0.3", + "version": "10.0.4", "license": "MIT", "dependencies": { "eslint-utils": "^3.0.0",