@thi.ng/rstream-dot 3.0.76 → 3.0.78

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,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-05-08T18:24:32Z
3
+ - **Last updated**: 2024-06-29T09:28:36Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ### [3.0.77](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream-dot@3.0.77) (2024-06-21)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - enforce uniform naming convention of internal functions ([56992b2](https://github.com/thi-ng/umbrella/commit/56992b2))
17
+
12
18
  ### [3.0.65](https://github.com/thi-ng/umbrella/tree/@thi.ng/rstream-dot@3.0.65) (2024-03-18)
13
19
 
14
20
  #### ♻️ Refactoring
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  > [!NOTE]
10
- > This is one of 192 standalone projects, maintained as part
10
+ > This is one of 189 standalone projects, maintained as part
11
11
  > of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
12
12
  > and anti-framework.
13
13
  >
@@ -65,7 +65,7 @@ For Node.js REPL:
65
65
  const rsdot = await import("@thi.ng/rstream-dot");
66
66
  ```
67
67
 
68
- Package sizes (brotli'd, pre-treeshake): ESM: 802 bytes
68
+ Package sizes (brotli'd, pre-treeshake): ESM: 803 bytes
69
69
 
70
70
  ## Dependencies
71
71
 
package/index.js CHANGED
@@ -4,15 +4,15 @@ import { StreamSync } from "@thi.ng/rstream/sync";
4
4
  import { truncate } from "@thi.ng/strings/truncate";
5
5
  import { map } from "@thi.ng/transducers/map";
6
6
  export * from "./api.js";
7
- const getNodeType = (sub) => sub instanceof Stream ? "Stream" : sub instanceof StreamSync ? "StreamSync" : sub instanceof StreamMerge ? "StreamMerge" : void 0;
8
- const getChildren = (sub) => {
7
+ const __getNodeType = (sub) => sub instanceof Stream ? "Stream" : sub instanceof StreamSync ? "StreamSync" : sub instanceof StreamMerge ? "StreamMerge" : void 0;
8
+ const __getChildren = (sub) => {
9
9
  let children = [];
10
10
  if (sub.subs) children.push(...sub.subs);
11
11
  if (sub.__owner) children.push(sub.__owner);
12
- if (sub.wrapped) children.push(...getChildren(sub.wrapped));
12
+ if (sub.wrapped) children.push(...__getChildren(sub.wrapped));
13
13
  return children;
14
14
  };
15
- const dotNode = (s, opts) => {
15
+ const __dotNode = (s, opts) => {
16
16
  let res = `s${s.id}[label="`;
17
17
  res += s.type ? `${s.label}\\n(${s.type})` : `${s.label}`;
18
18
  if (s.body !== void 0) {
@@ -22,8 +22,8 @@ const dotNode = (s, opts) => {
22
22
  res += s.type && opts.color[s.type.toLowerCase()] || (s.label === "<noid>" ? opts.color.noid : opts.color.default);
23
23
  return res + `"];`;
24
24
  };
25
- const dotEdge = (a, b, _) => `s${a.id} -> s${b.id}${b.xform ? `[label="xform"]` : ""};`;
26
- const subValue = (sub) => {
25
+ const __dotEdge = (a, b, _) => `s${a.id} -> s${b.id}${b.xform ? `[label="xform"]` : ""};`;
26
+ const __subValue = (sub) => {
27
27
  const res = JSON.stringify(sub.deref ? sub.deref() : void 0);
28
28
  return res ? truncate(64, "...")(res) : res;
29
29
  };
@@ -36,13 +36,13 @@ const traverse = (subs, opts, state) => {
36
36
  const desc = {
37
37
  id,
38
38
  label: sub.id || "<noid>",
39
- type: getNodeType(sub),
39
+ type: __getNodeType(sub),
40
40
  xform: !!sub.xform,
41
- body: opts.values ? subValue(sub) : void 0
41
+ body: opts.values ? __subValue(sub) : void 0
42
42
  };
43
43
  state.subs.set(sub, desc);
44
44
  state.id++;
45
- const children = getChildren(sub);
45
+ const children = __getChildren(sub);
46
46
  if (children.length) {
47
47
  traverse(children, opts, state);
48
48
  for (let c of children) {
@@ -74,8 +74,8 @@ const toDot = (state, opts) => {
74
74
  `rankdir=${opts.dir};`,
75
75
  `node[fontname="${opts.font}",fontsize=${opts.fontsize},style=filled,fontcolor=${opts.text}];`,
76
76
  `edge[fontname="${opts.font}",fontsize=${opts.fontsize}];`,
77
- ...map((n) => dotNode(n, opts), state.subs.values()),
78
- ...map((r) => dotEdge(r[0], r[1], opts), state.rels),
77
+ ...map((n) => __dotNode(n, opts), state.subs.values()),
78
+ ...map((r) => __dotEdge(r[0], r[1], opts), state.rels),
79
79
  "}"
80
80
  ].join("\n");
81
81
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/rstream-dot",
3
- "version": "3.0.76",
3
+ "version": "3.0.78",
4
4
  "description": "Graphviz DOT conversion of @thi.ng/rstream dataflow graph topologies",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -10,7 +10,7 @@
10
10
  "type": "git",
11
11
  "url": "https://github.com/thi-ng/umbrella.git"
12
12
  },
13
- "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/rstream-dot#readme",
13
+ "homepage": "https://thi.ng/rstream-dot",
14
14
  "funding": [
15
15
  {
16
16
  "type": "github",
@@ -36,15 +36,15 @@
36
36
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
37
37
  },
38
38
  "dependencies": {
39
- "@thi.ng/rstream": "^8.5.0",
40
- "@thi.ng/strings": "^3.7.33",
41
- "@thi.ng/transducers": "^9.0.5"
39
+ "@thi.ng/rstream": "^8.5.2",
40
+ "@thi.ng/strings": "^3.7.35",
41
+ "@thi.ng/transducers": "^9.0.7"
42
42
  },
43
43
  "devDependencies": {
44
- "@microsoft/api-extractor": "^7.43.2",
45
- "esbuild": "^0.21.1",
44
+ "@microsoft/api-extractor": "^7.47.0",
45
+ "esbuild": "^0.21.5",
46
46
  "typedoc": "^0.25.13",
47
- "typescript": "^5.4.5"
47
+ "typescript": "^5.5.2"
48
48
  },
49
49
  "keywords": [
50
50
  "conversion",
@@ -86,5 +86,5 @@
86
86
  ],
87
87
  "year": 2018
88
88
  },
89
- "gitHead": "df34b4a9e650cc7323575356de207d78933bdcf3\n"
89
+ "gitHead": "7b950c112fba0b2e7c450765b15624c3382f1354\n"
90
90
  }