diff --git a/.github/workflows/build-lint-test.yml b/.github/workflows/build-lint-test.yml index 891a0b50..e2799235 100644 --- a/.github/workflows/build-lint-test.yml +++ b/.github/workflows/build-lint-test.yml @@ -16,7 +16,7 @@ jobs: fi - uses: actions/setup-node@v1 with: - node-version: '14' + node-version: '18' - uses: actions/cache@v2 id: yarn-cache name: Cache npm deps @@ -62,7 +62,7 @@ jobs: fi - uses: actions/setup-node@v1 with: - node-version: '14' + node-version: '18' - uses: actions/cache@v2 id: yarn-cache name: Cache npm deps @@ -99,7 +99,7 @@ jobs: fi - uses: actions/setup-node@v1 with: - node-version: '14' + node-version: '18' - uses: actions/cache@v2 id: yarn-cache name: Cache npm deps @@ -149,7 +149,7 @@ jobs: fi - uses: actions/setup-node@v1 with: - node-version: '14' + node-version: '18' - uses: actions/cache@v2 id: yarn-cache name: Cache npm deps diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9eee7418..a9cce233 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: if: steps.setup-cache.outputs.cache-hit != 'true' - uses: actions/setup-node@v1 with: - node-version: '14' + node-version: '18' - uses: actions/cache@v2 id: yarn-cache name: Cache npm deps diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index 16a11290..ee24861e 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -23,7 +23,7 @@ jobs: # Injected by generate-workflows.js - uses: actions/setup-node@v1 with: - node-version: '16' + node-version: '18' - uses: actions/cache@v2 id: yarn-cache name: Load npm deps from cache diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml index 60134a48..78e06282 100644 --- a/.github/workflows/promote.yml +++ b/.github/workflows/promote.yml @@ -2,7 +2,7 @@ name: promote on: push: # Sequence of patterns matched against refs/tags - tags: + tags: - v5.* jobs: build-and-promote: @@ -17,7 +17,7 @@ jobs: run: yarn install --frozen-lockfile && yarn build - uses: actions/setup-node@v3 with: - node-version: '16.x' + node-version: '18' registry-url: 'https://registry.npmjs.org' - name: GitHub Tag Name example run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index be3a9bcd..f2c79dd7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: '14' + node-version: '18' - uses: actions/cache@v2 id: yarn-cache name: Cache npm deps diff --git a/packages/module/package.json b/packages/module/package.json index 3a36eb34..d30846f2 100644 --- a/packages/module/package.json +++ b/packages/module/package.json @@ -38,10 +38,9 @@ "@patternfly/react-styles": "^5.1.1", "@types/d3": "^7.4.0", "@types/d3-force": "^1.2.1", - "@types/dagre": "0.7.42", "@types/react-measure": "^2.0.6", "d3": "^7.8.0", - "dagre": "0.8.2", + "@dagrejs/dagre": "1.1.2", "mobx": "^6.9.0", "mobx-react": "^7.6.0", "point-in-svg-path": "^1.0.1", diff --git a/packages/module/src/components/VisualizationSurface.tsx b/packages/module/src/components/VisualizationSurface.tsx index 7d26de8e..25431e08 100644 --- a/packages/module/src/components/VisualizationSurface.tsx +++ b/packages/module/src/components/VisualizationSurface.tsx @@ -28,7 +28,7 @@ const VisualizationSurface: React.FunctionComponent = state }: VisualizationSurfaceProps) => { const controller = useVisualizationController(); - const timerId = React.useRef(); + const timerId = React.useRef(); const debounceMeasure = React.useCallback((func: (contentRect: ContentRect) => void, delay?: number) => { return (contentRect: ContentRect) => { diff --git a/packages/module/src/layouts/DagreGroupsLayout.ts b/packages/module/src/layouts/DagreGroupsLayout.ts index 4f76edbc..261589b6 100644 --- a/packages/module/src/layouts/DagreGroupsLayout.ts +++ b/packages/module/src/layouts/DagreGroupsLayout.ts @@ -1,4 +1,4 @@ -import * as dagre from 'dagre'; +import * as dagre from '@dagrejs/dagre'; import { Edge, Graph, GRAPH_LAYOUT_END_EVENT, Layout, Node } from '../types'; import { BaseLayout, LAYOUT_DEFAULTS } from './BaseLayout'; import { LayoutLink } from './LayoutLink'; diff --git a/packages/module/src/layouts/DagreLayout.ts b/packages/module/src/layouts/DagreLayout.ts index 44546a89..bc9201ce 100644 --- a/packages/module/src/layouts/DagreLayout.ts +++ b/packages/module/src/layouts/DagreLayout.ts @@ -1,4 +1,4 @@ -import * as dagre from 'dagre'; +import * as dagre from '@dagrejs/dagre'; import { Edge, Graph, GRAPH_LAYOUT_END_EVENT, Layout, Node } from '../types'; import { BaseLayout, LAYOUT_DEFAULTS } from './BaseLayout'; import { LayoutOptions } from './LayoutOptions'; diff --git a/packages/module/src/layouts/DagreNode.ts b/packages/module/src/layouts/DagreNode.ts index 6a92887c..ae9b347d 100644 --- a/packages/module/src/layouts/DagreNode.ts +++ b/packages/module/src/layouts/DagreNode.ts @@ -1,8 +1,8 @@ +import * as dagre from '@dagrejs/dagre'; import { LayoutNode } from './LayoutNode'; export class DagreNode extends LayoutNode implements dagre.Node { getUpdatableNode(): dagre.Node { return { - id: this.id, width: this.width, height: this.height, x: this.x, diff --git a/yarn.lock b/yarn.lock index b51b7246..7d6bf9e5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1390,6 +1390,18 @@ resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@dagrejs/dagre@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@dagrejs/dagre/-/dagre-1.1.2.tgz#5ec339979447091f48d2144deed8c70dfadae374" + integrity sha512-F09dphqvHsbe/6C2t2unbmpr5q41BNPEfJCdn8Z7aEBpVSy/zFQ/b4SWsweQjWNsYMDvE2ffNUN8X0CeFsEGNw== + dependencies: + "@dagrejs/graphlib" "2.2.2" + +"@dagrejs/graphlib@2.2.2": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@dagrejs/graphlib/-/graphlib-2.2.2.tgz#74154d5cb880a23b4fae71034a09b4b5aef06feb" + integrity sha512-CbyGpCDKsiTg/wuk79S7Muoj8mghDGAESWGxcSyhHX5jD35vYMBZochYVFzlHxynpE9unpu6O+4ZuhrLxASsOg== + "@discoveryjs/json-ext@0.5.7", "@discoveryjs/json-ext@^0.5.0": version "0.5.7" resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" @@ -2410,11 +2422,6 @@ "@types/d3-transition" "*" "@types/d3-zoom" "*" -"@types/dagre@0.7.42": - version "0.7.42" - resolved "https://registry.npmjs.org/@types/dagre/-/dagre-0.7.42.tgz" - integrity sha512-knVdi1Ul8xYgJ0wdhQ+/2YGJFKJFa/5srcPII9zvOs4KhsHfpnFrSTQXATYmjslglxRMif3Lg+wEZ0beag+94A== - "@types/eslint-scope@^3.7.3": version "3.7.4" resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16" @@ -5201,14 +5208,6 @@ d3@^7.8.0: d3-transition "3" d3-zoom "3" -dagre@0.8.2: - version "0.8.2" - resolved "https://registry.npmjs.org/dagre/-/dagre-0.8.2.tgz" - integrity sha512-TEOOGZOkCOgCG7AoUIq64sJ3d21SMv8tyoqteLpX+UsUsS9Qw8iap4hhogXY4oB3r0bbZuAjO0atAilgCmsE0Q== - dependencies: - graphlib "^2.1.5" - lodash "^4.17.4" - damerau-levenshtein@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz#b43d286ccbd36bc5b2f7ed41caf2d0aba1f8a6e7" @@ -7277,13 +7276,6 @@ grapheme-splitter@^1.0.4: resolved "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz" integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== -graphlib@^2.1.5: - version "2.1.8" - resolved "https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz" - integrity sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A== - dependencies: - lodash "^4.17.15" - gzip-size@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-6.0.0.tgz#065367fd50c239c0671cbcbad5be3e2eeb10e462" @@ -9288,7 +9280,7 @@ lodash.throttle@^4.1.1: resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4" integrity sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ== -lodash@^4.17.12, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.17.5: +lodash@^4.17.12, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.5: version "4.17.21" resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==