@valkey/valkey-glide 2.2.1-rc3 → 2.2.5-rc1

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.
@@ -493,6 +493,18 @@ export interface AdvancedBaseClientConfiguration {
493
493
  */
494
494
  rootCertificates?: string | Buffer;
495
495
  };
496
+ /**
497
+ * Controls TCP_NODELAY socket option (Nagle's algorithm).
498
+ *
499
+ * - When `true`, disables Nagle's algorithm for lower latency by sending packets immediately without buffering.
500
+ * This is optimal for Redis/Valkey workloads with many small requests.
501
+ *
502
+ * - When `false`, enables Nagle's algorithm to reduce network overhead by buffering small packets.
503
+ * This may increase latency by up to 200ms but reduces the number of packets sent.
504
+ *
505
+ * - If not explicitly set, a default value of `true` will be used by the Rust core.
506
+ */
507
+ tcpNoDelay?: boolean;
496
508
  }
497
509
  /**
498
510
  * Enum of Valkey data types
@@ -369,7 +369,8 @@ class BaseClient {
369
369
  let pointer;
370
370
  if (typeof message.respPointer === "number") {
371
371
  // Response from type number
372
- pointer = new PointerResponse(message.respPointer);
372
+ const long = long_1.default.fromNumber(message.respPointer);
373
+ pointer = new PointerResponse(message.respPointer, long.high, long.low);
373
374
  }
374
375
  else {
375
376
  // Response from type long
@@ -7029,6 +7030,10 @@ class BaseClient {
7029
7030
  request.connectionTimeout =
7030
7031
  options.connectionTimeout ??
7031
7032
  _1.DEFAULT_CONNECTION_TIMEOUT_IN_MILLISECONDS;
7033
+ // Set TCP_NODELAY if explicitly configured
7034
+ if (options.tcpNoDelay !== undefined) {
7035
+ request.tcpNodelay = options.tcpNoDelay;
7036
+ }
7032
7037
  // Apply TLS configuration if present
7033
7038
  if (options.tlsAdvancedConfiguration) {
7034
7039
  // request.tlsMode is either SecureTls or InsecureTls here
@@ -910,12 +910,6 @@ export namespace command_request {
910
910
  /** ScriptInvocationPointers argsPointer. */
911
911
  public argsPointer?: (number|Long|null);
912
912
 
913
- /** ScriptInvocationPointers _keysPointer. */
914
- public _keysPointer?: "keysPointer";
915
-
916
- /** ScriptInvocationPointers _argsPointer. */
917
- public _argsPointer?: "argsPointer";
918
-
919
913
  /**
920
914
  * Creates a new ScriptInvocationPointers instance using the specified properties.
921
915
  * @param [properties] Properties to set
@@ -1096,18 +1090,6 @@ export namespace command_request {
1096
1090
  /** Batch retryConnectionError. */
1097
1091
  public retryConnectionError?: (boolean|null);
1098
1092
 
1099
- /** Batch _raiseOnError. */
1100
- public _raiseOnError?: "raiseOnError";
1101
-
1102
- /** Batch _timeout. */
1103
- public _timeout?: "timeout";
1104
-
1105
- /** Batch _retryServerError. */
1106
- public _retryServerError?: "retryServerError";
1107
-
1108
- /** Batch _retryConnectionError. */
1109
- public _retryConnectionError?: "retryConnectionError";
1110
-
1111
1093
  /**
1112
1094
  * Creates a new Batch instance using the specified properties.
1113
1095
  * @param [properties] Properties to set
@@ -1201,15 +1183,6 @@ export namespace command_request {
1201
1183
  /** ClusterScan allowNonCoveredSlots. */
1202
1184
  public allowNonCoveredSlots: boolean;
1203
1185
 
1204
- /** ClusterScan _matchPattern. */
1205
- public _matchPattern?: "matchPattern";
1206
-
1207
- /** ClusterScan _count. */
1208
- public _count?: "count";
1209
-
1210
- /** ClusterScan _objectType. */
1211
- public _objectType?: "objectType";
1212
-
1213
1186
  /**
1214
1187
  * Creates a new ClusterScan instance using the specified properties.
1215
1188
  * @param [properties] Properties to set
@@ -1285,9 +1258,6 @@ export namespace command_request {
1285
1258
  /** UpdateConnectionPassword immediateAuth. */
1286
1259
  public immediateAuth: boolean;
1287
1260
 
1288
- /** UpdateConnectionPassword _password. */
1289
- public _password?: "password";
1290
-
1291
1261
  /**
1292
1262
  * Creates a new UpdateConnectionPassword instance using the specified properties.
1293
1263
  * @param [properties] Properties to set
@@ -1477,9 +1447,6 @@ export namespace command_request {
1477
1447
  /** CommandRequest command. */
1478
1448
  public command?: ("singleCommand"|"batch"|"scriptInvocation"|"scriptInvocationPointers"|"clusterScan"|"updateConnectionPassword"|"refreshIamToken");
1479
1449
 
1480
- /** CommandRequest _rootSpanPtr. */
1481
- public _rootSpanPtr?: "rootSpanPtr";
1482
-
1483
1450
  /**
1484
1451
  * Creates a new CommandRequest instance using the specified properties.
1485
1452
  * @param [properties] Properties to set
@@ -1656,9 +1623,6 @@ export namespace connection_request {
1656
1623
  /** AuthenticationInfo iamCredentials. */
1657
1624
  public iamCredentials?: (connection_request.IIamCredentials|null);
1658
1625
 
1659
- /** AuthenticationInfo _iamCredentials. */
1660
- public _iamCredentials?: "iamCredentials";
1661
-
1662
1626
  /**
1663
1627
  * Creates a new AuthenticationInfo instance using the specified properties.
1664
1628
  * @param [properties] Properties to set
@@ -1752,9 +1716,6 @@ export namespace connection_request {
1752
1716
  /** IamCredentials refreshIntervalSeconds. */
1753
1717
  public refreshIntervalSeconds?: (number|null);
1754
1718
 
1755
- /** IamCredentials _refreshIntervalSeconds. */
1756
- public _refreshIntervalSeconds?: "refreshIntervalSeconds";
1757
-
1758
1719
  /**
1759
1720
  * Creates a new IamCredentials instance using the specified properties.
1760
1721
  * @param [properties] Properties to set
@@ -2150,6 +2111,9 @@ export namespace connection_request {
2150
2111
 
2151
2112
  /** ConnectionRequest rootCerts */
2152
2113
  rootCerts?: (Uint8Array[]|null);
2114
+
2115
+ /** ConnectionRequest tcpNodelay */
2116
+ tcpNodelay?: (boolean|null);
2153
2117
  }
2154
2118
 
2155
2119
  /** Represents a ConnectionRequest. */
@@ -2221,6 +2185,9 @@ export namespace connection_request {
2221
2185
  /** ConnectionRequest rootCerts. */
2222
2186
  public rootCerts: Uint8Array[];
2223
2187
 
2188
+ /** ConnectionRequest tcpNodelay. */
2189
+ public tcpNodelay?: (boolean|null);
2190
+
2224
2191
  /** ConnectionRequest periodicChecks. */
2225
2192
  public periodicChecks?: ("periodicChecksManualInterval"|"periodicChecksDisabled");
2226
2193
 
@@ -2311,9 +2278,6 @@ export namespace connection_request {
2311
2278
  /** ConnectionRetryStrategy jitterPercent. */
2312
2279
  public jitterPercent?: (number|null);
2313
2280
 
2314
- /** ConnectionRetryStrategy _jitterPercent. */
2315
- public _jitterPercent?: "jitterPercent";
2316
-
2317
2281
  /**
2318
2282
  * Creates a new ConnectionRetryStrategy instance using the specified properties.
2319
2283
  * @param [properties] Properties to set
@@ -2509,9 +2473,6 @@ export namespace response {
2509
2473
  /** Response value. */
2510
2474
  public value?: ("respPointer"|"constantResponse"|"requestError"|"closingError");
2511
2475
 
2512
- /** Response _rootSpanPtr. */
2513
- public _rootSpanPtr?: "rootSpanPtr";
2514
-
2515
2476
  /**
2516
2477
  * Creates a new Response instance using the specified properties.
2517
2478
  * @param [properties] Properties to set
@@ -1879,23 +1879,13 @@ $root.command_request = (function() {
1879
1879
  // OneOf field names bound to virtual getters and setters
1880
1880
  var $oneOfFields;
1881
1881
 
1882
- /**
1883
- * ScriptInvocationPointers _keysPointer.
1884
- * @member {"keysPointer"|undefined} _keysPointer
1885
- * @memberof command_request.ScriptInvocationPointers
1886
- * @instance
1887
- */
1882
+ // Virtual OneOf for proto3 optional field
1888
1883
  Object.defineProperty(ScriptInvocationPointers.prototype, "_keysPointer", {
1889
1884
  get: $util.oneOfGetter($oneOfFields = ["keysPointer"]),
1890
1885
  set: $util.oneOfSetter($oneOfFields)
1891
1886
  });
1892
1887
 
1893
- /**
1894
- * ScriptInvocationPointers _argsPointer.
1895
- * @member {"argsPointer"|undefined} _argsPointer
1896
- * @memberof command_request.ScriptInvocationPointers
1897
- * @instance
1898
- */
1888
+ // Virtual OneOf for proto3 optional field
1899
1889
  Object.defineProperty(ScriptInvocationPointers.prototype, "_argsPointer", {
1900
1890
  get: $util.oneOfGetter($oneOfFields = ["argsPointer"]),
1901
1891
  set: $util.oneOfSetter($oneOfFields)
@@ -2280,45 +2270,25 @@ $root.command_request = (function() {
2280
2270
  // OneOf field names bound to virtual getters and setters
2281
2271
  var $oneOfFields;
2282
2272
 
2283
- /**
2284
- * Batch _raiseOnError.
2285
- * @member {"raiseOnError"|undefined} _raiseOnError
2286
- * @memberof command_request.Batch
2287
- * @instance
2288
- */
2273
+ // Virtual OneOf for proto3 optional field
2289
2274
  Object.defineProperty(Batch.prototype, "_raiseOnError", {
2290
2275
  get: $util.oneOfGetter($oneOfFields = ["raiseOnError"]),
2291
2276
  set: $util.oneOfSetter($oneOfFields)
2292
2277
  });
2293
2278
 
2294
- /**
2295
- * Batch _timeout.
2296
- * @member {"timeout"|undefined} _timeout
2297
- * @memberof command_request.Batch
2298
- * @instance
2299
- */
2279
+ // Virtual OneOf for proto3 optional field
2300
2280
  Object.defineProperty(Batch.prototype, "_timeout", {
2301
2281
  get: $util.oneOfGetter($oneOfFields = ["timeout"]),
2302
2282
  set: $util.oneOfSetter($oneOfFields)
2303
2283
  });
2304
2284
 
2305
- /**
2306
- * Batch _retryServerError.
2307
- * @member {"retryServerError"|undefined} _retryServerError
2308
- * @memberof command_request.Batch
2309
- * @instance
2310
- */
2285
+ // Virtual OneOf for proto3 optional field
2311
2286
  Object.defineProperty(Batch.prototype, "_retryServerError", {
2312
2287
  get: $util.oneOfGetter($oneOfFields = ["retryServerError"]),
2313
2288
  set: $util.oneOfSetter($oneOfFields)
2314
2289
  });
2315
2290
 
2316
- /**
2317
- * Batch _retryConnectionError.
2318
- * @member {"retryConnectionError"|undefined} _retryConnectionError
2319
- * @memberof command_request.Batch
2320
- * @instance
2321
- */
2291
+ // Virtual OneOf for proto3 optional field
2322
2292
  Object.defineProperty(Batch.prototype, "_retryConnectionError", {
2323
2293
  get: $util.oneOfGetter($oneOfFields = ["retryConnectionError"]),
2324
2294
  set: $util.oneOfSetter($oneOfFields)
@@ -2536,34 +2506,19 @@ $root.command_request = (function() {
2536
2506
  // OneOf field names bound to virtual getters and setters
2537
2507
  var $oneOfFields;
2538
2508
 
2539
- /**
2540
- * ClusterScan _matchPattern.
2541
- * @member {"matchPattern"|undefined} _matchPattern
2542
- * @memberof command_request.ClusterScan
2543
- * @instance
2544
- */
2509
+ // Virtual OneOf for proto3 optional field
2545
2510
  Object.defineProperty(ClusterScan.prototype, "_matchPattern", {
2546
2511
  get: $util.oneOfGetter($oneOfFields = ["matchPattern"]),
2547
2512
  set: $util.oneOfSetter($oneOfFields)
2548
2513
  });
2549
2514
 
2550
- /**
2551
- * ClusterScan _count.
2552
- * @member {"count"|undefined} _count
2553
- * @memberof command_request.ClusterScan
2554
- * @instance
2555
- */
2515
+ // Virtual OneOf for proto3 optional field
2556
2516
  Object.defineProperty(ClusterScan.prototype, "_count", {
2557
2517
  get: $util.oneOfGetter($oneOfFields = ["count"]),
2558
2518
  set: $util.oneOfSetter($oneOfFields)
2559
2519
  });
2560
2520
 
2561
- /**
2562
- * ClusterScan _objectType.
2563
- * @member {"objectType"|undefined} _objectType
2564
- * @memberof command_request.ClusterScan
2565
- * @instance
2566
- */
2521
+ // Virtual OneOf for proto3 optional field
2567
2522
  Object.defineProperty(ClusterScan.prototype, "_objectType", {
2568
2523
  get: $util.oneOfGetter($oneOfFields = ["objectType"]),
2569
2524
  set: $util.oneOfSetter($oneOfFields)
@@ -2745,12 +2700,7 @@ $root.command_request = (function() {
2745
2700
  // OneOf field names bound to virtual getters and setters
2746
2701
  var $oneOfFields;
2747
2702
 
2748
- /**
2749
- * UpdateConnectionPassword _password.
2750
- * @member {"password"|undefined} _password
2751
- * @memberof command_request.UpdateConnectionPassword
2752
- * @instance
2753
- */
2703
+ // Virtual OneOf for proto3 optional field
2754
2704
  Object.defineProperty(UpdateConnectionPassword.prototype, "_password", {
2755
2705
  get: $util.oneOfGetter($oneOfFields = ["password"]),
2756
2706
  set: $util.oneOfSetter($oneOfFields)
@@ -3122,12 +3072,7 @@ $root.command_request = (function() {
3122
3072
  set: $util.oneOfSetter($oneOfFields)
3123
3073
  });
3124
3074
 
3125
- /**
3126
- * CommandRequest _rootSpanPtr.
3127
- * @member {"rootSpanPtr"|undefined} _rootSpanPtr
3128
- * @memberof command_request.CommandRequest
3129
- * @instance
3130
- */
3075
+ // Virtual OneOf for proto3 optional field
3131
3076
  Object.defineProperty(CommandRequest.prototype, "_rootSpanPtr", {
3132
3077
  get: $util.oneOfGetter($oneOfFields = ["rootSpanPtr"]),
3133
3078
  set: $util.oneOfSetter($oneOfFields)
@@ -3551,12 +3496,7 @@ $root.connection_request = (function() {
3551
3496
  // OneOf field names bound to virtual getters and setters
3552
3497
  var $oneOfFields;
3553
3498
 
3554
- /**
3555
- * AuthenticationInfo _iamCredentials.
3556
- * @member {"iamCredentials"|undefined} _iamCredentials
3557
- * @memberof connection_request.AuthenticationInfo
3558
- * @instance
3559
- */
3499
+ // Virtual OneOf for proto3 optional field
3560
3500
  Object.defineProperty(AuthenticationInfo.prototype, "_iamCredentials", {
3561
3501
  get: $util.oneOfGetter($oneOfFields = ["iamCredentials"]),
3562
3502
  set: $util.oneOfSetter($oneOfFields)
@@ -3758,12 +3698,7 @@ $root.connection_request = (function() {
3758
3698
  // OneOf field names bound to virtual getters and setters
3759
3699
  var $oneOfFields;
3760
3700
 
3761
- /**
3762
- * IamCredentials _refreshIntervalSeconds.
3763
- * @member {"refreshIntervalSeconds"|undefined} _refreshIntervalSeconds
3764
- * @memberof connection_request.IamCredentials
3765
- * @instance
3766
- */
3701
+ // Virtual OneOf for proto3 optional field
3767
3702
  Object.defineProperty(IamCredentials.prototype, "_refreshIntervalSeconds", {
3768
3703
  get: $util.oneOfGetter($oneOfFields = ["refreshIntervalSeconds"]),
3769
3704
  set: $util.oneOfSetter($oneOfFields)
@@ -4523,6 +4458,7 @@ $root.connection_request = (function() {
4523
4458
  * @property {boolean|null} [refreshTopologyFromInitialNodes] ConnectionRequest refreshTopologyFromInitialNodes
4524
4459
  * @property {string|null} [libName] ConnectionRequest libName
4525
4460
  * @property {Array.<Uint8Array>|null} [rootCerts] ConnectionRequest rootCerts
4461
+ * @property {boolean|null} [tcpNodelay] ConnectionRequest tcpNodelay
4526
4462
  */
4527
4463
 
4528
4464
  /**
@@ -4702,6 +4638,14 @@ $root.connection_request = (function() {
4702
4638
  */
4703
4639
  ConnectionRequest.prototype.rootCerts = $util.emptyArray;
4704
4640
 
4641
+ /**
4642
+ * ConnectionRequest tcpNodelay.
4643
+ * @member {boolean|null|undefined} tcpNodelay
4644
+ * @memberof connection_request.ConnectionRequest
4645
+ * @instance
4646
+ */
4647
+ ConnectionRequest.prototype.tcpNodelay = null;
4648
+
4705
4649
  // OneOf field names bound to virtual getters and setters
4706
4650
  var $oneOfFields;
4707
4651
 
@@ -4716,6 +4660,12 @@ $root.connection_request = (function() {
4716
4660
  set: $util.oneOfSetter($oneOfFields)
4717
4661
  });
4718
4662
 
4663
+ // Virtual OneOf for proto3 optional field
4664
+ Object.defineProperty(ConnectionRequest.prototype, "_tcpNodelay", {
4665
+ get: $util.oneOfGetter($oneOfFields = ["tcpNodelay"]),
4666
+ set: $util.oneOfSetter($oneOfFields)
4667
+ });
4668
+
4719
4669
  /**
4720
4670
  * Creates a new ConnectionRequest instance using the specified properties.
4721
4671
  * @function create
@@ -4782,6 +4732,8 @@ $root.connection_request = (function() {
4782
4732
  if (message.rootCerts != null && message.rootCerts.length)
4783
4733
  for (var i = 0; i < message.rootCerts.length; ++i)
4784
4734
  writer.uint32(/* id 20, wireType 2 =*/162).bytes(message.rootCerts[i]);
4735
+ if (message.tcpNodelay != null && Object.hasOwnProperty.call(message, "tcpNodelay"))
4736
+ writer.uint32(/* id 24, wireType 0 =*/192).bool(message.tcpNodelay);
4785
4737
  return writer;
4786
4738
  };
4787
4739
 
@@ -4902,6 +4854,10 @@ $root.connection_request = (function() {
4902
4854
  message.rootCerts.push(reader.bytes());
4903
4855
  break;
4904
4856
  }
4857
+ case 24: {
4858
+ message.tcpNodelay = reader.bool();
4859
+ break;
4860
+ }
4905
4861
  default:
4906
4862
  reader.skipType(tag & 7);
4907
4863
  break;
@@ -5006,12 +4962,7 @@ $root.connection_request = (function() {
5006
4962
  // OneOf field names bound to virtual getters and setters
5007
4963
  var $oneOfFields;
5008
4964
 
5009
- /**
5010
- * ConnectionRetryStrategy _jitterPercent.
5011
- * @member {"jitterPercent"|undefined} _jitterPercent
5012
- * @memberof connection_request.ConnectionRetryStrategy
5013
- * @instance
5014
- */
4965
+ // Virtual OneOf for proto3 optional field
5015
4966
  Object.defineProperty(ConnectionRetryStrategy.prototype, "_jitterPercent", {
5016
4967
  get: $util.oneOfGetter($oneOfFields = ["jitterPercent"]),
5017
4968
  set: $util.oneOfSetter($oneOfFields)
@@ -5428,12 +5379,7 @@ $root.response = (function() {
5428
5379
  set: $util.oneOfSetter($oneOfFields)
5429
5380
  });
5430
5381
 
5431
- /**
5432
- * Response _rootSpanPtr.
5433
- * @member {"rootSpanPtr"|undefined} _rootSpanPtr
5434
- * @memberof response.Response
5435
- * @instance
5436
- */
5382
+ // Virtual OneOf for proto3 optional field
5437
5383
  Object.defineProperty(Response.prototype, "_rootSpanPtr", {
5438
5384
  get: $util.oneOfGetter($oneOfFields = ["rootSpanPtr"]),
5439
5385
  set: $util.oneOfSetter($oneOfFields)
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "build-ts/index.js",
5
5
  "module": "build-ts/index.js",
6
6
  "types": "build-ts/index.d.ts",
7
- "version": "2.2.1-rc3",
7
+ "version": "2.2.5-rc1",
8
8
  "exports": {
9
9
  ".": {
10
10
  "import": {
@@ -88,6 +88,7 @@
88
88
  "@jest/globals": "29",
89
89
  "@types/jest": "29",
90
90
  "@types/minimist": "1",
91
+ "@types/node": "24",
91
92
  "@types/semver": "7",
92
93
  "@types/uuid": "11",
93
94
  "find-free-port": "2",
@@ -134,11 +135,11 @@
134
135
  }
135
136
  },
136
137
  "optionalDependencies": {
137
- "@valkey/valkey-glide-darwin-x64": "2.2.1-rc3",
138
- "@valkey/valkey-glide-darwin-arm64": "2.2.1-rc3",
139
- "@valkey/valkey-glide-linux-x64-gnu": "2.2.1-rc3",
140
- "@valkey/valkey-glide-linux-arm64-gnu": "2.2.1-rc3",
141
- "@valkey/valkey-glide-linux-x64-musl": "2.2.1-rc3",
142
- "@valkey/valkey-glide-linux-arm64-musl": "2.2.1-rc3"
138
+ "@valkey/valkey-glide-darwin-x64": "2.2.5-rc1",
139
+ "@valkey/valkey-glide-darwin-arm64": "2.2.5-rc1",
140
+ "@valkey/valkey-glide-linux-x64-gnu": "2.2.5-rc1",
141
+ "@valkey/valkey-glide-linux-arm64-gnu": "2.2.5-rc1",
142
+ "@valkey/valkey-glide-linux-x64-musl": "2.2.5-rc1",
143
+ "@valkey/valkey-glide-linux-arm64-musl": "2.2.5-rc1"
143
144
  }
144
145
  }