diff --git a/.circleci/config.yml b/.circleci/config.yml index dfa6db4..5e7ae6e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,24 +1,30 @@ version: 2.1 orbs: - node: circleci/node@1.1.6 + node: circleci/node@5.0.2 + +parameters: + node_version: + type: string + default: '16.15.0' commands: install_deps: steps: - - node/with-cache: + - node/install-packages: + pkg-manager: yarn cache-version: v1-all - cache-key: package.json - dir: ~/repo/node_modules - use-strict-cache: true - steps: - - run: yarn install --pure-lockfile --no-progress + cache-only-lockfile: true + app-dir: ~/repo + override-ci-command: yarn install --pure-lockfile --no-progress + - run: sudo apt-get -q update && sudo apt-get -y install openjdk-17-jdk jobs: build: executor: name: node/default - tag: '14-browsers' + tag: << pipeline.parameters.node_version >> + working_directory: ~/repo steps: - checkout - install_deps diff --git a/jest-es-config.js b/jest-es-config.js index 9f51ba4..c345c0a 100644 --- a/jest-es-config.js +++ b/jest-es-config.js @@ -2,7 +2,7 @@ const documentsMapping = require('./index-mapping'); module.exports = function getClusterSetting() { return { - esVersion: '7.12.1', + esVersion: '8.2.0', clusterName: 'docs', nodeName: 'docs', port: 9200, diff --git a/package.json b/package.json index 916b01c..12f5b39 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "preset": "./jest-preset.js" }, "dependencies": { - "@shelf/elasticsearch-local": "2.3.0", + "@shelf/elasticsearch-local": "3.0.0", "cwd": "0.10.0" }, "devDependencies": { @@ -58,7 +58,7 @@ "prettier": "2.3.0" }, "engines": { - "node": ">=14" + "node": ">=16" }, "publishConfig": { "access": "public" diff --git a/src/search-by-term.test.js b/src/search-by-term.test.js index 65d400a..578fc44 100644 --- a/src/search-by-term.test.js +++ b/src/search-by-term.test.js @@ -23,8 +23,7 @@ describe('getDocuments', () => { _source: { id: 'some-doc-id-1', name: 'some-name-1' - }, - _type: '_doc' + } } ], totalCount: { diff --git a/teardown.js b/teardown.js index 1e76ce9..d7ad661 100644 --- a/teardown.js +++ b/teardown.js @@ -1,5 +1,5 @@ const {stop} = require('@shelf/elasticsearch-local'); module.exports = async function stopES() { - await stop(); + stop(); };