gremlin 3.5.2 → 3.5.3

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 (88) hide show
  1. package/.eslintrc.js +154 -0
  2. package/.prettierrc.js +29 -0
  3. package/Gruntfile.js +15 -16
  4. package/doc/AnonymousTraversalSource.html +4 -4
  5. package/doc/Authenticator.html +1 -1
  6. package/doc/Bytecode.html +6 -6
  7. package/doc/Client.html +137 -63
  8. package/doc/Connection.html +88 -4
  9. package/doc/DriverRemoteConnection.html +10 -10
  10. package/doc/EdgeLabelVerificationStrategy.html +1 -1
  11. package/doc/Graph.html +1 -1
  12. package/doc/GraphSON2Reader.html +3 -3
  13. package/doc/GraphSON2Writer.html +2 -2
  14. package/doc/GraphSON3Reader.html +2 -2
  15. package/doc/GraphSON3Writer.html +2 -2
  16. package/doc/GraphTraversal.html +106 -106
  17. package/doc/GraphTraversalSource.html +18 -18
  18. package/doc/HaltedTraverserStrategy.html +2 -2
  19. package/doc/MatchAlgorithmStrategy.html +2 -2
  20. package/doc/P.html +12 -12
  21. package/doc/PartitionStrategy.html +2 -2
  22. package/doc/Path.html +1 -1
  23. package/doc/PlainTextSaslAuthenticator.html +1 -1
  24. package/doc/ProductiveByStrategy.html +1 -1
  25. package/doc/RemoteConnection.html +9 -9
  26. package/doc/RemoteStrategy.html +3 -3
  27. package/doc/RemoteTraversal.html +2 -2
  28. package/doc/ReservedKeysVerificationStrategy.html +2 -2
  29. package/doc/ResponseError.html +1 -1
  30. package/doc/ResultSet.html +6 -6
  31. package/doc/SaslAuthenticator.html +1 -1
  32. package/doc/SaslMechanismBase.html +1 -1
  33. package/doc/SaslMechanismPlain.html +5 -5
  34. package/doc/SeedStrategy.html +2 -2
  35. package/doc/SubgraphStrategy.html +2 -2
  36. package/doc/TextP.html +9 -9
  37. package/doc/Transaction.html +5 -5
  38. package/doc/Translator.html +1 -1
  39. package/doc/TraversalStrategies.html +4 -4
  40. package/doc/TraversalStrategy.html +2 -2
  41. package/doc/TypeSerializer.html +1 -1
  42. package/doc/driver_auth_authenticator.js.html +3 -3
  43. package/doc/driver_auth_mechanisms_sasl-mechanism-base.js.html +2 -2
  44. package/doc/driver_auth_mechanisms_sasl-mechanism-plain.js.html +25 -16
  45. package/doc/driver_auth_plain-text-sasl-authenticator.js.html +6 -6
  46. package/doc/driver_auth_sasl-authenticator.js.html +2 -2
  47. package/doc/driver_client.js.html +69 -23
  48. package/doc/driver_connection.js.html +107 -88
  49. package/doc/driver_driver-remote-connection.js.html +11 -10
  50. package/doc/driver_remote-connection.js.html +3 -4
  51. package/doc/driver_response-error.js.html +4 -3
  52. package/doc/driver_result-set.js.html +3 -3
  53. package/doc/global.html +199 -2
  54. package/doc/index.html +1 -1
  55. package/doc/process_anonymous-traversal.js.html +3 -3
  56. package/doc/process_bytecode.js.html +10 -8
  57. package/doc/process_graph-traversal.js.html +193 -142
  58. package/doc/process_transaction.js.html +15 -8
  59. package/doc/process_translator.js.html +13 -10
  60. package/doc/process_traversal-strategy.js.html +59 -53
  61. package/doc/process_traversal.js.html +100 -107
  62. package/doc/structure_graph.js.html +6 -6
  63. package/doc/structure_io_graph-serializer.js.html +64 -17
  64. package/doc/structure_io_type-serializers.js.html +85 -88
  65. package/index.js +5 -5
  66. package/lib/driver/auth/authenticator.js +2 -2
  67. package/lib/driver/auth/mechanisms/sasl-mechanism-base.js +1 -1
  68. package/lib/driver/auth/mechanisms/sasl-mechanism-plain.js +24 -15
  69. package/lib/driver/auth/plain-text-sasl-authenticator.js +5 -5
  70. package/lib/driver/auth/sasl-authenticator.js +1 -1
  71. package/lib/driver/client.js +68 -22
  72. package/lib/driver/connection.js +106 -87
  73. package/lib/driver/driver-remote-connection.js +10 -9
  74. package/lib/driver/remote-connection.js +2 -3
  75. package/lib/driver/response-error.js +2 -2
  76. package/lib/driver/result-set.js +1 -2
  77. package/lib/process/anonymous-traversal.js +1 -2
  78. package/lib/process/bytecode.js +9 -7
  79. package/lib/process/graph-traversal.js +191 -141
  80. package/lib/process/transaction.js +13 -7
  81. package/lib/process/translator.js +11 -9
  82. package/lib/process/traversal-strategy.js +57 -52
  83. package/lib/process/traversal.js +99 -106
  84. package/lib/structure/graph.js +5 -5
  85. package/lib/structure/io/graph-serializer.js +62 -16
  86. package/lib/structure/io/type-serializers.js +84 -87
  87. package/lib/utils.js +15 -10
  88. package/package.json +10 -5
@@ -20,9 +20,9 @@
20
20
  /**
21
21
  * @author Jorge Bay Gondra
22
22
  */
23
+
23
24
  'use strict';
24
25
 
25
- const utils = require('../utils');
26
26
  const itemDone = Object.freeze({ value: null, done: true });
27
27
  const asyncIteratorSymbol = Symbol.asyncIterator || Symbol('@@asyncIterator');
28
28
 
@@ -63,19 +63,21 @@ class Traversal {
63
63
  }
64
64
  return result;
65
65
  });
66
- };
66
+ }
67
67
 
68
68
  /**
69
69
  * Determines if there are any more items to iterate from the traversal.
70
70
  * @returns {Promise.<boolean>}
71
71
  */
72
- hasNext() {
73
- return this._applyStrategies().then(() => {
74
- return this.traversers && this.traversers.length > 0 &&
75
- this._traversersIteratorIndex < this.traversers.length &&
76
- this.traversers[this._traversersIteratorIndex].bulk > 0;
77
- });
78
- }
72
+ hasNext() {
73
+ return this._applyStrategies().then(
74
+ () =>
75
+ this.traversers &&
76
+ this.traversers.length > 0 &&
77
+ this._traversersIteratorIndex < this.traversers.length &&
78
+ this.traversers[this._traversersIteratorIndex].bulk > 0,
79
+ );
80
+ }
79
81
 
80
82
  /**
81
83
  * Iterates all Traverser instances in the traversal.
@@ -86,6 +88,7 @@ class Traversal {
86
88
  return this._applyStrategies().then(() => {
87
89
  let it;
88
90
  while ((it = this._getNext()) && !it.done) {
91
+ //
89
92
  }
90
93
  });
91
94
  }
@@ -105,7 +108,7 @@ class Traversal {
105
108
  */
106
109
  _getNext() {
107
110
  while (this.traversers && this._traversersIteratorIndex < this.traversers.length) {
108
- let traverser = this.traversers[this._traversersIteratorIndex];
111
+ const traverser = this.traversers[this._traversersIteratorIndex];
109
112
  if (traverser.bulk > 0) {
110
113
  traverser.bulk--;
111
114
  return { value: traverser.object, done: false };
@@ -120,14 +123,14 @@ class Traversal {
120
123
  // Apply strategies only once
121
124
  return this._traversalStrategiesPromise;
122
125
  }
123
- return this._traversalStrategiesPromise = this.traversalStrategies.applyStrategies(this);
126
+ return (this._traversalStrategiesPromise = this.traversalStrategies.applyStrategies(this));
124
127
  }
125
128
 
126
129
  /**
127
130
  * Returns step instructions during JSON serialization
128
131
  * @returns {Array}
129
132
  */
130
- toJSON(){
133
+ toJSON() {
131
134
  return this.bytecode.stepInstructions;
132
135
  }
133
136
 
@@ -137,106 +140,103 @@ class Traversal {
137
140
  */
138
141
  toString() {
139
142
  return this.bytecode.toString();
140
- };
143
+ }
141
144
  }
142
145
 
143
-
144
146
  class IO {
147
+ static get graphml() {
148
+ return 'graphml';
149
+ }
145
150
 
146
- static get graphml() {
147
- return "graphml"
148
- }
149
-
150
- static get graphson() {
151
- return "graphson"
152
- }
151
+ static get graphson() {
152
+ return 'graphson';
153
+ }
153
154
 
154
- static get gryo() {
155
- return "gryo"
156
- }
155
+ static get gryo() {
156
+ return 'gryo';
157
+ }
157
158
 
158
- static get reader() {
159
- return "~tinkerpop.io.reader"
160
- }
159
+ static get reader() {
160
+ return '~tinkerpop.io.reader';
161
+ }
161
162
 
162
- static get registry() {
163
- return "~tinkerpop.io.registry"
164
- }
163
+ static get registry() {
164
+ return '~tinkerpop.io.registry';
165
+ }
165
166
 
166
- static get writer() {
167
- return "~tinkerpop.io.writer"
168
- }
167
+ static get writer() {
168
+ return '~tinkerpop.io.writer';
169
+ }
169
170
  }
170
171
 
172
+ // eslint-disable-next-line no-unused-vars
171
173
  class ConnectedComponent {
174
+ static get component() {
175
+ return 'gremlin.connectedComponentVertexProgram.component';
176
+ }
172
177
 
173
- static get component() {
174
- return "gremlin.connectedComponentVertexProgram.component"
175
- }
176
-
177
- static get edges() {
178
- return "~tinkerpop.connectedComponent.edges"
179
- }
178
+ static get edges() {
179
+ return '~tinkerpop.connectedComponent.edges';
180
+ }
180
181
 
181
- static get propertyName() {
182
- return "~tinkerpop.connectedComponent.propertyName"
183
- }
182
+ static get propertyName() {
183
+ return '~tinkerpop.connectedComponent.propertyName';
184
+ }
184
185
  }
185
186
 
187
+ // eslint-disable-next-line no-unused-vars
186
188
  class ShortestPath {
189
+ static get distance() {
190
+ return '~tinkerpop.shortestPath.distance';
191
+ }
187
192
 
188
- static get distance() {
189
- return "~tinkerpop.shortestPath.distance"
190
- }
191
-
192
- static get edges() {
193
- return "~tinkerpop.shortestPath.edges"
194
- }
193
+ static get edges() {
194
+ return '~tinkerpop.shortestPath.edges';
195
+ }
195
196
 
196
- static get includeEdges() {
197
- return "~tinkerpop.shortestPath.includeEdges"
198
- }
197
+ static get includeEdges() {
198
+ return '~tinkerpop.shortestPath.includeEdges';
199
+ }
199
200
 
200
- static get maxDistance() {
201
- return "~tinkerpop.shortestPath.maxDistance"
202
- }
201
+ static get maxDistance() {
202
+ return '~tinkerpop.shortestPath.maxDistance';
203
+ }
203
204
 
204
- static get target() {
205
- return "~tinkerpop.shortestPath.target"
206
- }
205
+ static get target() {
206
+ return '~tinkerpop.shortestPath.target';
207
+ }
207
208
  }
208
209
 
210
+ // eslint-disable-next-line no-unused-vars
209
211
  class PageRank {
212
+ static get edges() {
213
+ return '~tinkerpop.pageRank.edges';
214
+ }
210
215
 
211
- static get edges() {
212
- return "~tinkerpop.pageRank.edges"
213
- }
214
-
215
- static get propertyName() {
216
- return "~tinkerpop.pageRank.propertyName"
217
- }
216
+ static get propertyName() {
217
+ return '~tinkerpop.pageRank.propertyName';
218
+ }
218
219
 
219
- static get times() {
220
- return "~tinkerpop.pageRank.times"
221
- }
220
+ static get times() {
221
+ return '~tinkerpop.pageRank.times';
222
+ }
222
223
  }
223
224
 
225
+ // eslint-disable-next-line no-unused-vars
224
226
  class PeerPressure {
227
+ static get edges() {
228
+ return '~tinkerpop.peerPressure.edges';
229
+ }
225
230
 
226
- static get edges() {
227
- return "~tinkerpop.peerPressure.edges"
228
- }
229
-
230
- static get propertyName() {
231
- return "~tinkerpop.peerPressure.propertyName"
232
- }
231
+ static get propertyName() {
232
+ return '~tinkerpop.peerPressure.propertyName';
233
+ }
233
234
 
234
- static get times() {
235
- return "~tinkerpop.peerPressure.times"
236
- }
235
+ static get times() {
236
+ return '~tinkerpop.peerPressure.times';
237
+ }
237
238
  }
238
239
 
239
-
240
240
  class P {
241
241
  /**
242
242
  * Represents an operation.
@@ -253,16 +253,16 @@ class P {
253
253
  * @returns {string}
254
254
  */
255
255
  toString() {
256
- function formatValue(value){
256
+ function formatValue(value) {
257
257
  if (Array.isArray(value)) {
258
- let acc = [];
258
+ const acc = [];
259
259
  for (const item of value) {
260
260
  acc.push(formatValue(item));
261
261
  }
262
262
  return acc;
263
263
  }
264
- if (value && typeof value === "string"){
265
- return "'" + value + "'";
264
+ if (value && typeof value === 'string') {
265
+ return `'${value}'`;
266
266
  }
267
267
  return value;
268
268
  }
@@ -283,21 +283,18 @@ class P {
283
283
 
284
284
  static within(...args) {
285
285
  if (args.length === 1 && Array.isArray(args[0])) {
286
- return new P("within", args[0], null);
287
- } else {
288
- return new P("within", args, null);
286
+ return new P('within', args[0], null);
289
287
  }
288
+ return new P('within', args, null);
290
289
  }
291
290
 
292
291
  static without(...args) {
293
292
  if (args.length === 1 && Array.isArray(args[0])) {
294
- return new P("without", args[0], null);
295
- } else {
296
- return new P("without", args, null);
293
+ return new P('without', args[0], null);
297
294
  }
295
+ return new P('without', args, null);
298
296
  }
299
297
 
300
-
301
298
  /** @param {...Object} args */
302
299
  static between(...args) {
303
300
  return createP('between', args);
@@ -352,12 +349,11 @@ class P {
352
349
  static test(...args) {
353
350
  return createP('test', args);
354
351
  }
355
-
356
352
  }
357
353
 
358
354
  function createP(operator, args) {
359
355
  args.unshift(null, operator);
360
- return new (Function.prototype.bind.apply(P, args));
356
+ return new (Function.prototype.bind.apply(P, args))();
361
357
  }
362
358
 
363
359
  class TextP {
@@ -376,9 +372,9 @@ class TextP {
376
372
  * @returns {string}
377
373
  */
378
374
  toString() {
379
- function formatValue(value){
380
- if (value && typeof value === "string"){
381
- return "'" + value + "'";
375
+ function formatValue(value) {
376
+ if (value && typeof value === 'string') {
377
+ return `'${value}'`;
382
378
  }
383
379
  return value;
384
380
  }
@@ -426,12 +422,11 @@ class TextP {
426
422
  static startingWith(...args) {
427
423
  return createTextP('startingWith', args);
428
424
  }
429
-
430
425
  }
431
426
 
432
427
  function createTextP(operator, args) {
433
428
  args.unshift(null, operator);
434
- return new (Function.prototype.bind.apply(TextP, args));
429
+ return new (Function.prototype.bind.apply(TextP, args))();
435
430
  }
436
431
 
437
432
  class Traverser {
@@ -441,26 +436,24 @@ class Traverser {
441
436
  }
442
437
  }
443
438
 
444
- class TraversalSideEffects {
445
-
446
- }
439
+ class TraversalSideEffects {}
447
440
 
448
441
  const withOptions = {
449
- tokens: "~tinkerpop.valueMap.tokens",
442
+ tokens: '~tinkerpop.valueMap.tokens',
450
443
  none: 0,
451
444
  ids: 1,
452
445
  labels: 2,
453
446
  keys: 4,
454
447
  values: 8,
455
448
  all: 15,
456
- indexer: "~tinkerpop.index.indexer",
449
+ indexer: '~tinkerpop.index.indexer',
457
450
  list: 0,
458
- map: 1
451
+ map: 1,
459
452
  };
460
453
 
461
454
  function toEnum(typeName, keys) {
462
455
  const result = {};
463
- keys.split(' ').forEach(k => {
456
+ keys.split(' ').forEach((k) => {
464
457
  let jsKey = k;
465
458
  if (jsKey === jsKey.toUpperCase()) {
466
459
  jsKey = jsKey.toLowerCase();
@@ -501,5 +494,5 @@ module.exports = {
501
494
  pick: toEnum('Pick', 'any none'),
502
495
  pop: toEnum('Pop', 'all first last mixed'),
503
496
  scope: toEnum('Scope', 'global local'),
504
- t: toEnum('T', 'id key label value')
497
+ t: toEnum('T', 'id key label value'),
505
498
  };
@@ -57,7 +57,7 @@ class Element {
57
57
  * @returns {boolean}
58
58
  */
59
59
  equals(other) {
60
- return (other instanceof Element) && this.id === other.id;
60
+ return other instanceof Element && this.id === other.id;
61
61
  }
62
62
  }
63
63
 
@@ -119,7 +119,7 @@ class Property {
119
119
  }
120
120
 
121
121
  equals(other) {
122
- return (other instanceof Property) && this.key === other.key && this.value === other.value;
122
+ return other instanceof Property && this.key === other.key && this.value === other.value;
123
123
  }
124
124
  }
125
125
 
@@ -136,7 +136,7 @@ class Path {
136
136
  }
137
137
 
138
138
  toString() {
139
- return `path[${(this.objects || []).join(", ")}]`;
139
+ return `path[${(this.objects || []).join(', ')}]`;
140
140
  }
141
141
 
142
142
  equals(other) {
@@ -162,7 +162,7 @@ function areEqual(obj1, obj2) {
162
162
  return false;
163
163
  }
164
164
  for (let i = 0; i < obj1.length; i++) {
165
- if (!areEqual(obj1[i], obj2[i])){
165
+ if (!areEqual(obj1[i], obj2[i])) {
166
166
  return false;
167
167
  }
168
168
  }
@@ -186,5 +186,5 @@ module.exports = {
186
186
  Path,
187
187
  Property,
188
188
  Vertex,
189
- VertexProperty
189
+ VertexProperty,
190
190
  };
@@ -23,12 +23,12 @@
23
23
  'use strict';
24
24
 
25
25
  const typeSerializers = require('./type-serializers');
26
+ const Bytecode = require('../../process/bytecode');
26
27
 
27
28
  /**
28
29
  * GraphSON2 writer.
29
30
  */
30
31
  class GraphSON2Writer {
31
-
32
32
  /**
33
33
  * @param {Object} [options]
34
34
  * @param {Object} [options.serializers] An object used as an associative array with GraphSON 2 type name as keys and
@@ -38,7 +38,7 @@ class GraphSON2Writer {
38
38
  constructor(options) {
39
39
  this._options = options || {};
40
40
  // Create instance of the default serializers
41
- this._serializers = this.getDefaultSerializers().map(serializerConstructor => {
41
+ this._serializers = this.getDefaultSerializers().map((serializerConstructor) => {
42
42
  const s = new serializerConstructor();
43
43
  s.writer = this;
44
44
  return s;
@@ -46,7 +46,7 @@ class GraphSON2Writer {
46
46
 
47
47
  const customSerializers = this._options.serializers || {};
48
48
 
49
- Object.keys(customSerializers).forEach(key => {
49
+ Object.keys(customSerializers).forEach((key) => {
50
50
  const s = customSerializers[key];
51
51
  if (!s.serialize) {
52
52
  return;
@@ -83,7 +83,7 @@ class GraphSON2Writer {
83
83
  if (Array.isArray(value)) {
84
84
  // We need to handle arrays when there is no serializer
85
85
  // for older versions of GraphSON
86
- return value.map(item => this.adaptObject(item));
86
+ return value.map((item) => this.adaptObject(item));
87
87
  }
88
88
 
89
89
  // Default (strings / objects / ...)
@@ -98,6 +98,48 @@ class GraphSON2Writer {
98
98
  write(obj) {
99
99
  return JSON.stringify(this.adaptObject(obj));
100
100
  }
101
+
102
+ writeRequest({ requestId, op, processor, args }) {
103
+ const req = {
104
+ requestId: { '@type': 'g:UUID', '@value': requestId },
105
+ op,
106
+ processor,
107
+ args: this._adaptArgs(args, true),
108
+ };
109
+
110
+ if (req.args['gremlin'] instanceof Bytecode) {
111
+ req.args['gremlin'] = this.adaptObject(req.args['gremlin']);
112
+ }
113
+
114
+ return Buffer.from(JSON.stringify(req));
115
+ }
116
+
117
+ /**
118
+ * Takes the given args map and ensures all arguments are passed through to adaptObject
119
+ * @param {Object} args Map of arguments to process.
120
+ * @param {Boolean} protocolLevel Determines whether it's a protocol level binding.
121
+ * @returns {Object}
122
+ * @private
123
+ */
124
+ _adaptArgs(args, protocolLevel) {
125
+ if (args instanceof Object) {
126
+ const newObj = {};
127
+ Object.keys(args).forEach((key) => {
128
+ // bindings key (at the protocol-level needs special handling. without this, it wraps the generated Map
129
+ // in another map for types like EnumValue. Could be a nicer way to do this but for now it's solving the
130
+ // problem with script submission of non JSON native types
131
+ if (protocolLevel && key === 'bindings') {
132
+ newObj[key] = this._adaptArgs(args[key], false);
133
+ } else {
134
+ newObj[key] = this.adaptObject(args[key]);
135
+ }
136
+ });
137
+
138
+ return newObj;
139
+ }
140
+
141
+ return args;
142
+ }
101
143
  }
102
144
 
103
145
  /**
@@ -125,7 +167,7 @@ class GraphSON2Reader {
125
167
  this._deserializers = {};
126
168
 
127
169
  const defaultDeserializers = this.getDefaultDeserializers();
128
- Object.keys(defaultDeserializers).forEach(typeName => {
170
+ Object.keys(defaultDeserializers).forEach((typeName) => {
129
171
  const serializerConstructor = defaultDeserializers[typeName];
130
172
  const s = new serializerConstructor();
131
173
  s.reader = this;
@@ -134,7 +176,7 @@ class GraphSON2Reader {
134
176
 
135
177
  if (this._options.serializers) {
136
178
  const customSerializers = this._options.serializers || {};
137
- Object.keys(customSerializers).forEach(key => {
179
+ Object.keys(customSerializers).forEach((key) => {
138
180
  const s = customSerializers[key];
139
181
  if (!s.deserialize) {
140
182
  return;
@@ -161,7 +203,7 @@ class GraphSON2Reader {
161
203
  return null;
162
204
  }
163
205
  if (Array.isArray(obj)) {
164
- return obj.map(item => this.read(item));
206
+ return obj.map((item) => this.read(item));
165
207
  }
166
208
  const type = obj[typeSerializers.typeKey];
167
209
  if (type) {
@@ -179,6 +221,10 @@ class GraphSON2Reader {
179
221
  return obj;
180
222
  }
181
223
 
224
+ readResponse(buffer) {
225
+ return this.read(JSON.parse(buffer.toString()));
226
+ }
227
+
182
228
  _deserializeObject(obj) {
183
229
  const keys = Object.keys(obj);
184
230
  const result = {};
@@ -201,9 +247,9 @@ class GraphSON3Reader extends GraphSON2Reader {
201
247
  const graphSON2Deserializers = {
202
248
  'g:Traverser': typeSerializers.TraverserSerializer,
203
249
  'g:TraversalStrategy': typeSerializers.TraversalStrategySerializer,
204
- 'g:Int32': typeSerializers.NumberSerializer,
205
- 'g:Int64': typeSerializers.NumberSerializer,
206
- 'g:Float': typeSerializers.NumberSerializer,
250
+ 'g:Int32': typeSerializers.NumberSerializer,
251
+ 'g:Int64': typeSerializers.NumberSerializer,
252
+ 'g:Float': typeSerializers.NumberSerializer,
207
253
  'g:Double': typeSerializers.NumberSerializer,
208
254
  'g:Date': typeSerializers.DateSerializer,
209
255
  'g:Direction': typeSerializers.DirectionSerializer,
@@ -214,13 +260,13 @@ const graphSON2Deserializers = {
214
260
  'g:Path': typeSerializers.Path3Serializer,
215
261
  'g:TextP': typeSerializers.TextPSerializer,
216
262
  'g:T': typeSerializers.TSerializer,
217
- 'g:BulkSet': typeSerializers.BulkSetSerializer
263
+ 'g:BulkSet': typeSerializers.BulkSetSerializer,
218
264
  };
219
265
 
220
266
  const graphSON3Deserializers = Object.assign({}, graphSON2Deserializers, {
221
267
  'g:List': typeSerializers.ListSerializer,
222
268
  'g:Set': typeSerializers.SetSerializer,
223
- 'g:Map': typeSerializers.MapSerializer
269
+ 'g:Map': typeSerializers.MapSerializer,
224
270
  });
225
271
 
226
272
  const graphSON2Serializers = [
@@ -235,13 +281,13 @@ const graphSON2Serializers = [
235
281
  typeSerializers.EnumSerializer,
236
282
  typeSerializers.VertexSerializer,
237
283
  typeSerializers.EdgeSerializer,
238
- typeSerializers.LongSerializer
284
+ typeSerializers.LongSerializer,
239
285
  ];
240
286
 
241
287
  const graphSON3Serializers = graphSON2Serializers.concat([
242
288
  typeSerializers.ListSerializer,
243
289
  typeSerializers.SetSerializer,
244
- typeSerializers.MapSerializer
290
+ typeSerializers.MapSerializer,
245
291
  ]);
246
292
 
247
293
  module.exports = {
@@ -250,5 +296,5 @@ module.exports = {
250
296
  GraphSON2Writer,
251
297
  GraphSON2Reader,
252
298
  GraphSONWriter: GraphSON3Writer,
253
- GraphSONReader: GraphSON3Reader
254
- };
299
+ GraphSONReader: GraphSON3Reader,
300
+ };