@terascope/elasticsearch-api 4.0.1 → 4.1.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/index.js +1 -3
- package/jest.config.js +0 -9
- package/package.json +6 -6
- package/test/api-spec.js +2 -2
- package/.eslintrc.json +0 -14
package/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/* eslint-disable camelcase */
|
|
2
|
-
|
|
3
1
|
// polyfill because opensearch has references to an api that won't exist
|
|
4
2
|
// on the client side, should be able to remove in the future
|
|
5
3
|
import Promise from 'bluebird';
|
|
@@ -1177,7 +1175,7 @@ export default function elasticsearchApi(client, logger, _opConfig) {
|
|
|
1177
1175
|
clientName,
|
|
1178
1176
|
_time
|
|
1179
1177
|
) {
|
|
1180
|
-
|
|
1178
|
+
|
|
1181
1179
|
const giveupAfter = Date.now() + (_time || 10000);
|
|
1182
1180
|
return new Promise((resolve, reject) => {
|
|
1183
1181
|
const attemptToCreateIndex = () => {
|
package/jest.config.js
CHANGED
|
@@ -8,13 +8,4 @@ const module = await import(configModulePath);
|
|
|
8
8
|
|
|
9
9
|
const config = module.default(dirPath);
|
|
10
10
|
|
|
11
|
-
config.extensionsToTreatAsEsm = ['.ts'];
|
|
12
|
-
config.moduleNameMapper = {
|
|
13
|
-
'^(\\.{1,2}/.*)\\.js$': '$1',
|
|
14
|
-
};
|
|
15
|
-
config.testTimeout = 60 * 1000;
|
|
16
|
-
config.transform = {};
|
|
17
|
-
|
|
18
|
-
config.transform['^.+\\.(t|j)sx?$'] = '@swc/jest';
|
|
19
|
-
|
|
20
11
|
export default config;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@terascope/elasticsearch-api",
|
|
3
3
|
"displayName": "Elasticsearch API",
|
|
4
|
-
"version": "4.0
|
|
4
|
+
"version": "4.1.0",
|
|
5
5
|
"description": "Elasticsearch client api used across multiple services, handles retries and exponential backoff",
|
|
6
6
|
"homepage": "https://github.com/terascope/teraslice/tree/master/packages/elasticsearch-api#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"test:watch": "TEST_RESTRAINED_ELASTICSEARCH='true' ts-scripts test --watch . --"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@terascope/types": "^1.
|
|
28
|
-
"@terascope/utils": "^1.
|
|
27
|
+
"@terascope/types": "^1.1.0",
|
|
28
|
+
"@terascope/utils": "^1.1.0",
|
|
29
29
|
"bluebird": "^3.7.2",
|
|
30
30
|
"setimmediate": "^1.0.5"
|
|
31
31
|
},
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"@opensearch-project/opensearch": "^1.2.0",
|
|
34
34
|
"@types/elasticsearch": "^5.0.43",
|
|
35
35
|
"elasticsearch": "^15.4.1",
|
|
36
|
-
"elasticsearch-store": "^1.0
|
|
36
|
+
"elasticsearch-store": "^1.1.0",
|
|
37
37
|
"elasticsearch6": "npm:@elastic/elasticsearch@^6.7.0",
|
|
38
38
|
"elasticsearch7": "npm:@elastic/elasticsearch@^7.0.0",
|
|
39
39
|
"elasticsearch8": "npm:@elastic/elasticsearch@^8.0.0"
|
|
40
40
|
},
|
|
41
41
|
"engines": {
|
|
42
|
-
"node": ">=
|
|
43
|
-
"yarn": ">=1.
|
|
42
|
+
"node": ">=18.18.0",
|
|
43
|
+
"yarn": ">=1.22.19"
|
|
44
44
|
},
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public",
|
package/test/api-spec.js
CHANGED
|
@@ -452,7 +452,7 @@ describe('elasticsearch-api', () => {
|
|
|
452
452
|
searchError = { body: { error: { type: 'some_thing_else' } } };
|
|
453
453
|
try {
|
|
454
454
|
await api.search(query);
|
|
455
|
-
} catch (
|
|
455
|
+
} catch (_err) {
|
|
456
456
|
queryFailed = true;
|
|
457
457
|
}
|
|
458
458
|
return expect(queryFailed).toEqual(true);
|
|
@@ -485,7 +485,7 @@ describe('elasticsearch-api', () => {
|
|
|
485
485
|
failures = [];
|
|
486
486
|
})
|
|
487
487
|
]);
|
|
488
|
-
} catch (
|
|
488
|
+
} catch (_err) {
|
|
489
489
|
queryFailed = true;
|
|
490
490
|
}
|
|
491
491
|
return expect(queryFailed).toEqual(true);
|
package/.eslintrc.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@terascope",
|
|
3
|
-
"parserOptions": {
|
|
4
|
-
"ecmaVersion": "latest",
|
|
5
|
-
"sourceType": "module"
|
|
6
|
-
},
|
|
7
|
-
"rules": {
|
|
8
|
-
"@typescript-eslint/naming-convention": "off",
|
|
9
|
-
"@typescript-eslint/no-duplicate-enum-values": "warn",
|
|
10
|
-
"import/extensions": "off",
|
|
11
|
-
"import/no-import-module-exports": "off"
|
|
12
|
-
},
|
|
13
|
-
"ignorePatterns":[]
|
|
14
|
-
}
|