@fastify/elasticsearch 4.0.3 → 4.0.4
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/.github/workflows/ci.yml +13 -2
- package/README.md +4 -1
- package/es-docker.sh +7 -1
- package/package.json +5 -2
package/.github/workflows/ci.yml
CHANGED
|
@@ -23,7 +23,7 @@ permissions:
|
|
|
23
23
|
contents: read
|
|
24
24
|
|
|
25
25
|
jobs:
|
|
26
|
-
test:
|
|
26
|
+
test-elasticsearch-8:
|
|
27
27
|
permissions:
|
|
28
28
|
contents: write
|
|
29
29
|
pull-requests: write
|
|
@@ -31,4 +31,15 @@ jobs:
|
|
|
31
31
|
with:
|
|
32
32
|
lint: true
|
|
33
33
|
license-check: true
|
|
34
|
-
elasticsearch-version: 8.
|
|
34
|
+
elasticsearch-version: '8.19.19'
|
|
35
|
+
|
|
36
|
+
test-elasticsearch-9:
|
|
37
|
+
permissions:
|
|
38
|
+
contents: write
|
|
39
|
+
pull-requests: write
|
|
40
|
+
uses: fastify/workflows/.github/workflows/plugins-ci-elasticsearch.yml@ef591e2186785d5ab36b9fe6a79c7ce2f1d94e57 # v7.0.0
|
|
41
|
+
with:
|
|
42
|
+
lint: true
|
|
43
|
+
license-check: true
|
|
44
|
+
elasticsearch-version: '9.4.4'
|
|
45
|
+
|
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ Under the hood, the official [elasticsearch](https://www.npmjs.com/package/@elas
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
13
13
|
```
|
|
14
|
-
npm i @fastify/elasticsearch
|
|
14
|
+
npm i @fastify/elasticsearch @elastic/elasticsearch
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
### Compatibility
|
|
@@ -92,6 +92,9 @@ fastify.listen({ port: 3000 }, err => {
|
|
|
92
92
|
```
|
|
93
93
|
|
|
94
94
|
## Versioning
|
|
95
|
+
|
|
96
|
+
`@fastify/elasticsearch` supports Elasticsearch client versions 8 and 9.
|
|
97
|
+
|
|
95
98
|
By default the latest and greatest version of the Elasticsearch client is used, see the [compatibility](https://www.elastic.co/docs/reference/elasticsearch/clients/javascript/installation#nodejs-support) table to understand if the embedded client is correct for you.
|
|
96
99
|
If it is not, you can pass a custom client via the `client` option.
|
|
97
100
|
```js
|
package/es-docker.sh
CHANGED
|
@@ -3,9 +3,15 @@
|
|
|
3
3
|
# run this file to get a working ES instance
|
|
4
4
|
# for running the test locally
|
|
5
5
|
|
|
6
|
+
# ES_VERSION can be overridden:
|
|
7
|
+
# ES_VERSION=8.19.19 ./es-docker.sh
|
|
8
|
+
# ES_VERSION=9.4.4 ./es-docker.sh
|
|
9
|
+
|
|
10
|
+
ES_VERSION="${ES_VERSION:-8.19.19}"
|
|
11
|
+
|
|
6
12
|
exec docker run \
|
|
7
13
|
--rm \
|
|
8
14
|
-e "discovery.type=single-node" \
|
|
9
15
|
-e "xpack.security.enabled=false" \
|
|
10
16
|
-p 9200:9200 \
|
|
11
|
-
docker.elastic.co/elasticsearch/elasticsearch
|
|
17
|
+
"docker.elastic.co/elasticsearch/elasticsearch:${ES_VERSION}"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fastify/elasticsearch",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
4
4
|
"description": "Fastify plugin for elastic search",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
}
|
|
60
60
|
],
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@elastic/elasticsearch": "^9.0.2",
|
|
63
62
|
"fastify-plugin": "^6.0.0"
|
|
64
63
|
},
|
|
65
64
|
"devDependencies": {
|
|
65
|
+
"@elastic/elasticsearch": "^9.0.2",
|
|
66
66
|
"@types/node": "^26.0.1",
|
|
67
67
|
"c8": "^12.0.0",
|
|
68
68
|
"eslint": "^9.17.0",
|
|
@@ -70,6 +70,9 @@
|
|
|
70
70
|
"neostandard": "^0.13.0",
|
|
71
71
|
"tstyche": "^7.0.0"
|
|
72
72
|
},
|
|
73
|
+
"peerDependencies": {
|
|
74
|
+
"@elastic/elasticsearch": "^8 || ^9"
|
|
75
|
+
},
|
|
73
76
|
"publishConfig": {
|
|
74
77
|
"access": "public"
|
|
75
78
|
}
|