Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use @antv/vendor to replace d3 package #6594

Merged
merged 7 commits into from
Jan 23, 2025
Merged

Conversation

BQXBQX
Copy link
Contributor

@BQXBQX BQXBQX commented Jan 22, 2025

Checklist
  • npm test passes
image
  • commit message follows commit guidelines
Description of change

Replace all d3 packages with the newly built @antv/vendor package (Completed the conversion of all src core code)

@BQXBQX BQXBQX changed the title feat: use @antv/vendor to replace d3 feat: use @antv/vendor to replace d3 package Jan 22, 2025
Copy link

Walkthrough

This pull request replaces all instances of d3 packages with the newly built @antv/vendor package across the entire codebase. This change affects multiple files, ensuring that all core source code now utilizes the @antv/vendor package instead of d3.

Changes

Files Summary
package.json Removed d3 dependencies and added @antv/vendor dependency.
src/animation/*.ts Replaced d3-shape imports with @antv/vendor/d3-shape.
src/component/*.ts Replaced d3-array and d3-format imports with @antv/vendor equivalents.
src/composition/*.ts Replaced d3-geo imports with @antv/vendor/d3-geo.
src/data/*.ts Replaced d3-array, d3-dsv imports with @antv/vendor equivalents.
src/interaction/*.ts Replaced d3-array imports with @antv/vendor/d3-array.
src/label-transform/*.ts Replaced d3-array imports with @antv/vendor/d3-array.
src/mark/*.ts Replaced d3-array imports with @antv/vendor/d3-array.
src/runtime/*.ts Replaced d3-array, d3-format imports with @antv/vendor equivalents.
src/shape/**/*.ts Replaced d3-shape, d3-path imports with @antv/vendor equivalents.
src/transform/*.ts Replaced d3-array imports with @antv/vendor/d3-array.
src/utils/*.ts Replaced d3-array, d3-path imports with @antv/vendor equivalents.

package.json Outdated Show resolved Hide resolved
@BQXBQX
Copy link
Contributor Author

BQXBQX commented Jan 22, 2025

build 的 ci 报错,我认为是 npm i 的问题 🤔,npm 装包会有依赖问题导致 jest transformIgnorePatterns 无法捕捉从而导致报错,本地使用 pnpm 时,单测全部正常。
image

src/data/fetch.ts Outdated Show resolved Hide resolved
src/spec/coordinate.ts Outdated Show resolved Hide resolved
src/transform/sample.ts Outdated Show resolved Hide resolved
@hustcc
Copy link
Member

hustcc commented Jan 23, 2025

另外,jest config 中也有 d3- 相关的内容,可以删除。也可以全局搜索一下 d3- 看看还有什么~

这个可以先忽略,我们优先年前发一个包。

package.json Show resolved Hide resolved
@hustcc hustcc merged commit dac27dd into antvis:v5 Jan 23, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants