Repository navigation
desktop: bump maplibre-gl to 6.4.1 and make the map work with it - #194
Conversation
Bumps [maplibre-gl](https://github.com/maplibre/maplibre-gl-js) from 5.24.1 to 6.4.1. - [Release notes](https://github.com/maplibre/maplibre-gl-js/releases) - [Changelog](https://github.com/maplibre/maplibre-gl-js/blob/main/CHANGELOG.md) - [Commits](maplibre/maplibre-gl-js@v5.24.1...v6.4.1) --- updated-dependencies: - dependency-name: maplibre-gl dependency-version: 6.4.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
maplibre-gl 6 is ESM-only with named exports, types its map events, and ships its worker as a separate module it expects to find next to its own file. Import the namespace, drop the now-unneeded error cast, and point the library at the worker Vite bundles; without that the map came up blank with no error. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PS44Q9xMXvq6eHJiMxeSUJ
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|


Requested by Kevin · project thread
Carries Dependabot's maplibre-gl 5.24.1 → 6.4.1 bump from #192, plus the code changes the desktop app needs for it. Merging this also closes #192, since it contains that commit.
On its own, #192 breaks the desktop app in three ways:
import maplibregl from "maplibre-gl"fails in bothnpm run checkandnpm run build.MapView.sveltenow imports the namespace.errorhandler's cast to{ error?: Error }no longer type-checks. The event is typed now, so the cast is removed.?worker&url, withworker.format: "es") and passes it tosetWorkerUrl.Verification
npm run check: 0 errors, 0 warnings.npm run build: succeeds, and the worker is emitted as its own asset.Not verified: the packaged Tauri app on each OS. The Desktop workflow on this PR builds those.
Generated by Claude Code
Note
Medium Risk
Major map library upgrade affects core map rendering; changes are localized to import/worker/Vite config but regressions are possible in the packaged Tauri build.
Overview
Bumps maplibre-gl from ^5.9.0 to ^6.4.1 (lockfile included) so the desktop app stays on the v6 line.
MapView.svelteadapts to v6’s ESM-only API: namespace import instead of default,setWorkerUrlwired to a Vite-bundled worker (?worker&url), and the maperrorhandler uses the library’s typed event (no manual cast).vite.config.tssetsworker: { format: "es" }so the maplibre worker module bundles correctly.Reviewed by Cursor Bugbot for commit 47c05cf. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit