@graphty/graph-io 0.3.33 → 0.3.34

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 (47) hide show
  1. package/dist/chunks/{exporter-jp43hhXk.js → exporter-CkPnJCXU.js} +34 -10
  2. package/dist/chunks/exporter-CkPnJCXU.js.map +1 -0
  3. package/dist/chunks/{exporter-BkkfMWGQ.js → exporter-LZTIAzkS.js} +14 -2
  4. package/dist/chunks/{exporter-BkkfMWGQ.js.map → exporter-LZTIAzkS.js.map} +1 -1
  5. package/dist/chunks/{importer-BESct_Xz.js → importer-C1VMuEBQ.js} +2 -2
  6. package/dist/chunks/importer-C1VMuEBQ.js.map +1 -0
  7. package/dist/chunks/{importer-DoSz--Ip.js → importer-DvPvd4Yy.js} +14 -7
  8. package/dist/chunks/importer-DvPvd4Yy.js.map +1 -0
  9. package/dist/cx.js +1 -1
  10. package/dist/graph-io.js +8 -8
  11. package/dist/json.js +1 -1
  12. package/dist/obo.js +1 -1
  13. package/dist/pajek.js +1 -1
  14. package/dist/src/formats/cx/exporter.js +1 -1
  15. package/dist/src/formats/cx/exporter.js.map +1 -1
  16. package/dist/src/formats/json/exporter.d.ts +2 -0
  17. package/dist/src/formats/json/exporter.d.ts.map +1 -1
  18. package/dist/src/formats/json/exporter.js +2 -0
  19. package/dist/src/formats/json/exporter.js.map +1 -1
  20. package/dist/src/formats/json/obographs-export.d.ts +2 -0
  21. package/dist/src/formats/json/obographs-export.d.ts.map +1 -1
  22. package/dist/src/formats/json/obographs-export.js +5 -0
  23. package/dist/src/formats/json/obographs-export.js.map +1 -1
  24. package/dist/src/formats/obo/exporter.d.ts +2 -0
  25. package/dist/src/formats/obo/exporter.d.ts.map +1 -1
  26. package/dist/src/formats/obo/exporter.js +5 -0
  27. package/dist/src/formats/obo/exporter.js.map +1 -1
  28. package/dist/src/formats/obo/syntax.d.ts.map +1 -1
  29. package/dist/src/formats/obo/syntax.js +39 -10
  30. package/dist/src/formats/obo/syntax.js.map +1 -1
  31. package/dist/src/formats/pajek/exporter.d.ts.map +1 -1
  32. package/dist/src/formats/pajek/exporter.js +2 -4
  33. package/dist/src/formats/pajek/exporter.js.map +1 -1
  34. package/dist/src/formats/pajek/syntax.d.ts.map +1 -1
  35. package/dist/src/formats/pajek/syntax.js +12 -2
  36. package/dist/src/formats/pajek/syntax.js.map +1 -1
  37. package/package.json +1 -1
  38. package/src/formats/cx/exporter.ts +1 -1
  39. package/src/formats/json/exporter.ts +2 -0
  40. package/src/formats/json/obographs-export.ts +10 -0
  41. package/src/formats/obo/exporter.ts +10 -0
  42. package/src/formats/obo/syntax.ts +42 -9
  43. package/src/formats/pajek/exporter.ts +2 -4
  44. package/src/formats/pajek/syntax.ts +12 -2
  45. package/dist/chunks/exporter-jp43hhXk.js.map +0 -1
  46. package/dist/chunks/importer-BESct_Xz.js.map +0 -1
  47. package/dist/chunks/importer-DoSz--Ip.js.map +0 -1
@@ -3819,7 +3819,9 @@ const OBOGRAPHS_LOSS = Object.freeze({
3819
3819
  /** A node id or relation is written as an IRI the importer's default `oboIds: "curie"` reads back as a different id. */
3820
3820
  ID_CHANGED: "W_OBOGRAPHS_ID_CHANGED",
3821
3821
  /** A `property_value` with an xsd datatype: basicPropertyValues have no datatype, so it reads back without one. */
3822
- DATATYPE_DROPPED: "W_OBOGRAPHS_DATATYPE_DROPPED"
3822
+ DATATYPE_DROPPED: "W_OBOGRAPHS_DATATYPE_DROPPED",
3823
+ /** A graph without a node `type` column is written with CLASS nodes and reads back with a `type` column holding Term. */
3824
+ TYPE_GAINED: "W_OBOGRAPHS_TYPE_GAINED"
3823
3825
  });
3824
3826
  const OBOGRAPHS_SHARED_LOSS = Object.freeze({
3825
3827
  /** A node column outside the OBO vocabulary reads back inside the `property_value` column. */
@@ -4224,6 +4226,14 @@ ${settings.indent}` : "";
4224
4226
  const { snapshot, rows, label, note } = this;
4225
4227
  const type = this.placed.get("type");
4226
4228
  const typedefs = type === void 0 ? 0 : rows.filter((i) => type.isSet(i) && type.value(i) === "Typedef").length;
4229
+ if (rows.length > 0 && snapshot.nodes.get("type") === null) {
4230
+ note(
4231
+ OBOGRAPHS_LOSS.TYPE_GAINED,
4232
+ `${rows.length} node${plural(rows.length)} ${agree(rows.length, "is", "are")} written with the type CLASS and ${agree(rows.length, "reads", "read")} back with the type Term in a new node column "type"`,
4233
+ null,
4234
+ rows.length
4235
+ );
4236
+ }
4227
4237
  if (typedefs > 0) {
4228
4238
  note(
4229
4239
  TYPEDEF_NODES_CODE,
@@ -4738,6 +4748,8 @@ const JSON_LOSS = Object.freeze({
4738
4748
  OBOGRAPHS_ID_CHANGED: OBOGRAPHS_LOSS.ID_CHANGED,
4739
4749
  /** Obographs: a property_value's xsd datatype has no place in basicPropertyValues and reads back unset. */
4740
4750
  OBOGRAPHS_DATATYPE_DROPPED: OBOGRAPHS_LOSS.DATATYPE_DROPPED,
4751
+ /** Obographs: a graph without a node type column is written with CLASS nodes and reads back with a type column holding Term. */
4752
+ OBOGRAPHS_TYPE_GAINED: OBOGRAPHS_LOSS.TYPE_GAINED,
4741
4753
  /** Obographs: a node column outside the OBO vocabulary reads back inside the property_value column. */
4742
4754
  COLUMN_AS_PROPERTY_VALUE: OBOGRAPHS_SHARED_LOSS.COLUMN_AS_PROPERTY_VALUE,
4743
4755
  /** Obographs: an edge without a relation is written with the pred is_a. */
@@ -5934,4 +5946,4 @@ export {
5934
5946
  rankFormats as r,
5935
5947
  sniffFormat as s
5936
5948
  };
5937
- //# sourceMappingURL=exporter-BkkfMWGQ.js.map
5949
+ //# sourceMappingURL=exporter-LZTIAzkS.js.map