From 3e9c94a3ea0b61ac2b2d7f979a0bcddfe7ac9e13 Mon Sep 17 00:00:00 2001 From: ding113 Date: Thu, 4 Jun 2026 19:56:01 +0800 Subject: [PATCH] fix(map): resolve GeoJSON namespace with geojson import and dev dep 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) --- package.json | 1 + src/components/ui/map.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/package.json b/package.json index 506c51648..530014dd0 100644 --- a/package.json +++ b/package.json @@ -126,6 +126,7 @@ "devDependencies": { "@biomejs/biome": "^2", "@tailwindcss/postcss": "^4.2.0", + "@types/geojson": "^7946.0.16", "@types/ioredis": "^5", "@types/node": "^25", "@types/pg": "^8", diff --git a/src/components/ui/map.tsx b/src/components/ui/map.tsx index 64581775d..fa4f25b54 100644 --- a/src/components/ui/map.tsx +++ b/src/components/ui/map.tsx @@ -1,5 +1,6 @@ "use client"; +import type * as GeoJSON from "geojson"; import { Loader2, Locate, Maximize, Minus, Plus, X } from "lucide-react"; import MapLibreGL, { type MarkerOptions, type PopupOptions } from "maplibre-gl"; import {