Skip to content

Commit 3978903

Browse files
delvedorszabosteve
andcommitted
Added node.js support doc (#1346)
Co-authored-by: István Zoltán Szabó <[email protected]>
1 parent dfb09b4 commit 3978903

File tree

2 files changed

+65
-6
lines changed

2 files changed

+65
-6
lines changed

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,33 @@ The official Node.js client for Elasticsearch.
2626
npm install @elastic/elasticsearch
2727
```
2828

29-
### Compatibility
29+
### Node.js support
30+
31+
NOTE: The minimum supported version of Node.js is `v8`.
32+
33+
The client versioning follows the Elastc Stack versioning, this means that
34+
major, minor, and patch releases are done following a precise schedule that
35+
often does not coincide with the [Node.js release](https://nodejs.org/en/about/releases/) times.
36+
37+
To avoid support insecure and unsupported versions of Node.js, the
38+
client **will drop the support of EOL versions of Node.js between minor releases**.
39+
Typically, as soon as a Node.js version goes into EOL, the client will continue
40+
to support that version for at least another minor release. If you are using the client
41+
with a version of Node.js that will be unsupported soon, you will see a warning
42+
in your logs (the client will start logging the warning with two minors in advance).
3043

31-
The minimum supported version of Node.js is `v8`.
44+
Unless you are **always** using a supported version of Node.js,
45+
we recommend defining the client dependency in your
46+
`package.json` with the `~` instead of `^`. In this way, you will lock the
47+
dependency on the minor release and not the major. (for example, `~7.10.0` instead
48+
of `^7.10.0`).
49+
50+
| Node.js Version | Node.js EOL date | End of support |
51+
| --------------- |------------------| ---------------------- |
52+
| `8.x` | `December 2019` | `7.11` (early 2021) |
53+
| `10.x` | `Apri 2021` | `7.12` (mid 2021) |
54+
55+
### Compatibility
3256

3357
The library is compatible with all Elasticsearch versions since 5.x, and you should use the same major version of the Elasticsearch instance that you are using.
3458

docs/installation.asciidoc

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,52 @@ npm install @elastic/elasticsearch@<major>
2020
To learn more about the supported major versions, please refer to the
2121
<<js-compatibility-matrix>>.
2222

23+
[discrete]
24+
[[nodejs-support]]
25+
=== Node.js support
26+
27+
NOTE: The minimum supported version of Node.js is `v8`.
28+
29+
The client versioning follows the {stack} versioning, this means that
30+
major, minor, and patch releases are done following a precise schedule that
31+
often does not coincide with the https://nodejs.org/en/about/releases/[Node.js release] times.
32+
33+
To avoid support insecure and unsupported versions of Node.js, the
34+
client *will drop the support of EOL versions of Node.js between minor releases*.
35+
Typically, as soon as a Node.js version goes into EOL, the client will continue
36+
to support that version for at least another minor release. If you are using the client
37+
with a version of Node.js that will be unsupported soon, you will see a warning
38+
in your logs (the client will start logging the warning with two minors in advance).
39+
40+
Unless you are *always* using a supported version of Node.js,
41+
we recommend defining the client dependency in your
42+
`package.json` with the `~` instead of `^`. In this way, you will lock the
43+
dependency on the minor release and not the major. (for example, `~7.10.0` instead
44+
of `^7.10.0`).
45+
46+
[%header,cols=3*]
47+
|===
48+
|Node.js Version
49+
|Node.js EOL date
50+
|End of support
51+
52+
|`8.x`
53+
|December 2019
54+
|`7.11` (early 2021)
55+
56+
|`10.x`
57+
|April 2021
58+
|`7.12` (mid 2021)
59+
|===
60+
2361
[discrete]
2462
[[js-compatibility-matrix]]
2563
=== Compatibility matrix
2664

27-
The minimum supported version of Node.js is `v8`.
28-
2965
The library is compatible with all {es} versions since 5.x. We recommend you to
3066
use the same major version of the client as the {es} instance that you are
3167
using.
3268

33-
3469
[%header,cols=2*]
3570
|===
3671
|{es} Version
@@ -55,4 +90,4 @@ using.
5590

5691
WARNING: There is no official support for the browser environment. It exposes
5792
your {es} instance to everyone, which could lead to security issues. We
58-
recommend you to write a lightweight proxy that uses this client instead.
93+
recommend you to write a lightweight proxy that uses this client instead.

0 commit comments

Comments
 (0)