@fastify/elasticsearch 3.1.0 → 4.0.0-pre.fv5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.gitattributes ADDED
@@ -0,0 +1,2 @@
1
+ # Set default behavior to automatically convert line endings
2
+ * text=auto eol=lf
@@ -2,6 +2,11 @@ name: CI
2
2
 
3
3
  on:
4
4
  push:
5
+ branches:
6
+ - main
7
+ - master
8
+ - next
9
+ - 'v*'
5
10
  paths-ignore:
6
11
  - 'docs/**'
7
12
  - '*.md'
@@ -11,70 +16,8 @@ on:
11
16
  - '*.md'
12
17
 
13
18
  jobs:
14
- dependency-review:
15
- name: Dependency Review
16
- if: github.event_name == 'pull_request'
17
- runs-on: ubuntu-latest
18
- permissions:
19
- contents: read
20
- steps:
21
- - name: Check out repo
22
- uses: actions/checkout@v3
23
- with:
24
- persist-credentials: false
25
-
26
- - name: Dependency review
27
- uses: actions/dependency-review-action@v3
28
-
29
19
  test:
30
- runs-on: ubuntu-latest
31
- permissions:
32
- contents: read
33
- strategy:
34
- matrix:
35
- node-version: [14, 16, 18]
36
- steps:
37
- - name: Check out repo
38
- uses: actions/checkout@v3
39
- with:
40
- persist-credentials: false
41
-
42
- - name: Setup Node ${{ matrix.node-version }}
43
- uses: actions/setup-node@v3
44
- with:
45
- node-version: ${{ matrix.node-version }}
46
-
47
- - name: Configure sysctl limits
48
- run: |
49
- sudo swapoff -a
50
- sudo sysctl -w vm.swappiness=1
51
- sudo sysctl -w fs.file-max=262144
52
- sudo sysctl -w vm.max_map_count=262144
53
-
54
- - name: Runs Elasticsearch
55
- uses: elastic/elastic-github-actions/elasticsearch@562b8b6ae4677da97273ff6bc4d630ce96ecbaa5
56
- with:
57
- stack-version: 8.3.2
58
- security-enabled: false
59
-
60
- - name: Install dependencies
61
- run: npm i --ignore-scripts
62
-
63
- - name: Run tests
64
- run: npm test
65
-
66
- automerge:
67
- name: Automerge Dependabot PRs
68
- if: >
69
- github.event_name == 'pull_request' &&
70
- github.event.pull_request.user.login == 'dependabot[bot]'
71
- needs: test
72
- permissions:
73
- pull-requests: write
74
- contents: write
75
- runs-on: ubuntu-latest
76
- steps:
77
- - uses: fastify/github-action-merge-dependabot@v3
78
- with:
79
- github-token: ${{ secrets.GITHUB_TOKEN }}
80
- target: major
20
+ uses: fastify/workflows/.github/workflows/plugins-ci-elasticsearch.yml@v4.2.0
21
+ with:
22
+ lint: true
23
+ license-check: true
package/es-docker.sh CHANGED
File without changes
package/index.js CHANGED
@@ -40,7 +40,7 @@ async function fastifyElasticsearch (fastify, options) {
40
40
  }
41
41
 
42
42
  module.exports = fp(fastifyElasticsearch, {
43
- fastify: '4.x',
43
+ fastify: '5.x',
44
44
  name: '@fastify/elasticsearch'
45
45
  })
46
46
  module.exports.default = fastifyElasticsearch
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@fastify/elasticsearch",
3
- "version": "3.1.0",
3
+ "version": "4.0.0-pre.fv5.2",
4
4
  "description": "Fastify plugin for elastic search",
5
5
  "main": "index.js",
6
+ "type": "commonjs",
6
7
  "types": "types/index.d.ts",
7
8
  "scripts": {
8
9
  "lint": "standard",
@@ -28,16 +29,16 @@
28
29
  },
29
30
  "homepage": "https://github.com/fastify/fastify-elasticsearch#readme",
30
31
  "dependencies": {
31
- "@elastic/elasticsearch": "^8.2.1",
32
- "fastify-plugin": "^4.0.0"
32
+ "@elastic/elasticsearch": "^8.13.1",
33
+ "fastify-plugin": "^5.0.0-pre.fv5.1"
33
34
  },
34
35
  "devDependencies": {
35
- "@types/node": "^18.6.4",
36
- "@fastify/pre-commit": "^2.0.2",
37
- "fastify": "^4.0.0-rc.2",
38
- "standard": "^17.0.0",
39
- "tap": "^16.0.0",
40
- "tsd": "^0.22.0"
36
+ "@types/node": "^22.0.0",
37
+ "@fastify/pre-commit": "^2.1.0",
38
+ "fastify": "^5.0.0-alpha.3",
39
+ "standard": "^17.1.0",
40
+ "tap": "^18.7.2",
41
+ "tsd": "^0.31.0"
41
42
  },
42
43
  "publishConfig": {
43
44
  "access": "public"
@@ -53,7 +53,7 @@ test('namespaced', async t => {
53
53
  })
54
54
 
55
55
  await fastify.ready()
56
- t.strictEqual(fastify.elastic.cluster.name, 'elasticsearch-js')
56
+ t.equal(fastify.elastic.cluster.name, 'elasticsearch-js')
57
57
  t.equal(isElasticsearchClient(fastify.elastic), false)
58
58
  t.equal(isElasticsearchClient(fastify.elastic.cluster), true)
59
59
  await fastify.close()
@@ -92,7 +92,7 @@ test('custom client', async t => {
92
92
 
93
93
  await fastify.ready()
94
94
  t.equal(isElasticsearchClient(fastify.elastic), true)
95
- t.strictEqual(fastify.elastic.name, 'custom')
95
+ t.equal(fastify.elastic.name, 'custom')
96
96
  await fastify.close()
97
97
  })
98
98