@mat3ra/wode 2026.4.9-0 → 2026.5.23-0

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 (2) hide show
  1. package/dist/js/utils.js +2 -7
  2. package/package.json +3 -3
package/dist/js/utils.js CHANGED
@@ -22,7 +22,6 @@ function setUnitsHead(units) {
22
22
  return units;
23
23
  }
24
24
 
25
- // TODO: fix setNextLinks on unit removal and convergence logic.
26
25
  /**
27
26
  * @summary Re-establishes the linked `next => flowchartId` logic in an array of units
28
27
  * @params units {Unit[]}
@@ -31,12 +30,8 @@ function setUnitsHead(units) {
31
30
  function setNextLinks(units) {
32
31
  const flowchartIds = units.map(u => u.flowchartId);
33
32
  for (let i = 0; i < units.length - 1; i++) {
34
- if (!units[i].next) {
35
- // newly added units don't have next set yet => set it
36
- units[i].next = units[i + 1].flowchartId;
37
- if (i > 0) units[i - 1].next = units[i].flowchartId;
38
- } else if (!flowchartIds.includes(units[i].next)) {
39
- // newly removed units may create broken next links => fix it
33
+ if (!units[i].next || !flowchartIds.includes(units[i].next)) {
34
+ // newly added units don't have next set yet, or removed units created broken links => fix it
40
35
  units[i].next = units[i + 1].flowchartId;
41
36
  }
42
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mat3ra/wode",
3
- "version": "2026.4.9-0",
3
+ "version": "2026.5.23-0",
4
4
  "description": "WOrkflow DEfinitions",
5
5
  "scripts": {
6
6
  "test": "nyc --reporter=text mocha --recursive --bail --require @babel/register/lib --require tests/js/setup.js tests/js",
@@ -47,7 +47,7 @@
47
47
  "v20": "^0.1.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@mat3ra/ade": "2026.3.4-0",
50
+ "@mat3ra/ade": "2026.4.29-0",
51
51
  "@exabyte-io/eslint-config": "2025.5.13-0",
52
52
  "@mat3ra/ide": "2025.11.19-0",
53
53
  "@mat3ra/mode": "2026.3.4-0",
@@ -55,7 +55,7 @@
55
55
  "@mat3ra/code": "2025.10.24-0",
56
56
  "@mat3ra/esse": "2026.4.4-0",
57
57
  "@mat3ra/made": "2025.7.15-0",
58
- "@mat3ra/standata": "2026.1.12-0",
58
+ "@mat3ra/standata": "^2026.5.15-0",
59
59
  "chai": "^4.3.4",
60
60
  "eslint": "7.32.0",
61
61
  "eslint-config-airbnb": "19.0.2",