kirill-stepanishin opened a new pull request, #3312: URL: https://github.com/apache/tinkerpop/pull/3312
## Update JS driver to GraphBinary v4 Migrates the gremlin-javascript GraphBinary serialization layer from v1 to v4 and replaces the test suite. ### Serializer changes **Removed serializer files:** Traverser, P, TextP, Lambda, TraversalStrategy, BulkSet, OffsetDateTime, LongSerializerNg **Removed DataType constants (had serializer implementations):** Traverser (0x21), P (0x1e), TextP (0x28), Lambda (0x1d), TraversalStrategy (0x29), BulkSet (0x2a), Timestamp (0x05), Class (0x06), Barrier (0x13), Binding (0x14), Bytecode (0x15), Cardinality (0x16), Column (0x17), Operator (0x19), Order (0x1a), Pick (0x1b), Pop (0x1c), Scope (0x1f), OffsetDateTime (0x88) **Removed DataType constants (no serializer implementations existed):** Metrics (0x2c), TraversalMetrics (0x2d), Merge (0x2e), DT (0x2f), GType (0x30), InetAddress (0x82), Instant (0x83), LocalDate (0x84), LocalDateTime (0x85), LocalTime (0x86), MonthDay (0x87), OffsetTime (0x89), Period (0x8a), Year (0x8b), YearMonth (0x8c), ZonedDateTime (0x8d), ZoneOffset (0x8e), Custom (0x00) **Added:** Marker (0xfd), StubSerializer for Tree (0x2b), Graph (0x10), CompositePDT (0xf0), PrimitivePDT (0xf1) **Renamed:** ByteBufferSerializer → BinarySerializer (0x25), `DATE` constant → `DATETIME` (same code 0x04) **Replaced:** DateSerializer and OffsetDateTimeSerializer both removed, replaced by new DateTimeSerializer (0x04) with component format (year/month/day/nanos/offset — 18 bytes) instead of epoch millis **Modified:** - Byte: unsigned → signed (writeUInt8 → writeInt8) - EnumSerializer: narrowed to Direction (0x18) and T (0x20) only, uses fully-qualified string values - List/Set: value_flag=0x02 indicates bulked format - Map: value_flag=0x02 indicates ordered, value_flag=0x01 returns null - Edge/Vertex/VertexProperty: labels serialize as List\<String\> on the wire. Properties field always writes empty List instead of null — properties on graph objects are lost during serialization. ### Test rewrite Replaced per-serializer tests with a model-based approach: - `model.js` / `model-test.js` — validates `.gbin` reference files with three modes: `run` (byte-exact), `runWriteRead` (double round-trip idempotency), `runRead` (deserialize-only) - `error-cases-test.js` — malformed input cases consolidated from old per-serializer tests - `type-detection-test.js` — AnySerializer dispatch, canBeUsedFor, number routing boundaries, round-trip extras - `null-handling-test.js` — null/undefined per type in both fully-qualified and bare formats **Note:** GraphBinaryReader and GraphBinaryWriter are not updated in this PR. They will be migrated to the v4 message framing format in a future PR, as they depend on other changes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
