From d9e49817426978537d95ab2c08c61fe5377f8544 Mon Sep 17 00:00:00 2001 From: Akbar Husain <43771058+akbar1214@users.noreply.github.com> Date: Thu, 20 Feb 2025 00:18:15 +0530 Subject: [PATCH] - Replaces dagre dependency with @dagrejs/dagre. (#37469) Signed-off-by: akbarhusainpatel Co-authored-by: akbarhusainpatel --- js/apps/admin-ui/package.json | 2 +- .../components/diagram/auto-layout.ts | 2 +- js/pnpm-lock.yaml | 56 +++++++++---------- 3 files changed, 29 insertions(+), 31 deletions(-) diff --git a/js/apps/admin-ui/package.json b/js/apps/admin-ui/package.json index 3521cd1b8c7..74f9e0a58d7 100644 --- a/js/apps/admin-ui/package.json +++ b/js/apps/admin-ui/package.json @@ -97,7 +97,7 @@ "@patternfly/react-table": "^5.4.14", "@uiw/react-textarea-code-editor": "^3.1.0", "admin-ui": "file:", - "dagre": "^0.8.5", + "@dagrejs/dagre": "^1.1.4", "file-saver": "^2.0.5", "flat": "^6.0.1", "i18next": "^24.2.2", diff --git a/js/apps/admin-ui/src/authentication/components/diagram/auto-layout.ts b/js/apps/admin-ui/src/authentication/components/diagram/auto-layout.ts index 6a144d675b2..28fcdf214de 100644 --- a/js/apps/admin-ui/src/authentication/components/diagram/auto-layout.ts +++ b/js/apps/admin-ui/src/authentication/components/diagram/auto-layout.ts @@ -1,4 +1,4 @@ -import { graphlib, layout } from "dagre"; +import { graphlib, layout } from "@dagrejs/dagre"; import { Edge, Node, Position } from "reactflow"; const dagreGraph = new graphlib.Graph(); diff --git a/js/pnpm-lock.yaml b/js/pnpm-lock.yaml index 6e71f03f022..8b09d4d2c82 100644 --- a/js/pnpm-lock.yaml +++ b/js/pnpm-lock.yaml @@ -150,6 +150,9 @@ importers: apps/admin-ui: dependencies: + '@dagrejs/dagre': + specifier: ^1.1.4 + version: 1.1.4 '@keycloak/keycloak-admin-client': specifier: workspace:* version: link:../../libs/keycloak-admin-client @@ -177,9 +180,6 @@ importers: admin-ui: specifier: 'file:' version: '@keycloak/keycloak-admin-ui@file:apps/admin-ui(@babel/runtime@7.26.7)(@types/react@18.3.18)(typescript@5.7.3)' - dagre: - specifier: ^0.8.5 - version: 0.8.5 file-saver: specifier: ^2.0.5 version: 2.0.5 @@ -733,6 +733,13 @@ packages: '@cypress/xvfb@1.2.4': resolution: {integrity: sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==} + '@dagrejs/dagre@1.1.4': + resolution: {integrity: sha512-QUTc54Cg/wvmlEUxB+uvoPVKFazM1H18kVHBQNmK2NbrDR5ihOCR6CXLnDSZzMcSQKJtabPUWridBOlJM3WkDg==} + + '@dagrejs/graphlib@2.2.4': + resolution: {integrity: sha512-mepCf/e9+SKYy1d02/UkvSy6+6MoyXhVxP8lLDfA7BPE1X1d4dR0sZznmbM8/XVJ1GPM+Svnx7Xj6ZweByWUkw==} + engines: {node: '>17.0.0'} + '@dependents/detective-less@5.0.1': resolution: {integrity: sha512-Y6+WUMsTFWE5jb20IFP4YGa5IrGY/+a/FbOSjDF/wz9gepU2hwCYSXRHP/vPwBvwcY3SVMASt4yXxbXNXigmZQ==} engines: {node: '>=18'} @@ -2553,9 +2560,6 @@ packages: resolution: {integrity: sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==} engines: {node: '>=12'} - dagre@0.8.5: - resolution: {integrity: sha512-/aTqmnRta7x7MCCpExk7HQL2O4owCT2h8NT//9I1OQ9vt29Pa0BzSAkR5lwFUcQ7491yVi/3CXU9jQ5o0Mn2Sw==} - dashdash@1.14.1: resolution: {integrity: sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==} engines: {node: '>=0.10'} @@ -3256,9 +3260,6 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - graphlib@2.1.8: - resolution: {integrity: sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==} - gunzip-maybe@1.4.2: resolution: {integrity: sha512-4haO1M4mLO91PW57BMsDFf75UmwoRX0GkdD+Faw+Lr+r/OZrOCS0pIBwOL1xCKQqnQzbNFGgK2V2CpBUPeFNTw==} hasBin: true @@ -5511,10 +5512,10 @@ snapshots: '@babel/helper-compilation-targets': 7.26.5 '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.8) '@babel/helpers': 7.26.7 - '@babel/parser': 7.26.8 + '@babel/parser': 7.26.9 '@babel/template': 7.26.8 '@babel/traverse': 7.26.8 - '@babel/types': 7.26.8 + '@babel/types': 7.26.9 '@types/gensync': 1.0.4 convert-source-map: 2.0.0 debug: 4.4.0(supports-color@8.1.1) @@ -5526,8 +5527,8 @@ snapshots: '@babel/generator@7.26.8': dependencies: - '@babel/parser': 7.26.8 - '@babel/types': 7.26.8 + '@babel/parser': 7.26.9 + '@babel/types': 7.26.9 '@jridgewell/gen-mapping': 0.3.8 '@jridgewell/trace-mapping': 0.3.25 jsesc: 3.1.0 @@ -5567,7 +5568,7 @@ snapshots: '@babel/helper-module-imports@7.25.9': dependencies: '@babel/traverse': 7.26.8 - '@babel/types': 7.26.8 + '@babel/types': 7.26.9 transitivePeerDependencies: - supports-color @@ -5611,7 +5612,7 @@ snapshots: '@babel/helpers@7.26.7': dependencies: '@babel/template': 7.26.8 - '@babel/types': 7.26.8 + '@babel/types': 7.26.9 '@babel/parser@7.26.8': dependencies: @@ -5641,16 +5642,16 @@ snapshots: '@babel/template@7.26.8': dependencies: '@babel/code-frame': 7.26.2 - '@babel/parser': 7.26.8 - '@babel/types': 7.26.8 + '@babel/parser': 7.26.9 + '@babel/types': 7.26.9 '@babel/traverse@7.26.8': dependencies: '@babel/code-frame': 7.26.2 '@babel/generator': 7.26.8 - '@babel/parser': 7.26.8 + '@babel/parser': 7.26.9 '@babel/template': 7.26.8 - '@babel/types': 7.26.8 + '@babel/types': 7.26.9 debug: 4.4.0(supports-color@8.1.1) globals: 11.12.0 transitivePeerDependencies: @@ -5721,6 +5722,12 @@ snapshots: transitivePeerDependencies: - supports-color + '@dagrejs/dagre@1.1.4': + dependencies: + '@dagrejs/graphlib': 2.2.4 + + '@dagrejs/graphlib@2.2.4': {} + '@dependents/detective-less@5.0.1': dependencies: gonzales-pe: 4.3.0 @@ -5978,6 +5985,7 @@ snapshots: '@keycloak/keycloak-admin-ui@file:apps/admin-ui(@babel/runtime@7.26.7)(@types/react@18.3.18)(typescript@5.7.3)': dependencies: + '@dagrejs/dagre': 1.1.4 '@keycloak/keycloak-admin-client': link:libs/keycloak-admin-client '@keycloak/keycloak-ui-shared': link:libs/ui-shared '@patternfly/patternfly': 5.4.2 @@ -5986,7 +5994,6 @@ snapshots: '@patternfly/react-styles': 5.4.1 '@patternfly/react-table': 5.4.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@uiw/react-textarea-code-editor': 3.1.0(@babel/runtime@7.26.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - dagre: 0.8.5 file-saver: 2.0.5 flat: 6.0.1 i18next: 24.2.2(typescript@5.7.3) @@ -7519,11 +7526,6 @@ snapshots: d3-selection: 3.0.0 d3-transition: 3.0.1(d3-selection@3.0.0) - dagre@0.8.5: - dependencies: - graphlib: 2.1.8 - lodash: 4.17.21 - dashdash@1.14.1: dependencies: assert-plus: 1.0.0 @@ -8439,10 +8441,6 @@ snapshots: graphemer@1.4.0: {} - graphlib@2.1.8: - dependencies: - lodash: 4.17.21 - gunzip-maybe@1.4.2: dependencies: browserify-zlib: 0.1.4