Skip to content

chore: remove dead code in maps & legacy build#2874

Open
lzxue wants to merge 1 commit into
masterfrom
cleanup/dead-code
Open

chore: remove dead code in maps & legacy build#2874
lzxue wants to merge 1 commit into
masterfrom
cleanup/dead-code

Conversation

@lzxue

@lzxue lzxue commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

清理死代码(零行为变更)

上一轮包合并 (12→8) 后的走查中发现的零引用文件,纯删除,无新增代码。

maps: 删除零引用 theme.ts ×3

map/theme.tsmapbox/theme.tsearth/theme.tsutils/theme.ts 逐字节相同diff 全空),且全仓无任何 import

$ grep -rn "from './theme'" packages/maps/src
packages/maps/src/utils/BaseMapService.ts   # 唯一引用方
packages/maps/src/amap-next/map.ts          # 唯一引用方

maps: 删除 tdtmap 孤儿 logo.css

其余 6 个适配器的 map.ts 都有 import './logo.css',唯独 tdtmap/map.ts 没有,但目录里留有 logo.css —— 孤儿文件。

legacy: 删除旧 rollup 构建脚本

迁移到 father 之前的构建脚本(rollup.config.jsrollup.config.worker.jsrollup-plugin-glsl.jsrollup-plugin-inline-worker.jsrollup-plugin-miniapp.jsbundle.ts),全仓无引用。legacy/dev-docs/legacy/scripts/ 作为归档保留。

验证

  • @antv/l7-maps esm/cjs + umd 全部构建通过
  • es 产物仅保留被引用的 utils/theme.tsamap-next/theme.ts
  • tsceslint 通过

改动

10 files changed, 336 deletions(-)

- maps: 删除三份零引用的 theme.ts (map/, mapbox/, earth/,与 utils/theme.ts
  逐字节相同且无任何 import); 删除 tdtmap 孤儿 logo.css (无 map.ts 引用)
- legacy: 删除迁移到 father 之前的旧 rollup 构建脚本 (rollup.config*.js,
  rollup-plugin-*.js, bundle.ts),全仓无引用

构建验证: @antv/l7-maps esm/cjs (88 文件) + umd 全部通过
@changeset-bot

changeset-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 286d148

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request cleans up the codebase by removing several unused configuration files, Rollup plugins (such as glsl and inline-worker), build configurations, duplicate MapTheme definitions, and CSS styles. I have no feedback to provide as there are no review comments to evaluate.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant