From 959190ae604094b1f50283eeab061969edfdb320 Mon Sep 17 00:00:00 2001 From: hustcc Date: Thu, 23 Jan 2025 11:42:15 +0800 Subject: [PATCH] fix: replace d3 with @antv/vendor (#6741) --- packages/g6/__tests__/demos/case-why-do-cats.ts | 2 +- packages/g6/package.json | 1 + packages/site/examples/scene-case/default/demo/why-do-cats.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/g6/__tests__/demos/case-why-do-cats.ts b/packages/g6/__tests__/demos/case-why-do-cats.ts index 56438b01949..b5c556c856e 100644 --- a/packages/g6/__tests__/demos/case-why-do-cats.ts +++ b/packages/g6/__tests__/demos/case-why-do-cats.ts @@ -2,7 +2,7 @@ import { Renderer as CanvasRenderer } from '@antv/g-canvas'; import { Plugin as PluginRoughCanvasRenderer } from '@antv/g-plugin-rough-canvas-renderer'; import type { ComboData, GraphData, NodeData } from '@antv/g6'; import { BaseLayout, ExtensionCategory, Graph, register } from '@antv/g6'; -import { hierarchy, pack } from 'd3-hierarchy'; +import { hierarchy, pack } from '@antv/vendor/d3-hierarchy'; export const caseWhyDoCats: TestCase = async (context) => { const style = document.createElement('style'); diff --git a/packages/g6/package.json b/packages/g6/package.json index 3d233c4016e..41e6cbc675a 100644 --- a/packages/g6/package.json +++ b/packages/g6/package.json @@ -75,6 +75,7 @@ "@antv/g-webgl": "^2.0.36", "@antv/layout-gpu": "^1.1.7", "@antv/layout-wasm": "^1.4.2", + "@antv/vendor": "^1.0.3", "@types/hull.js": "^1.0.4", "@types/xmlserializer": "^0.6.6", "cross-env": "^7.0.3", diff --git a/packages/site/examples/scene-case/default/demo/why-do-cats.js b/packages/site/examples/scene-case/default/demo/why-do-cats.js index e168216039b..8e42368109c 100644 --- a/packages/site/examples/scene-case/default/demo/why-do-cats.js +++ b/packages/site/examples/scene-case/default/demo/why-do-cats.js @@ -2,7 +2,7 @@ import { Renderer as CanvasRenderer } from '@antv/g-canvas'; import { Plugin as PluginRoughCanvasRenderer } from '@antv/g-plugin-rough-canvas-renderer'; import { BaseLayout, ExtensionCategory, Graph, register } from '@antv/g6'; -import { hierarchy, pack } from 'd3-hierarchy'; +import { hierarchy, pack } from '@antv/vendor/d3-hierarchy'; const style = document.createElement('style'); style.innerHTML = `