@opensearch-project/opensearch 2.3.0 → 2.4.0

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/CHANGELOG.md CHANGED
@@ -11,20 +11,55 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
11
11
  ### Fixed
12
12
  ### Security
13
13
 
14
+ ## [2.4.0]
15
+ ### Added
16
+ - Added Security API ([#606](https://github.com/opensearch-project/opensearch-js/pull/606))
17
+ - Documentation for edge-case in Sigv4Signer ([#622](https://github.com/opensearch-project/opensearch-js/pull/622))
18
+ ### Dependencies
19
+ - Bumps `rimraf` from 5.0.0 to 5.0.5
20
+ - Bumps `eslint` from 8.41.0 to 8.50.0
21
+ - Bumps `dedent` from 0.7.0 to 1.5.1
22
+ - Bumps `@types/node` from 20.2.5 to 20.6.5
23
+ - Bumps `@aws-sdk/types` from 3.341.0 to 3.418.0
24
+ - Bumps `@babel/eslint-parser` from 7.21.8 to 7.22.15
25
+ - Bumps `prettier` from 2.8.8 to 3.0.3
26
+ - Bumps `eslint-plugin-prettier` from 4.0.0 to 5.0.0
27
+ - Bumps `node-fetch` from 3.3.1 to 3.3.2
28
+ - Bumps `tap` from 16.3.4 to 16.3.8
29
+ - Bumps `eslint-config-prettier` from 8.8.0 to 9.0.0
30
+ - Bumps `ora` from 6.3.1 to 7.0.1
31
+ - Bumps `simple-git` from 3.18.0 to 3.20.0
32
+ ### Changed
33
+ - Make handling of long numerals an option that is disabled by default ([#557](https://github.com/opensearch-project/opensearch-js/pull/557))
34
+ - Add `enableLongNumeralSupport` to the type definition for `ClientOptions` ([#598](https://github.com/opensearch-project/opensearch-js/pull/598))
35
+ ### Deprecated
36
+ ### Removed
37
+ ### Fixed
38
+ ### Security
39
+
14
40
  ## [2.3.0]
15
41
 
16
42
  ### Added
17
-
18
43
  - Add serialization and deserialization of numerals larger than `Number.MAX_SAFE_INTEGER` ([#544](https://github.com/opensearch-project/opensearch-js/pull/544))
19
-
20
44
  ### Dependencies
45
+ - Bumps `prettier` from 2.8.7 to 2.8.8
46
+ - Bumps `ora` from 6.1.2 to 6.3.1
47
+ - Bumps `@types/node` from 18.15.11 to 20.2.5
48
+ - Bumps `eslint` from 8.38.0 to 8.41.0
49
+ - Bumps `xmlbuilder2` from 3.0.2 to 3.1.1
50
+ - Bumps `simple-git` from 3.17.0 to 3.18.0
51
+ - Bumps `@babel/eslint-parser` from 7.21.3 to 7.21.8
52
+ - Bumps `@aws-sdk/types` from 3.257.0 to 3.341.0
53
+ - Bumps `semver` from 7.3.8 to 7.5.1
54
+ - Bumps `node-fetch` from 3.2.10 to 3.3.1
21
55
  ### Changed
22
-
56
+ - Implemented Docker Image caching for `integration-unreleased` workflow ([#387](https://github.com/opensearch-project/opensearch-js/issues/387))
23
57
  - Add upgrading NPM to all workflows running older Node.js versions ([#545](https://github.com/opensearch-project/opensearch-js/issues/545))
24
-
58
+ - Upgrade and secure the backport workflow ([#547](https://github.com/opensearch-project/opensearch-js/issues/547))
25
59
  ### Deprecated
26
60
  ### Removed
27
61
  ### Fixed
62
+ - Fixed malformed `bundler.yml` ([#497](https://github.com/opensearch-project/opensearch-js/pull/497))
28
63
  ### Security
29
64
 
30
65
  ## [2.2.1]
@@ -152,7 +187,3 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
152
187
  ### Fixed
153
188
 
154
189
  - Fix mutability of connection headers ([#291](https://github.com/opensearch-project/opensearch-js/issues/291))
155
-
156
- [2.1.0]: https://github.com/opensearch-project/opensearch-js/releases/tag/2.1.0
157
- [2.2.0]: https://github.com/opensearch-project/opensearch-js/releases/tag/2.2.0
158
- [Unreleased]: https://github.com/opensearch-project/opensearch-js/compare/2.2.0...HEAD
package/COMPATIBILITY.md CHANGED
@@ -1,27 +1,13 @@
1
- - [Compatibility with OpenSearch](#compatibility-with-opensearch)
2
- - [Upgrading](#upgrading)
1
+ # Compatibility with OpenSearch
3
2
 
4
- ## Compatibility with OpenSearch
3
+ The below matrix shows the compatibility of the [`opensearch-js`](https://www.npmjs.com/package/@opensearch-project/opensearch) with versions of [`OpenSearch`](https://opensearch.org/downloads.html#opensearch). In the vast majority of cases, a minor version upgrade of the OpenSearch Server does not affect how your application's existing features interact with the cluster via the JavaScript client. However, such an upgrade can introduce new endpoints that your current version of the client does not support. In this case, you must upgrade the client to the version shown in the table below (or higher) to use the new endpoints.
5
4
 
6
- The below matrix shows the compatibility of the [`opensearch-js`](https://www.npmjs.com/package/@opensearch-project/opensearch) with versions of [`OpenSearch`](https://opensearch.org/downloads.html#opensearch).
5
+ If your Server Version is higher than those listed in the table below, you should use the newest client. If the newest client still does not support the endpoint you need, please open an issue and let us know.
7
6
 
8
- | OpenSearch Version | Client Version |
9
- | ------------------ | -------------- |
10
- | 1.0.0 | 1.0.0 |
11
- | 1.0.1 | 1.0.0 |
12
- | 1.1.0 | 1.1.0 |
13
- | 1.2.0 | 1.1.0 |
14
- | 1.2.1 | 1.1.0 |
15
- | 1.2.2 | 1.1.0 |
16
- | 1.2.3 | 1.1.0 |
17
- | 1.2.4 | 1.1.0 |
18
- | 1.3.0 | 1.1.0 |
19
- | 1.3.1 | 1.1.0 |
20
- | 1.3.2 | 1.1.0 |
21
- | 1.3.3 | 1.1.0 |
22
- | 2.0.0 | 2.0.0 |
23
- | 2.0.1 | 2.0.0 |
7
+ | Server Version | Client Version |
8
+ |----------------|----------------|
9
+ | 1.x | 1.x |
10
+ | 2.x | 2.x |
24
11
 
25
12
  ## Upgrading
26
-
27
- Major versions of OpenSearch introduce breaking changes that require careful upgrades of the client. While `opensearch-js` 2.0.0 works against the latest OpenSearch 1.x, certain deprecated features removed in OpenSearch 2.0 have also been removed from the client. Please refer to the [OpenSearch documentation](https://opensearch.org/docs/latest/clients/index/) for more information.
13
+ Major versions of OpenSearch introduce breaking changes that require careful upgrades of the client. While `opensearch-js` 2.x works against the latest OpenSearch 1.x, certain deprecated features removed in OpenSearch 2.0 have also been removed from the client. Please refer to the [OpenSearch documentation](https://opensearch.org/docs/latest/clients/index/) for more information.
package/MAINTAINERS.md CHANGED
@@ -13,6 +13,7 @@ This document contains a list of maintainers in this repo. See [opensearch-proje
13
13
  | Vacha Shah | [VachaShah](https://github.com/VachaShah) | Amazon |
14
14
  | Theo Truong | [nhtruong](https://github.com/nhtruong) | Amazon |
15
15
  | Harsha Vamsi Kalluri | [harshavamsi](https://github.com/harshavamsi) | Amazon |
16
+ | Timur Bolotov | [timursaurus](https://github.com/timursaurus) | |
16
17
 
17
18
  ## Emeritus
18
19
 
package/USER_GUIDE.md CHANGED
@@ -5,6 +5,7 @@
5
5
  - [Authenticate with Amazon OpenSearch Service](#authenticate-with-amazon-opensearch-service)
6
6
  - [Using AWS V2 SDK](#using-aws-v2-sdk)
7
7
  - [Using AWS V3 SDK](#using-aws-v3-sdk)
8
+ - [Enable Handling of Long Numerals](#enable-handling-of-long-numerals)
8
9
  - [Create an Index](#create-an-index)
9
10
  - [Add a Document to the Index](#add-a-document-to-the-index)
10
11
  - [Search for the Document](#search-for-the-document)
@@ -64,6 +65,7 @@ const client = new Client({
64
65
  getCredentials: () =>
65
66
  new Promise((resolve, reject) => {
66
67
  // Any other method to acquire a new Credentials object can be used.
68
+ // If you use profiles, make sure to pass role assumer, or use default provider fromNodeProviderChain
67
69
  AWS.config.getCredentials((err, credentials) => {
68
70
  if (err) {
69
71
  reject(err);
@@ -107,6 +109,21 @@ const client = new Client({
107
109
  });
108
110
  ```
109
111
 
112
+ ### Enable Handling of Long Numerals
113
+
114
+ JavaScript can safely work with integers from -(2<sup>53</sup> - 1) to 2<sup>53</sup> - 1. However,
115
+ serialized JSON texts from other languages can potentially have numeric values beyond that range and the native
116
+ serialization and deserialization methods of JavaScript's JSON, incapable of parsing them with precision; these
117
+ values get rounded to fit the IEEE-754 representation.
118
+
119
+ The `Client` can be configured to appropriately deserialize long numerals as `BigInt` values and vice versa:
120
+
121
+ ```javascript
122
+ const client = new Client({
123
+ enableLongNumeralSupport: true,
124
+ });
125
+ ```
126
+
110
127
  ## Create an Index
111
128
 
112
129
  ```javascript