Conversation
The GeoJSON global namespace used in map.tsx came only from @types/geojson, a transitive dep of maplibre-gl. Since bun.lock is gitignored, CI runs a fresh non-frozen install where the ambient UMD global is no longer reliably picked up by tsgo, breaking 'Cannot find namespace GeoJSON' on the release pipeline. Add an explicit 'import type * as GeoJSON from "geojson"' so the namespace resolves via module resolution instead of the ambient global, and declare @types/geojson as a direct devDependency so the specifier always resolves. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 Walkthrough走查在 改动GeoJSON类型支持
代码审查工作量估计🎯 1 (Trivial) | ⏱️ ~3 分钟 可能相关的PR
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request adds the @types/geojson dependency to package.json and imports the GeoJSON type in src/components/ui/map.tsx. There are no review comments, and I have no feedback to provide.
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.
🧪 测试结果
总体结果: ✅ 所有测试通过 |
There was a problem hiding this comment.
Code Review Summary
No significant issues identified in this PR.
PR Size: XS
- Lines changed: 2
- Files changed: 2
Review Coverage
- Logic and correctness - Clean
- Security (OWASP Top 10) - Clean
- Error handling - Clean
- Type safety - Clean
- Documentation accuracy - Clean
- Test coverage - Adequate
- Code clarity - Good
Automated review by Codex AI
There was a problem hiding this comment.
Reviewed PR #1246 and posted the GitHub review summary.
- Applied the
size/XSlabel. - No validated issues met the reporting threshold after checking the diff and surrounding context.
- No inline comments were added because I didn’t find any high-confidence defects in the changed lines.
If you want, I can also help draft a small follow-up test for the GeoJSON import path.
问题
Release 流水线(
Auto Release Pipeline)在Install dependencies, type check, and format code步骤失败:失败 run: https://github.com/ding113/claude-code-hub/actions/runs/26948118648/job/79506098306
根因
src/components/ui/map.tsx使用了全局GeoJSON命名空间(GeoJSON.Point/GeoJSON.Feature/GeoJSON.FeatureCollection/GeoJSON.GeoJsonProperties)。@types/geojson,而它只是maplibre-gl的间接依赖(通过export as namespace GeoJSON提供 UMD 全局)。bun.lock被.gitignore忽略、未提交,因此 CI 每次都是全新的非冻结bun install。在maplibre-gl由 5.23 升到 5.24 等依赖变动后,全新安装下 tsgo(@typescript/native-preview)不再稳定地把@types/geojson的 UMD 全局自动纳入,导致找不到GeoJSON命名空间。node_modules+lockfile 全新bun install后,bun run typecheck报出与 CI 完全一致的 12 处错误。修复
src/components/ui/map.tsx:新增显式import type * as GeoJSON from "geojson";,让GeoJSON.*通过模块解析获取,不再依赖会被破坏的 ambient UMD 全局。无需改动 12 处使用点。package.json:将@types/geojson声明为直接devDependency,保证"geojson"specifier 在全新安装下始终可解析(不再依赖间接依赖的提升)。本地验证(与 CI 相同条件:删 node_modules + 无 lockfile 全新安装)
bun run typecheck(修复前复现 12 处报错,修复后通过)bun run buildCompiled successfullybun run test702 files / 6321 tests passed,13 skippedbun run lintbun run format:checkRelated
src/components/ui/map.tsxwhich introduced the maplibre-gl dependency and the GeoJSON namespace usage that breaks under fresh install.Description enhanced by Claude AI