From 88d9c9f1a2a7f87d655ec74d0b310581197f654e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Oct 2026 01:44:20 +0000 Subject: [PATCH 1/2] Bump the production-dependencies group across 1 directory with 9 updates Bumps the production-dependencies group with 9 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@dagrejs/dagre](https://github.com/dagrejs/dagre) | `3.0.0` | `3.1.1` | | [@nanostores/react](https://github.com/nanostores/react) | `1.1.0` | `2.0.1` | | [@xyflow/react](https://github.com/xyflow/xyflow/tree/HEAD/packages/react) | `12.11.5` | `12.12.0` | | [nanostores](https://github.com/nanostores/nanostores) | `1.5.2` | `1.5.4` | | [query-string](https://github.com/sindresorhus/query-string) | `9.5.0` | `9.5.1` | | [react](https://github.com/react/react/tree/HEAD/packages/react) | `19.2.8` | `19.3.0` | | [react-dom](https://github.com/react/react/tree/HEAD/packages/react-dom) | `19.2.8` | `19.3.0` | | [react-hot-toast](https://github.com/timolins/react-hot-toast) | `2.6.0` | `2.6.1` | | [zod](https://github.com/colinhacks/zod) | `4.4.3` | `4.6.5` | Updates `@dagrejs/dagre` from 3.0.0 to 3.1.1 - [Release notes](https://github.com/dagrejs/dagre/releases) - [Changelog](https://github.com/dagrejs/dagre/blob/master/changelog.md) - [Commits](https://github.com/dagrejs/dagre/compare/v3.0.0...v3.1.1) Updates `@nanostores/react` from 1.1.0 to 2.0.1 - [Release notes](https://github.com/nanostores/react/releases) - [Changelog](https://github.com/nanostores/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/nanostores/react/compare/1.1.0...2.0.1) Updates `@xyflow/react` from 12.11.5 to 12.12.0 - [Release notes](https://github.com/xyflow/xyflow/releases) - [Changelog](https://github.com/xyflow/xyflow/blob/main/packages/react/CHANGELOG.md) - [Commits](https://github.com/xyflow/xyflow/commits/@xyflow/react@12.12.0/packages/react) Updates `nanostores` from 1.5.2 to 1.5.4 - [Release notes](https://github.com/nanostores/nanostores/releases) - [Changelog](https://github.com/nanostores/nanostores/blob/main/CHANGELOG.md) - [Commits](https://github.com/nanostores/nanostores/compare/1.5.2...1.5.4) Updates `query-string` from 9.5.0 to 9.5.1 - [Release notes](https://github.com/sindresorhus/query-string/releases) - [Commits](https://github.com/sindresorhus/query-string/compare/v9.5.0...v9.5.1) Updates `react` from 19.2.8 to 19.3.0 - [Release notes](https://github.com/react/react/releases) - [Changelog](https://github.com/react/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/react/react/commits/v19.3.0/packages/react) Updates `react-dom` from 19.2.8 to 19.3.0 - [Release notes](https://github.com/react/react/releases) - [Changelog](https://github.com/react/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/react/react/commits/v19.3.0/packages/react-dom) Updates `react-hot-toast` from 2.6.0 to 2.6.1 - [Release notes](https://github.com/timolins/react-hot-toast/releases) - [Commits](https://github.com/timolins/react-hot-toast/compare/v2.6.0...v2.6.1) Updates `zod` from 4.4.3 to 4.6.5 - [Release notes](https://github.com/colinhacks/zod/releases) - [Commits](https://github.com/colinhacks/zod/compare/v4.4.3...v4.6.5) --- updated-dependencies: - dependency-name: "@dagrejs/dagre" dependency-version: 3.1.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: "@nanostores/react" dependency-version: 2.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: production-dependencies - dependency-name: "@xyflow/react" dependency-version: 12.12.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: nanostores dependency-version: 1.5.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: query-string dependency-version: 9.5.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: react dependency-version: 19.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: react-dom dependency-version: 19.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: react-hot-toast dependency-version: 2.6.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: zod dependency-version: 4.6.5 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies ... Signed-off-by: dependabot[bot] --- package-lock.json | 140 +++++++++++++++++++++++++--------------------- package.json | 22 ++++---- 2 files changed, 86 insertions(+), 76 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0cce885e..e1172c3c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,25 +8,25 @@ "name": "river-ui-vite", "version": "0.0.0", "dependencies": { - "@dagrejs/dagre": "^3.0.0", + "@dagrejs/dagre": "^3.1.1", "@headlessui/react": "^2.2.10", "@heroicons/react": "^2.2.0", "@nanostores/persistent": "^1.3.5", - "@nanostores/react": "^1.1.0", + "@nanostores/react": "^2.0.1", "@tailwindcss/typography": "^0.5.20", "@tanstack/react-query": "^5.102.4", "@tanstack/react-router": "^1.170.32", - "@xyflow/react": "^12.11.5", + "@xyflow/react": "^12.12.0", "clsx": "^2.1.1", "date-fns": "^4.4.0", - "nanostores": "^1.5.2", + "nanostores": "^1.5.4", "next-themes": "^0.4.6", - "query-string": "^9.5.0", - "react": "^19.2.8", - "react-dom": "^19.2.8", - "react-hot-toast": "^2.6.0", + "query-string": "^9.5.1", + "react": "^19.3.0", + "react-dom": "^19.3.0", + "react-hot-toast": "^2.6.1", "react-time-sync": "^5.2.1", - "zod": "^4.4.3" + "zod": "^4.6.5" }, "devDependencies": { "@chromatic-com/storybook": "^5.3.1", @@ -48,8 +48,8 @@ "@testing-library/react": "^16.3.2", "@types/eslint__js": "^9.14.0", "@types/node": "^26.3.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.5", + "@types/react": "^19.3.0", + "@types/react-dom": "^19.3.0", "@vitejs/plugin-react-swc": "^4.3.3", "concurrently": "^10.0.5", "eslint": "^10.9.1", @@ -601,18 +601,18 @@ } }, "node_modules/@dagrejs/dagre": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@dagrejs/dagre/-/dagre-3.0.0.tgz", - "integrity": "sha512-ZzhnTy1rfuoew9Ez3EIw4L2znPGnYYhfn8vc9c4oB8iw6QAsszbiU0vRhlxWPFnmmNSFAkrYeF1PhM5m4lAN0Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@dagrejs/dagre/-/dagre-3.1.1.tgz", + "integrity": "sha512-zroZB1dFOFiGgv4Xcrn1DckB1o4aOikPqD2NDQPV0WM//CXGcS6xiD0rNkqHmw6FEg4tabt4nxPLwgCWT+Vb2A==", "license": "MIT", "dependencies": { - "@dagrejs/graphlib": "4.0.1" + "@dagrejs/graphlib": "4.0.5" } }, "node_modules/@dagrejs/graphlib": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@dagrejs/graphlib/-/graphlib-4.0.1.tgz", - "integrity": "sha512-IvcV6FduIIAmLwnH+yun+QtV36SC7mERqa86aClNqmMN09WhmPPYU8ckHrZBozErf+UvHPWOTJYaGYiIcs0DgA==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@dagrejs/graphlib/-/graphlib-4.0.5.tgz", + "integrity": "sha512-7xrBTqIts3o+PMUZX97wSc+7TUbW+/rULzGNCTP6yooNVDXbzw4Wutg/H/xOutTB/c/k0YqOAavgPh4/Zk9PFA==", "license": "MIT" }, "node_modules/@emnapi/core": { @@ -1534,9 +1534,9 @@ } }, "node_modules/@nanostores/react": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@nanostores/react/-/react-1.1.0.tgz", - "integrity": "sha512-MbH35fjhcf7LAubYX5vhOChYUfTLzNLqH/mBGLVsHkcvjy0F8crO1WQwdmQ2xKbAmtpalDa2zBt3Hlg5kqr8iw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@nanostores/react/-/react-2.0.1.tgz", + "integrity": "sha512-txbZTd+7/hnO7FhtF8Pmr+cu0ThdCuCnOyEEh0DsEM2Hp9PfOa5EY4uj3wpZpypSzp5BuqDgf2AxVAKoUIWOFQ==", "funding": [ { "type": "github", @@ -1545,7 +1545,7 @@ ], "license": "MIT", "engines": { - "node": "^20.0.0 || >=22.0.0" + "node": "^22.0.0 || ^24.0.0 || >=26.0.0" }, "peerDependencies": { "nanostores": "^1.2.0", @@ -4217,9 +4217,9 @@ } }, "node_modules/@types/d3-selection": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.11.tgz", - "integrity": "sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==", + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.12.tgz", + "integrity": "sha512-Qe/KWYhEiIIxGs7HrAAjMfShxKldx19SJtr5zu53f3afPsdZNz7HHtdTLXo/kqeiWNXVycI24kSnfzBYkTzpgw==", "license": "MIT" }, "node_modules/@types/d3-transition": { @@ -4232,9 +4232,9 @@ } }, "node_modules/@types/d3-zoom": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-3.0.8.tgz", - "integrity": "sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-3.0.9.tgz", + "integrity": "sha512-0sE1406XBYJGiqD3AusTl9ZqC//2mIXix51tbom25gDCA8ri4xnSZg28CaSE8Srl6FClqABUKfsn0qghgdepMA==", "license": "MIT", "dependencies": { "@types/d3-interpolate": "*", @@ -4305,9 +4305,9 @@ } }, "node_modules/@types/react": { - "version": "19.2.18", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.18.tgz", - "integrity": "sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.0.tgz", + "integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==", "devOptional": true, "license": "MIT", "dependencies": { @@ -4315,13 +4315,13 @@ } }, "node_modules/@types/react-dom": { - "version": "19.2.5", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.5.tgz", - "integrity": "sha512-fMPwH9v7r/pp43yUd2/Mbiex5KouJwwR3dzHkhLREUC6764VyDsqxhAxv6OFEYR1RhjOyD1naqba8ECDBe7ZQg==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.3.0.tgz", + "integrity": "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q==", "devOptional": true, "license": "MIT", "peerDependencies": { - "@types/react": "^19.2.0" + "@types/react": "^19.3.0" } }, "node_modules/@types/resolve": { @@ -4819,12 +4819,12 @@ "license": "MIT" }, "node_modules/@xyflow/react": { - "version": "12.11.5", - "resolved": "https://registry.npmjs.org/@xyflow/react/-/react-12.11.5.tgz", - "integrity": "sha512-QqoryGkqEhWBuQN9bZWRKhwr3Uoj9lCGj/tg0NnIWHHEOXV+5c8cYsc7Q9TST63V92lHqcNV9P5cjvJ9ZAmblQ==", + "version": "12.12.0", + "resolved": "https://registry.npmjs.org/@xyflow/react/-/react-12.12.0.tgz", + "integrity": "sha512-74oXI0Rgm1Eu33cHQAd74J6oVgCH9mbFyTVQbsGgp2kmWwh0HdtBr2VP04z8mbPD+M/xO69nqG5dDEt7/EN2rQ==", "license": "MIT", "dependencies": { - "@xyflow/system": "0.0.81", + "@xyflow/system": "0.0.83", "classcat": "^5.0.3", "zustand": "^4.4.0" }, @@ -4844,9 +4844,9 @@ } }, "node_modules/@xyflow/system": { - "version": "0.0.81", - "resolved": "https://registry.npmjs.org/@xyflow/system/-/system-0.0.81.tgz", - "integrity": "sha512-hfbafW4i7uLq7ILok8QWFFm4KMFw22lbZNJHKfHOMSOOoCk5e5m8yfr84UV9NaJajmogWaLVnp2XFU9JQejlqg==", + "version": "0.0.83", + "resolved": "https://registry.npmjs.org/@xyflow/system/-/system-0.0.83.tgz", + "integrity": "sha512-a//eDjez3WZF47aaPTfVUDD0OINOq+WVwBZCRTqG+m0a5euX8EwlJ4jMY1Wxz0Ocj4xOeekJ70V22Pq0ll8RJw==", "license": "MIT", "dependencies": { "@types/d3-drag": "^3.0.7", @@ -6973,9 +6973,9 @@ } }, "node_modules/nanostores": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/nanostores/-/nanostores-1.5.2.tgz", - "integrity": "sha512-B0UbxzK1s0CN8Xht6r+7iT5+xV8PTaRERR1nATeplRv1Rw5YLWfVAid0hkqY3EceqpG4RjTk8GAwIxQY39Rnwg==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/nanostores/-/nanostores-1.5.4.tgz", + "integrity": "sha512-4UXY7OAJEK0Y6V3SudBU7cXjAzTDc189R78dDOh0Xbm19gpKYto6WizSg58LJf12lTsRxKSLGyE117OiLpM4DQ==", "funding": [ { "type": "github", @@ -7483,9 +7483,9 @@ } }, "node_modules/query-string": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-9.5.0.tgz", - "integrity": "sha512-YlJmwNyi0RGYjlxYcuDncMsxFU7YyutbuI7gTm8ySxIGBlwx5yiBCOD5ig9ZNoHkawk/1Dey0N5mEfcUybMVAA==", + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-9.5.1.tgz", + "integrity": "sha512-/zO3RwuRCMTIcEgq6YMv4OrtEE1XzBG7w5N6zc6ydYnkWYOWsnLI/5894hYEzfESfMOT4cHCsRTIdxsSl1KjGg==", "license": "MIT", "dependencies": { "decode-uri-component": "^0.5.0", @@ -7500,9 +7500,9 @@ } }, "node_modules/react": { - "version": "19.2.8", - "resolved": "https://registry.npmjs.org/react/-/react-19.2.8.tgz", - "integrity": "sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.3.0.tgz", + "integrity": "sha512-E8LUcbtBWt20bbl2YoHfx4ZDBdxVTfOKtCZn9cDSJ4l6/nuoApcpIBcj47t2wZoVX8g2ZHuMHbiShgCR1T5Sog==", "license": "MIT", "engines": { "node": ">=0.10.0" @@ -7541,21 +7541,21 @@ } }, "node_modules/react-dom": { - "version": "19.2.8", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.8.tgz", - "integrity": "sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.3.0.tgz", + "integrity": "sha512-JDk8dgif51OjFoDE70+OT9ICyYr+69HlmihNwp1+Nsfbna3t5sIiCa9ZJktDmQ4/1b/rn26hIAR2uYXDMr5r0Q==", "license": "MIT", "dependencies": { - "scheduler": "^0.27.0" + "scheduler": "^0.28.0" }, "peerDependencies": { - "react": "^19.2.8" + "react": "^19.3.0" } }, "node_modules/react-hot-toast": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/react-hot-toast/-/react-hot-toast-2.6.0.tgz", - "integrity": "sha512-bH+2EBMZ4sdyou/DPrfgIouFpcRLCJ+HoCA32UoAYHn6T3Ur5yfcDCeSr5mwldl6pFOsiocmrXMuoCJ1vV8bWg==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/react-hot-toast/-/react-hot-toast-2.6.1.tgz", + "integrity": "sha512-gjFsf05dxcku0FkyMtFH+XmYFdA2odXfBVknEr/IZ+XpUjwsgvtY2616sOpUynK+l9ykQDRNpaJ1hYfuximUiA==", "license": "MIT", "dependencies": { "csstype": "^3.1.3", @@ -7565,8 +7565,18 @@ "node": ">=10" }, "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", "react": ">=16", "react-dom": ">=16" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } } }, "node_modules/react-is": { @@ -7747,9 +7757,9 @@ } }, "node_modules/scheduler": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", - "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.28.0.tgz", + "integrity": "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==", "license": "MIT" }, "node_modules/semver": { @@ -9172,9 +9182,9 @@ } }, "node_modules/zod": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz", - "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==", + "version": "4.6.5", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.5.tgz", + "integrity": "sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" diff --git a/package.json b/package.json index beeeda11..38cce1b8 100644 --- a/package.json +++ b/package.json @@ -8,25 +8,25 @@ "npm": ">=11.10.0" }, "dependencies": { - "@dagrejs/dagre": "^3.0.0", + "@dagrejs/dagre": "^3.1.1", "@headlessui/react": "^2.2.10", "@heroicons/react": "^2.2.0", "@nanostores/persistent": "^1.3.5", - "@nanostores/react": "^1.1.0", + "@nanostores/react": "^2.0.1", "@tailwindcss/typography": "^0.5.20", "@tanstack/react-query": "^5.102.4", "@tanstack/react-router": "^1.170.32", - "@xyflow/react": "^12.11.5", + "@xyflow/react": "^12.12.0", "clsx": "^2.1.1", "date-fns": "^4.4.0", - "nanostores": "^1.5.2", + "nanostores": "^1.5.4", "next-themes": "^0.4.6", - "query-string": "^9.5.0", - "react": "^19.2.8", - "react-dom": "^19.2.8", - "react-hot-toast": "^2.6.0", + "query-string": "^9.5.1", + "react": "^19.3.0", + "react-dom": "^19.3.0", + "react-hot-toast": "^2.6.1", "react-time-sync": "^5.2.1", - "zod": "^4.4.3" + "zod": "^4.6.5" }, "devDependencies": { "@chromatic-com/storybook": "^5.3.1", @@ -48,8 +48,8 @@ "@testing-library/react": "^16.3.2", "@types/eslint__js": "^9.14.0", "@types/node": "^26.3.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.5", + "@types/react": "^19.3.0", + "@types/react-dom": "^19.3.0", "@vitejs/plugin-react-swc": "^4.3.3", "concurrently": "^10.0.5", "eslint": "^10.9.1", From 56b02f3d76bbaf2f2409d7adb62d847348ca8e19 Mon Sep 17 00:00:00 2001 From: Blake Gentry Date: Wed, 7 Oct 2026 21:19:00 -0500 Subject: [PATCH 2/2] resolve Dagre through its package exports Dagre 3.1 renames its CommonJS bundle, so the absolute Vite alias prevents production builds from resolving workflow layouts. Remove the Dagre v2 workaround and use the package's supported ESM export. Cover fork-and-join node placement and edge routes to keep workflow layouts checked as Dagre evolves. --- CHANGELOG.md | 4 ++ .../workflowDiagramGraphModel.test.ts | 53 ++++++++++++++++++- vite.config.ts | 9 ---- 3 files changed, 56 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3a82adb..86690293 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Keep workflow diagram layouts compatible with Dagre's package exports after dependency upgrades. [PR #687](https://github.com/riverqueue/riverui/pull/687). + ## [v0.21.0] - 2026-10-07 ### Changed diff --git a/src/components/workflow-diagram/workflowDiagramGraphModel.test.ts b/src/components/workflow-diagram/workflowDiagramGraphModel.test.ts index 92987049..de1b3d0f 100644 --- a/src/components/workflow-diagram/workflowDiagramGraphModel.test.ts +++ b/src/components/workflow-diagram/workflowDiagramGraphModel.test.ts @@ -2,12 +2,24 @@ import { JobState } from "@services/types"; import { workflowJobFactory } from "@test/factories/workflowJob"; import { describe, expect, it } from "vitest"; -import { switchHandleCenterGap } from "./workflowDiagramConstants"; +import { + nodeHeight, + nodeWidth, + switchHandleCenterGap, +} from "./workflowDiagramConstants"; import { buildWorkflowGraphModel, depStatusFromJob, } from "./workflowDiagramGraphModel"; +const isFinitePoint = (point: unknown): boolean => + point !== null && + typeof point === "object" && + "x" in point && + "y" in point && + Number.isFinite(point.x) && + Number.isFinite(point.y); + const targetAnchorOffsetX = (edgeData: unknown): number | undefined => { if (!edgeData || typeof edgeData !== "object") return undefined; const value = (edgeData as { targetAnchorOffsetX?: unknown }) @@ -36,6 +48,45 @@ describe("buildWorkflowGraphModel", () => { ]); }); + it("lays out a fork and join with Dagre node positions and edge routes", () => { + const tasks = [ + workflowJobFactory.build({ id: 1, task: "start" }), + workflowJobFactory.build({ deps: ["start"], id: 2, task: "branch-a" }), + workflowJobFactory.build({ deps: ["start"], id: 3, task: "branch-b" }), + workflowJobFactory.build({ + deps: ["branch-a", "branch-b"], + id: 4, + task: "join", + }), + ]; + + const model = buildWorkflowGraphModel(tasks); + const [start, branchA, branchB, join] = model.nodes; + + expect(model.nodes).toHaveLength(4); + for (const node of model.nodes) { + expect(Number.isFinite(node.position.x)).toBe(true); + expect(Number.isFinite(node.position.y)).toBe(true); + expect(node.sourcePosition).toBe("right"); + expect(node.targetPosition).toBe("left"); + } + for (const branch of [branchA, branchB]) { + expect(branch.position.x).toBeGreaterThan(start.position.x + nodeWidth); + expect(join.position.x).toBeGreaterThan(branch.position.x + nodeWidth); + } + expect(Math.abs(branchA.position.y - branchB.position.y)).toBeGreaterThan( + nodeHeight, + ); + expect(model.edges).toHaveLength(4); + for (const edge of model.edges) { + const points: unknown = edge.data?.dagrePoints; + if (!Array.isArray(points)) + throw new Error("Expected a Dagre edge route"); + expect(points.length).toBeGreaterThanOrEqual(2); + expect(points.every(isFinitePoint)).toBe(true); + } + }); + it("maps job states to dependency statuses", () => { expect( depStatusFromJob( diff --git a/vite.config.ts b/vite.config.ts index 08c9d4aa..bf6ba43e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,14 +1,8 @@ import tailwindcss from "@tailwindcss/vite"; import { tanstackRouter } from "@tanstack/router-plugin/vite"; import react from "@vitejs/plugin-react-swc"; -import path from "node:path"; import { defineConfig } from "vite"; -const dagreCjsPath = path.resolve( - process.cwd(), - "node_modules/@dagrejs/dagre/dist/dagre.cjs.js", -); - // https://vitejs.dev/config/ export default defineConfig({ base: "", @@ -50,9 +44,6 @@ export default defineConfig({ }), ], resolve: { - alias: { - "@dagrejs/dagre": dagreCjsPath, - }, tsconfigPaths: true, }, });