@opensearch-project/opensearch 2.3.1 → 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/api/utils.js CHANGED
@@ -40,6 +40,11 @@ function handleError(err, callback) {
40
40
  return Promise.reject(err);
41
41
  }
42
42
 
43
+ function encodePathParam(camelName, snakeName = null) {
44
+ if (camelName == null && snakeName == null) return null;
45
+ return encodeURIComponent(snakeName || camelName);
46
+ }
47
+
43
48
  function snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) {
44
49
  const target = {};
45
50
  const keys = Object.keys(querystring);
@@ -65,4 +70,11 @@ function normalizeArguments(params, options, callback) {
65
70
 
66
71
  function noop() {}
67
72
 
68
- module.exports = { handleError, snakeCaseKeys, normalizeArguments, noop, kConfigurationError };
73
+ module.exports = {
74
+ handleError,
75
+ snakeCaseKeys,
76
+ normalizeArguments,
77
+ noop,
78
+ kConfigurationError,
79
+ encodePathParam,
80
+ };
package/index.d.ts CHANGED
@@ -138,6 +138,7 @@ interface ClientOptions {
138
138
  };
139
139
  disablePrototypePoisoningProtection?: boolean | 'proto' | 'constructor';
140
140
  memoryCircuitBreaker?: MemoryCircuitBreakerOptions;
141
+ enableLongNumeralSupport?: boolean;
141
142
  }
142
143
 
143
144
  declare class Client {
package/package.json CHANGED
@@ -23,7 +23,7 @@
23
23
  }
24
24
  },
25
25
  "homepage": "https://www.opensearch.org/",
26
- "version": "2.3.1",
26
+ "version": "2.4.0",
27
27
  "versionCanary": "7.10.0-canary.6",
28
28
  "keywords": [
29
29
  "opensearch",
@@ -59,15 +59,15 @@
59
59
  "@aws-sdk/types": "^3.160.0",
60
60
  "@babel/eslint-parser": "^7.19.1",
61
61
  "@sinonjs/fake-timers": "github:sinonjs/fake-timers#0bfffc1",
62
- "@types/node": "^18.15.3",
62
+ "@types/node": "^20.1.4",
63
63
  "convert-hrtime": "^5.0.0",
64
64
  "cross-zip": "^4.0.0",
65
- "dedent": "^0.7.0",
65
+ "dedent": "^1.1.0",
66
66
  "deepmerge": "^4.2.2",
67
67
  "dezalgo": "^1.0.3",
68
68
  "eslint": "^8.30.0",
69
- "eslint-config-prettier": "^8.5.0",
70
- "eslint-plugin-prettier": "^4.0.0",
69
+ "eslint-config-prettier": "^9.0.0",
70
+ "eslint-plugin-prettier": "^5.0.0",
71
71
  "fast-deep-equal": "^3.1.3",
72
72
  "into-stream": "^6.0.0",
73
73
  "js-yaml": "^4.1.0",
@@ -75,8 +75,8 @@
75
75
  "license-checker": "^25.0.1",
76
76
  "minimist": "^1.2.5",
77
77
  "node-fetch": "^3.2.10",
78
- "ora": "^6.1.2",
79
- "prettier": "^2.6.2",
78
+ "ora": "^7.0.1",
79
+ "prettier": "^3.0.1",
80
80
  "pretty-hrtime": "^1.0.3",
81
81
  "proxy": "^1.0.2",
82
82
  "rimraf": "^5.0.0",