gremlin 3.8.1 → 3.8.2

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.
Files changed (74) hide show
  1. package/doc/AnonymousTraversalSource.html +1 -1
  2. package/doc/Authenticator.html +1 -1
  3. package/doc/Bytecode.html +1 -1
  4. package/doc/CardinalityValue.html +1 -1
  5. package/doc/Client.html +1 -1
  6. package/doc/Connection.html +1 -1
  7. package/doc/DriverRemoteConnection.html +1 -1
  8. package/doc/EdgeLabelVerificationStrategy.html +2 -2
  9. package/doc/Graph.html +1 -1
  10. package/doc/GraphSON2Reader.html +1 -1
  11. package/doc/GraphSON2Writer.html +1 -1
  12. package/doc/GraphSON3Reader.html +1 -1
  13. package/doc/GraphSON3Writer.html +1 -1
  14. package/doc/GraphTraversal.html +1 -1
  15. package/doc/GraphTraversalSource.html +1 -1
  16. package/doc/HaltedTraverserStrategy.html +1 -1
  17. package/doc/MatchAlgorithmStrategy.html +1 -1
  18. package/doc/P.html +15 -15
  19. package/doc/PartitionStrategy.html +1 -1
  20. package/doc/Path.html +2 -2
  21. package/doc/PlainTextSaslAuthenticator.html +1 -1
  22. package/doc/ProductiveByStrategy.html +5 -2
  23. package/doc/RemoteConnection.html +1 -1
  24. package/doc/RemoteStrategy.html +1 -1
  25. package/doc/RemoteTraversal.html +1 -1
  26. package/doc/ReservedKeysVerificationStrategy.html +2 -2
  27. package/doc/ResponseError.html +1 -1
  28. package/doc/ResultSet.html +1 -1
  29. package/doc/SaslAuthenticator.html +1 -1
  30. package/doc/SaslMechanismBase.html +1 -1
  31. package/doc/SaslMechanismPlain.html +1 -1
  32. package/doc/SeedStrategy.html +1 -1
  33. package/doc/SubgraphStrategy.html +1 -1
  34. package/doc/TextP.html +11 -11
  35. package/doc/Transaction.html +1 -1
  36. package/doc/Translator.html +1 -1
  37. package/doc/TraversalStrategies.html +1 -1
  38. package/doc/TraversalStrategy.html +1 -1
  39. package/doc/TypeSerializer.html +1 -1
  40. package/doc/driver_auth_authenticator.js.html +1 -1
  41. package/doc/driver_auth_mechanisms_sasl-mechanism-base.js.html +1 -1
  42. package/doc/driver_auth_mechanisms_sasl-mechanism-plain.js.html +1 -1
  43. package/doc/driver_auth_plain-text-sasl-authenticator.js.html +1 -1
  44. package/doc/driver_auth_sasl-authenticator.js.html +1 -1
  45. package/doc/driver_client.js.html +1 -1
  46. package/doc/driver_connection.js.html +1 -1
  47. package/doc/driver_driver-remote-connection.js.html +1 -1
  48. package/doc/driver_remote-connection.js.html +1 -1
  49. package/doc/driver_response-error.js.html +1 -1
  50. package/doc/driver_result-set.js.html +1 -1
  51. package/doc/global.html +2 -2
  52. package/doc/index.html +1 -1
  53. package/doc/module.exports.html +1 -1
  54. package/doc/process_anonymous-traversal.js.html +1 -1
  55. package/doc/process_bytecode.js.html +1 -1
  56. package/doc/process_graph-traversal.js.html +1 -1
  57. package/doc/process_transaction.js.html +1 -1
  58. package/doc/process_translator.js.html +1 -1
  59. package/doc/process_traversal-strategy.js.html +5 -1
  60. package/doc/process_traversal.js.html +29 -6
  61. package/doc/structure_graph.js.html +14 -1
  62. package/doc/structure_io_binary_internals_DataType.js.html +1 -1
  63. package/doc/structure_io_binary_internals_GraphBinaryReader.js.html +1 -1
  64. package/doc/structure_io_binary_internals_GraphBinaryWriter.js.html +1 -1
  65. package/doc/structure_io_graph-serializer.js.html +1 -1
  66. package/doc/structure_io_type-serializers.js.html +10 -2
  67. package/doc/utils.js.html +2 -2
  68. package/lib/process/traversal-strategy.js +4 -0
  69. package/lib/process/traversal.js +28 -5
  70. package/lib/structure/graph.js +13 -0
  71. package/lib/structure/io/binary/internals/OffsetDateTimeSerializer.js +9 -0
  72. package/lib/structure/io/type-serializers.js +9 -1
  73. package/lib/utils.js +1 -1
  74. package/package.json +10 -10
@@ -518,7 +518,7 @@
518
518
  <br class="clear">
519
519
 
520
520
  <footer>
521
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:04 GMT-0700 (Pacific Daylight Time)
521
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:15 GMT-0700 (Pacific Daylight Time)
522
522
  </footer>
523
523
 
524
524
  <script> prettyPrint(); </script>
@@ -643,7 +643,7 @@
643
643
  <br class="clear">
644
644
 
645
645
  <footer>
646
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:04 GMT-0700 (Pacific Daylight Time)
646
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:15 GMT-0700 (Pacific Daylight Time)
647
647
  </footer>
648
648
 
649
649
  <script> prettyPrint(); </script>
@@ -384,7 +384,7 @@
384
384
  <br class="clear">
385
385
 
386
386
  <footer>
387
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:04 GMT-0700 (Pacific Daylight Time)
387
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:15 GMT-0700 (Pacific Daylight Time)
388
388
  </footer>
389
389
 
390
390
  <script> prettyPrint(); </script>
@@ -157,7 +157,7 @@
157
157
  <br class="clear">
158
158
 
159
159
  <footer>
160
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:04 GMT-0700 (Pacific Daylight Time)
160
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:15 GMT-0700 (Pacific Daylight Time)
161
161
  </footer>
162
162
 
163
163
  <script> prettyPrint(); </script>
@@ -80,7 +80,7 @@ module.exports = Authenticator;
80
80
  <br class="clear">
81
81
 
82
82
  <footer>
83
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:03 GMT-0700 (Pacific Daylight Time)
83
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
84
84
  </footer>
85
85
 
86
86
  <script> prettyPrint(); </script>
@@ -94,7 +94,7 @@ module.exports = SaslMechanismBase;
94
94
  <br class="clear">
95
95
 
96
96
  <footer>
97
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:04 GMT-0700 (Pacific Daylight Time)
97
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
98
98
  </footer>
99
99
 
100
100
  <script> prettyPrint(); </script>
@@ -148,7 +148,7 @@ module.exports = SaslMechanismPlain;
148
148
  <br class="clear">
149
149
 
150
150
  <footer>
151
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:04 GMT-0700 (Pacific Daylight Time)
151
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
152
152
  </footer>
153
153
 
154
154
  <script> prettyPrint(); </script>
@@ -97,7 +97,7 @@ module.exports = PlainTextSaslAuthenticator;
97
97
  <br class="clear">
98
98
 
99
99
  <footer>
100
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:03 GMT-0700 (Pacific Daylight Time)
100
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
101
101
  </footer>
102
102
 
103
103
  <script> prettyPrint(); </script>
@@ -91,7 +91,7 @@ module.exports = SaslAuthenticator;
91
91
  <br class="clear">
92
92
 
93
93
  <footer>
94
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:03 GMT-0700 (Pacific Daylight Time)
94
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
95
95
  </footer>
96
96
 
97
97
  <script> prettyPrint(); </script>
@@ -241,7 +241,7 @@ module.exports = Client;
241
241
  <br class="clear">
242
242
 
243
243
  <footer>
244
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:03 GMT-0700 (Pacific Daylight Time)
244
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
245
245
  </footer>
246
246
 
247
247
  <script> prettyPrint(); </script>
@@ -509,7 +509,7 @@ module.exports = Connection;
509
509
  <br class="clear">
510
510
 
511
511
  <footer>
512
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:03 GMT-0700 (Pacific Daylight Time)
512
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
513
513
  </footer>
514
514
 
515
515
  <script> prettyPrint(); </script>
@@ -184,7 +184,7 @@ module.exports = DriverRemoteConnection;
184
184
  <br class="clear">
185
185
 
186
186
  <footer>
187
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:03 GMT-0700 (Pacific Daylight Time)
187
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
188
188
  </footer>
189
189
 
190
190
  <script> prettyPrint(); </script>
@@ -189,7 +189,7 @@ module.exports = { RemoteConnection, RemoteStrategy, RemoteTraversal };
189
189
  <br class="clear">
190
190
 
191
191
  <footer>
192
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:03 GMT-0700 (Pacific Daylight Time)
192
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
193
193
  </footer>
194
194
 
195
195
  <script> prettyPrint(); </script>
@@ -89,7 +89,7 @@ module.exports = ResponseError;
89
89
  <br class="clear">
90
90
 
91
91
  <footer>
92
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:03 GMT-0700 (Pacific Daylight Time)
92
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
93
93
  </footer>
94
94
 
95
95
  <script> prettyPrint(); </script>
@@ -125,7 +125,7 @@ module.exports = ResultSet;
125
125
  <br class="clear">
126
126
 
127
127
  <footer>
128
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:03 GMT-0700 (Pacific Daylight Time)
128
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
129
129
  </footer>
130
130
 
131
131
  <script> prettyPrint(); </script>
package/doc/global.html CHANGED
@@ -296,7 +296,7 @@ See org.apache.tinkerpop.gremlin.structure.io.binary.DataType Java class.
296
296
 
297
297
  <dt class="tag-source">Source:</dt>
298
298
  <dd class="tag-source"><ul class="dummy"><li>
299
- <a href="structure_io_type-serializers.js.html">structure/io/type-serializers.js</a>, <a href="structure_io_type-serializers.js.html#line317">line 317</a>
299
+ <a href="structure_io_type-serializers.js.html">structure/io/type-serializers.js</a>, <a href="structure_io_type-serializers.js.html#line325">line 325</a>
300
300
  </li></ul></dd>
301
301
 
302
302
 
@@ -719,7 +719,7 @@ See org.apache.tinkerpop.gremlin.structure.io.binary.DataType Java class.
719
719
  <br class="clear">
720
720
 
721
721
  <footer>
722
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:04 GMT-0700 (Pacific Daylight Time)
722
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
723
723
  </footer>
724
724
 
725
725
  <script> prettyPrint(); </script>
package/doc/index.html CHANGED
@@ -176,7 +176,7 @@ for early testing purposes only. These releases are not suitable for production.
176
176
  <br class="clear">
177
177
 
178
178
  <footer>
179
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:04 GMT-0700 (Pacific Daylight Time)
179
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
180
180
  </footer>
181
181
 
182
182
  <script> prettyPrint(); </script>
@@ -292,7 +292,7 @@
292
292
  <br class="clear">
293
293
 
294
294
  <footer>
295
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:04 GMT-0700 (Pacific Daylight Time)
295
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:15 GMT-0700 (Pacific Daylight Time)
296
296
  </footer>
297
297
 
298
298
  <script> prettyPrint(); </script>
@@ -129,7 +129,7 @@ module.exports = AnonymousTraversalSource;
129
129
  <br class="clear">
130
130
 
131
131
  <footer>
132
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:03 GMT-0700 (Pacific Daylight Time)
132
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
133
133
  </footer>
134
134
 
135
135
  <script> prettyPrint(); </script>
@@ -166,7 +166,7 @@ module.exports = Bytecode;
166
166
  <br class="clear">
167
167
 
168
168
  <footer>
169
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:03 GMT-0700 (Pacific Daylight Time)
169
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
170
170
  </footer>
171
171
 
172
172
  <script> prettyPrint(); </script>
@@ -1927,7 +1927,7 @@ module.exports = {
1927
1927
  <br class="clear">
1928
1928
 
1929
1929
  <footer>
1930
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:03 GMT-0700 (Pacific Daylight Time)
1930
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
1931
1931
  </footer>
1932
1932
 
1933
1933
  <script> prettyPrint(); </script>
@@ -142,7 +142,7 @@ module.exports = {
142
142
  <br class="clear">
143
143
 
144
144
  <footer>
145
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:04 GMT-0700 (Pacific Daylight Time)
145
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
146
146
  </footer>
147
147
 
148
148
  <script> prettyPrint(); </script>
@@ -163,7 +163,7 @@ module.exports = Translator;
163
163
  <br class="clear">
164
164
 
165
165
  <footer>
166
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:04 GMT-0700 (Pacific Daylight Time)
166
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
167
167
  </footer>
168
168
 
169
169
  <script> prettyPrint(); </script>
@@ -304,6 +304,10 @@ class PathRetractionStrategy extends TraversalStrategy {
304
304
  }
305
305
  }
306
306
 
307
+ /**
308
+ * @deprecated As of release 3.7.7, not replaced. This strategy was added as a temporary way to mimic pre-3.5.0
309
+ * null processing behavior.
310
+ */
307
311
  class ProductiveByStrategy extends TraversalStrategy {
308
312
  /**
309
313
  * @param {Object} [options]
@@ -457,7 +461,7 @@ module.exports = {
457
461
  <br class="clear">
458
462
 
459
463
  <footer>
460
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:03 GMT-0700 (Pacific Daylight Time)
464
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
461
465
  </footer>
462
466
 
463
467
  <script> prettyPrint(); </script>
@@ -122,12 +122,35 @@ class Traversal {
122
122
  }
123
123
 
124
124
  /**
125
- * Async iterator method implementation.
126
- * Returns a promise containing an iterator item.
127
- * @returns {Promise.&lt;{value, done}>}
125
+ * Returns the next result from the traversal.
126
+ *
127
+ * When called without an argument, returns a Promise that resolves to an iterator
128
+ * item ({value, done}), following the async iterator protocol.
129
+ *
130
+ * When called with an amount, returns a Promise that resolves to an Array containing
131
+ * up to {@code amount} result values. The Array form is always used when an amount is
132
+ * supplied, including {@code next(1)}, which resolves to an Array of one value rather
133
+ * than a bare value, matching the behavior of next(n) in the other Gremlin language
134
+ * variants. If fewer results remain, the Array contains only those that remain, and an
135
+ * amount of zero or less yields an empty Array.
136
+ * @param {Number} [amount] The number of results to retrieve.
137
+ * @returns {Promise.&lt;{value, done}>|Promise.&lt;Array>}
128
138
  */
129
- next() {
130
- return this._applyStrategies().then(() => this._getNext());
139
+ next(amount) {
140
+ if (amount === undefined || amount === null) {
141
+ return this._applyStrategies().then(() => this._getNext());
142
+ }
143
+ return this._applyStrategies().then(() => {
144
+ const result = [];
145
+ for (let i = 0; i &lt; amount; i++) {
146
+ const it = this._getNext();
147
+ if (it.done) {
148
+ break;
149
+ }
150
+ result.push(it.value);
151
+ }
152
+ return result;
153
+ });
131
154
  }
132
155
 
133
156
  /**
@@ -583,7 +606,7 @@ module.exports = {
583
606
  <br class="clear">
584
607
 
585
608
  <footer>
586
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:03 GMT-0700 (Pacific Daylight Time)
609
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
587
610
  </footer>
588
611
 
589
612
  <script> prettyPrint(); </script>
@@ -89,6 +89,19 @@ class Element {
89
89
  equals(other) {
90
90
  return other instanceof Element &amp;&amp; this.id === other.id;
91
91
  }
92
+
93
+ /**
94
+ * Groups this element's properties by key.
95
+ * @returns {Object&lt;string, Object[]>} a map of property key to the array of
96
+ * property objects for that key (empty object when there are no properties).
97
+ */
98
+ propertyMap() {
99
+ const map = Object.create(null);
100
+ for (const p of this.properties) {
101
+ (map[p.key] = map[p.key] || []).push(p);
102
+ }
103
+ return map;
104
+ }
92
105
  }
93
106
 
94
107
  class Vertex extends Element {
@@ -224,7 +237,7 @@ module.exports = {
224
237
  <br class="clear">
225
238
 
226
239
  <footer>
227
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:03 GMT-0700 (Pacific Daylight Time)
240
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
228
241
  </footer>
229
242
 
230
243
  <script> prettyPrint(); </script>
@@ -142,7 +142,7 @@ module.exports = DataType;
142
142
  <br class="clear">
143
143
 
144
144
  <footer>
145
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:03 GMT-0700 (Pacific Daylight Time)
145
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
146
146
  </footer>
147
147
 
148
148
  <script> prettyPrint(); </script>
@@ -124,7 +124,7 @@ module.exports = class GraphBinaryReader {
124
124
  <br class="clear">
125
125
 
126
126
  <footer>
127
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:04 GMT-0700 (Pacific Daylight Time)
127
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
128
128
  </footer>
129
129
 
130
130
  <script> prettyPrint(); </script>
@@ -127,7 +127,7 @@ module.exports = class GraphBinaryWriter {
127
127
  <br class="clear">
128
128
 
129
129
  <footer>
130
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:04 GMT-0700 (Pacific Daylight Time)
130
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
131
131
  </footer>
132
132
 
133
133
  <script> prettyPrint(); </script>
@@ -345,7 +345,7 @@ module.exports = {
345
345
  <br class="clear">
346
346
 
347
347
  <footer>
348
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:03 GMT-0700 (Pacific Daylight Time)
348
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
349
349
  </footer>
350
350
 
351
351
  <script> prettyPrint(); </script>
@@ -131,7 +131,15 @@ class OffsetDateTimeSerializer extends TypeSerializer {
131
131
  }
132
132
 
133
133
  deserialize(obj) {
134
- return new Date(obj[valueKey]);
134
+ // An OffsetDateTime value can carry a date-time (e.g. extreme years) that falls outside the range
135
+ // representable by a JavaScript Date. In those cases new Date(...) yields an invalid Date without
136
+ // throwing. Reject such values so unsupported boundary date-times fail deserialization instead of
137
+ // silently producing an unusable Date instance. Mirrors the GraphBinary OffsetDateTime reader.
138
+ const value = new Date(obj[valueKey]);
139
+ if (Number.isNaN(value.getTime())) {
140
+ throw new Error('OffsetDateTime value is outside the range supported by JavaScript Date');
141
+ }
142
+ return value;
135
143
  }
136
144
 
137
145
  canBeUsedFor(value) {
@@ -608,7 +616,7 @@ module.exports = {
608
616
  <br class="clear">
609
617
 
610
618
  <footer>
611
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:03 GMT-0700 (Pacific Daylight Time)
619
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
612
620
  </footer>
613
621
 
614
622
  <script> prettyPrint(); </script>
package/doc/utils.js.html CHANGED
@@ -53,7 +53,7 @@
53
53
 
54
54
  const uuid = require('uuid');
55
55
 
56
- const gremlinVersion = '3.8.1'; // DO NOT MODIFY - Configured automatically by Maven Replacer Plugin
56
+ const gremlinVersion = '3.8.2'; // DO NOT MODIFY - Configured automatically by Maven Replacer Plugin
57
57
 
58
58
  exports.toLong = function toLong(value) {
59
59
  return new Long(value);
@@ -172,7 +172,7 @@ module.exports.DeferredPromise = DeferredPromise;
172
172
  <br class="clear">
173
173
 
174
174
  <footer>
175
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Mon Apr 06 2026 17:24:04 GMT-0700 (Pacific Daylight Time)
175
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Tue Sep 08 2026 14:53:14 GMT-0700 (Pacific Daylight Time)
176
176
  </footer>
177
177
 
178
178
  <script> prettyPrint(); </script>
@@ -276,6 +276,10 @@ class PathRetractionStrategy extends TraversalStrategy {
276
276
  }
277
277
  }
278
278
 
279
+ /**
280
+ * @deprecated As of release 3.7.7, not replaced. This strategy was added as a temporary way to mimic pre-3.5.0
281
+ * null processing behavior.
282
+ */
279
283
  class ProductiveByStrategy extends TraversalStrategy {
280
284
  /**
281
285
  * @param {Object} [options]
@@ -94,12 +94,35 @@ class Traversal {
94
94
  }
95
95
 
96
96
  /**
97
- * Async iterator method implementation.
98
- * Returns a promise containing an iterator item.
99
- * @returns {Promise.<{value, done}>}
97
+ * Returns the next result from the traversal.
98
+ *
99
+ * When called without an argument, returns a Promise that resolves to an iterator
100
+ * item ({value, done}), following the async iterator protocol.
101
+ *
102
+ * When called with an amount, returns a Promise that resolves to an Array containing
103
+ * up to {@code amount} result values. The Array form is always used when an amount is
104
+ * supplied, including {@code next(1)}, which resolves to an Array of one value rather
105
+ * than a bare value, matching the behavior of next(n) in the other Gremlin language
106
+ * variants. If fewer results remain, the Array contains only those that remain, and an
107
+ * amount of zero or less yields an empty Array.
108
+ * @param {Number} [amount] The number of results to retrieve.
109
+ * @returns {Promise.<{value, done}>|Promise.<Array>}
100
110
  */
101
- next() {
102
- return this._applyStrategies().then(() => this._getNext());
111
+ next(amount) {
112
+ if (amount === undefined || amount === null) {
113
+ return this._applyStrategies().then(() => this._getNext());
114
+ }
115
+ return this._applyStrategies().then(() => {
116
+ const result = [];
117
+ for (let i = 0; i < amount; i++) {
118
+ const it = this._getNext();
119
+ if (it.done) {
120
+ break;
121
+ }
122
+ result.push(it.value);
123
+ }
124
+ return result;
125
+ });
103
126
  }
104
127
 
105
128
  /**
@@ -61,6 +61,19 @@ class Element {
61
61
  equals(other) {
62
62
  return other instanceof Element && this.id === other.id;
63
63
  }
64
+
65
+ /**
66
+ * Groups this element's properties by key.
67
+ * @returns {Object<string, Object[]>} a map of property key to the array of
68
+ * property objects for that key (empty object when there are no properties).
69
+ */
70
+ propertyMap() {
71
+ const map = Object.create(null);
72
+ for (const p of this.properties) {
73
+ (map[p.key] = map[p.key] || []).push(p);
74
+ }
75
+ return map;
76
+ }
64
77
  }
65
78
 
66
79
  class Vertex extends Element {
@@ -143,6 +143,15 @@ module.exports = class OffsetDateTimeSerializer {
143
143
  // use UTC time calculated with offset above
144
144
  const v = new Date(Date.UTC(year, month, date, h, m, s, ms));
145
145
 
146
+ // The GraphBinary DateTime/OffsetDateTime wire format can carry values (e.g. extreme years near
147
+ // +/-999999999) that fall outside the range representable by a JavaScript Date. In those cases
148
+ // Date.UTC(...) returns NaN and new Date(NaN) yields an invalid Date without throwing. Reject such
149
+ // values here so unsupported boundary date-times fail deserialization instead of silently producing
150
+ // an unusable Date instance.
151
+ if (Number.isNaN(v.getTime())) {
152
+ throw new Error('{value} is outside the range supported by JavaScript Date');
153
+ }
154
+
146
155
  return { v, len };
147
156
  } catch (err) {
148
157
  throw this.ioc.utils.des_error({ serializer: this, args: arguments, cursor, err });
@@ -103,7 +103,15 @@ class OffsetDateTimeSerializer extends TypeSerializer {
103
103
  }
104
104
 
105
105
  deserialize(obj) {
106
- return new Date(obj[valueKey]);
106
+ // An OffsetDateTime value can carry a date-time (e.g. extreme years) that falls outside the range
107
+ // representable by a JavaScript Date. In those cases new Date(...) yields an invalid Date without
108
+ // throwing. Reject such values so unsupported boundary date-times fail deserialization instead of
109
+ // silently producing an unusable Date instance. Mirrors the GraphBinary OffsetDateTime reader.
110
+ const value = new Date(obj[valueKey]);
111
+ if (Number.isNaN(value.getTime())) {
112
+ throw new Error('OffsetDateTime value is outside the range supported by JavaScript Date');
113
+ }
114
+ return value;
107
115
  }
108
116
 
109
117
  canBeUsedFor(value) {
package/lib/utils.js CHANGED
@@ -25,7 +25,7 @@
25
25
 
26
26
  const uuid = require('uuid');
27
27
 
28
- const gremlinVersion = '3.8.1'; // DO NOT MODIFY - Configured automatically by Maven Replacer Plugin
28
+ const gremlinVersion = '3.8.2'; // DO NOT MODIFY - Configured automatically by Maven Replacer Plugin
29
29
 
30
30
  exports.toLong = function toLong(value) {
31
31
  return new Long(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gremlin",
3
- "version": "3.8.1",
3
+ "version": "3.8.2",
4
4
  "description": "JavaScript Gremlin Language Variant",
5
5
  "author": {
6
6
  "name": "Apache TinkerPop team"
@@ -19,26 +19,26 @@
19
19
  "license": "Apache-2.0",
20
20
  "dependencies": {
21
21
  "buffer": "^6.0.3",
22
- "eventemitter3": "^5.0.1",
23
- "readable-stream": "^4.5.2",
24
- "uuid": "^9.0.1",
25
- "ws": "^8.16.0"
22
+ "eventemitter3": "^5.0.4",
23
+ "readable-stream": "^4.7.0",
24
+ "uuid": "^11.1.1",
25
+ "ws": "^8.21.1"
26
26
  },
27
27
  "devDependencies": {
28
28
  "chai": "~4.5.0",
29
- "chai-string": "~1.5.0",
29
+ "chai-string": "~1.6.0",
30
30
  "colors": "1.4.0",
31
31
  "cross-env": "^10.1.0",
32
32
  "@cucumber/cucumber": "~12.7.0",
33
33
  "@eslint/js": "^9.16.0",
34
34
  "eslint": "^9.36.0",
35
- "eslint-config-prettier": "^10.0.1",
36
- "eslint-plugin-prettier": "^5.0.0",
35
+ "eslint-config-prettier": "^10.1.8",
36
+ "eslint-plugin-prettier": "^5.5.6",
37
37
  "globals": "^15.14.0",
38
38
  "jsdoc": "^4.0.5",
39
39
  "js-yaml": "^3.14.2",
40
- "mocha": "^11.7.5",
41
- "prettier": "^3.0.0"
40
+ "mocha": "^11.7.6",
41
+ "prettier": "^3.9.6"
42
42
  },
43
43
  "repository": {
44
44
  "type": "git",