Skip to content

Commit 29ee3ec

Browse files
committed
Merge branch '7.x' of https://github.com/elastic/elasticsearch-js into 7.x
2 parents fbaa502 + 07faf09 commit 29ee3ec

File tree

1 file changed

+63
-3
lines changed

1 file changed

+63
-3
lines changed

docs/changelog.asciidoc

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
[[changelog-client]]
22
== Changelog
33

4+
[discrete]
45
=== 7.10.0
56

7+
[discrete]
68
==== Features
79

10+
[discrete]
811
===== Support for Elasticsearch `v7.10`.
912

1013
You can find all the API changes https://www.elastic.co/guide/en/elasticsearch/reference/7.10/release-notes-7.10.0.html[here].
1114

15+
[discrete]
1216
===== Added proxy support https://github.com/elastic/elasticsearch-js/pull/1260[#1260]
1317

1418
If you need to pass through an http(s) proxy for connecting to Elasticsearch, the client offers
@@ -33,20 +37,25 @@ const client = new Client({
3337
})
3438
----
3539

40+
[discrete]
3641
==== Fixes
3742

43+
[discrete]
3844
===== Scroll search should clear the scroll at the end https://github.com/elastic/elasticsearch-js/pull/1331[#1331]
3945

4046
From now on the scroll search helper will automatically close the scroll on Elasticsearch,
4147
by doing so, Elasticsearch will free resources faster.
4248

49+
[discrete]
4350
===== Handle connectivity issues while reading the body https://github.com/elastic/elasticsearch-js/pull/1343[#1343]
4451

4552
It might happen that the underlying socket stops working due to an external cause while reading the body.
4653
This could lead to an unwanted `DeserialzationError`. From now, this will be handled as a generic `ConnectionError`.
4754

55+
[discrete]
4856
==== Warnings
4957

58+
[discrete]
5059
===== Add warning log about nodejs version support https://github.com/elastic/elasticsearch-js/pull/1349[#1349]
5160

5261
`7.11` will be the last version of the client that will support Node.js v8, while `7.12` will be
@@ -56,11 +65,13 @@ as usng an EOL version will expose you to securty risks.
5665

5766
Please refer to https://ela.st/nodejs-support[ela.st/nodejs-support] for additional information.
5867

59-
68+
[discrete]
6069
=== 7.9.1
6170

71+
[discrete]
6272
==== Fixes
6373

74+
[discrete]
6475
===== Improve child performances https://github.com/elastic/elasticsearch-js/pull/1314[#1314]
6576

6677
The client code has been refactored to speed up the performances of the child method.
@@ -71,29 +82,35 @@ This change should not cause any breaking change unless you were mocking the cli
7182

7283
Finally, this change should also fix once and of all the bundlers support.
7384

85+
[discrete]
7486
===== Throw all errors asynchronously https://github.com/elastic/elasticsearch-js/pull/1295[#1295]
7587

7688
Some validation errors were thrown synchronously, causing the callback to be called in th same tick.
7789
This issue is known as _"The release fo Zalgo"_ (see https://blog.izs.me/2013/08/designing-apis-for-asynchrony[here]).
7890

91+
[discrete]
7992
===== Fix `maxRetries` request option handling https://github.com/elastic/elasticsearch-js/pull/1296[#1296]
8093

8194
The `maxRetries` parameter can be configured on a per requets basis, if set to zero it was defaulting to the client default. Now the client is honoring the request specific configuration.
8295

83-
96+
[discrete]
8497
===== Fix RequestOptions.body type to include null https://github.com/elastic/elasticsearch-js/pull/1300[#1300]
8598

8699
The Connection requets option types were not accepting `null` as valid value.
87100

101+
[discrete]
88102
===== Fixed `size` and `maxRetries` parameters in helpers https://github.com/elastic/elasticsearch-js/pull/1284[#1284]
89103

90104
The `size` parameter was being passed too the scroll request, which was causing an error.
91105
`maxRetries` setted to 0 was resulting in no request at all.
92106

107+
[discrete]
93108
=== 7.9.0
94109

110+
[discrete]
95111
==== Features
96112

113+
[discrete]
97114
===== Add ability to disable the http agent https://github.com/elastic/elasticsearch-js/pull/1251[#1251]
98115

99116
If needed, the http agent can be disabled by setting it to `false`
@@ -107,6 +124,7 @@ const client = new Client({
107124
})
108125
----
109126

127+
[discrete]
110128
===== Add support for a global context option https://github.com/elastic/elasticsearch-js/pull/1256[#1256]
111129

112130
Before this, you could set a `context` option in each request, but there was no way of setting it globally.
@@ -121,6 +139,7 @@ const client = new Client({
121139
})
122140
----
123141

142+
[discrete]
124143
===== ESM support https://github.com/elastic/elasticsearch-js/pull/1235[#1235]
125144

126145
If you are using ES Modules, now you can easily import the client!
@@ -130,8 +149,10 @@ If you are using ES Modules, now you can easily import the client!
130149
import { Client } from '@elastic/elasticsearch'
131150
----
132151

152+
[discrete]
133153
==== Fixes
134154

155+
[discrete]
135156
===== Allow the client name to be a symbol https://github.com/elastic/elasticsearch-js/pull/1254[#1254]
136157

137158
It was possible in plain JavaScript, but not in TypeScript, now you can do it in TypeScript as well.
@@ -145,15 +166,18 @@ const client = new Client({
145166
})
146167
----
147168

169+
[discrete]
148170
===== Fixed transport.request querystring type https://github.com/elastic/elasticsearch-js/pull/1240[#1240]
149171

150172
Only `Record<string, any>` was allowed. Now `string` is allowed as well.
151173

174+
[discrete]
152175
===== Fixed type definitions https://github.com/elastic/elasticsearch-js/pull/1263[#1263]
153176

154177
* The `transport.request` defintion was incorrect, it was returning a `Promise<T>` instead of `TransportRequestPromise<T>`.
155178
* The `refresh` parameter of most APIs was declared as `'true' | 'false' | 'wait_for'`, which was clunky. Now is `'wait_for' | boolean`.
156179

180+
[discrete]
157181
===== Generate response type as boolean if the request is HEAD only https://github.com/elastic/elasticsearch-js/pull/1275[#1275]
158182

159183
All HEAD request will have the body casted to a boolean value, `true` in case of a 200 response, `false` in case of
@@ -170,14 +194,17 @@ const { body } = await client.exist({ index: 'my-index', id: 'my-id' })
170194
console.log(body) // either `true` or `false`
171195
----
172196

197+
[discrete]
173198
==== Internals
174199

200+
[discrete]
175201
===== Updated default http agent configuration https://github.com/elastic/elasticsearch-js/pull/1242[#1242]
176202

177203
Added the scheduling: 'lifo' option to the default HTTP agent configuration to avoid maximizing the open sockets
178204
against Elasticsearch and lowering the risk of encountering socket timeouts.
179205
This feature is only available from Node v14.5+, but it should be backported to v10 and v12. (https://github.com/nodejs/node/pull/33278[nodejs/node#33278])
180206

207+
[discrete]
181208
===== Improve child API https://github.com/elastic/elasticsearch-js/pull/1245[#1245]
182209

183210
This pr introduce two changes which should not impact the surface API:
@@ -187,14 +214,18 @@ and improves the child creation performances by ~12%.
187214
* The client no longer inherits from the EventEmitter class, but instead has an internal event emitter and exposes
188215
only the API useful for the users, namely `emit, `on`, `once`, and `off`. The type definitions have been updated accordingly.
189216

217+
[discrete]
190218
=== 7.8.0
191219

220+
[discrete]
192221
==== Features
193222

223+
[discrete]
194224
===== Support for Elasticsearch `v7.8`.
195225

196226
You can find all the API changes https://www.elastic.co/guide/en/elasticsearch/reference/7.8/release-notes-7.8.0.html[here].
197227

228+
[discrete]
198229
===== Added multi search helper https://github.com/elastic/elasticsearch-js/pull/1186[#1186]
199230

200231
If you are sending search request at a high rate, this helper might be useful for you.
@@ -227,6 +258,7 @@ m.search(
227258
)
228259
----
229260

261+
[discrete]
230262
===== Added timeout support in bulk and msearch helpers https://github.com/elastic/elasticsearch-js/pull/1206[#1206]
231263

232264
If there is a slow producer, the bulk helper might send data with a very large period of time, and if the process crashes for any reason, the data would be lost.
@@ -248,38 +280,48 @@ const m = client.helpers.msearch({
248280
})
249281
----
250282

283+
[discrete]
251284
==== Internals
252285

286+
[discrete]
253287
===== Use filter_path for improving the search helpers performances https://github.com/elastic/elasticsearch-js/pull/1199[#1199]
254288

255289
From now on, all he search helpers will use the `filter_path` option automatically when needed to retrieve only the hits source. This change will result in less netwprk traffic and improved deserialization performances.
256290

291+
[discrete]
257292
===== Search helpers documents getter https://github.com/elastic/elasticsearch-js/pull/1186[#1186]
258293

259294
Before this, the `documents` key that you can access in any search helper was computed as soon as we got the search result from Elasticsearch. With this change the `documents` key is now a getter, which makes this procees lazy, resulting in better performances and lower memory impact.
260295

261-
296+
[discrete]
262297
=== 7.7.1
263298

299+
[discrete]
264300
==== Fixes
265301

302+
[discrete]
266303
===== Disable client Helpers in Node.js < 10 - https://github.com/elastic/elasticsearch-js/pull/1194[#1194]
267304

268305
The client helpers can't be used in Node.js < 10 because it needs a custom flag to be able to use them.
269306
Given that not every provider allows the user to specify cuatom Node.js flags, the Helpers has been disabled completely in Node.js < 10.
270307

308+
[discrete]
271309
===== Force lowercase in all headers - https://github.com/elastic/elasticsearch-js/pull/1187[#1187]
272310

273311
Now all the user-provided headers names will be lowercased by default, so there will be no conflicts in case of the same header with different casing.
274312

313+
[discrete]
275314
=== 7.7.0
276315

316+
[discrete]
277317
==== Features
278318

319+
[discrete]
279320
===== Support for Elasticsearch `v7.7`.
280321

281322
You can find all the API changes https://www.elastic.co/guide/en/elasticsearch/reference/7.7/release-notes-7.7.0.html[here].
282323

324+
[discrete]
283325
===== Introduced client helpers - https://github.com/elastic/elasticsearch-js/pull/1107[#1107]
284326

285327
From now on, the client comes with an handy collection of helpers to give you a more comfortable experience with some APIs.
@@ -293,11 +335,13 @@ The following helpers has been introduced:
293335
- `client.helpers.scrollSearch`
294336
- `client.helpers.scrollDocuments`
295337

338+
[discrete]
296339
===== The `ConnectionPool.getConnection` now always returns a `Connection` - https://github.com/elastic/elasticsearch-js/pull/1127[#1127]
297340

298341
What does this mean? It means that you will see less `NoLivingConnectionError`, which now can only be caused if you set a selector/filter too strict.
299342
For improving the debugging experience, the `NoLivingConnectionsError` error message has been updated.
300343

344+
[discrete]
301345
===== Abortable promises - https://github.com/elastic/elasticsearch-js/pull/1141[#1141]
302346

303347
From now on, it will be possible to abort a request generated with the promise-styl API. If you abort a request generated from a promise, the promise will be rejected with a `RequestAbortedError`.
@@ -318,6 +362,7 @@ promise
318362
promise.abort()
319363
----
320364

365+
[discrete]
321366
===== Major refactor of the Type Definitions - https://github.com/elastic/elasticsearch-js/pull/1119[#1119] https://github.com/elastic/elasticsearch-js/issues/1130[#1130] https://github.com/elastic/elasticsearch-js/pull/1132[#1132]
322367

323368
Now every API makes better use of the generics and overloading, so you can (or not, by default request/response bodies are `Record<string, any>`) define the request/response bodies in the generics.
@@ -333,25 +378,31 @@ client.search<SearchResponse, SearchBody>(...)
333378

334379
This *should* not be a breaking change, as every generics defaults to `any`. It might happen to some users that the code breaks, but our test didn't detect any of it, probably because they were not robust enough. However, given the gigantic improvement in the developer experience, we have decided to release this change in the 7.x line.
335380

381+
[discrete]
336382
==== Fixes
337383

384+
[discrete]
338385
===== The `ConnectionPool.update` method now cleans the `dead` list - https://github.com/elastic/elasticsearch-js/issues/1122[#1122] https://github.com/elastic/elasticsearch-js/pull/1127[#1127]
339386

340387
It can happen in a situation where we are updating the connections list and running sniff, leaving the `dead` list in a dirty state. Now the `ConnectionPool.update` cleans up the `dead` list every time, which makes way more sense given that all the new connections are alive.
341388

389+
[discrete]
342390
===== `ConnectionPoolmarkDead` should ignore connections that no longer exists - https://github.com/elastic/elasticsearch-js/pull/1159[#1159]
343391

344392
It might happen that markDead is called just after a pool update, and in such case, the clint was adding the dead list a node that no longer exists, causing unhandled exceptions later.
345393

394+
[discrete]
346395
===== Do not retry a request if the body is a stream - https://github.com/elastic/elasticsearch-js/pull/1143[#1143]
347396

348397
The client should not retry if it's sending a stream body, because it should store in memory a copy of the stream to be able to send it again, but since it doesn't know in advance the size of the stream, it risks to take too much memory.
349398
Furthermore, copying everytime the stream is very an expensive operation.
350399

400+
[discrete]
351401
===== Return an error if the request has been aborted - https://github.com/elastic/elasticsearch-js/pull/1141[#1141]
352402

353403
Until now, aborting a request was blocking the HTTP request, but never calling the callback or resolving the promise to notify the user. This is a bug because it could lead to dangerous memory leaks. From now on if the user calls the `request.abort()` method, the callback style API will be called with a `RequestAbortedError`, the promise will be rejected with `RequestAbortedError` as well.
354404

405+
[discrete]
355406
=== 7.6.1
356407

357408
**Fixes:**
@@ -363,10 +414,12 @@ Until now, aborting a request was blocking the HTTP request, but never calling t
363414

364415
- Fix typo in api reference - https://github.com/elastic/elasticsearch-js/pull/1109[#1109]
365416

417+
[discrete]
366418
=== 7.6.0
367419

368420
Support for Elasticsearch `v7.6`.
369421

422+
[discrete]
370423
=== 7.5.1
371424

372425
**Fixes:**
@@ -382,6 +435,7 @@ Support for Elasticsearch `v7.6`.
382435
- Add examples to reference - https://github.com/elastic/elasticsearch-js/pull/1076[#1076]
383436
- Added new examples - https://github.com/elastic/elasticsearch-js/pull/1031[#1031]
384437

438+
[discrete]
385439
=== 7.5.0
386440

387441
Support for Elasticsearch `v7.5`.
@@ -390,6 +444,7 @@ Support for Elasticsearch `v7.5`.
390444

391445
- X-Opaque-Id support https://github.com/elastic/elasticsearch-js/pull/997[#997]
392446

447+
[discrete]
393448
=== 7.4.0
394449

395450
Support for Elasticsearch `v7.4`.
@@ -407,6 +462,7 @@ Support for Elasticsearch `v7.4`.
407462

408463
- Update code generation https://github.com/elastic/elasticsearch-js/pull/969[#969]
409464

465+
[discrete]
410466
=== 7.3.0
411467

412468
Support for Elasticsearch `v7.3`.
@@ -429,6 +485,7 @@ Support for Elasticsearch `v7.3`.
429485
- Better reference code examples - https://github.com/elastic/elasticsearch-js/pull/920[#920]
430486
- Improve README - https://github.com/elastic/elasticsearch-js/pull/909[#909]
431487

488+
[discrete]
432489
=== 7.2.0
433490

434491
Support for Elasticsearch `v7.2`
@@ -437,6 +494,7 @@ Support for Elasticsearch `v7.2`
437494

438495
- Remove auth data from inspect and toJSON in connection class - https://github.com/elastic/elasticsearch-js/pull/887[#887]
439496

497+
[discrete]
440498
=== 7.1.0
441499

442500
Support for Elasticsearch `v7.1`
@@ -446,6 +504,7 @@ Support for Elasticsearch `v7.1`
446504
- Support for non-friendly chars in url username and password - https://github.com/elastic/elasticsearch-js/pull/858[#858]
447505
- Patch deprecated parameters - https://github.com/elastic/elasticsearch-js/pull/851[#851]
448506

507+
[discrete]
449508
=== 7.0.1
450509

451510
**Fixes:**
@@ -455,6 +514,7 @@ Support for Elasticsearch `v7.1`
455514
- Fix TypeScript definiton *(issue https://github.com/elastic/elasticsearch-js/pull/803[#803])* - https://github.com/elastic/elasticsearch-js/pull/846[#846]
456515
- Added toJSON method to Connection class *(issue https://github.com/elastic/elasticsearch-js/pull/848[#848])* - https://github.com/elastic/elasticsearch-js/pull/849[#849]
457516

517+
[discrete]
458518
=== 7.0.0
459519

460520
Support for Elasticsearch `v7.0`

0 commit comments

Comments
 (0)