Files
zzy 400f083a5e chore(前端): 删除已停用的旧 JS,模板只留 bundle + 5 个外部脚本
- static/js 删除 map.js / navigation.js / share.js / subscribe.js / src/core/geo.js
  (线上已切 dist/app.js;geo.js 的实现 bundle 内自带)
- 这 4 个旧文件移入 tests/fixtures/legacy-js 作为冻结快照:
  test_order_return.cjs / test_map_refresh.cjs / test_ring_all_frontend.py 仍在读它们,
  避免删代码同时丢断言;目录内 README 说明「不要改、改 src-ts 后同步」
- templates/map.html 去掉 geo.js 引用;MAP_ASSETS 同步
- static/js 现在只剩第三方与被引用的 5 个:
  qrcode.min.js / coordtransform.js / ui-motion.js / bike-clusters.js / settings-pages.js

验证:167 pytest(连跑 2 次)+ 32 node 全绿;浏览器实测 498 辆车、
页面只加载 6 个自有脚本、JS 异常 0
2026-11-16 11:52:34 +08:00

17 lines
841 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 冻结的旧版前端快照(仅测试用)
2026-11-16 前端从原生 JS 重写为 TypeScript(`src-ts/` + esbuild → `static/dist/app.js`),
这四个文件 **不再参与部署**,只作为两个 node 契约测试的输入:
| 测试 | 依赖 |
|---|---|
| `tests/test_order_return.cjs` | `map.js` / `navigation.js` / `share.js` / `subscribe.js` |
| `tests/test_map_refresh.cjs` | `map.js`(按标记切片执行) |
| `tests/test_ring_all_frontend.py` | `map.js`(断言请求头形状) |
## 规则
- **不要修改这里**:它们是冻结快照,改动不会影响线上。
- 需要改行为时改 `src-ts/` 对应模块,然后**同步更新快照**(否则测试断言的是旧行为)。
- 等新的 TS 版测试补齐(直接对 `src-ts` 或 `dist/app.js` 断言)后,这个目录可以整体删除。