ts-graphviz 3.0.10 → 3.0.11

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # ts-graphviz
2
2
 
3
+ ## 3.0.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1797](https://github.com/ts-graphviz/ts-graphviz/pull/1797) [`d527f0d`](https://github.com/ts-graphviz/ts-graphviz/commit/d527f0ded9bd6f0a8fe38a47f6505aea98905989) Thanks [@kamiazya](https://github.com/kamiazya)! - More fields are read only from the objects that own them:
8
+
9
+ - `parse` passes its options to the generated parser in an object without a prototype.
10
+ - Graph and subgraph ids are printed and converted only when the AST node owns them.
11
+ - The model type guards (`isNodeModel`, `isForwardRefNode` and the others) read `$type` and `id` from the object or its classes only.
12
+ - The React components and hooks read their props from own properties.
13
+
14
+ - Updated dependencies [[`d527f0d`](https://github.com/ts-graphviz/ts-graphviz/commit/d527f0ded9bd6f0a8fe38a47f6505aea98905989)]:
15
+ - @ts-graphviz/adapter@3.0.10
16
+ - @ts-graphviz/ast@3.0.9
17
+ - @ts-graphviz/common@3.0.6
18
+ - @ts-graphviz/core@3.0.10
19
+
3
20
  ## 3.0.10
4
21
 
5
22
  ### Patch Changes
@@ -2,7 +2,7 @@ import { registerDefault as d } from "@ts-graphviz/core";
2
2
  export * from "@ts-graphviz/core";
3
3
  import { RootModelsContext as y, createModelsContext as h } from "@ts-graphviz/common";
4
4
  export * from "@ts-graphviz/common";
5
- import { parse as g, toModel as m, fromModel as b, stringify as w } from "@ts-graphviz/ast";
5
+ import { parse as b, toModel as g, fromModel as m, stringify as w } from "@ts-graphviz/ast";
6
6
  const M = new Proxy(
7
7
  Object.freeze({}),
8
8
  {
@@ -15,16 +15,16 @@ function p(e) {
15
15
  const o = Object.getOwnPropertyDescriptors(e);
16
16
  for (const r of Object.getOwnPropertyNames(o)) {
17
17
  const n = o[r];
18
- t[r] = "value" in n ? n.value : n.get?.call(e);
18
+ t[r] = Object.hasOwn(n, "value") ? n.value : n.get?.call(e);
19
19
  }
20
20
  }
21
21
  return t;
22
22
  }
23
23
  function D(e, t) {
24
- const o = p(t), r = g(e, o.parse);
24
+ const o = p(t), r = b(e, o.parse);
25
25
  if (Array.isArray(r) || r.type === "Attribute" || r.type === "AttributeList" || r.type === "Comment" || r.type === "NodeRef" || r.type === "NodeRefGroup" || r.type === "Literal")
26
26
  throw new Error();
27
- return m(r, o.convert);
27
+ return g(r, o.convert);
28
28
  }
29
29
  function a(e, t) {
30
30
  return (...o) => {
@@ -51,7 +51,7 @@ function z(e) {
51
51
  });
52
52
  }
53
53
  function G(e, t) {
54
- const { convert: o, print: r } = p(t), n = b(e, o);
54
+ const { convert: o, print: r } = p(t), n = m(e, o);
55
55
  return w(n, r);
56
56
  }
57
57
  d();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-graphviz",
3
- "version": "3.0.10",
3
+ "version": "3.0.11",
4
4
  "description": "Graphviz library for TypeScript",
5
5
  "keywords": [
6
6
  "graphviz",
@@ -45,10 +45,10 @@
45
45
  "./package.json": "./package.json"
46
46
  },
47
47
  "dependencies": {
48
- "@ts-graphviz/adapter": "^3.0.9",
49
- "@ts-graphviz/ast": "^3.0.8",
50
- "@ts-graphviz/common": "^3.0.5",
51
- "@ts-graphviz/core": "^3.0.9"
48
+ "@ts-graphviz/adapter": "^3.0.10",
49
+ "@ts-graphviz/ast": "^3.0.9",
50
+ "@ts-graphviz/common": "^3.0.6",
51
+ "@ts-graphviz/core": "^3.0.10"
52
52
  },
53
53
  "devDependencies": {
54
54
  "typescript": "^5.8.2",