Skip to content

Commit 79d522f

Browse files
authoredApr 28, 2025
Merge branch 'main' into renovate/ora-8.x
2 parents 376e197 + d6cb0dd commit 79d522f

27 files changed

+1005
-1945
lines changed
 

‎.buildkite/pipeline.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
---
2+
agents:
3+
provider: "gcp"
4+
image: family/core-ubuntu-2204
5+
memory: "8G"
6+
cpu: "2"
7+
28
steps:
3-
- label: ":elasticsearch: :javascript: ES JavaScript ({{ matrix.nodejs }}) Test Suite: {{ matrix.suite }}"
4-
agents:
5-
provider: "gcp"
9+
- label: ":elasticsearch: :javascript: ES JavaScript ({{ matrix.nodejs }})"
610
env:
711
NODE_VERSION: "{{ matrix.nodejs }}"
8-
TEST_SUITE: "{{ matrix.suite }}"
9-
STACK_VERSION: 8.16.0
12+
TEST_SUITE: "platinum"
13+
STACK_VERSION: 9.0.0
14+
GITHUB_TOKEN_PATH: "secret/ci/elastic-elasticsearch-js/github-token"
15+
TEST_ES_STACK: "1"
1016
matrix:
1117
setup:
12-
suite:
13-
- "free"
14-
- "platinum"
1518
nodejs:
1619
- "18"
1720
- "20"
@@ -21,9 +24,6 @@ steps:
2124
- wait: ~
2225
continue_on_failure: true
2326
- label: ":junit: Test results"
24-
agents:
25-
provider: "gcp"
26-
image: family/core-ubuntu-2204
2727
plugins:
2828
- junit-annotate#v2.6.0:
2929
artifacts: "junit-output/junit-*.xml"

‎.buildkite/run-client.sh

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,29 @@ export NODE_VERSION=${NODE_VERSION:-18}
1010

1111
echo "--- :javascript: Building Docker image"
1212
docker build \
13-
--file "$script_path/Dockerfile" \
14-
--tag elastic/elasticsearch-js \
15-
--build-arg NODE_VERSION="$NODE_VERSION" \
16-
.
13+
--file "$script_path/Dockerfile" \
14+
--tag elastic/elasticsearch-js \
15+
--build-arg NODE_VERSION="$NODE_VERSION" \
16+
.
1717

18-
echo "--- :javascript: Running $TEST_SUITE tests"
18+
GITHUB_TOKEN=$(vault read -field=token "$GITHUB_TOKEN_PATH")
19+
export GITHUB_TOKEN
20+
21+
echo "--- :javascript: Running tests"
1922
mkdir -p "$repo/junit-output"
2023
docker run \
21-
--network="${network_name}" \
22-
--env "TEST_ES_SERVER=${elasticsearch_url}" \
23-
--env "ELASTIC_PASSWORD=${elastic_password}" \
24-
--env "TEST_SUITE=${TEST_SUITE}" \
25-
--env "ELASTIC_USER=elastic" \
26-
--env "BUILDKITE=true" \
27-
--volume "$repo/junit-output:/junit-output" \
28-
--name elasticsearch-js \
29-
--rm \
30-
elastic/elasticsearch-js \
31-
bash -c "npm run test:integration; [ -f ./$TEST_SUITE-report-junit.xml ] && mv ./$TEST_SUITE-report-junit.xml /junit-output/junit-$BUILDKITE_JOB_ID.xml || echo 'No JUnit artifact found'"
24+
--network="${network_name}" \
25+
--env TEST_ES_STACK \
26+
--env STACK_VERSION \
27+
--env GITHUB_TOKEN \
28+
--env "TEST_ES_SERVER=${elasticsearch_url}" \
29+
--env "ELASTIC_PASSWORD=${elastic_password}" \
30+
--env "ELASTIC_USER=elastic" \
31+
--env "BUILDKITE=true" \
32+
--volume "/usr/src/app/node_modules" \
33+
--volume "$repo:/usr/src/app" \
34+
--volume "$repo/junit-output:/junit-output" \
35+
--name elasticsearch-js \
36+
--rm \
37+
elastic/elasticsearch-js \
38+
bash -c "npm run test:integration; [ -f ./report-junit.xml ] && mv ./report-junit.xml /junit-output/junit-$BUILDKITE_JOB_ID.xml || echo 'No JUnit artifact found'"

‎.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ elasticsearch
66
lib
77
junit-output
88
.tap
9+
rest-api-spec
10+
yaml-rest-tests
11+
generated-tests

‎.github/workflows/nodejs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
persist-credentials: false
4242

4343
- name: Use Node.js ${{ matrix.node-version }}
44-
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
44+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
4545
with:
4646
node-version: ${{ matrix.node-version }}
4747

@@ -71,7 +71,7 @@ jobs:
7171
persist-credentials: false
7272

7373
- name: Use Node.js
74-
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
74+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
7575
with:
7676
node-version: 22.x
7777

‎.github/workflows/npm-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
with:
1717
persist-credentials: false
1818
ref: ${{ github.event.inputs.branch }}
19-
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
19+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
2020
with:
2121
node-version: "22.x"
2222
registry-url: "https://registry.npmjs.org"

‎.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,7 @@ bun.lockb
6868
test-results
6969
processinfo
7070
.tap
71+
rest-api-spec
72+
yaml-rest-tests
73+
generated-tests
74+
schema

‎.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,6 @@ CONTRIBUTING.md
7474
src
7575
bun.lockb
7676
.tap
77+
rest-api-spec
78+
yaml-rest-tests
79+
generated-tests

‎README.md

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Elasticsearch Node.js client
44

5-
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/) [![Build Status](https://badge.buildkite.com/15e4246eb268ea78f6e10aa90bce38c1abb0a4489e79f5a0ac.svg)](https://buildkite.com/elastic/elasticsearch-javascript-client-integration-tests/builds?branch=main) [![Node CI](https://github.com/elastic/elasticsearch-js/actions/workflows/nodejs.yml/badge.svg)](https://github.com/elastic/elasticsearch-js/actions/workflows/nodejs.yml) [![codecov](https://codecov.io/gh/elastic/elasticsearch-js/branch/master/graph/badge.svg)](https://codecov.io/gh/elastic/elasticsearch-js) [![NPM downloads](https://img.shields.io/npm/dm/@elastic/elasticsearch.svg?style=flat)](https://www.npmjs.com/package/@elastic/elasticsearch)
5+
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/) [![Build Status](https://badge.buildkite.com/15e4246eb268ea78f6e10aa90bce38c1abb0a4489e79f5a0ac.svg)](https://buildkite.com/elastic/elasticsearch-javascript-client-integration-tests/builds?branch=main) [![Node CI](https://github.com/elastic/elasticsearch-js/actions/workflows/nodejs.yml/badge.svg)](https://github.com/elastic/elasticsearch-js/actions/workflows/nodejs.yml) [![codecov](https://codecov.io/gh/elastic/elasticsearch-js/branch/master/graph/badge.svg)](https://codecov.io/gh/elastic/elasticsearch-js) [![NPM downloads](https://img.shields.io/npm/dm/@elastic/elasticsearch.svg?style=flat)](https://www.npmjs.com/package/@elastic/elasticsearch)
66

77
**[Download the latest version of Elasticsearch](https://www.elastic.co/downloads/elasticsearch)**
88
or
@@ -34,11 +34,12 @@ the new features of the 8.13 version of Elasticsearch, the 8.13 client version
3434
is required for that. Elasticsearch language clients are only backwards
3535
compatible with default distributions and without guarantees made.
3636

37-
| Elasticsearch Version | Elasticsearch-JS Branch | Supported |
38-
| --------------------- | ------------------------ | --------- |
39-
| main | main | |
40-
| 8.x | 8.x | 8.x |
41-
| 7.x | 7.x | 7.17 |
37+
| Elasticsearch Version | Elasticsearch-JS Branch |
38+
| --------------------- | ----------------------- |
39+
| main | main |
40+
| 9.x | 9.x |
41+
| 8.x | 8.x |
42+
| 7.x | 7.x |
4243

4344
## Usage
4445

@@ -65,36 +66,20 @@ to support that version for at least another minor release. If you are using the
6566
with a version of Node.js that will be unsupported soon, you will see a warning
6667
in your logs (the client will start logging the warning with two minors in advance).
6768

68-
Unless you are **always** using a supported version of Node.js,
69+
Unless you are **always** using a supported version of Node.js,
6970
we recommend defining the client dependency in your
7071
`package.json` with the `~` instead of `^`. In this way, you will lock the
7172
dependency on the minor release and not the major. (for example, `~7.10.0` instead
7273
of `^7.10.0`).
7374

74-
| Node.js Version | Node.js EOL date | End of support |
75-
| --------------- |------------------| ---------------------- |
76-
| `8.x` | `December 2019` | `7.11` (early 2021) |
77-
| `10.x` | `April 2021` | `7.12` (mid 2021) |
78-
| `12.x` | `April 2022` | `8.2` (early 2022) |
79-
| `14.x` | `April 2023` | `8.8` (early 2023) |
80-
| `16.x` | `September 2023` | `8.11` (late 2023) |
81-
82-
### Compatibility
83-
84-
Language clients are forward compatible; meaning that clients support communicating with greater or equal minor versions of Elasticsearch.
85-
Elasticsearch language clients are only backwards compatible with default distributions and without guarantees made.
86-
87-
| Elasticsearch Version | Client Version |
88-
| --------------------- |----------------|
89-
| `8.x` | `8.x` |
90-
| `7.x` | `7.x` |
91-
| `6.x` | `6.x` |
92-
| `5.x` | `5.x` |
93-
94-
To install a specific major of the client, run the following command:
95-
```
96-
npm install @elastic/elasticsearch@<major>
97-
```
75+
| Node.js Version | Node.js EOL date | End of support |
76+
| --------------- | ---------------- | ------------------- |
77+
| `8.x` | `December 2019` | `7.11` (early 2021) |
78+
| `10.x` | `April 2021` | `7.12` (mid 2021) |
79+
| `12.x` | `April 2022` | `8.2` (early 2022) |
80+
| `14.x` | `April 2023` | `8.8` (early 2023) |
81+
| `16.x` | `September 2023` | `8.11` (late 2023) |
82+
| `18.x` | `April 2025` | `9.2` (late 2025) |
9883

9984
#### Browser
10085

@@ -117,6 +102,7 @@ We recommend that you write a lightweight proxy that uses this client instead, y
117102
* [Examples](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/examples.html)
118103

119104
## Install multiple versions
105+
120106
If you are using multiple versions of Elasticsearch, you need to use multiple versions of the client. In the past, install multiple versions of the same package was not possible, but with `npm v6.9`, you can do that via aliasing.
121107

122108
The command you must run to install different version of the client is:

0 commit comments

Comments
 (0)