Skip to content

Commit c988c44

Browse files
authored
Changelog for 9.0.0 (#2712) (#2713)
* Changelog for 9.0.0 (#2712) * Changelog for 9.0.0 * Update title for release notes page * Grammar tweak * Adjustment to formatting * Change title
1 parent 60e745d commit c988c44

File tree

2 files changed

+59
-14
lines changed

2 files changed

+59
-14
lines changed

Diff for: docs/release-notes/breaking-changes.md

+39-8
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,53 @@ navigation_title: "Breaking changes"
33
---
44

55
# Elasticsearch JavaScript Client breaking changes [elasticsearch-javascript-client-breaking-changes]
6+
67
Breaking changes can impact your Elastic applications, potentially disrupting normal operations. Before you upgrade, carefully review the Elasticsearch JavaScript Client breaking changes and take the necessary steps to mitigate any issues. To learn how to upgrade, check [Upgrade](docs-content://deploy-manage/upgrade.md).
78

89
% ## Next version [elasticsearch-javascript-client-versionnext-breaking-changes]
910

10-
% ::::{dropdown} Title of breaking change
11+
% ::::{dropdown} Title of breaking change
1112
% Description of the breaking change.
1213
% For more information, check [PR #](PR link).
1314
% **Impact**<br> Impact of the breaking change.
1415
% **Action**<br> Steps for mitigating deprecation impact.
1516
% ::::
1617

17-
% ## 9.0.0 [elasticsearch-javascript-client-900-breaking-changes]
18+
## 9.0.0 [elasticsearch-javascript-client-900-breaking-changes]
1819

19-
% ::::{dropdown} Title of breaking change
20-
% Description of the breaking change.
21-
% For more information, check [PR #](PR link).
22-
% **Impact**<br> Impact of the breaking change.
23-
% **Action**<br> Steps for mitigating deprecation impact.
24-
% ::::
20+
::::{dropdown} Changes to the optional body property
21+
22+
In 8.x, every API function had a `body` property that would provide a place to put arbitrary values that should go in the HTTP request body, even if they were not noted in the specification or documentation. In 9.0, each API function still includes an optional `body` property, but TypeScript's type checker will disallow properties that should go in the root of the object. A `querystring` parameter has also been added that behaves the same as `body`, but inserts its values into the request querystring.
23+
24+
**Impact**<br> Some adjustments to API calls may be necessary for code that used a `body` property 8.x, especially to appease the TypeScript type checker, but it should not have any impact on any code that was not using a `body` property.
25+
26+
**Action**<br> Check existing code for use of the `body` property, and move any properties that should be in the root object according to the API function's request type definition. If using TypeScript, the TypeScript type checker will surface most of these issues for you.
27+
::::
28+
29+
::::{dropdown} Changes to API parameter collation into an HTTP request
30+
31+
The logic for where each parameter in an API function call should be added to its HTTP request has been updated:
32+
33+
1. If recognized as a `body` parameter according to the Elasticsearch specification, put it in the JSON body
34+
2. If recognized as a `path` parameter, put it in the URL path
35+
3. If recognized as a `query` parameter or a "common" query parameter (e.g. `pretty`, `error_trace`), put it in the querystring
36+
4. If not recognized, and this API accepts a JSON body, put it in the JSON body
37+
5. If not recognized and this API does not accept a JSON body, put it in the querystring
38+
39+
The first two steps are identical in 8.x. The final three steps replace the logic from 8.x that put all unrecognized parameters in the querystring.
40+
41+
**Impact**<br> Some parameters that were sent via querystring to Elasticsearch may be sent in the JSON request body, and vice versa.
42+
43+
**Action**<br> If Elasticsearch sends back an error response due to a request not being valid, verify with the client's TypeScript type definitions, or via the docs, that the parameters your code passes are correct.
44+
::::
45+
46+
::::{dropdown} Removal of the default 30-second timeout on all API calls
47+
48+
The default 30-second timeout on all HTTP requests sent to Elasticsearch has been dropped in favor of having no timeout set at all. The previous behavior still works as it did when setting the `requestTimeout` value.
49+
50+
See pull request [#2573](https://github.com/elastic/elasticsearch-js/pull/2573) for more information.
51+
52+
**Impact**<br> Requests to Elasticsearch that used to time out after 30 seconds will now wait for as long as it takes for Elasticsearch to respond.
53+
54+
**Action**<br> In environments where it is not ideal to wait for an API response indefinitely, manually setting the `requestTimeout` option when instantiating the client still works as it did in 8.x.
55+
::::

Diff for: docs/release-notes/index.md

+20-6
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,39 @@
11
---
2-
navigation_title: "Elasticsearch JavaScript Client"
2+
navigation_title: "Release notes"
33
---
44

55
# Elasticsearch JavaScript Client release notes [elasticsearch-javascript-client-release-notes]
66

7-
Review the changes, fixes, and more in each version of Elasticsearch JavaScript Client.
7+
Review the changes, fixes, and more in each version of Elasticsearch JavaScript Client.
88

99
To check for security updates, go to [Security announcements for the Elastic stack](https://discuss.elastic.co/c/announcements/security-announcements/31).
1010

11-
% Release notes include only features, enhancements, and fixes. Add breaking changes, deprecations, and known issues to the applicable release notes sections.
11+
% Release notes include only features, enhancements, and fixes. Add breaking changes, deprecations, and known issues to the applicable release notes sections.
1212

1313
% ## version.next [elasticsearch-javascript-client-next-release-notes]
1414

15+
% **Release date:** Month day, year
16+
1517
% ### Features and enhancements [elasticsearch-javascript-client-next-features-enhancements]
16-
% *
1718

1819
% ### Fixes [elasticsearch-javascript-client-next-fixes]
19-
% *
2020

2121
## 9.0.0 [elasticsearch-javascript-client-900-release-notes]
2222

23+
**Release date:** April 8, 2025
24+
2325
### Features and enhancements [elasticsearch-javascript-client-900-features-enhancements]
2426

25-
### Fixes [elasticsearch-javascript-client-900-fixes]
27+
- **Compatibility with Elasticsearch 9.0:** All changes and additions to Elasticsearch APIs for its 9.0 release are reflected in this release.
28+
- **Serverless client merged in:** the `@elastic/elasticsearch-serverless` client is being deprecated, and its functionality has been merged back into this client. This should have zero impact on the way the client works by default, except that a new `serverMode` option has been added. When it's explicitly set to `"serverless"` by a user, a few default settings and behaviors are changed:
29+
30+
- turns off sniffing and ignores any sniffing-related options
31+
- ignores all nodes passed in config except the first one, and ignores any node filtering and selecting options
32+
- enables compression and `TLSv1_2_method` (same as when configured for Elastic Cloud)
33+
- adds an `elastic-api-version` HTTP header to all requests
34+
- uses `CloudConnectionPool` by default instead of `WeightedConnectionPool`
35+
- turns off vendored `content-type` and `accept` headers in favor or standard MIME types
36+
37+
Docstrings for types that differ between stack and serverless have also been updated to indicate when that is the case.
38+
39+
### Fixes [elasticsearch-javascript-client-900-fixes]

0 commit comments

Comments
 (0)