Stephen Mallette created TINKERPOP-3307:
-------------------------------------------
Summary: CardinalityValue not exported from gremlin-javascript
public API
Key: TINKERPOP-3307
URL: https://issues.apache.org/jira/browse/TINKERPOP-3307
Project: TinkerPop
Issue Type: Improvement
Components: javascript
Affects Versions: 3.7.7
Reporter: Stephen Mallette
Assignee: Stephen Mallette
CardinalityValue was added in 3.7.0 (TINKERPOP-2957) so that mergeV() and
property(Map) can take a cardinality with each value, e.g.
CardinalityValue.list(33). The class is defined and exported in
lib/process/graph-traversal.js, but it was never added to the process namespace
in the package's top-level index.js (lib/index.ts on master). As a result:
{code}
const gremlin = require('gremlin');
gremlin.process.CardinalityValue // undefined
{code}
The reference docs (Gremlin-JavaScript "Common Imports" and "Differences") tell
users to get it from gremlin.process.CardinalityValue, and that doesn't work.
Users can only reach it through an unsupported deep import of
gremlin/lib/process/graph-traversal. The Gherkin tests don't catch the problem
because the generated test/cucumber/gremlin.js loads CardinalityValue straight
from the internal graph-traversal module, not through the public entry point.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)